geometrix 0.5.10 → 0.5.12

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.
Files changed (89) hide show
  1. package/dist/index.d.ts +505 -0
  2. package/dist/index.js +3848 -0
  3. package/package.json +7 -1
  4. package/.eslintignore +0 -17
  5. package/.eslintrc.cjs +0 -24
  6. package/.prettierignore +0 -15
  7. package/.prettierrc +0 -8
  8. package/src/aaExportContent.ts +0 -213
  9. package/src/aaExportFile.ts +0 -141
  10. package/src/aaParamGeom.ts +0 -62
  11. package/src/angle_utils.test.ts +0 -83
  12. package/src/angle_utils.ts +0 -98
  13. package/src/arc_to_stroke.ts +0 -73
  14. package/src/canvas_utils.test.ts +0 -28
  15. package/src/canvas_utils.ts +0 -159
  16. package/src/contour.test.ts +0 -37
  17. package/src/contour.ts +0 -806
  18. package/src/designParams.ts +0 -178
  19. package/src/figure.test.ts +0 -21
  20. package/src/figure.ts +0 -400
  21. package/src/index.ts +0 -16
  22. package/src/line.test.ts +0 -78
  23. package/src/line.ts +0 -359
  24. package/src/paramFile.ts +0 -52
  25. package/src/point.test.ts +0 -36
  26. package/src/point.ts +0 -246
  27. package/src/prepare_pax.ts +0 -102
  28. package/src/segment.test.ts +0 -26
  29. package/src/segment.ts +0 -701
  30. package/src/sub_design.ts +0 -16
  31. package/src/triangle_utils.test.ts +0 -38
  32. package/src/triangle_utils.ts +0 -112
  33. package/src/vector.test.ts +0 -28
  34. package/src/vector.ts +0 -122
  35. package/src/volume.ts +0 -50
  36. package/src/write_dxf.ts +0 -100
  37. package/src/write_openjscad.ts +0 -284
  38. package/src/write_openscad.ts +0 -305
  39. package/src/write_pax.ts +0 -73
  40. package/src/write_svg.ts +0 -101
  41. package/svg/any_triangle.svg +0 -156
  42. package/svg/arc_definition.svg +0 -506
  43. package/svg/construct_corner_rounded_ext_arc_ext_arc.svg +0 -378
  44. package/svg/construct_corner_rounded_int_arc_ext_arc.svg +0 -359
  45. package/svg/construct_corner_rounded_int_arc_int_arc.svg +0 -356
  46. package/svg/construct_corner_rounded_stroke_ext_arc.svg +0 -374
  47. package/svg/construct_corner_rounded_stroke_ext_arc_obtuse.svg +0 -370
  48. package/svg/construct_corner_rounded_stroke_ext_arc_obtuse_method2.svg +0 -311
  49. package/svg/construct_corner_rounded_stroke_int_arc.svg +0 -364
  50. package/svg/construct_corner_rounded_stroke_int_arc_obtuse.svg +0 -358
  51. package/svg/construct_corner_rounded_stroke_int_arc_obtuse_method2.svg +0 -237
  52. package/svg/construct_corner_rounded_stroke_stroke.svg +0 -280
  53. package/svg/construct_corner_wideacc.svg +0 -286
  54. package/svg/construct_corner_widened.svg +0 -278
  55. package/svg/construction_of_line_intersection_1.svg +0 -187
  56. package/svg/construction_of_line_intersection_2.svg +0 -189
  57. package/svg/contour_arc_definition_options.svg +0 -324
  58. package/svg/contour_point_absolute_relative.svg +0 -258
  59. package/svg/contour_tangential_two_arcs.svg +0 -531
  60. package/svg/contour_tangential_two_arcs_impossible_case.svg +0 -175
  61. package/svg/contour_tangential_two_arcs_requirements.svg +0 -364
  62. package/svg/corner_rounded_ext_arc_ext_arc.svg +0 -281
  63. package/svg/corner_rounded_int_arc_ext_arc.svg +0 -281
  64. package/svg/corner_rounded_int_arc_int_arc.svg +0 -279
  65. package/svg/corner_rounded_stroke_ext_arc.svg +0 -218
  66. package/svg/corner_rounded_stroke_int_arc.svg +0 -225
  67. package/svg/corner_rounded_stroke_stroke.svg +0 -174
  68. package/svg/geom_dev.svg +0 -14708
  69. package/svg/geom_modules.svg +0 -246
  70. package/svg/geom_user.svg +0 -58
  71. package/svg/line_axis_x_cases.svg +0 -1408
  72. package/svg/line_axis_y_cases.svg +0 -1369
  73. package/svg/line_distanceOrig.svg +0 -318
  74. package/svg/line_getAxisXIntersection.svg +0 -262
  75. package/svg/line_getAxisXIntersection_2.svg +0 -244
  76. package/svg/line_getAxisYIntersection.svg +0 -304
  77. package/svg/line_getAxisYIntersection_2.svg +0 -285
  78. package/svg/line_getAxisYIntersection_3.svg +0 -277
  79. package/svg/line_intersection.svg +0 -346
  80. package/svg/line_projectPoint.svg +0 -311
  81. package/svg/point_1.svg +0 -243
  82. package/svg/point_2.svg +0 -409
  83. package/svg/point_3.svg +0 -298
  84. package/svg/point_4.svg +0 -272
  85. package/svg/point_5.svg +0 -356
  86. package/svg/right_triangle.svg +0 -194
  87. package/svg/vector_definition.svg +0 -130
  88. package/tsconfig.json +0 -13
  89. package/vitest.config.ts +0 -7
