-
Notifications
You must be signed in to change notification settings - Fork 0
/
shapereco.inx
81 lines (67 loc) · 4.35 KB
/
shapereco.inx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<_name>Shape recognition Olli</_name>
<id>qpad</id>
<dependency type="executable" location="extensions">shapereco.py</dependency>
<dependency type="executable" location="extensions">inkex.py</dependency>
<param name="MainTabs" type="notebook">
<!-- Basics ********** -->
<page name="Basic" gui-text="Basic options">
<_param name="title" type="description">Simple shape
recognition. From a selection of one or many path, find straight
lines, recognizes those parallel or with similar angles or
lenght. Recognizes rectangles, circle and ellipses. </_param>
<param name="keepOrigin" type="boolean" _gui-text="Keep origin path">false</param>
<param name="doUniformization" type="boolean" _gui-text="Enable uniformization">true</param>
</page>
<!-- Segments ********** -->
<page name="page_segments" gui-text="Segments finding">
<param name="name" type="description" appearance="header">Segment extension</param>
<param name="segExtensionEnable" type="boolean" _gui-text="Enable">true</param>
<param name="segExtensionDtoSeg" type="float" _gui-description="Distance (relative to segment length) from point to segment below wich point is merged to segment"
_gui-text="Relative distance to segment"
precision="3" min="0" max="20"> 10.0
</param>
<param name="segExtensionQual" type="float" _gui-description="Fit quality for which a candidate point is actually merged"
_gui-text="Fit quality"
precision="2" max="1.">
0.2</param>
<param name="removDesc" type="description" appearance="header">Remove very small segments/sub-paths </param>
<param name="segRemoveSmallEdge" type="boolean" _gui-text="Enable">true</param>
</page>
<page name="page_merging" gui-text="Segments merging">
<param name="mergeDesc" type="description" appearance="header">Merge aligned consectutive segments </param>
<param name="segAngleMergeEnable" type="boolean" _gui-text="Enable">true</param>
<param name="segAngleMergePara" type="float" _gui-description="How close to parraell do segments need to be to fit" _gui-text="Fit parrell at" precision="3" max="1.">
0.500</param>
<param name="segAngleMergeTol1" type="float" _gui-description="Merge line if angles are less than tolarane 1" _gui-text="merge lines with angles within tollarance1" precision="2" max="1.">
0.48</param>
<param name="segAngleMergeTol2" type="float" _gui-description="Merge line if angles are less than tolarane 2" _gui-text="merge lines with angles within tollarance2" precision="3" max="1.">
0.50</param>
</page>
<page name="page_unif" gui-text="length normalization">
<param name="doEqualizeDist" type="boolean" _gui-text="Equalize segments of similar length">true</param>
<param name="shapeDistLocal" type="float" _gui-description="Make lengths the mean of the lengths if they are within this threashold" _gui-text="make lengths equal locally" precision="3" max="50.">
0.3</param>
<param name="shapeDistGlobal" type="float" _gui-description="Make lengths the mean of the lengths if they are within this threashold, globally" _gui-text="make lengths equal globally" precision="4" max="50.">
0.025</param>
</page>
<!-- Uniformization ********** -->
<page name="page_unif" gui-text="Uniformization">
<param name="doParrallelize" type="boolean"
_gui-text="Parralelize segments">true</param>
<param name="doKnownAngle" type="boolean" _gui-text="Set segment angles to closest remarkable angles">true</param>
<param name="doEqualizeRadius" type="boolean" _gui-text="Equalize circle radius of similar length">true</param>
<param name="doCenterCircOnSeg" type="boolean" _gui-text="Center circle center on nearby segment">true</param>
</page>
</param>
<effect>
<object-type>path</object-type>
<effects-menu>
<submenu _name="Generate from Path"/>
</effects-menu>
</effect>
<script>
<command reldir="extensions" interpreter="python">shapereco.py</command>
</script>
</inkscape-extension>