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,356 +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="312.45325"
7
- viewBox="0 0 76.210578 82.669921"
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.1893044"
31
- inkscape:cx="159.75725"
32
- inkscape:cy="12156.265"
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="false" />
40
- <defs
41
- id="defs2">
42
- <rect
43
- x="86.404892"
44
- y="8251.748"
45
- width="70.081017"
46
- height="57.682091"
47
- id="rect2113-3-7-8-7" />
48
- <rect
49
- x="204.84335"
50
- y="8338.3955"
51
- width="83.852852"
52
- height="42.639156"
53
- id="rect2119-6-9-4-9" />
54
- <rect
55
- x="343.1825"
56
- y="8353.1172"
57
- width="64.674751"
58
- height="45.493374"
59
- id="rect2125-7-2-5-2" />
60
- <rect
61
- x="307.06467"
62
- y="8197.7441"
63
- width="48.524952"
64
- height="24.998806"
65
- id="rect2247-5-0-0-0" />
66
- <rect
67
- x="79.050255"
68
- y="8300.6836"
69
- width="264.65823"
70
- height="48.8255"
71
- id="rect1972-3-2-3-2" />
72
- <rect
73
- x="251.71738"
74
- y="8436.2734"
75
- width="62.168148"
76
- height="32.449692"
77
- id="rect9067-3-6-3" />
78
- <rect
79
- x="420.70566"
80
- y="8448.9414"
81
- width="77.717155"
82
- height="48.312233"
83
- id="rect9073-7-1-7" />
84
- <rect
85
- x="439.93347"
86
- y="9157.3789"
87
- width="51.895821"
88
- height="43.12149"
89
- id="rect22942-5" />
90
- <rect
91
- x="310.89185"
92
- y="9159.2021"
93
- width="33.538937"
94
- height="27.888342"
95
- id="rect22948-9" />
96
- <rect
97
- x="450.46594"
98
- y="10459.747"
99
- width="41.233315"
100
- height="38.021324"
101
- id="rect49640-2-6" />
102
- <rect
103
- x="423.24832"
104
- y="10177.365"
105
- width="36.09647"
106
- height="24.909346"
107
- id="rect3942-9" />
108
- <rect
109
- x="450.46594"
110
- y="10459.747"
111
- width="59.67897"
112
- height="39.07893"
113
- id="rect49640-2-6-0" />
114
- </defs>
115
- <g
116
- inkscape:label="Layer 1"
117
- inkscape:groupmode="layer"
118
- id="layer1"
119
- transform="translate(-39.164314,-3003.6116)">
120
- <rect
121
- style="fill:#ffffff;stroke:#ffffff;stroke-width:0.264583"
122
- id="rect2407-5-5-0-1"
123
- width="75.945992"
124
- height="82.40551"
125
- x="39.296608"
126
- y="3003.7437"
127
- inkscape:export-filename="construct_corner_rounded_int_arc_int_arc.svg"
128
- inkscape:export-xdpi="96"
129
- inkscape:export-ydpi="96" />
130
- <path
131
- style="fill:none;stroke:#ffaaaa;stroke-width:0.264583"
132
- id="path20498"
133
- sodipodi:type="arc"
134
- sodipodi:cx="94.207787"
135
- sodipodi:cy="3044.8125"
136
- sodipodi:rx="24.213923"
137
- sodipodi:ry="24.213923"
138
- sodipodi:start="1.8211128"
139
- sodipodi:end="5.0732811"
140
- sodipodi:arc-type="arc"
141
- d="m 88.209742,3068.2718 a 24.213923,24.213923 0 0 1 -17.542291,-17.7877 24.213923,24.213923 0 0 1 7.516529,-23.8252 24.213923,24.213923 0 0 1 24.57396,-4.5005"
142
- sodipodi:open="true" />
143
- <path
144
- style="fill:none;stroke:#ffaaaa;stroke-width:0.264583"
145
- id="path20440"
146
- sodipodi:type="arc"
147
- sodipodi:cx="52.563511"
148
- sodipodi:cy="3044.0476"
149
- sodipodi:rx="23.324917"
150
- sodipodi:ry="23.324917"
151
- sodipodi:start="5.1488416"
152
- sodipodi:end="1.0498465"
153
- sodipodi:arc-type="arc"
154
- d="m 62.42359,3022.9092 a 23.324917,23.324917 0 0 1 13.444024,20.1533 23.324917,23.324917 0 0 1 -11.695194,21.2159"
155
- sodipodi:open="true" />
156
- <text
157
- xml:space="preserve"
158
- transform="matrix(0.26458333,0,0,0.26458333,35.459536,874.78195)"
159
- id="text2111-2-2-3-7"
160
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2113-3-7-8-7);display:inline"><tspan
161
- x="86.404297"
162
- y="8264.7246"
163
- id="tspan28997">p1</tspan></text>
164
- <text
165
- xml:space="preserve"
166
- transform="matrix(0.26458333,0,0,0.26458333,16.466036,805.28815)"
167
- id="text2117-9-2-2-2"
168
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2119-6-9-4-9);display:inline"><tspan
169
- x="204.84375"
170
- y="8351.3711"
171
- id="tspan28999">p2</tspan></text>
172
- <text
173
- xml:space="preserve"
174
- transform="matrix(0.26458333,0,0,0.26458333,-16.585519,856.97872)"
175
- id="text2123-1-8-0-2"
176
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2125-7-2-5-2);display:inline"><tspan
177
- x="343.18164"
178
- y="8366.0938"
179
- id="tspan29001">p3</tspan></text>
180
- <path
181
- style="fill:none;stroke:#008000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
182
- d="m 73.120443,3033.1442 6.00609,8.7752"
183
- id="path2243-3-3-5-6" />
184
- <text
185
- xml:space="preserve"
186
- transform="matrix(0.26458333,0,0,0.26458333,-8.0574342,867.49369)"
187
- id="text2245-6-6-5-1"
188
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2247-5-0-0-0);display:inline;fill:#008000"><tspan
189
- x="307.06445"
190
- y="8210.7207"
191
- id="tspan29003">r</tspan></text>
192
- <text
193
- xml:space="preserve"
194
- transform="matrix(0.26458333,0,0,0.26458333,20.805385,879.05082)"
195
- id="text1970-1-2-7-0"
196
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1972-3-2-3-2);display:inline"><tspan
197
- x="79.050781"
198
- y="8313.6602"
199
- id="tspan29005">construct cornerRounded(radius)
200
- </tspan><tspan
201
- x="79.050781"
202
- y="8331.9932"
203
- id="tspan29007">case int-arc-int-arc</tspan></text>
204
- <path
205
- style="fill:none;stroke:#e6e6e6;stroke-width:0.264583"
206
- id="path8778-9-6-6"
207
- sodipodi:type="arc"
208
- sodipodi:cx="-2724.2156"
209
- sodipodi:cy="-1358.7638"
210
- sodipodi:rx="33.899853"
211
- sodipodi:ry="33.899853"
212
- sodipodi:start="1.1432914"
213
- sodipodi:end="2.7898327"
214
- sodipodi:arc-type="slice"
215
- d="m -2710.1606,-1327.9148 a 33.899853,33.899853 0 0 1 -27.1239,0.4305 33.899853,33.899853 0 0 1 -18.7552,-19.5993 l 31.8241,-11.6802 z"
216
- transform="rotate(-117.49458)"
217
- inkscape:transform-center-x="-16.990157"
218
- inkscape:transform-center-y="-1.8953049" />
219
- <path
220
- style="fill:none;stroke:#b3b3b3;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
221
- d="m 97.402543,3019.7967 -44.81841,24.1155"
222
- id="path8881-3-5-1"
223
- sodipodi:nodetypes="cc" />
224
- <path
225
- style="fill:none;stroke:#000000;stroke-width:0.264583"
226
- id="path8778-8-1-6-5"
227
- sodipodi:type="arc"
228
- sodipodi:cx="-2724.2468"
229
- sodipodi:cy="-1358.692"
230
- sodipodi:rx="33.899853"
231
- sodipodi:ry="33.899853"
232
- sodipodi:start="1.1432914"
233
- sodipodi:end="2.7898327"
234
- sodipodi:arc-type="arc"
235
- d="m -2710.1919,-1327.843 a 33.899853,33.899853 0 0 1 -27.1238,0.4304 33.899853,33.899853 0 0 1 -18.7552,-19.5992"
236
- sodipodi:open="true"
237
- transform="rotate(-117.49458)"
238
- inkscape:transform-center-x="-27.506279"
239
- inkscape:transform-center-y="-1.9007211" />
240
- <path
241
- style="fill:none;stroke:#0000ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
242
- d="m 82.605933,3027.9048 -30.03194,16.0004"
243
- id="path9063-9-9-9"
244
- sodipodi:nodetypes="cc" />
245
- <text
246
- xml:space="preserve"
247
- transform="matrix(0.26458333,0,0,0.26458333,-2.1303469,799.62414)"
248
- id="text9065-4-3-4"
249
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect9067-3-6-3);display:inline;fill:#0000ff"><tspan
250
- x="251.7168"
251
- y="8449.25"
252
- id="tspan29009">r3</tspan></text>
253
- <text
254
- xml:space="preserve"
255
- transform="matrix(0.26458333,0,0,0.26458333,-63.771114,807.46978)"
256
- id="text9071-7-7-9"
257
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect9073-7-1-7);display:inline"><tspan
258
- x="420.70508"
259
- y="8461.918"
260
- id="tspan29011">p5</tspan></text>
261
- <path
262
- style="fill:none;stroke:#e6e6e6;stroke-width:0.264583"
263
- id="path22803-0"
264
- sodipodi:type="arc"
265
- sodipodi:cx="-473.6069"
266
- sodipodi:cy="3008.8972"
267
- sodipodi:rx="34.172989"
268
- sodipodi:ry="34.172989"
269
- sodipodi:start="2.9452743"
270
- sodipodi:end="4.2600932"
271
- sodipodi:arc-type="slice"
272
- d="m -507.12348,3015.563 a 34.172989,34.172989 0 0 1 18.5819,-37.4025 l 14.93468,30.7367 z"
273
- inkscape:transform-center-x="17.15886"
274
- inkscape:transform-center-y="-7.1831739"
275
- transform="rotate(-10.712023)" />
276
- <path
277
- style="fill:none;stroke:#000000;stroke-width:0.264583"
278
- id="path22803-4-91"
279
- sodipodi:type="arc"
280
- sodipodi:cx="-473.75439"
281
- sodipodi:cy="3008.8523"
282
- sodipodi:rx="34.172989"
283
- sodipodi:ry="34.172989"
284
- sodipodi:start="2.9452743"
285
- sodipodi:end="4.2600932"
286
- sodipodi:arc-type="arc"
287
- d="m -507.27097,3015.5181 a 34.172989,34.172989 0 0 1 18.5819,-37.4026"
288
- sodipodi:open="true"
289
- inkscape:transform-center-x="27.505905"
290
- inkscape:transform-center-y="-7.1998986"
291
- transform="rotate(-10.712023)" />
292
- <circle
293
- style="fill:none;stroke:#d45500;stroke-width:0.264583"
294
- id="path2235-2-9-6-7"
295
- cx="73.064522"
296
- cy="3033.324"
297
- r="10.633756" />
298
- <path
299
- style="fill:none;stroke:#cccccc;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
300
- d="m 94.143903,3044.7168 -38.42649,-21.8285"
301
- id="path22936-7" />
302
- <path
303
- style="fill:none;stroke:#008080;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
304
- d="m 94.158033,3044.9749 -30.23719,-17.2918"
305
- id="path22938-1" />
306
- <text
307
- xml:space="preserve"
308
- transform="matrix(0.26458333,0,0,0.26458333,-29.373782,614.14431)"
309
- id="text22940-1"
310
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect22942-5);display:inline;fill:#008080"><tspan
311
- x="439.93359"
312
- y="9170.3555"
313
- id="tspan29013">r2</tspan></text>
314
- <text
315
- xml:space="preserve"
316
- transform="matrix(0.26458333,0,0,0.26458333,11.362937,621.04331)"
317
- id="text22946-5"
318
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect22948-9);display:inline"><tspan
319
- x="310.89258"
320
- y="9172.1797"
321
- id="tspan29015">p4</tspan></text>
322
- <path
323
- style="fill:none;stroke:#ff00ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
324
- d="m 52.640417,3044.0987 41.416163,0.7316"
325
- id="path20500" />
326
- <text
327
- xml:space="preserve"
328
- transform="matrix(0.26458333,0,0,0.26458333,-58.292055,277.10709)"
329
- id="text49638-7-2"
330
- style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect49640-2-6);display:inline;fill:#ff00ff"><tspan
331
- x="450.4668"
332
- y="10470.363"
333
- id="tspan29017">1:l54</tspan></text>
334
- <text
335
- xml:space="preserve"
336
- transform="matrix(0.26458333,0,0,0.26458333,-36.982594,336.48447)"
337
- id="text3940-2"
338
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3942-9);display:inline"><tspan
339
- x="423.24805"
340
- y="10190.342"
341
- id="tspan29019">p7</tspan></text>
342
- <path
343
- style="fill:none;stroke:#ff00ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
344
- d="m 56.152125,3041.9837 c 0,0 0.929726,0.4716 1.00285,0.9191 0.07208,0.4411 -0.648724,1.1735 -0.648724,1.1735"
345
- id="path20650"
346
- sodipodi:nodetypes="cac" />
347
- <text
348
- xml:space="preserve"
349
- transform="matrix(0.26458333,0,0,0.26458333,-74.471359,271.16979)"
350
- id="text49638-7-2-2"
351
- style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect49640-2-6-0);display:inline;fill:#ff00ff"><tspan
352
- x="450.4668"
353
- y="10470.363"
354
- id="tspan29021">2:a457</tspan></text>
355
- </g>
356
- </svg>