Como conecto meu \optdetector e \optbox usando as fibras/fios do pacote pst-optexp?

Como conecto meu \optdetector e \optbox usando as fibras/fios do pacote pst-optexp?

Passei hoje trabalhando e aprendendo mais sobre o pacote pst-optexp. Até agora, consegui resolver todos os problemas que encontrei ao usá-lo.

Mas ofinalparte do desenho é algo que não consigo consertar no momento, toda vez outra parte do desenho desaparece ou é desenhada incorretamente. Quero conectar meu APD \optdetector com meu receptor \optbox usando um fio ou fibra.

Estou usando o Overleaf e o compilador LaTeX normal, pois percebi que nem o XeLaTeX nem o LuaLaTeX funcionavam com esses pacotes.

O que notei é que toda vez ele começa a dar erros que dizem: 'overfull \hbox (xxxpt muito largo) no parágrafo nas linhas xx-xx' onde essas são as últimas linhas do documento.

Aqui está meu desenho, se isso ajudar: Configuração atual

E finalmente, meu código:

\documentclass[11pt]{article}
\usepackage{pst-all}
\usepackage{pst-optexp}
\usepackage{xkeyval}
\usepackage{nicefrac}
\begin{document}

\psset{unit=1}
\begin{pspicture}[showgrid](13,9)
\pnode(6,2.5){BoxUp}

% Beam coordinates
\pnode(2,5){GreenEnd}
\pnode(6,1.5){GreenStart}
\pnode(GreenEnd){RedStart}
\pnode(11,2){RedEnd}

% Mirror coordinates
\pnodes(5,5){Ldc}(6,5){Mdc}(6,4){Bdc}
\pnodes(8,5){Lfm}(9,5){Mfm}(9,4){Bfm}
\pnodes(9,4){Um1}(9,2){Mm1}(10,2){Rm1}

% Lens coordinates
\pnodes(4,5){LPos}(2,5){LFoc}

%Laser Diode
\optbox[position=start, compname=box](3,-1)(3,-1){Laser Diode}

% Fiber
\optfiber[fiberloopradius=0.2,
linecolor=green,label=0.3,compname=ssmf](3,-1)(5,-1){SSMF}

% Draw laser box
\optbox[position=start, labeloffset=0, labelref=relative, compname=LO](GreenStart)(BoxUp){Laser}

% Draw ND filter
\optfilter[fiber=none,allowbeaminside=false,compname=nd,
labelref=relative,labeloffset=-1](6,2.5)(6,3.5){ND-Filter}

% Draw CMOS Camera
\optbox[position=end, labeloffset=0](RedEnd)(11,2){CMOS}

% Attempt 1 for receiver
\optbox[position=end, labeloffset=0,compname=apdrec](9.6,8)(9.6,8){Receiver}

% Draw semitransparent mirror
\mirror[mirrortype=semitrans,compname=dc](Ldc)(Mdc)(Bdc){DC}

% Draw the focusing objective
\lens[abspos=0,lensradius=2,lenswidth=1.5,
lensheight=0.75,compname=lens1](LPos)(LFoc){x40 Focusing objective}
\addtopsstyle{Beam}{opacity=0.1}

% Draw the green laser beam
\drawwidebeam[beamwidth=0.4,opacity=0.4,
fillstyle=solid,fillcolor=green](GreenStart){nd}{dc}{lens1}(GreenEnd)

% Draw the flip mirror
\mirror[labelangle=45,compname=fm](Lfm)(Mfm)(Bfm){Flip Mirror}

% Edge Filter
\optfilter[filtertype=bandstop,compname=ef,labelref=relative](9,4)(9,3){Edge Filter}

% Mirror to CMOS
\mirror[labelangle=45,compname=m1](Um1)(Mm1)(Rm1)

% Draw the red laser beam
\drawwidebeam[beamwidth=0.2,opacity=0.6,fillstyle=solid, fillcolor=red,linestyle=none](RedStart){dc}{fm}{ef}{m1}(RedEnd)

% Draw the NV-Centers
\crystal[crystalheight=2, crystalwidth=1,labelangle=0,labeloffset=-1.3](2,5)(1,5){NV-Centers}

% Connect ssmf and laser output
\drawfiber[linecolor=green,fiberstyle=angle,linearc=0.5]{ssmf}{LO}

% Draw ramp generator
\elecsynthesizer[synthshape=rectangle,synthsize=2 1,
synthtype=sawtooth,compname=rg,labelref=relative](6,8)(5,8){Ramp Generator}

% Draw MW-source
\optbarcomp[fiber,compname=mw](5,8)(3,8){MW-Generator}

% Connect Rampgenerator with MW-source
\drawfiber[linecolor=black]{rg}{mw}

% Connect MW-source with MW-antenna
\drawfiber[linecolor=black,fiberstyle=angle,linearc=0.5]{mw}(0.5,4,5)

% Extra node
\pnodes(10.8,5){ap}(11.2,5){apa}(12,5){apb}(12,8){apc}(11,8){apd}

% Draw APD-receiver connection (stubborn version)
%\drawfiber[linecolor=black]{apdrec}(apa)(apb)(apc)(apd)

% Draw APD
\optdetector[position=start,fiber,compname=apd,
labelangle=180](11.2,5)(11.2,5){APD}

%\optbox[position=end, labeloffset=0,compname=apdrec](9.6,8)(9.6,8){Receiver}