@@ -1,364 +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="288.03998"
6
- height="428.93948"
7
- viewBox="0 0 76.210578 113.49024"
8
- version="1.1"
9
- id="svg5"
10
- inkscape:version="1.2.2 (1:1.2.2+202305151914+b0a8486541)"
11
- sodipodi:docname="geom.svg"
12
- inkscape:export-filename="arc_definition.svg"
13
- inkscape:export-xdpi="96"
14
- inkscape:export-ydpi="96"
15
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
16
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
17
- xmlns="http://www.w3.org/2000/svg"
18
- xmlns:svg="http://www.w3.org/2000/svg">
19
- <sodipodi:namedview
20
- id="namedview7"
21
- pagecolor="#ffffff"
22
- bordercolor="#666666"
23
- borderopacity="1.0"
24
- inkscape:showpageshadow="2"
25
- inkscape:pageopacity="0.0"
26
- inkscape:pagecheckerboard="0"
27
- inkscape:deskcolor="#d1d1d1"
28
- inkscape:document-units="px"
29
- showgrid="false"
30
- inkscape:zoom="1.36"
31
- inkscape:cx="333.08824"
32
- inkscape:cy="12727.574"
33
- inkscape:window-width="1366"
34
- inkscape:window-height="836"
35
- inkscape:window-x="0"
36
- inkscape:window-y="0"
37
- inkscape:window-maximized="1"
38
- inkscape:current-layer="layer1"
39
- showguides="true" />
40
- <defs
41
- id="defs2">
42
- <rect
43
- x="59.561695"
44
- y="11092.664"
45
- width="54.615692"
46
- height="37.877701"
47
- id="rect3649" />
48
- <rect
49
- x="417.68872"
50
- y="11091.145"
51
- width="63.205135"
52
- height="46.069336"
53
- id="rect3643" />
54
- <rect
55
- x="86.404892"
56
- y="8251.748"
57
- width="70.081017"
58
- height="57.682091"
59
- id="rect2113-3-7-3" />
60
- <rect
61
- x="204.84335"
62
- y="8338.3955"
63
- width="83.852852"
64
- height="42.639156"
65
- id="rect2119-6-9-6" />
66
- <rect
67
- x="343.1825"
68
- y="8353.1172"
69
- width="64.674751"
70
- height="45.493374"
71
- id="rect2125-7-2-0" />
72
- <rect
73
- x="307.06467"
74
- y="8197.7441"
75
- width="48.524952"
76
- height="24.998806"
77
- id="rect2247-5-0-6" />
78
- <rect
79
- x="79.050255"
80
- y="8300.6836"
81
- width="273.1701"
82
- height="51.164238"
83
- id="rect1972-3-2-2" />
84
- <rect
85
- x="251.71738"
86
- y="8436.2734"
87
- width="62.168148"
88
- height="32.449692"
89
- id="rect9067-3-61" />
90
- <rect
91
- x="420.70566"
92
- y="8448.9414"
93
- width="77.717155"
94
- height="48.312233"
95
- id="rect9073-7-8" />
96
- <rect
97
- x="450.46594"
98
- y="10459.747"
99
- width="41.233315"
100
- height="38.021324"
101
- id="rect49640-2" />
102
- <rect
103
- x="367.05576"
104
- y="10442.883"
105
- width="32.882603"
106
- height="25.009695"
107
- id="rect49648-3" />
108
- <rect
109
- x="423.24832"
110
- y="10177.365"
111
- width="36.09647"
112
- height="24.909346"
113
- id="rect3942-8" />
114
- <rect
115
- x="441.70547"
116
- y="10454.384"
117
- width="116.48731"
118
- height="28.208582"
119
- id="rect49656-3-5" />
120
- <rect
121
- x="441.70547"
122
- y="10454.384"
123
- width="116.48731"
124
- height="28.208582"
125
- id="rect49656-6" />
126
- </defs>
127
- <g
128
- inkscape:label="Layer 1"
129
- inkscape:groupmode="layer"
130
- id="layer1"
131
- transform="translate(-37.048004,-2881.2529)">
132
- <rect
133
- style="fill:#ffffff;stroke:#ffffff;stroke-width:0.264584"
134
- id="rect2407-5-5-06"
135
- width="75.945992"
136
- height="113.22585"
137
- x="37.180298"
138
- y="2881.3853"
139
- inkscape:export-filename="construct_corner_rounded_stroke_int_arc.svg"
140
- inkscape:export-xdpi="96"
141
- inkscape:export-ydpi="96" />
142
- <path
143
- style="fill:none;stroke:#cccccc;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
144
- d="m 42.44345,2962.8838 59.90652,-76.2836"
145
- id="path12249" />
146
- <path
147
- style="fill:none;stroke:#ffaaaa;stroke-width:0.264583"
148
- id="path12247"
149
- sodipodi:type="arc"
150
- sodipodi:cx="50.93063"
151
- sodipodi:cy="2952.4473"
152
- sodipodi:rx="23.120169"
153
- sodipodi:ry="23.120169"
154
- sodipodi:start="5.1422404"
155
- sodipodi:end="0.88569616"
156
- sodipodi:arc-type="arc"
157
- d="m 60.56563,2931.4304 a 23.120169,23.120169 0 0 1 13.297133,18.0742 23.120169,23.120169 0 0 1 -8.302833,20.8459"
158
- sodipodi:open="true" />
159
- <path
160
- style="fill:none;stroke:#ffaaaa;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
161
- d="m 62.595788,2982.0501 34.726051,-94.744"
162
- id="path2057-6-9-0-1"
163
- sodipodi:nodetypes="cc" />
164
- <path
165
- style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
166
- d="m 58.38984,2962.3776 13.42461,-36.7838"
167
- id="path2057-6-9-0"
168
- sodipodi:nodetypes="cc" />
169
- <text
170
- xml:space="preserve"
171
- transform="matrix(0.26458333,0,0,0.26458333,30.775372,777.1633)"
172
- id="text2111-2-2-6"
173
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2113-3-7-3);display:inline"><tspan
174
- x="86.404297"
175
- y="8264.7246"
176
- id="tspan45015">p1</tspan></text>
177
- <text
178
- xml:space="preserve"
179
- transform="matrix(0.26458333,0,0,0.26458333,14.878899,713.74987)"
180
- id="text2117-9-2-8"
181
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2119-6-9-6);display:inline"><tspan
182
- x="204.84375"
183
- y="8351.3711"
184
- id="tspan45017">p2</tspan></text>
185
- <text
186
- xml:space="preserve"
187
- transform="matrix(0.26458333,0,0,0.26458333,-18.172655,765.44044)"
188
- id="text2123-1-8-9"
189
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2125-7-2-0);display:inline"><tspan
190
- x="343.18164"
191
- y="8366.0938"
192
- id="tspan45019">p3</tspan></text>
193
- <circle
194
- style="fill:none;stroke:#d45500;stroke-width:0.264583"
195
- id="path2235-2-9-2"
196
- cx="73.92244"
197
- cy="2950.5139"
198
- r="10.633756" />
199
- <path
200
- style="fill:none;stroke:#b3b3b3;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
201
- d="m 58.48524,2945.1168 23.59958,8.5793"
202
- id="path2239-0-7-6" />
203
- <path
204
- style="fill:none;stroke:#008000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
205
- d="m 73.86284,2950.6358 6.00609,8.7752"
206
- id="path2243-3-3-6" />
207
- <text
208
- xml:space="preserve"
209
- transform="matrix(0.26458333,0,0,0.26458333,-2.2399745,784.35917)"
210
- id="text2245-6-6-4"
211
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2247-5-0-6);display:inline;fill:#008000"><tspan
212
- x="307.06445"
213
- y="8210.7207"
214
- id="tspan45021">r</tspan></text>
215
- <path
216
- style="fill:none;stroke:#666666;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
217
- d="m 63.08125,2949.224 2.05055,0.7503 0.73431,-2.2371"
218
- id="path2251-0-1-9" />
219
- <text
220
- xml:space="preserve"
221
- transform="matrix(0.26458333,0,0,0.26458333,18.689082,787.51254)"
222
- id="text1970-1-2-5"
223
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1972-3-2-2);display:inline"><tspan
224
- x="79.050781"
225
- y="8313.6602"
226
- id="tspan45023">construct cornerRounded(radius)
227
- </tspan><tspan
228
- x="79.050781"
229
- y="8331.9932"
230
- id="tspan45025">case stroke-int-arc</tspan></text>
231
- <path
232
- style="fill:none;stroke:#e6e6e6;stroke-width:0.264583"
233
- id="path8778-9-0"
234
- sodipodi:type="arc"
235
- sodipodi:cx="-2642.2834"
236
- sodipodi:cy="-1317.9117"
237
- sodipodi:rx="33.899853"
238
- sodipodi:ry="33.899853"
239
- sodipodi:start="1.1432914"
240
- sodipodi:end="2.7898327"
241
- sodipodi:arc-type="slice"
242
- d="m -2628.2285,-1287.0628 a 33.899853,33.899853 0 0 1 -27.1238,0.4305 33.899853,33.899853 0 0 1 -18.7552,-19.5992 l 31.8241,-11.6802 z"
243
- transform="rotate(-117.49458)"
244
- inkscape:transform-center-x="-16.990157"
245
- inkscape:transform-center-y="-1.8953049" />
246
- <path
247
- style="fill:none;stroke:#b3b3b3;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
248
- d="m 102.30749,2948.727 -51.3105,3.6469"
249
- id="path8881-3-4"
250
- sodipodi:nodetypes="cc" />
251
- <path
252
- style="fill:none;stroke:#000000;stroke-width:0.264583"
253
- id="path8778-8-1-8"
254
- sodipodi:type="arc"
255
- sodipodi:cx="-2642.3147"
256
- sodipodi:cy="-1317.84"
257
- sodipodi:rx="33.899853"
258
- sodipodi:ry="33.899853"
259
- sodipodi:start="1.1432914"
260
- sodipodi:end="2.7898327"
261
- sodipodi:arc-type="arc"
262
- d="m -2628.2598,-1286.991 a 33.899853,33.899853 0 0 1 -27.1238,0.4305 33.899853,33.899853 0 0 1 -18.7552,-19.5993"
263
- sodipodi:open="true"
264
- transform="rotate(-117.49458)"
265
- inkscape:transform-center-x="-27.506279"
266
- inkscape:transform-center-y="-1.9007211" />
267
- <path
268
- style="fill:none;stroke:#0000ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
269
- d="m 84.55273,2949.8447 -33.56587,2.5222"
270
- id="path9063-9-7"
271
- sodipodi:nodetypes="cc" />
272
- <text
273
- xml:space="preserve"
274
- transform="matrix(0.26458333,0,0,0.26458333,-9.6260863,715.53604)"
275
- id="text9065-4-1"
276
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect9067-3-61);display:inline;fill:#0000ff"><tspan
277
- x="251.7168"
278
- y="8449.25"
279
- id="tspan45027">r2</tspan></text>
280
- <path
281
- style="fill:none;stroke:#ff00ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
282
- d="m 88.419715,2904.5458 c 0,0 0.413898,1.1742 0.874112,1.547 0.318975,0.2584 1.174597,0.3702 1.174597,0.3702"
283
- id="path12251"
284
- sodipodi:nodetypes="cac" />
285
- <text
286
- xml:space="preserve"
287
- transform="matrix(0.26458333,0,0,0.26458333,-24.374175,129.16217)"
288
- id="text49638-7"
289
- style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect49640-2);display:inline;fill:#ff00ff"><tspan
290
- x="450.4668"
291
- y="10470.363"
292
- id="tspan45029">1:pA</tspan></text>
293
- <text
294
- xml:space="preserve"
295
- transform="matrix(0.26458333,0,0,0.26458333,-24.472404,147.11746)"
296
- id="text49646-6"
297
- style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect49648-3);display:inline;fill:#ff00ff"><tspan
298
- x="367.05664"
299
- y="10453.5"
300
- id="tspan45031">2:lA5</tspan></text>
301
- <path
302
- style="fill:none;stroke:#ff00ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
303
- d="m 50.869918,2952.2535 42.937126,-54.6894"
304
- id="path12249-0" />
305
- <text
306
- xml:space="preserve"
307
- transform="matrix(0.26458333,0,0,0.26458333,-43.587575,257.86602)"
308
- id="text3940-7"
309
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3942-8);display:inline"><tspan
310
- x="423.24805"
311
- y="10190.342"
312
- id="tspan45033">p7</tspan></text>
313
- <text
314
- xml:space="preserve"
315
- transform="matrix(0.26458333,0,0,0.26458333,-60.563292,161.60031)"
316
- id="text49654-6-3"
317
- style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect49656-3-5);display:inline;fill:#ff00ff"><tspan
318
- x="441.70508"
319
- y="10465"
320
- id="tspan45035">3:a125</tspan></text>
321
- <path
322
- style="fill:none;stroke:#ff00ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
323
- d="m 66.84944,2931.6031 c 0,0 0.413898,1.1742 0.874112,1.547 0.318975,0.2584 1.174597,0.3702 1.174597,0.3702"
324
- id="path12251-5"
325
- sodipodi:nodetypes="cac" />
326
- <text
327
- xml:space="preserve"
328
- transform="matrix(0.26458333,0,0,0.26458333,-25.676514,139.94141)"
329
- id="text49654-2"
330
- style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect49656-6);display:inline;fill:#ff00ff"><tspan
331
- x="441.70508"
332
- y="10465"
333
- id="tspan45037">4:aA=a125</tspan></text>
334
- <text
335
- xml:space="preserve"
336
- transform="matrix(0.26458333,0,0,0.26458333,-62.983442,712.73089)"
337
- id="text9071-7-72"
338
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect9073-7-8);display:inline"><tspan
339
- x="420.70508"
340
- y="8461.918"
341
- id="tspan45039">p5</tspan></text>
342
- <path
343
- style="fill:none;stroke:#ffcc00;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
344
- d="m 53.342235,2948.9683 c 0,0 1.121886,0.7669 1.320411,1.369 0.172379,0.5228 -0.214685,1.6375 -0.214685,1.6375"
345
- id="path3639"
346
- sodipodi:nodetypes="cac" />
347
- <text
348
- xml:space="preserve"
349
- transform="matrix(0.26458333,0,0,0.26458333,-51.086713,7.7233467)"
350
- id="text3641"
351
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3643);display:inline;fill:#808080"><tspan
352
- x="417.68945"
353
- y="11104.121"
354
- id="tspan45041">p8</tspan></text>
355
- <text
356
- xml:space="preserve"
357
- transform="matrix(0.26458333,0,0,0.26458333,69.637412,10.744898)"
358
- id="text3647"
359
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3649);display:inline;fill:#808080"><tspan
360
- x="59.5625"
361
- y="11105.641"
362
- id="tspan45043">p9</tspan></text>
363
- </g>
364
- </svg>