HEX
Server: Apache
System: Linux opal14.opalstack.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: curbgloabal_opal (1234)
PHP: 8.1.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/inkscape/extensions/render_gears.pyc
�
��Yc@s�dZddlZddlZddlZddlmZddlTddlZd�Zd�Z	d�Z
dejfd	��YZe
d
kr�e�Zej�ndS(s
Copyright (C) 2007 Aaron Spike  (aaron @ ekips.org)
Copyright (C) 2007 Tavmjong Bah (tavmjong @ free.fr)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
i����N(tcomputePointInNode(t*cCsAt|�t|�}}t|d|d�|t||�S(Ni(tfloattsqrttacos(tRbtR((s./usr/share/inkscape/extensions/render_gears.pytinvolute_intersect_anglescCs*|t|�}|t|�}||fS(N(tcostsin(tradiustangletxty((s./usr/share/inkscape/extensions/render_gears.pytpoint_on_circlescCsK|d}|d}d|}x|D]}|d|7}q%W|d7}|S(Niis
M%.5f,%.5fs L%.5f,%.5ftz((tptftsvgdR((s./usr/share/inkscape/extensions/render_gears.pytpoints_to_svgd$s




tGearscBseZd�Zd�ZRS(c
Cs	tjj|�|jjddddddddd	d
dd�|jjd
dddddddd	ddd�|jjddddddddd	ddd�|jjddddddddd	ddd�|jjddddddddd	d dd!�dS("Ns-ts--teethtactiontstorettypetinttdesttteethtdefaultithelpsNumber of teeths-ps--pitchRtpitchg4@s5Circular Pitch (length of arc from one tooth to next)s-as--angleRs4Pressure Angle (common values: 14.5, 20, 25 degrees)s-cs--centerdiametertcenterdiameterg$@s*Diameter of central hole - 0.0 for no holes-us--unittstringtunittpxs6unit of measure for circular pitch and center diameter(tinkextEffectt__init__tOptionParsert
add_option(tself((s./usr/share/inkscape/extensions/render_gears.pyR$.s*c8	Cs�|jj}|jt|jj�|jj�}|jj}|jt|jj�|jj�}dt}t	|�|t}|d}|t
t|��}|d}	t	|�|}
d|
}||}|d}
t|dt	|�}dtt|��d}||k}d}||}||}|d}|dt	|�}t
|	|�}t
|	|�|}gt|�D]}||t	|�^q}}g}xY|D]Q}||}||}||}||}||} ||}!t|	|�}"t||�}#t||�}$t|	| �}%t||�}&t||!�}'||	kr�|t
|	|�}(||(})||(}*t||)�}+t||*�},|+|#|$|'|&|,g}-n<t||�}+t|| �},|+|"|#|$|'|&|%|,g}-|j|-�q�Wt|�}.tt|j�|j�}/dt|/d�dt|/d	�d
}0idt|�tjdd
�6|0d6}1tjj|jd|1�}2idd6dd6t|jd��d6}3itj|3�d6|.d6}4tjj|2tjdd�|4�}5|dkr�itj|3�d6dtjdd�6dtjdd�6t|d�tjdd�6t|d�tjdd�6d tjd!d�6}6tjj|2tjdd�|6�}7ndS("Ng@g�?igg@s
translate(it,it)tGeartlabeltinkscapet	transformtgs#000000tstroketnonetfillt1pxsstroke-widthtstyletdtpathtsvgs0.0tcxtsodipoditcytrxtrytarcR(toptionsRtunittouutstrRR RRtpiRRtradiansR	RtrangeRtextendRRtlisttview_centert
current_layerR"taddNStetreet
SubElementtsimplestyletformatStyle(8R'RRRRttwo_pitpitch_diametertpitch_radiust
base_diametertbase_radiustpitch_diametrialtaddendumtouter_radiustouter_diameterttoothtundercuttneeds_undercutt	clearancetdedendumtroot_radiust
root_diameterthalf_thick_angletpitch_to_base_angletpitch_to_outer_angleRtcenterstpointstctpitch1tbase1touter1tpitch2tbase2touter2tb1tp1to1tb2tp2to2tpitch_to_root_angletroot1troot2tr1tr2tp_tmpR5REttt	g_attribsR.R3tgear_attribstgeartcenter_attribstcenter((s./usr/share/inkscape/extensions/render_gears.pyteffectDs�%%








-








* 
*$(t__name__t
__module__R$Rz(((s./usr/share/inkscape/extensions/render_gears.pyR-s	t__main__(t__doc__R"RJtsystsimpletransformRtmathRRRRR#RR{tetaffect(((s./usr/share/inkscape/extensions/render_gears.pyt<module>s
				