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/addnodes.pyo
�
��Yc@s�dZddlZddlZddlZddlZddlZddlZddlZd�Zdd�Z	dd�Z
ddd�Zdd	�Zd
�Z
d�Zdejfd
��YZedkr�e�Zej�ndS(s�
This extension either adds nodes to a path so that
    a) no segment is longer than a maximum value 
    or
    b) so that each segment is divided into a given number of equal segments

Copyright (C) 2005,2007 Aaron Spike, aaron@ekips.org

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����NcCs'tg|D]}t|�d^q
�S(Ni(tsumtlen(tcsptp((s*/usr/share/inkscape/extensions/addnodes.pytnumsegssg�?cCs:|\}}|\}}||||||||gS(N((t.0t.1tttx1ty1tx2ty2((s*/usr/share/inkscape/extensions/addnodes.pyttpointsc	Cs�t|d|d|�}t|d|d|�}t|d|d|�}t|||�}t|||�}t|||�}|d|d|g|||g||d|dggS(Niii(R(	tsp1tsp2Rtm1tm2tm3tm4tm5tm((s*/usr/share/inkscape/extensions/addnodes.pytcspbezsplit sg����MbP?cCsK|d|d|d|df}tj|||�}t|||�S(Niii(tbezmisctbeziertatlengthR(R
Rtlt	tolerancetbezR((s*/usr/share/inkscape/extensions/addnodes.pytcspbezsplitatlength(s&cCs6|d|d|d|df}tj||�S(Niii(Rtbezierlength(R
RRR((s*/usr/share/inkscape/extensions/addnodes.pytcspseglength,s&cCs�d}g}xq|D]i}|jg�xStdt|��D]<}t||d||�}|dj|�||7}q<WqW||fS(Niii����(tappendtxrangeRR(RttotaltlengthstsptiR((s*/usr/share/inkscape/extensions/addnodes.pyt	csplength/s

cCsEd}x8|D]0}x'|D]}|dkr|d7}qqWq
W|S(Nii((tcsplentretvalR"R((s*/usr/share/inkscape/extensions/addnodes.pyt
numlengths9s

tSplitItcBseZd�Zd�ZRS(cCs�tjj|�|jjddddddddd	d
d�|jjddddd
dddd	d
d�|jjdddddddddd
d�dS(Ns
--segmentstactiontstorettypetinttdesttsegmentstdefaultithelps*Number of segments to divide the path intos--maxtfloattmaxs--methodtstringtmethodtsThe kind of division to perform(tinkextEffectt__init__tOptionParsert
add_option(tself((s*/usr/share/inkscape/extensions/addnodes.pyR8BscCs�x�|jj�D]�\}}|jtjdd�krtj|jd��}g}x&|D]}|j|dg�d}x�|t	|�dkryt
|dd||�}|jjdkr�|jj
}ntj||jj�}xitt|�dd�D]O}	t|dd||d|	�\|dd<}
||<|dj|
�qW|dj||�|d7}q�Wq\W|jdtj|��qqWdS(	Ntpathtsvgtdiii����tbynumg�?(tselectedt	iteritemsttagR6taddNStcubicsuperpatht	parsePathtgetRRRtoptionsR4R.tmathtceilR2RR,Rtsett
formatPath(R;tidtnodeRtnewtsubR#tlengthtsplitststnext((s*/usr/share/inkscape/extensions/addnodes.pyteffectQs$
7(t__name__t
__module__R8RT(((s*/usr/share/inkscape/extensions/addnodes.pyR(As	t__main__(t__doc__R6RDtsimplestyletcopyRHtreRRRRRRR$R'R7R(RUtetaffect(((s*/usr/share/inkscape/extensions/addnodes.pyt<module>sH		
	.