\drawwire{apd}(12,6.5){apdrec}

% Optional beam to APD
\drawwidebeam[beamwidth=0.2,opacity=0.6,fillstyle=vlines,
fillcolor=red,linestyle=none]{fm}{apd}

\end{pspicture}

\end{document}

Responder1

Executando seu exemplo para lualatexobter diretamente uma saída em PDF, recebo:

\DocumentMetadata{}
\documentclass[11pt]{article}
\usepackage{pst-optexp}
\usepackage{nicefrac}
\begin{document}
    
\begin{pspicture}[showgrid=false](0,-2)(13,9)
    \pnode(6,2.5){BoxUp}
    % Beam coordinates
    \pnode(2,5){GreenEnd}
    \pnode(6,1.5){GreenStart}
    \pnode(GreenEnd){RedStart}
    \pnode(11,2){RedEnd}
    % Mirror coordinates
    \pnodes(5,5){Ldc}(6,5){Mdc}(6,4){Bdc}
    \pnodes(8,5){Lfm}(9,5){Mfm}(9,4){Bfm}
    \pnodes(9,4){Um1}(9,2){Mm1}(10,2){Rm1}
    % Lens coordinates
    \pnodes(4,5){LPos}(2,5){LFoc}
    %Laser Diode
    \optbox[position=start, compname=box](3,-1)(3,-1){Laser Diode}
    % Fiber
    \optfiber[fiberloopradius=0.2,
    linecolor=green,label=0.3,compname=ssmf](3,-1)(5,-1){SSMF}
    % Draw laser box
    \optbox[position=start, labeloffset=0, labelref=relative, compname=LO](GreenStart)(BoxUp){Laser}
    
    % Draw ND filter
    \optfilter[fiber=none,allowbeaminside=false,compname=nd,
    labelref=relative,labeloffset=-1](6,2.5)(6,3.5){ND-Filter}
    % Draw CMOS Camera
    \optbox[position=end, labeloffset=0](RedEnd)(11,2){CMOS}
    % Attempt 1 for receiver
    \optbox[position=end, labeloffset=0,compname=apdrec](9.6,8)(9.6,8){Receiver}
    % Draw semitransparent mirror
    \mirror[mirrortype=semitrans,compname=dc](Ldc)(Mdc)(Bdc){DC}
    % Draw the focusing objective
    \lens[abspos=0,lensradius=2,lenswidth=1.5,
    lensheight=0.75,compname=lens1](LPos)(LFoc){x40 Focusing objective}
    \addtopsstyle{Beam}{opacity=0.1}
    % Draw the green laser beam
    \drawwidebeam[beamwidth=0.4,opacity=0.4,
    fillstyle=solid,fillcolor=green](GreenStart){nd}{dc}{lens1}(GreenEnd)
    % Draw the flip mirror
    \mirror[labelangle=45,compname=fm](Lfm)(Mfm)(Bfm){Flip Mirror}
    % Edge Filter
    \optfilter[filtertype=bandstop,compname=ef,labelref=relative](9,4)(9,3){Edge Filter}
    % Mirror to CMOS
    \mirror[labelangle=45,compname=m1](Um1)(Mm1)(Rm1)
    % Draw the red laser beam
    \drawwidebeam[beamwidth=0.2,opacity=0.6,fillstyle=solid, fillcolor=red, 
             linestyle=none](RedStart){dc}{fm}{ef}{m1}(RedEnd)
    % Draw the NV-Centers
    \crystal[crystalheight=2, crystalwidth=1,labelangle=0,labeloffset=-1.3](2,5)(1,5){NV-Centers}
    % Connect ssmf and laser output
    \drawfiber[linecolor=green,fiberstyle=angle,linearc=0.5]{ssmf}{LO}
    % Draw ramp generator
    \elecsynthesizer[synthshape=rectangle,synthsize=2 1, synthtype=sawtooth, 
            compname=rg,labelref=relative](6,8)(5,8){Ramp Generator}
    % Draw MW-source
    \optbarcomp[fiber,compname=mw](5,8)(3,8){MW-Generator}
    % Connect Rampgenerator with MW-source
    \drawfiber[linecolor=black]{rg}{mw}
    % Connect MW-source with MW-antenna
    \drawfiber[linecolor=black,fiberstyle=angle,linearc=0.5]{mw}(0.5,4,5)
    % Extra node
    \pnodes(10.8,5){ap}(11.2,5){apa}(12,5){apb}(12,8){apc}(11,8){apd}
    % Draw APD-receiver connection (stubborn version)
    %\drawfiber[linecolor=black]{apdrec}(apa)(apb)(apc)(apd)
    % Draw APD
    \optdetector[position=start,fiber,compname=apd,labelangle=180](11.2,5)(11.2,5){APD}
    %\optbox[position=end, labeloffset=0,compname=apdrec](9.6,8)(9.6,8){Receiver}
    \drawwire{apd}(12,6.5){apdrec}  
    % Optional beam to APD
    \drawwidebeam[beamwidth=0.2,opacity=0.6,fillstyle=vlines,fillcolor=red,linestyle=none]{fm}{apd}
\end{pspicture}
    
\end{document}

insira a descrição da imagem aqui

com a sequência latex->dvips->ps2pdf há um problema com

Erro: /resultado indefinido em --atan--

que precisa de mais investigação \optdetector. As coordenadas idênticas parecem erradas para mim ...

informação relacionada