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.
Files changed (90) hide show
  1. package/dist/index.d.ts +505 -0
  2. package/dist/index.js +3848 -0
  3. package/dist/index.js.map +1 -0
  4. package/package.json +6 -1
  5. package/.eslintignore +0 -17
  6. package/.eslintrc.cjs +0 -24
  7. package/.prettierignore +0 -15
  8. package/.prettierrc +0 -8
  9. package/src/aaExportContent.ts +0 -213
  10. package/src/aaExportFile.ts +0 -141
  11. package/src/aaParamGeom.ts +0 -62
  12. package/src/angle_utils.test.ts +0 -83
  13. package/src/angle_utils.ts +0 -98
  14. package/src/arc_to_stroke.ts +0 -73
  15. package/src/canvas_utils.test.ts +0 -28
  16. package/src/canvas_utils.ts +0 -159
  17. package/src/contour.test.ts +0 -37
  18. package/src/contour.ts +0 -806
  19. package/src/designParams.ts +0 -178
  20. package/src/figure.test.ts +0 -21
  21. package/src/figure.ts +0 -400
  22. package/src/index.ts +0 -16
  23. package/src/line.test.ts +0 -78
  24. package/src/line.ts +0 -359
  25. package/src/paramFile.ts +0 -52
  26. package/src/point.test.ts +0 -36
  27. package/src/point.ts +0 -246
  28. package/src/prepare_pax.ts +0 -102
  29. package/src/segment.test.ts +0 -26
  30. package/src/segment.ts +0 -701
  31. package/src/sub_design.ts +0 -16
  32. package/src/triangle_utils.test.ts +0 -38
  33. package/src/triangle_utils.ts +0 -112
  34. package/src/vector.test.ts +0 -28
  35. package/src/vector.ts +0 -122
  36. package/src/volume.ts +0 -50
  37. package/src/write_dxf.ts +0 -100
  38. package/src/write_openjscad.ts +0 -284
  39. package/src/write_openscad.ts +0 -305
  40. package/src/write_pax.ts +0 -73
  41. package/src/write_svg.ts +0 -101
  42. package/svg/any_triangle.svg +0 -156
  43. package/svg/arc_definition.svg +0 -506
  44. package/svg/construct_corner_rounded_ext_arc_ext_arc.svg +0 -378
  45. package/svg/construct_corner_rounded_int_arc_ext_arc.svg +0 -359
  46. package/svg/construct_corner_rounded_int_arc_int_arc.svg +0 -356
  47. package/svg/construct_corner_rounded_stroke_ext_arc.svg +0 -374
  48. package/svg/construct_corner_rounded_stroke_ext_arc_obtuse.svg +0 -370
  49. package/svg/construct_corner_rounded_stroke_ext_arc_obtuse_method2.svg +0 -311
  50. package/svg/construct_corner_rounded_stroke_int_arc.svg +0 -364
  51. package/svg/construct_corner_rounded_stroke_int_arc_obtuse.svg +0 -358
  52. package/svg/construct_corner_rounded_stroke_int_arc_obtuse_method2.svg +0 -237
  53. package/svg/construct_corner_rounded_stroke_stroke.svg +0 -280
  54. package/svg/construct_corner_wideacc.svg +0 -286
  55. package/svg/construct_corner_widened.svg +0 -278
  56. package/svg/construction_of_line_intersection_1.svg +0 -187
  57. package/svg/construction_of_line_intersection_2.svg +0 -189
  58. package/svg/contour_arc_definition_options.svg +0 -324
  59. package/svg/contour_point_absolute_relative.svg +0 -258
  60. package/svg/contour_tangential_two_arcs.svg +0 -531
  61. package/svg/contour_tangential_two_arcs_impossible_case.svg +0 -175
  62. package/svg/contour_tangential_two_arcs_requirements.svg +0 -364
  63. package/svg/corner_rounded_ext_arc_ext_arc.svg +0 -281
  64. package/svg/corner_rounded_int_arc_ext_arc.svg +0 -281
  65. package/svg/corner_rounded_int_arc_int_arc.svg +0 -279
  66. package/svg/corner_rounded_stroke_ext_arc.svg +0 -218
  67. package/svg/corner_rounded_stroke_int_arc.svg +0 -225
  68. package/svg/corner_rounded_stroke_stroke.svg +0 -174
  69. package/svg/geom_dev.svg +0 -14708
  70. package/svg/geom_modules.svg +0 -246
  71. package/svg/geom_user.svg +0 -58
  72. package/svg/line_axis_x_cases.svg +0 -1408
  73. package/svg/line_axis_y_cases.svg +0 -1369
  74. package/svg/line_distanceOrig.svg +0 -318
  75. package/svg/line_getAxisXIntersection.svg +0 -262
  76. package/svg/line_getAxisXIntersection_2.svg +0 -244
  77. package/svg/line_getAxisYIntersection.svg +0 -304
  78. package/svg/line_getAxisYIntersection_2.svg +0 -285
  79. package/svg/line_getAxisYIntersection_3.svg +0 -277
  80. package/svg/line_intersection.svg +0 -346
  81. package/svg/line_projectPoint.svg +0 -311
  82. package/svg/point_1.svg +0 -243
  83. package/svg/point_2.svg +0 -409
  84. package/svg/point_3.svg +0 -298
  85. package/svg/point_4.svg +0 -272
  86. package/svg/point_5.svg +0 -356
  87. package/svg/right_triangle.svg +0 -194
  88. package/svg/vector_definition.svg +0 -130
  89. package/tsconfig.json +0 -13
  90. package/vitest.config.ts +0 -7
