403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/inkscape/extensions/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/inkscape/extensions/__pycache__/plotter.cpython-310.pyc
o

0�af�@sTddlZddlmZddlmZddlZGdd�dej�Ze	dkr(e��
�dSdS)�N)�Serial)�
inkex_gettextc@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�PlotzGenerate a plot in HPGL outputcCs�|�d�|jdddd�|jdddd�|jd	d
dd�|jdd
dd�|jdddd�|jdddd�|jdddd�|jdtddd�|jdtddd�|jdtdd d�|jd!td"d#d�|jd$td%d&d�|jd'd(d)d�|jd*tjd+d,d�|jd-tjd+d.d�|jd/tjd+d0d�|jd1td2d3d�|jd4tjd5d6d�|jd7td8d9d�|jd:tjd5d;d�|jd<td=d>d�|jd?|�d@�|jdAdBdC�|jdD|�dE�|jdFdGdC�dS)HNz--tabz--parallelPortz/dev/usb/lp2z
Parallel port)�default�helpz--serialPort�COM1zSerial portz--serialBaudRate�9600zSerial Baud ratez--serialByteSize�eightzSerial byte sizez--serialStopBits�onezSerial stop bitsz--serialParity�nonez
Serial parityz--serialFlowControl�0zFlow controlz
--resolutionXg��@zResolution X (dpi))�typerrz
--resolutionYzResolution Y (dpi)z--pen�z
Pen numberz--force�z
Pen force (g)z--speed�zPen speed (cm/s)z
--orientation�90zRotation (Clockwise)z	--mirrorXFz
Mirror X axisz	--mirrorYz
Mirror Y axisz--centerzCenter zero pointz	--overcutg�?zOvercut (mm)z--precutTz
Use precutz--flatg333333�?zCurve flatnessz--autoAlignz
Auto alignz--toolOffsetg�?z#Tool (Knife) offset correction (mm)z
--portType�to�to_portz	Port type)r
r�destrz--commandLanguage�convert�to_languagezCommand Language Filter)�add_argument�float�int�inkex�Boolean�
arg_method�	to_serial�convert_hpgl)�self�pars�r!�)/usr/share/inkscape/extensions/plotter.py�
add_argumentss<

��
�zPlot.add_argumentscCsHt�|�}z|j�|j�|����WdStjy#t�t	d���w)Nz6No paths where found. Please convert objects to paths.)
�hpgl_encoder�hpglEncoder�optionsrr�getHpgl�NoPathErrorr�AbortExtension�_)r�encoderr!r!r"�effect;s
�zPlot.effectcC�d}||dS)zConvert raw HPGL to HPGL�INz;PU0,0;SP0;IN; r!�r�hpgl�initr!r!r"rC�zPlot.convert_hpglcCsl|�dd�}|�dd�}|�dd�}|�dd�}d	}|jjd
kr(|d|jj7}|d7}||d
d�dS)zConvert HPGL to DMPL�;�,�SP�P�PU�U�PD�Dz;:HAL0rzV%d�EC1rNz,P0,U0,0,Z )�replacer&�speedr/r!r!r"�convert_dmplLs
zPlot.convert_dmplcCr-)z$Convert HPGL to KNK Plotter Language�ZGz
;SP0;PU0,0;@ r!r/r!r!r"�convert_knkcr2zPlot.convert_knkcCs*t|jjd�}|�|�d��|��dS)z!Output to hgpl to a parallel port�wb�utf8N)�openr&�parallelPort�write�encode�close)rr0�portr!r!r"�to_parallellszPlot.to_parallelcCsbt|jj|jj|jj|jj|jj|jjd��}|�|�	d��Wd�dS1s*wYdS)zOutput to hgpl to a serial port)�baud�stop�size�flow�parityrBN)
rr&�
serialPort�serialBaudRate�serialStopBits�serialByteSize�serialFlowControl�serialParityrErF)rr0�comxr!r!r"rrs�"�zPlot.to_serialN)�__name__�
__module__�__qualname__�__doc__r#r,rr>r@rIrr!r!r!r"rs		r�__main__)r�inkex.portsr�inkex.localizationrr*r$�EffectExtensionrrV�runr!r!r!r"�<module>sa�

Youez - 2016 - github.com/yon3zu
LinuXploit