geometrix 0.5.10 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +505 -0
- package/dist/index.js +3848 -0
- package/dist/index.js.map +1 -0
- package/package.json +6 -1
- package/.eslintignore +0 -17
- package/.eslintrc.cjs +0 -24
- package/.prettierignore +0 -15
- package/.prettierrc +0 -8
- package/src/aaExportContent.ts +0 -213
- package/src/aaExportFile.ts +0 -141
- package/src/aaParamGeom.ts +0 -62
- package/src/angle_utils.test.ts +0 -83
- package/src/angle_utils.ts +0 -98
- package/src/arc_to_stroke.ts +0 -73
- package/src/canvas_utils.test.ts +0 -28
- package/src/canvas_utils.ts +0 -159
- package/src/contour.test.ts +0 -37
- package/src/contour.ts +0 -806
- package/src/designParams.ts +0 -178
- package/src/figure.test.ts +0 -21
- package/src/figure.ts +0 -400
- package/src/index.ts +0 -16
- package/src/line.test.ts +0 -78
- package/src/line.ts +0 -359
- package/src/paramFile.ts +0 -52
- package/src/point.test.ts +0 -36
- package/src/point.ts +0 -246
- package/src/prepare_pax.ts +0 -102
- package/src/segment.test.ts +0 -26
- package/src/segment.ts +0 -701
- package/src/sub_design.ts +0 -16
- package/src/triangle_utils.test.ts +0 -38
- package/src/triangle_utils.ts +0 -112
- package/src/vector.test.ts +0 -28
- package/src/vector.ts +0 -122
- package/src/volume.ts +0 -50
- package/src/write_dxf.ts +0 -100
- package/src/write_openjscad.ts +0 -284
- package/src/write_openscad.ts +0 -305
- package/src/write_pax.ts +0 -73
- package/src/write_svg.ts +0 -101
- package/svg/any_triangle.svg +0 -156
- package/svg/arc_definition.svg +0 -506
- package/svg/construct_corner_rounded_ext_arc_ext_arc.svg +0 -378
- package/svg/construct_corner_rounded_int_arc_ext_arc.svg +0 -359
- package/svg/construct_corner_rounded_int_arc_int_arc.svg +0 -356
- package/svg/construct_corner_rounded_stroke_ext_arc.svg +0 -374
- package/svg/construct_corner_rounded_stroke_ext_arc_obtuse.svg +0 -370
- package/svg/construct_corner_rounded_stroke_ext_arc_obtuse_method2.svg +0 -311
- package/svg/construct_corner_rounded_stroke_int_arc.svg +0 -364
- package/svg/construct_corner_rounded_stroke_int_arc_obtuse.svg +0 -358
- package/svg/construct_corner_rounded_stroke_int_arc_obtuse_method2.svg +0 -237
- package/svg/construct_corner_rounded_stroke_stroke.svg +0 -280
- package/svg/construct_corner_wideacc.svg +0 -286
- package/svg/construct_corner_widened.svg +0 -278
- package/svg/construction_of_line_intersection_1.svg +0 -187
- package/svg/construction_of_line_intersection_2.svg +0 -189
- package/svg/contour_arc_definition_options.svg +0 -324
- package/svg/contour_point_absolute_relative.svg +0 -258
- package/svg/contour_tangential_two_arcs.svg +0 -531
- package/svg/contour_tangential_two_arcs_impossible_case.svg +0 -175
- package/svg/contour_tangential_two_arcs_requirements.svg +0 -364
- package/svg/corner_rounded_ext_arc_ext_arc.svg +0 -281
- package/svg/corner_rounded_int_arc_ext_arc.svg +0 -281
- package/svg/corner_rounded_int_arc_int_arc.svg +0 -279
- package/svg/corner_rounded_stroke_ext_arc.svg +0 -218
- package/svg/corner_rounded_stroke_int_arc.svg +0 -225
- package/svg/corner_rounded_stroke_stroke.svg +0 -174
- package/svg/geom_dev.svg +0 -14708
- package/svg/geom_modules.svg +0 -246
- package/svg/geom_user.svg +0 -58
- package/svg/line_axis_x_cases.svg +0 -1408
- package/svg/line_axis_y_cases.svg +0 -1369
- package/svg/line_distanceOrig.svg +0 -318
- package/svg/line_getAxisXIntersection.svg +0 -262
- package/svg/line_getAxisXIntersection_2.svg +0 -244
- package/svg/line_getAxisYIntersection.svg +0 -304
- package/svg/line_getAxisYIntersection_2.svg +0 -285
- package/svg/line_getAxisYIntersection_3.svg +0 -277
- package/svg/line_intersection.svg +0 -346
- package/svg/line_projectPoint.svg +0 -311
- package/svg/point_1.svg +0 -243
- package/svg/point_2.svg +0 -409
- package/svg/point_3.svg +0 -298
- package/svg/point_4.svg +0 -272
- package/svg/point_5.svg +0 -356
- package/svg/right_triangle.svg +0 -194
- package/svg/vector_definition.svg +0 -130
- package/tsconfig.json +0 -13
- package/vitest.config.ts +0 -7
package/svg/geom_modules.svg
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
-
|
|
4
|
-
<svg
|
|
5
|
-
width="241.80025"
|
|
6
|
-
height="270.01755"
|
|
7
|
-
viewBox="0 0 63.976315 71.442142"
|
|
8
|
-
version="1.1"
|
|
9
|
-
id="svg5"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
xmlns:svg="http://www.w3.org/2000/svg">
|
|
12
|
-
<defs
|
|
13
|
-
id="defs2">
|
|
14
|
-
<rect
|
|
15
|
-
x="60.004025"
|
|
16
|
-
y="15381.483"
|
|
17
|
-
width="149.38248"
|
|
18
|
-
height="28.785616"
|
|
19
|
-
id="rect14491" />
|
|
20
|
-
<rect
|
|
21
|
-
x="328.13651"
|
|
22
|
-
y="15328.763"
|
|
23
|
-
width="108.95853"
|
|
24
|
-
height="25.132124"
|
|
25
|
-
id="rect3037" />
|
|
26
|
-
<rect
|
|
27
|
-
x="240.98404"
|
|
28
|
-
y="15381.021"
|
|
29
|
-
width="135.41475"
|
|
30
|
-
height="36.081112"
|
|
31
|
-
id="rect3031" />
|
|
32
|
-
<rect
|
|
33
|
-
x="139.11133"
|
|
34
|
-
y="15408.008"
|
|
35
|
-
width="107.20646"
|
|
36
|
-
height="25.703699"
|
|
37
|
-
id="rect3025" />
|
|
38
|
-
<rect
|
|
39
|
-
x="143.85339"
|
|
40
|
-
y="15378.013"
|
|
41
|
-
width="108.9614"
|
|
42
|
-
height="25.399242"
|
|
43
|
-
id="rect3019" />
|
|
44
|
-
<rect
|
|
45
|
-
x="137.92509"
|
|
46
|
-
y="15332.615"
|
|
47
|
-
width="114.62833"
|
|
48
|
-
height="39.496208"
|
|
49
|
-
id="rect3013" />
|
|
50
|
-
<rect
|
|
51
|
-
x="133.87236"
|
|
52
|
-
y="15287.9"
|
|
53
|
-
width="153.2083"
|
|
54
|
-
height="36.038029"
|
|
55
|
-
id="rect3007" />
|
|
56
|
-
<rect
|
|
57
|
-
x="88.783897"
|
|
58
|
-
y="15222.726"
|
|
59
|
-
width="212.79872"
|
|
60
|
-
height="51.640053"
|
|
61
|
-
id="rect2947" />
|
|
62
|
-
<rect
|
|
63
|
-
x="92.204735"
|
|
64
|
-
y="15174.11"
|
|
65
|
-
width="139.703"
|
|
66
|
-
height="35.74506"
|
|
67
|
-
id="rect2941" />
|
|
68
|
-
<rect
|
|
69
|
-
x="94.075104"
|
|
70
|
-
y="15131.606"
|
|
71
|
-
width="246.39877"
|
|
72
|
-
height="37.548801"
|
|
73
|
-
id="rect2935" />
|
|
74
|
-
<marker
|
|
75
|
-
style="overflow:visible"
|
|
76
|
-
id="Arrow1L"
|
|
77
|
-
refX="0"
|
|
78
|
-
refY="0"
|
|
79
|
-
orient="auto-start-reverse"
|
|
80
|
-
markerWidth="8.75"
|
|
81
|
-
markerHeight="5"
|
|
82
|
-
viewBox="0 0 8.75 5"
|
|
83
|
-
preserveAspectRatio="xMidYMid">
|
|
84
|
-
<path
|
|
85
|
-
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
|
|
86
|
-
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
87
|
-
id="arrow1L"
|
|
88
|
-
transform="scale(-0.5)" />
|
|
89
|
-
</marker>
|
|
90
|
-
<marker
|
|
91
|
-
style="overflow:visible"
|
|
92
|
-
id="Arrow1L-3675"
|
|
93
|
-
refX="0"
|
|
94
|
-
refY="0"
|
|
95
|
-
orient="auto-start-reverse"
|
|
96
|
-
markerWidth="8.75"
|
|
97
|
-
markerHeight="5"
|
|
98
|
-
viewBox="0 0 8.75 5"
|
|
99
|
-
preserveAspectRatio="xMidYMid">
|
|
100
|
-
<path
|
|
101
|
-
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
|
|
102
|
-
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
103
|
-
id="arrow1L-3"
|
|
104
|
-
transform="scale(-0.5)" />
|
|
105
|
-
</marker>
|
|
106
|
-
</defs>
|
|
107
|
-
<g
|
|
108
|
-
id="layer1"
|
|
109
|
-
transform="translate(-19.450794,-4004.4114)">
|
|
110
|
-
<rect
|
|
111
|
-
style="fill:#ffffff;stroke:#ffffff;stroke-width:0.264584"
|
|
112
|
-
id="rect15045"
|
|
113
|
-
width="63.711727"
|
|
114
|
-
height="71.177452"
|
|
115
|
-
x="19.583088"
|
|
116
|
-
y="4004.5437" />
|
|
117
|
-
<text
|
|
118
|
-
xml:space="preserve"
|
|
119
|
-
transform="matrix(0.26458333,0,0,0.26458333,-3.6492681,1.9165877)"
|
|
120
|
-
id="text2933"
|
|
121
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2935)"><tspan
|
|
122
|
-
x="94.074219"
|
|
123
|
-
y="15144.582"
|
|
124
|
-
id="tspan20644">angle_utils.ts</tspan></text>
|
|
125
|
-
<text
|
|
126
|
-
xml:space="preserve"
|
|
127
|
-
transform="matrix(0.26458333,0,0,0.26458333,8.84047,-0.03723707)"
|
|
128
|
-
id="text2939"
|
|
129
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2941)"><tspan
|
|
130
|
-
x="92.205078"
|
|
131
|
-
y="15187.086"
|
|
132
|
-
id="tspan20646">canvas_utils.ts</tspan></text>
|
|
133
|
-
<text
|
|
134
|
-
xml:space="preserve"
|
|
135
|
-
transform="matrix(0.26458333,0,0,0.26458333,8.9727007,-6.5325091)"
|
|
136
|
-
id="text2945"
|
|
137
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2947)"><tspan
|
|
138
|
-
x="88.783203"
|
|
139
|
-
y="15235.703"
|
|
140
|
-
id="tspan20648">triangle_utils.ts</tspan></text>
|
|
141
|
-
<text
|
|
142
|
-
xml:space="preserve"
|
|
143
|
-
transform="matrix(0.26458333,0,0,0.26458333,23.324311,11.333098)"
|
|
144
|
-
id="text3005"
|
|
145
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3007)"><tspan
|
|
146
|
-
x="133.87305"
|
|
147
|
-
y="15300.877"
|
|
148
|
-
id="tspan20650">contour.ts</tspan></text>
|
|
149
|
-
<text
|
|
150
|
-
xml:space="preserve"
|
|
151
|
-
transform="matrix(0.26458333,0,0,0.26458333,28.937282,7.4056887)"
|
|
152
|
-
id="text3011"
|
|
153
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3013)"><tspan
|
|
154
|
-
x="137.92578"
|
|
155
|
-
y="15345.592"
|
|
156
|
-
id="tspan20652">figure.ts</tspan></text>
|
|
157
|
-
<text
|
|
158
|
-
xml:space="preserve"
|
|
159
|
-
transform="matrix(0.26458333,0,0,0.26458333,7.649632,-32.519675)"
|
|
160
|
-
id="text3017"
|
|
161
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3019)"><tspan
|
|
162
|
-
x="143.85352"
|
|
163
|
-
y="15390.988"
|
|
164
|
-
id="tspan20654">line.ts</tspan></text>
|
|
165
|
-
<text
|
|
166
|
-
xml:space="preserve"
|
|
167
|
-
transform="matrix(0.26458333,0,0,0.26458333,2.289722,-47.853137)"
|
|
168
|
-
id="text3023"
|
|
169
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3025)"><tspan
|
|
170
|
-
x="139.11133"
|
|
171
|
-
y="15420.984"
|
|
172
|
-
id="tspan20656">point.ts</tspan></text>
|
|
173
|
-
<text
|
|
174
|
-
xml:space="preserve"
|
|
175
|
-
transform="matrix(0.26458333,0,0,0.26458333,-10.769216,-21.049787)"
|
|
176
|
-
id="text3029"
|
|
177
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3031)"><tspan
|
|
178
|
-
x="240.98438"
|
|
179
|
-
y="15393.998"
|
|
180
|
-
id="tspan20658">segment.ts</tspan></text>
|
|
181
|
-
<text
|
|
182
|
-
xml:space="preserve"
|
|
183
|
-
transform="matrix(0.26458333,0,0,0.26458333,-41.334307,-14.733103)"
|
|
184
|
-
id="text3035"
|
|
185
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3037)"><tspan
|
|
186
|
-
x="328.13672"
|
|
187
|
-
y="15341.738"
|
|
188
|
-
id="tspan20660">vector.ts</tspan></text>
|
|
189
|
-
<path
|
|
190
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
191
|
-
d="m 32.073585,4016.3911 -2.982034,-5.5962"
|
|
192
|
-
id="path3095" />
|
|
193
|
-
<path
|
|
194
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
195
|
-
d="m 31.996072,4022.4253 -5.285436,-10.9355"
|
|
196
|
-
id="path4762" />
|
|
197
|
-
<path
|
|
198
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
199
|
-
d="m 38.941232,4032.2111 -13.673736,-4.3598 -0.05776,-17.4334"
|
|
200
|
-
id="path9902" />
|
|
201
|
-
<path
|
|
202
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
203
|
-
d="m 54.590833,4030.6439 12.317989,-1.7645 0.295619,-6.673 -4.777031,-3.343"
|
|
204
|
-
id="path9908" />
|
|
205
|
-
<path
|
|
206
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
207
|
-
d="m 44.967617,4037.6766 -1.458341,-4.2747"
|
|
208
|
-
id="path9914" />
|
|
209
|
-
<path
|
|
210
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
211
|
-
d="m 45.325551,4042.7013 -3.286774,-9.2052"
|
|
212
|
-
id="path9920" />
|
|
213
|
-
<path
|
|
214
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
215
|
-
d="m 56.705005,4037.213 0.71511,-11.4258"
|
|
216
|
-
id="path11644" />
|
|
217
|
-
<path
|
|
218
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
219
|
-
d="m 58.287215,4038.8447 11.001002,-7.8473 -0.500046,-10.1057 -5.810557,-3.6259"
|
|
220
|
-
id="path11650" />
|
|
221
|
-
<path
|
|
222
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
223
|
-
d="m 52.816355,4051.0068 -10.469039,-4.5916 -1.985743,-12.369"
|
|
224
|
-
id="path13374" />
|
|
225
|
-
<path
|
|
226
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
227
|
-
d="m 66.832066,4049.4161 0.834422,-9.6345 -6.786329,-0.7046"
|
|
228
|
-
id="path13380" />
|
|
229
|
-
<path
|
|
230
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L)"
|
|
231
|
-
d="m 58.72302,4057.4731 -1.598544,-3.2504"
|
|
232
|
-
id="path13386" />
|
|
233
|
-
<path
|
|
234
|
-
style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L-3675)"
|
|
235
|
-
d="m 65.131907,4064.9613 -1.598544,-3.2504"
|
|
236
|
-
id="path13386-5" />
|
|
237
|
-
<text
|
|
238
|
-
xml:space="preserve"
|
|
239
|
-
transform="matrix(0.26458333,0,0,0.26458333,5.9412699,-0.20670573)"
|
|
240
|
-
id="text14489"
|
|
241
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect14491)"><tspan
|
|
242
|
-
x="60.003906"
|
|
243
|
-
y="15394.461"
|
|
244
|
-
id="tspan20662">geom modules</tspan></text>
|
|
245
|
-
</g>
|
|
246
|
-
</svg>
|
package/svg/geom_user.svg
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
-
|
|
4
|
-
<svg
|
|
5
|
-
width="600"
|
|
6
|
-
height="3000"
|
|
7
|
-
viewBox="0 0 158.75 793.75"
|
|
8
|
-
version="1.1"
|
|
9
|
-
id="svg5"
|
|
10
|
-
inkscape:version="1.2.2 (1:1.2.2+202305151914+b0a8486541)"
|
|
11
|
-
sodipodi:docname="geom_user.svg"
|
|
12
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
13
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
14
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
-
xmlns:svg="http://www.w3.org/2000/svg">
|
|
16
|
-
<sodipodi:namedview
|
|
17
|
-
id="namedview7"
|
|
18
|
-
pagecolor="#ffffff"
|
|
19
|
-
bordercolor="#666666"
|
|
20
|
-
borderopacity="1.0"
|
|
21
|
-
inkscape:showpageshadow="2"
|
|
22
|
-
inkscape:pageopacity="0.0"
|
|
23
|
-
inkscape:pagecheckerboard="0"
|
|
24
|
-
inkscape:deskcolor="#d1d1d1"
|
|
25
|
-
inkscape:document-units="px"
|
|
26
|
-
showgrid="false"
|
|
27
|
-
inkscape:zoom="1.1893044"
|
|
28
|
-
inkscape:cx="394.34816"
|
|
29
|
-
inkscape:cy="166.90428"
|
|
30
|
-
inkscape:window-width="1366"
|
|
31
|
-
inkscape:window-height="836"
|
|
32
|
-
inkscape:window-x="0"
|
|
33
|
-
inkscape:window-y="0"
|
|
34
|
-
inkscape:window-maximized="1"
|
|
35
|
-
inkscape:current-layer="layer1" />
|
|
36
|
-
<defs
|
|
37
|
-
id="defs2">
|
|
38
|
-
<rect
|
|
39
|
-
x="23.227863"
|
|
40
|
-
y="21.368846"
|
|
41
|
-
width="194.67787"
|
|
42
|
-
height="40.964071"
|
|
43
|
-
id="rect113" />
|
|
44
|
-
</defs>
|
|
45
|
-
<g
|
|
46
|
-
inkscape:label="Layer 1"
|
|
47
|
-
inkscape:groupmode="layer"
|
|
48
|
-
id="layer1">
|
|
49
|
-
<text
|
|
50
|
-
xml:space="preserve"
|
|
51
|
-
transform="scale(0.26458333)"
|
|
52
|
-
id="text111"
|
|
53
|
-
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect113)"><tspan
|
|
54
|
-
x="23.228516"
|
|
55
|
-
y="34.345733"
|
|
56
|
-
id="tspan168">geom_user.svg</tspan></text>
|
|
57
|
-
</g>
|
|
58
|
-
</svg>
|