@@ -1,378 +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.03995"
6
- height="312.45416"
7
- viewBox="0 0 76.210569 82.670163"
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.6819304"
31
- inkscape:cx="257.44228"
32
- inkscape:cy="11834.318"
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-5-5-1" />
48
- <rect
49
- x="204.84335"
50
- y="8338.3955"
51
- width="83.852852"
52
- height="42.639156"
53
- id="rect2119-6-9-4-2-0-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-5-4-4" />
60
- <rect
61
- x="307.06467"
62
- y="8197.7441"
63
- width="48.524952"
64
- height="24.998806"
65
- id="rect2247-5-0-0-4-8-7" />
66
- <rect
67
- x="79.050255"
68
- y="8300.6836"
69
- width="271.6814"
70
- height="55.449215"
71
- id="rect1972-3-2-3-7-7-8" />
72
- <rect
73
- x="251.71738"
74
- y="8436.2734"
75
- width="62.168148"
76
- height="32.449692"
77
- id="rect9067-3-6-4-1-4" />
78
- <rect
79
- x="420.70566"
80
- y="8448.9414"
81
- width="77.717155"
82
- height="48.312233"
83
- id="rect9073-7-1-4-7-5" />
84
- <rect
85
- x="439.93347"
86
- y="9157.3789"
87
- width="51.895821"
88
- height="43.12149"
89
- id="rect22942-3-2-0" />
90
- <rect
91
- x="310.89185"
92
- y="9159.2021"
93
- width="33.538937"
94
- height="27.888342"
95
- id="rect22948-0-7-3" />
96
- <rect
97
- x="307.06467"
98
- y="8197.7441"
99
- width="48.524952"
100
- height="24.998806"
101
- id="rect2247-5-0-0-4-8-7-6" />
102
- <rect
103
- x="450.46594"
104
- y="10459.747"
105
- width="41.233315"
106
- height="38.021324"
107
- id="rect49640-2-6-7-9" />
108
- <rect
109
- x="423.24832"
110
- y="10177.365"
111
- width="36.09647"
112
- height="24.909346"
113
- id="rect3942-9-3-2" />
114
- <rect
115
- x="450.46594"
116
- y="10459.747"
117
- width="59.67897"
118
- height="39.07893"
119
- id="rect49640-2-6-0-3-0" />
120
- </defs>
121
- <g
122
- inkscape:label="Layer 1"
123
- inkscape:groupmode="layer"
124
- id="layer1"
125
- transform="translate(-34.746769,-3184.0379)">
126
- <path
127
- style="fill:none;stroke:#ffaaaa;stroke-width:0.264583"
128
- id="path10987"
129
- sodipodi:type="arc"
130
- sodipodi:cx="36.159637"
131
- sodipodi:cy="3196.1414"
132
- sodipodi:rx="44.646351"
133
- sodipodi:ry="44.646351"
134
- sodipodi:start="0"
135
- sodipodi:end="1.518304"
136
- sodipodi:open="true"
137
- sodipodi:arc-type="arc"
138
- d="m 80.805988,3196.1414 a 44.646351,44.646351 0 0 1 -42.303836,44.5848" />
139
- <path
140
- style="fill:none;stroke:#ffaaaa;stroke-width:0.264583"
141
- id="path10989"
142
- sodipodi:type="arc"
143
- sodipodi:cx="104.49394"
144
- sodipodi:cy="3194.8494"
145
- sodipodi:rx="44.675232"
146
- sodipodi:ry="44.675232"
147
- sodipodi:start="1.6313165"
148
- sodipodi:end="3.2979206"
149
- sodipodi:open="true"
150
- sodipodi:arc-type="arc"
151
- d="m 101.79184,3239.4428 a 44.675232,44.675232 0 0 1 -32.120982,-16.6072 44.675232,44.675232 0 0 1 -9.307362,-34.9418" />
152
- <rect
153
- style="fill:#ffffff;stroke:#ffffff;stroke-width:0.264583"
154
- id="rect2407-5-5-0-7-2-6"
155
- width="75.945992"
156
- height="82.40551"
157
- x="34.879059"
158
- y="3184.1702"
159
- inkscape:export-filename="corner_rounded_ext_arc_ext_arc.svg"
160
- inkscape:export-xdpi="96"
161
- inkscape:export-ydpi="96" />
162
- <text
163
- xml:space="preserve"
164
- transform="matrix(0.26458333,0,0,0.26458333,18.969296,1045.5476)"
165
- id="text2111-2-2-3-8-2-5"
166
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2113-3-7-8-5-5-1);display:inline"><tspan
167
- x="86.404297"
168
- y="8264.7246"
169
- id="tspan16020">p1</tspan></text>
170
- <text
171
- xml:space="preserve"
172
- transform="matrix(0.26458333,0,0,0.26458333,13.481656,1018.8303)"
173
- id="text2123-1-8-0-8-1-9"
174
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2125-7-2-5-5-4-4);display:inline"><tspan
175
- x="343.18164"
176
- y="8366.0938"
177
- id="tspan16022">p3</tspan></text>
178
- <text
179
- xml:space="preserve"
180
- transform="matrix(0.26458333,0,0,0.26458333,-6.3332806,1050.4967)"
181
- id="text2245-6-6-5-4-6-3"
182
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2247-5-0-0-4-8-7);display:inline;fill:#008000"><tspan
183
- x="307.06445"
184
- y="8210.7207"
185
- id="tspan16024">r</tspan></text>
186
- <text
187
- xml:space="preserve"
188
- transform="matrix(0.26458333,0,0,0.26458333,16.387826,1059.4807)"
189
- id="text1970-1-2-7-3-1-8"
190
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1972-3-2-3-7-7-8);display:inline"><tspan
191
- x="79.050781"
192
- y="8313.6602"
193
- id="tspan16026">construct cornerRounded(radius)
194
- </tspan><tspan
195
- x="79.050781"
196
- y="8331.9932"
197
- id="tspan16028">case ext-arc-ext-arc</tspan></text>
198
- <path
199
- style="fill:none;stroke:#e6e6e6;stroke-width:0.264583"
200
- id="path8778-9-6-1-5-5"
201
- sodipodi:type="arc"
202
- sodipodi:cx="-2927.6111"
203
- sodipodi:cy="1282.3087"
204
- sodipodi:rx="33.899853"
205
- sodipodi:ry="33.899853"
206
- sodipodi:start="1.2169958"
207
- sodipodi:end="2.7898327"
208
- sodipodi:arc-type="slice"
209
- d="m -2915.866,1314.1089 a 33.899853,33.899853 0 0 1 -25.9576,-1.0235 33.899853,33.899853 0 0 1 -17.6116,-19.0965 l 31.8241,-11.6802 z"
210
- transform="matrix(-0.43078663,-0.90245381,-0.90245381,0.43078663,0,0)"
211
- inkscape:transform-center-x="15.354513"
212
- inkscape:transform-center-y="17.006646" />
213
- <path
214
- style="fill:none;stroke:#b3b3b3;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
215
- d="m 104.18241,3194.4207 -51.462893,45.9354"
216
- id="path8881-3-5-4-9-6"
217
- sodipodi:nodetypes="cc" />
218
- <path
219
- style="fill:none;stroke:#0000ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
220
- d="m 104.39041,3194.4636 -25.498853,22.667"
221
- id="path9063-9-9-2-4-1"
222
- sodipodi:nodetypes="cc" />
223
- <text
224
- xml:space="preserve"
225
- transform="matrix(0.26458333,0,0,0.26458333,18.301347,971.84246)"
226
- id="text9065-4-3-0-9-1"
227
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect9067-3-6-4-1-4);display:inline;fill:#0000ff"><tspan
228
- x="251.7168"
229
- y="8449.25"
230
- id="tspan16030">r3</tspan></text>
231
- <text
232
- xml:space="preserve"
233
- transform="matrix(0.26458333,0,0,0.26458333,-75.236255,954.77318)"
234
- id="text9071-7-7-6-0-5"
235
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect9073-7-1-4-7-5);display:inline"><tspan
236
- x="420.70508"
237
- y="8461.918"
238
- id="tspan16032">p4</tspan></text>
239
- <path
240
- style="fill:none;stroke:#e6e6e6;stroke-width:0.264583"
241
- id="path22803-8-9-9"
242
- sodipodi:type="arc"
243
- sodipodi:cx="-2842.6196"
244
- sodipodi:cy="1460.9839"
245
- sodipodi:rx="34.172989"
246
- sodipodi:ry="34.172989"
247
- sodipodi:start="2.9452743"
248
- sodipodi:end="4.1819317"
249
- sodipodi:arc-type="slice"
250
- d="m -2876.1362,1467.6497 a 34.172989,34.172989 0 0 1 16.2275,-36.1426 l 17.2891,29.4768 z"
251
- inkscape:transform-center-x="-17.022454"
252
- inkscape:transform-center-y="15.943212"
253
- transform="matrix(-0.46705922,-0.88422604,-0.88422604,0.46705922,0,0)" />
254
- <path
255
- style="fill:none;stroke:#000000;stroke-width:0.264583"
256
- id="path22803-4-9-1-8"
257
- sodipodi:type="arc"
258
- sodipodi:cx="-2842.7671"
259
- sodipodi:cy="1460.939"
260
- sodipodi:rx="34.172989"
261
- sodipodi:ry="34.172989"
262
- sodipodi:start="2.9452743"
263
- sodipodi:end="4.1859004"
264
- sodipodi:arc-type="arc"
265
- d="m -2876.2837,1467.6047 a 34.172989,34.172989 0 0 1 16.3447,-36.2109"
266
- sodipodi:open="true"
267
- inkscape:transform-center-x="-22.011134"
268
- inkscape:transform-center-y="16.052619"
269
- transform="matrix(-0.46705922,-0.88422604,-0.88422604,0.46705922,0,0)" />
270
- <circle
271
- style="fill:none;stroke:#d45500;stroke-width:0.264583"
272
- id="path2235-2-9-6-2-7-4"
273
- cx="70.89373"
274
- cy="3224.0698"
275
- r="10.633756" />
276
- <path
277
- style="fill:none;stroke:#cccccc;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
278
- d="M 92.494121,3241.3327 35.939167,3196.05"
279
- id="path22936-6-7-8"
280
- sodipodi:nodetypes="cc" />
281
- <path
282
- style="fill:none;stroke:#008080;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
283
- d="m 62.575317,3217.4027 -26.67315,-21.4839"
284
- id="path22938-6-1-1"
285
- sodipodi:nodetypes="cc" />
286
- <text
287
- xml:space="preserve"
288
- transform="matrix(0.26458333,0,0,0.26458333,-63.138182,782.9338)"
289
- id="text22940-4-1-0"
290
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect22942-3-2-0);display:inline;fill:#008080"><tspan
291
- x="439.93359"
292
- y="9170.3555"
293
- id="tspan16034">r2</tspan></text>
294
- <text
295
- xml:space="preserve"
296
- transform="matrix(0.26458333,0,0,0.26458333,22.324408,767.35773)"
297
- id="text22946-9-5-3"
298
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect22948-0-7-3);display:inline"><tspan
299
- x="310.89258"
300
- y="9172.1797"
301
- id="tspan16036">p5</tspan></text>
302
- <path
303
- style="fill:none;stroke:#000000;stroke-width:0.264583"
304
- id="path8778-8-1-6-9-9-0"
305
- sodipodi:type="arc"
306
- sodipodi:cx="-2927.3696"
307
- sodipodi:cy="1282.1943"
308
- sodipodi:rx="33.899853"
309
- sodipodi:ry="33.899853"
310
- sodipodi:start="1.2229604"
311
- sodipodi:end="2.7898327"
312
- sodipodi:arc-type="arc"
313
- d="m -2915.8144,1314.064 a 33.899853,33.899853 0 0 1 -43.3793,-20.1895"
314
- sodipodi:open="true"
315
- transform="matrix(-0.43078663,-0.90245381,-0.90245381,0.43078663,0,0)"
316
- inkscape:transform-center-x="15.40577"
317
- inkscape:transform-center-y="17.36844" />
318
- <path
319
- style="fill:none;stroke:#008000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
320
- d="m 70.920157,3224.18 7.821599,-7.1229"
321
- id="path2243-3-3-5-8-0-6"
322
- sodipodi:nodetypes="cc" />
323
- <path
324
- style="fill:none;stroke:#008000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
325
- d="m 62.87549,3217.5357 8.090985,6.6273"
326
- id="path10991" />
327
- <text
328
- xml:space="preserve"
329
- transform="matrix(0.26458333,0,0,0.26458333,-17.588208,1050.52)"
330
- id="text2245-6-6-5-4-6-3-2"
331
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2247-5-0-0-4-8-7-6);display:inline;fill:#008000"><tspan
332
- x="307.06445"
333
- y="8210.7207"
334
- id="tspan16038">r</tspan></text>
335
- <path
336
- style="fill:none;stroke:#ff00ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
337
- d="m 35.958083,3195.7572 68.508207,-1.1662"
338
- id="path11035"
339
- sodipodi:nodetypes="cc" />
340
- <text
341
- xml:space="preserve"
342
- transform="matrix(0.26458333,0,0,0.26458333,16.477916,988.9792)"
343
- id="text2117-9-2-2-6-6-0"
344
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2119-6-9-4-2-0-9);display:inline"><tspan
345
- x="204.84375"
346
- y="8351.3711"
347
- id="tspan16040">p2</tspan></text>
348
- <text
349
- xml:space="preserve"
350
- transform="matrix(0.26458333,0,0,0.26458333,-53.057665,423.86144)"
351
- id="text49638-7-2-5-1"
352
- style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect49640-2-6-7-9);display:inline;fill:#ff00ff"><tspan
353
- x="450.4668"
354
- y="10470.363"
355
- id="tspan16042">1:l54</tspan></text>
356
- <text
357
- xml:space="preserve"
358
- transform="matrix(0.26458333,0,0,0.26458333,-43.898442,531.50824)"
359
- id="text3940-2-6-7"
360
- style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect3942-9-3-2);display:inline"><tspan
361
- x="423.24805"
362
- y="10190.342"
363
- id="tspan16044">p7</tspan></text>
364
- <path
365
- style="fill:none;stroke:#ff00ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
366
- d="m 98.747764,3194.827 c 0,0 -0.478519,1.235 -0.275479,1.8108 0.258649,0.7335 1.720225,1.5764 1.720225,1.5764"
367
- id="path11184"
368
- sodipodi:nodetypes="cac" />
369
- <text
370
- xml:space="preserve"
371
- transform="matrix(0.26458333,0,0,0.26458333,-32.002577,428.08591)"
372
- id="text49638-7-2-2-5-9"
373
- style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect49640-2-6-0-3-0);display:inline;fill:#ff00ff"><tspan
374
- x="450.4668"
375
- y="10470.363"
376
- id="tspan16046">2:a457</tspan></text>
377
- </g>
378
- </svg>