fluidcad 0.0.2

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 (773) hide show
  1. package/LICENSE.txt +504 -0
  2. package/README.md +175 -0
  3. package/bin/fluidcad.js +94 -0
  4. package/bin/watcher.js +55 -0
  5. package/lib/dist/common/edge.d.ts +14 -0
  6. package/lib/dist/common/edge.js +32 -0
  7. package/lib/dist/common/face.d.ts +31 -0
  8. package/lib/dist/common/face.js +83 -0
  9. package/lib/dist/common/materials.d.ts +7 -0
  10. package/lib/dist/common/materials.js +22 -0
  11. package/lib/dist/common/scene-object.d.ts +111 -0
  12. package/lib/dist/common/scene-object.js +380 -0
  13. package/lib/dist/common/shape-factory.d.ts +8 -0
  14. package/lib/dist/common/shape-factory.js +31 -0
  15. package/lib/dist/common/shape-type.d.ts +1 -0
  16. package/lib/dist/common/shape-type.js +1 -0
  17. package/lib/dist/common/shape.d.ts +43 -0
  18. package/lib/dist/common/shape.js +95 -0
  19. package/lib/dist/common/shapes.d.ts +6 -0
  20. package/lib/dist/common/shapes.js +6 -0
  21. package/lib/dist/common/solid-face.d.ts +9 -0
  22. package/lib/dist/common/solid-face.js +22 -0
  23. package/lib/dist/common/solid.d.ts +20 -0
  24. package/lib/dist/common/solid.js +68 -0
  25. package/lib/dist/common/vertex.d.ts +17 -0
  26. package/lib/dist/common/vertex.js +44 -0
  27. package/lib/dist/common/wire.d.ts +22 -0
  28. package/lib/dist/common/wire.js +97 -0
  29. package/lib/dist/constraints/constraint.d.ts +11 -0
  30. package/lib/dist/constraints/constraint.js +51 -0
  31. package/lib/dist/constraints/outside.d.ts +3 -0
  32. package/lib/dist/constraints/outside.js +4 -0
  33. package/lib/dist/core/2d/aline.d.ts +28 -0
  34. package/lib/dist/core/2d/aline.js +26 -0
  35. package/lib/dist/core/2d/arc.d.ts +77 -0
  36. package/lib/dist/core/2d/arc.js +49 -0
  37. package/lib/dist/core/2d/aslot.d.ts +12 -0
  38. package/lib/dist/core/2d/aslot.js +40 -0
  39. package/lib/dist/core/2d/bezier.d.ts +16 -0
  40. package/lib/dist/core/2d/bezier.js +15 -0
  41. package/lib/dist/core/2d/circle.d.ts +24 -0
  42. package/lib/dist/core/2d/circle.js +44 -0
  43. package/lib/dist/core/2d/connect.d.ts +11 -0
  44. package/lib/dist/core/2d/connect.js +10 -0
  45. package/lib/dist/core/2d/crect.d.ts +12 -0
  46. package/lib/dist/core/2d/crect.js +74 -0
  47. package/lib/dist/core/2d/face-driller.d.ts +8 -0
  48. package/lib/dist/core/2d/face-driller.js +70 -0
  49. package/lib/dist/core/2d/face-maker.d.ts +13 -0
  50. package/lib/dist/core/2d/face-maker.js +119 -0
  51. package/lib/dist/core/2d/face-maker2.d.ts +6 -0
  52. package/lib/dist/core/2d/face-maker2.js +54 -0
  53. package/lib/dist/core/2d/hline.d.ts +33 -0
  54. package/lib/dist/core/2d/hline.js +37 -0
  55. package/lib/dist/core/2d/hmove.d.ts +9 -0
  56. package/lib/dist/core/2d/hmove.js +11 -0
  57. package/lib/dist/core/2d/index.d.ts +22 -0
  58. package/lib/dist/core/2d/index.js +22 -0
  59. package/lib/dist/core/2d/line.d.ts +24 -0
  60. package/lib/dist/core/2d/line.js +40 -0
  61. package/lib/dist/core/2d/move.d.ts +13 -0
  62. package/lib/dist/core/2d/move.js +13 -0
  63. package/lib/dist/core/2d/offset.d.ts +21 -0
  64. package/lib/dist/core/2d/offset.js +24 -0
  65. package/lib/dist/core/2d/pmove.d.ts +11 -0
  66. package/lib/dist/core/2d/pmove.js +12 -0
  67. package/lib/dist/core/2d/polygon.d.ts +38 -0
  68. package/lib/dist/core/2d/polygon.js +63 -0
  69. package/lib/dist/core/2d/project.d.ts +17 -0
  70. package/lib/dist/core/2d/project.js +20 -0
  71. package/lib/dist/core/2d/rect.d.ts +27 -0
  72. package/lib/dist/core/2d/rect.js +58 -0
  73. package/lib/dist/core/2d/rmove.d.ts +17 -0
  74. package/lib/dist/core/2d/rmove.js +14 -0
  75. package/lib/dist/core/2d/slot.d.ts +49 -0
  76. package/lib/dist/core/2d/slot.js +65 -0
  77. package/lib/dist/core/2d/tarc.d.ts +46 -0
  78. package/lib/dist/core/2d/tarc.js +61 -0
  79. package/lib/dist/core/2d/tcircle.d.ts +15 -0
  80. package/lib/dist/core/2d/tcircle.js +24 -0
  81. package/lib/dist/core/2d/tline.d.ts +24 -0
  82. package/lib/dist/core/2d/tline.js +30 -0
  83. package/lib/dist/core/2d/vline.d.ts +33 -0
  84. package/lib/dist/core/2d/vline.js +37 -0
  85. package/lib/dist/core/2d/vmove.d.ts +9 -0
  86. package/lib/dist/core/2d/vmove.js +11 -0
  87. package/lib/dist/core/2d/wire.d.ts +11 -0
  88. package/lib/dist/core/2d/wire.js +29 -0
  89. package/lib/dist/core/axis.d.ts +41 -0
  90. package/lib/dist/core/axis.js +104 -0
  91. package/lib/dist/core/chamfer.d.ts +31 -0
  92. package/lib/dist/core/chamfer.js +32 -0
  93. package/lib/dist/core/color.d.ts +16 -0
  94. package/lib/dist/core/color.js +19 -0
  95. package/lib/dist/core/common.d.ts +12 -0
  96. package/lib/dist/core/common.js +36 -0
  97. package/lib/dist/core/copy.d.ts +58 -0
  98. package/lib/dist/core/copy.js +49 -0
  99. package/lib/dist/core/cut.d.ts +46 -0
  100. package/lib/dist/core/cut.js +53 -0
  101. package/lib/dist/core/cylinder.d.ts +11 -0
  102. package/lib/dist/core/cylinder.js +10 -0
  103. package/lib/dist/core/extrude.d.ts +36 -0
  104. package/lib/dist/core/extrude.js +55 -0
  105. package/lib/dist/core/fillet.d.ts +33 -0
  106. package/lib/dist/core/fillet.js +58 -0
  107. package/lib/dist/core/fuse.d.ts +14 -0
  108. package/lib/dist/core/fuse.js +36 -0
  109. package/lib/dist/core/index.d.ts +32 -0
  110. package/lib/dist/core/index.js +30 -0
  111. package/lib/dist/core/interfaces.d.ts +411 -0
  112. package/lib/dist/core/interfaces.js +1 -0
  113. package/lib/dist/core/load.d.ts +10 -0
  114. package/lib/dist/core/load.js +10 -0
  115. package/lib/dist/core/loft.d.ts +10 -0
  116. package/lib/dist/core/loft.js +21 -0
  117. package/lib/dist/core/mirror.d.ts +40 -0
  118. package/lib/dist/core/mirror.js +95 -0
  119. package/lib/dist/core/part.d.ts +7 -0
  120. package/lib/dist/core/part.js +29 -0
  121. package/lib/dist/core/plane.d.ts +56 -0
  122. package/lib/dist/core/plane.js +111 -0
  123. package/lib/dist/core/region.d.ts +13 -0
  124. package/lib/dist/core/region.js +18 -0
  125. package/lib/dist/core/remove.d.ts +10 -0
  126. package/lib/dist/core/remove.js +10 -0
  127. package/lib/dist/core/repeat.d.ts +41 -0
  128. package/lib/dist/core/repeat.js +146 -0
  129. package/lib/dist/core/revolve.d.ts +19 -0
  130. package/lib/dist/core/revolve.js +39 -0
  131. package/lib/dist/core/rotate.d.ts +34 -0
  132. package/lib/dist/core/rotate.js +48 -0
  133. package/lib/dist/core/select.d.ts +12 -0
  134. package/lib/dist/core/select.js +21 -0
  135. package/lib/dist/core/shell.d.ts +16 -0
  136. package/lib/dist/core/shell.js +28 -0
  137. package/lib/dist/core/sketch.d.ts +18 -0
  138. package/lib/dist/core/sketch.js +34 -0
  139. package/lib/dist/core/sphere.d.ts +16 -0
  140. package/lib/dist/core/sphere.js +11 -0
  141. package/lib/dist/core/split.d.ts +12 -0
  142. package/lib/dist/core/split.js +26 -0
  143. package/lib/dist/core/subtract.d.ts +11 -0
  144. package/lib/dist/core/subtract.js +10 -0
  145. package/lib/dist/core/sweep.d.ts +16 -0
  146. package/lib/dist/core/sweep.js +29 -0
  147. package/lib/dist/core/translate.d.ts +64 -0
  148. package/lib/dist/core/translate.js +39 -0
  149. package/lib/dist/core/trim.d.ts +13 -0
  150. package/lib/dist/core/trim.js +18 -0
  151. package/lib/dist/core/use.d.ts +5 -0
  152. package/lib/dist/core/use.js +22 -0
  153. package/lib/dist/features/2d/aline.d.ts +18 -0
  154. package/lib/dist/features/2d/aline.js +78 -0
  155. package/lib/dist/features/2d/amove.d.ts +14 -0
  156. package/lib/dist/features/2d/amove.js +33 -0
  157. package/lib/dist/features/2d/arc-from-center.d.ts +16 -0
  158. package/lib/dist/features/2d/arc-from-center.js +69 -0
  159. package/lib/dist/features/2d/arc-to-point.d.ts +17 -0
  160. package/lib/dist/features/2d/arc-to-point.js +95 -0
  161. package/lib/dist/features/2d/arc.d.ts +19 -0
  162. package/lib/dist/features/2d/arc.js +94 -0
  163. package/lib/dist/features/2d/bezier.d.ts +15 -0
  164. package/lib/dist/features/2d/bezier.js +77 -0
  165. package/lib/dist/features/2d/circle.d.ts +17 -0
  166. package/lib/dist/features/2d/circle.js +58 -0
  167. package/lib/dist/features/2d/connect.d.ts +12 -0
  168. package/lib/dist/features/2d/connect.js +105 -0
  169. package/lib/dist/features/2d/constraints/constraint.d.ts +11 -0
  170. package/lib/dist/features/2d/constraints/constraint.js +49 -0
  171. package/lib/dist/features/2d/constraints/geometry-qualifier.d.ts +6 -0
  172. package/lib/dist/features/2d/constraints/geometry-qualifier.js +13 -0
  173. package/lib/dist/features/2d/constraints/outside.d.ts +3 -0
  174. package/lib/dist/features/2d/constraints/outside.js +4 -0
  175. package/lib/dist/features/2d/constraints/qualified-geometry.d.ts +16 -0
  176. package/lib/dist/features/2d/constraints/qualified-geometry.js +36 -0
  177. package/lib/dist/features/2d/extrudable-base.d.ts +15 -0
  178. package/lib/dist/features/2d/extrudable-base.js +27 -0
  179. package/lib/dist/features/2d/geometry.d.ts +20 -0
  180. package/lib/dist/features/2d/geometry.js +77 -0
  181. package/lib/dist/features/2d/hline.d.ts +16 -0
  182. package/lib/dist/features/2d/hline.js +66 -0
  183. package/lib/dist/features/2d/hmove.d.ts +14 -0
  184. package/lib/dist/features/2d/hmove.js +37 -0
  185. package/lib/dist/features/2d/line.d.ts +15 -0
  186. package/lib/dist/features/2d/line.js +59 -0
  187. package/lib/dist/features/2d/move.d.ts +15 -0
  188. package/lib/dist/features/2d/move.js +36 -0
  189. package/lib/dist/features/2d/offset.d.ts +18 -0
  190. package/lib/dist/features/2d/offset.js +117 -0
  191. package/lib/dist/features/2d/pmove.d.ts +16 -0
  192. package/lib/dist/features/2d/pmove.js +40 -0
  193. package/lib/dist/features/2d/polygon.d.ts +25 -0
  194. package/lib/dist/features/2d/polygon.js +107 -0
  195. package/lib/dist/features/2d/projection.d.ts +15 -0
  196. package/lib/dist/features/2d/projection.js +94 -0
  197. package/lib/dist/features/2d/rect.d.ts +45 -0
  198. package/lib/dist/features/2d/rect.js +262 -0
  199. package/lib/dist/features/2d/rmove.d.ts +17 -0
  200. package/lib/dist/features/2d/rmove.js +39 -0
  201. package/lib/dist/features/2d/sketch.d.ts +34 -0
  202. package/lib/dist/features/2d/sketch.js +171 -0
  203. package/lib/dist/features/2d/slot-from-edge.d.ts +19 -0
  204. package/lib/dist/features/2d/slot-from-edge.js +66 -0
  205. package/lib/dist/features/2d/slot.d.ts +24 -0
  206. package/lib/dist/features/2d/slot.js +119 -0
  207. package/lib/dist/features/2d/tarc-constrained.d.ts +20 -0
  208. package/lib/dist/features/2d/tarc-constrained.js +64 -0
  209. package/lib/dist/features/2d/tarc-to-point-tangent.d.ts +15 -0
  210. package/lib/dist/features/2d/tarc-to-point-tangent.js +86 -0
  211. package/lib/dist/features/2d/tarc-to-point.d.ts +13 -0
  212. package/lib/dist/features/2d/tarc-to-point.js +86 -0
  213. package/lib/dist/features/2d/tarc-two-circles.d.ts +18 -0
  214. package/lib/dist/features/2d/tarc-two-circles.js +61 -0
  215. package/lib/dist/features/2d/tarc-with-tangent.d.ts +17 -0
  216. package/lib/dist/features/2d/tarc-with-tangent.js +71 -0
  217. package/lib/dist/features/2d/tarc.d.ts +13 -0
  218. package/lib/dist/features/2d/tarc.js +71 -0
  219. package/lib/dist/features/2d/tcircle-constrained.d.ts +14 -0
  220. package/lib/dist/features/2d/tcircle-constrained.js +37 -0
  221. package/lib/dist/features/2d/tcircle-three-tan.d.ts +13 -0
  222. package/lib/dist/features/2d/tcircle-three-tan.js +33 -0
  223. package/lib/dist/features/2d/tcircle-two-tan.d.ts +13 -0
  224. package/lib/dist/features/2d/tcircle-two-tan.js +33 -0
  225. package/lib/dist/features/2d/tline-constrained.d.ts +27 -0
  226. package/lib/dist/features/2d/tline-constrained.js +82 -0
  227. package/lib/dist/features/2d/tline.d.ts +12 -0
  228. package/lib/dist/features/2d/tline.js +49 -0
  229. package/lib/dist/features/2d/vline.d.ts +16 -0
  230. package/lib/dist/features/2d/vline.js +65 -0
  231. package/lib/dist/features/2d/vmove.d.ts +14 -0
  232. package/lib/dist/features/2d/vmove.js +37 -0
  233. package/lib/dist/features/2d/wire.d.ts +12 -0
  234. package/lib/dist/features/2d/wire.js +76 -0
  235. package/lib/dist/features/Extrude.d.ts +1 -0
  236. package/lib/dist/features/Extrude.js +1 -0
  237. package/lib/dist/features/axis-from-edge.d.ts +15 -0
  238. package/lib/dist/features/axis-from-edge.js +82 -0
  239. package/lib/dist/features/axis-mid.d.ts +16 -0
  240. package/lib/dist/features/axis-mid.js +59 -0
  241. package/lib/dist/features/axis-renderable-base.d.ts +8 -0
  242. package/lib/dist/features/axis-renderable-base.js +12 -0
  243. package/lib/dist/features/axis.d.ts +14 -0
  244. package/lib/dist/features/axis.js +43 -0
  245. package/lib/dist/features/chamfer.d.ts +20 -0
  246. package/lib/dist/features/chamfer.js +129 -0
  247. package/lib/dist/features/color.d.ts +11 -0
  248. package/lib/dist/features/color.js +93 -0
  249. package/lib/dist/features/common.d.ts +12 -0
  250. package/lib/dist/features/common.js +70 -0
  251. package/lib/dist/features/common2d.d.ts +15 -0
  252. package/lib/dist/features/common2d.js +96 -0
  253. package/lib/dist/features/copy-circular.d.ts +23 -0
  254. package/lib/dist/features/copy-circular.js +73 -0
  255. package/lib/dist/features/copy-circular2d.d.ts +15 -0
  256. package/lib/dist/features/copy-circular2d.js +84 -0
  257. package/lib/dist/features/copy-linear.d.ts +23 -0
  258. package/lib/dist/features/copy-linear.js +101 -0
  259. package/lib/dist/features/copy-linear2d.d.ts +15 -0
  260. package/lib/dist/features/copy-linear2d.js +108 -0
  261. package/lib/dist/features/cut-base.d.ts +49 -0
  262. package/lib/dist/features/cut-base.js +312 -0
  263. package/lib/dist/features/cut-symmetric.d.ts +23 -0
  264. package/lib/dist/features/cut-symmetric.js +119 -0
  265. package/lib/dist/features/cut-two-distances.d.ts +24 -0
  266. package/lib/dist/features/cut-two-distances.js +110 -0
  267. package/lib/dist/features/cut.d.ts +27 -0
  268. package/lib/dist/features/cut.js +101 -0
  269. package/lib/dist/features/cylinder.d.ts +13 -0
  270. package/lib/dist/features/cylinder.js +33 -0
  271. package/lib/dist/features/extrude-base.d.ts +56 -0
  272. package/lib/dist/features/extrude-base.js +331 -0
  273. package/lib/dist/features/extrude-options.d.ts +8 -0
  274. package/lib/dist/features/extrude-options.js +1 -0
  275. package/lib/dist/features/extrude-symmetric.d.ts +28 -0
  276. package/lib/dist/features/extrude-symmetric.js +177 -0
  277. package/lib/dist/features/extrude-to-face.d.ts +35 -0
  278. package/lib/dist/features/extrude-to-face.js +275 -0
  279. package/lib/dist/features/extrude-two-distances.d.ts +21 -0
  280. package/lib/dist/features/extrude-two-distances.js +116 -0
  281. package/lib/dist/features/extrude.d.ts +25 -0
  282. package/lib/dist/features/extrude.js +182 -0
  283. package/lib/dist/features/fillet.d.ts +24 -0
  284. package/lib/dist/features/fillet.js +125 -0
  285. package/lib/dist/features/fillet2d.d.ts +16 -0
  286. package/lib/dist/features/fillet2d.js +98 -0
  287. package/lib/dist/features/fuse.d.ts +10 -0
  288. package/lib/dist/features/fuse.js +63 -0
  289. package/lib/dist/features/fuse2d.d.ts +13 -0
  290. package/lib/dist/features/fuse2d.js +86 -0
  291. package/lib/dist/features/infinite-extrude.d.ts +10 -0
  292. package/lib/dist/features/infinite-extrude.js +44 -0
  293. package/lib/dist/features/lazy-scene-object.d.ts +16 -0
  294. package/lib/dist/features/lazy-scene-object.js +52 -0
  295. package/lib/dist/features/lazy-vertex.d.ts +19 -0
  296. package/lib/dist/features/lazy-vertex.js +62 -0
  297. package/lib/dist/features/load.d.ts +9 -0
  298. package/lib/dist/features/load.js +31 -0
  299. package/lib/dist/features/loft.d.ts +27 -0
  300. package/lib/dist/features/loft.js +273 -0
  301. package/lib/dist/features/mirror-feature.d.ts +15 -0
  302. package/lib/dist/features/mirror-feature.js +39 -0
  303. package/lib/dist/features/mirror-shape.d.ts +14 -0
  304. package/lib/dist/features/mirror-shape.js +86 -0
  305. package/lib/dist/features/mirror-shape2d.d.ts +18 -0
  306. package/lib/dist/features/mirror-shape2d.js +110 -0
  307. package/lib/dist/features/part.d.ts +12 -0
  308. package/lib/dist/features/part.js +36 -0
  309. package/lib/dist/features/plane-from-object.d.ts +29 -0
  310. package/lib/dist/features/plane-from-object.js +103 -0
  311. package/lib/dist/features/plane-mid.d.ts +18 -0
  312. package/lib/dist/features/plane-mid.js +54 -0
  313. package/lib/dist/features/plane-renderable-base.d.ts +9 -0
  314. package/lib/dist/features/plane-renderable-base.js +15 -0
  315. package/lib/dist/features/plane.d.ts +21 -0
  316. package/lib/dist/features/plane.js +64 -0
  317. package/lib/dist/features/region2d.d.ts +25 -0
  318. package/lib/dist/features/region2d.js +185 -0
  319. package/lib/dist/features/remove.d.ts +9 -0
  320. package/lib/dist/features/remove.js +33 -0
  321. package/lib/dist/features/repeat-circular.d.ts +23 -0
  322. package/lib/dist/features/repeat-circular.js +47 -0
  323. package/lib/dist/features/repeat-circular2d.d.ts +17 -0
  324. package/lib/dist/features/repeat-circular2d.js +90 -0
  325. package/lib/dist/features/repeat-linear.d.ts +23 -0
  326. package/lib/dist/features/repeat-linear.js +52 -0
  327. package/lib/dist/features/repeat-linear2d.d.ts +17 -0
  328. package/lib/dist/features/repeat-linear2d.js +114 -0
  329. package/lib/dist/features/revolve-options.d.ts +6 -0
  330. package/lib/dist/features/revolve-options.js +1 -0
  331. package/lib/dist/features/revolve.d.ts +23 -0
  332. package/lib/dist/features/revolve.js +150 -0
  333. package/lib/dist/features/rotate.d.ts +16 -0
  334. package/lib/dist/features/rotate.js +89 -0
  335. package/lib/dist/features/rotate2d.d.ts +15 -0
  336. package/lib/dist/features/rotate2d.js +83 -0
  337. package/lib/dist/features/select.d.ts +26 -0
  338. package/lib/dist/features/select.js +113 -0
  339. package/lib/dist/features/shell.d.ts +24 -0
  340. package/lib/dist/features/shell.js +214 -0
  341. package/lib/dist/features/simple-extruder.d.ts +22 -0
  342. package/lib/dist/features/simple-extruder.js +108 -0
  343. package/lib/dist/features/sphere.d.ts +13 -0
  344. package/lib/dist/features/sphere.js +33 -0
  345. package/lib/dist/features/split.d.ts +14 -0
  346. package/lib/dist/features/split.js +74 -0
  347. package/lib/dist/features/split2d.d.ts +13 -0
  348. package/lib/dist/features/split2d.js +69 -0
  349. package/lib/dist/features/state-scene-object.d.ts +15 -0
  350. package/lib/dist/features/state-scene-object.js +44 -0
  351. package/lib/dist/features/state-select.d.ts +21 -0
  352. package/lib/dist/features/state-select.js +73 -0
  353. package/lib/dist/features/static-scene-object.d.ts +10 -0
  354. package/lib/dist/features/static-scene-object.js +21 -0
  355. package/lib/dist/features/subtract.d.ts +13 -0
  356. package/lib/dist/features/subtract.js +56 -0
  357. package/lib/dist/features/sweep.d.ts +22 -0
  358. package/lib/dist/features/sweep.js +129 -0
  359. package/lib/dist/features/translate.d.ts +17 -0
  360. package/lib/dist/features/translate.js +76 -0
  361. package/lib/dist/features/translate2d.d.ts +16 -0
  362. package/lib/dist/features/translate2d.js +61 -0
  363. package/lib/dist/features/trim2d.d.ts +15 -0
  364. package/lib/dist/features/trim2d.js +154 -0
  365. package/lib/dist/filters/all-filter.d.ts +8 -0
  366. package/lib/dist/filters/all-filter.js +12 -0
  367. package/lib/dist/filters/edge/at-index.d.ts +21 -0
  368. package/lib/dist/filters/edge/at-index.js +82 -0
  369. package/lib/dist/filters/edge/circle-filter.d.ts +17 -0
  370. package/lib/dist/filters/edge/circle-filter.js +34 -0
  371. package/lib/dist/filters/edge/curve-filter.d.ts +17 -0
  372. package/lib/dist/filters/edge/curve-filter.js +34 -0
  373. package/lib/dist/filters/edge/edge-filter.d.ts +22 -0
  374. package/lib/dist/filters/edge/edge-filter.js +169 -0
  375. package/lib/dist/filters/edge/line-filter.d.ts +14 -0
  376. package/lib/dist/filters/edge/line-filter.js +27 -0
  377. package/lib/dist/filters/edge/on-plane.d.ts +20 -0
  378. package/lib/dist/filters/edge/on-plane.js +70 -0
  379. package/lib/dist/filters/edge/parallel.d.ts +18 -0
  380. package/lib/dist/filters/edge/parallel.js +41 -0
  381. package/lib/dist/filters/edge/vertical-plane.d.ts +18 -0
  382. package/lib/dist/filters/edge/vertical-plane.js +41 -0
  383. package/lib/dist/filters/face/at-index.d.ts +21 -0
  384. package/lib/dist/filters/face/at-index.js +89 -0
  385. package/lib/dist/filters/face/circle-filter.d.ts +17 -0
  386. package/lib/dist/filters/face/circle-filter.js +34 -0
  387. package/lib/dist/filters/face/cone-filter.d.ts +15 -0
  388. package/lib/dist/filters/face/cone-filter.js +30 -0
  389. package/lib/dist/filters/face/cylinder-curve.d.ts +17 -0
  390. package/lib/dist/filters/face/cylinder-curve.js +34 -0
  391. package/lib/dist/filters/face/cylinder.d.ts +17 -0
  392. package/lib/dist/filters/face/cylinder.js +34 -0
  393. package/lib/dist/filters/face/face-filter.d.ts +21 -0
  394. package/lib/dist/filters/face/face-filter.js +134 -0
  395. package/lib/dist/filters/face/on-plane.d.ts +18 -0
  396. package/lib/dist/filters/face/on-plane.js +41 -0
  397. package/lib/dist/filters/face/parallel.d.ts +18 -0
  398. package/lib/dist/filters/face/parallel.js +41 -0
  399. package/lib/dist/filters/filter-base.d.ts +8 -0
  400. package/lib/dist/filters/filter-base.js +2 -0
  401. package/lib/dist/filters/filter-builder-base.d.ts +10 -0
  402. package/lib/dist/filters/filter-builder-base.js +31 -0
  403. package/lib/dist/filters/filter.d.ts +8 -0
  404. package/lib/dist/filters/filter.js +33 -0
  405. package/lib/dist/filters/index.d.ts +4 -0
  406. package/lib/dist/filters/index.js +8 -0
  407. package/lib/dist/filters/near-point-filter.d.ts +11 -0
  408. package/lib/dist/filters/near-point-filter.js +33 -0
  409. package/lib/dist/helpers/clone-transform.d.ts +3 -0
  410. package/lib/dist/helpers/clone-transform.js +46 -0
  411. package/lib/dist/helpers/cut-helpers.d.ts +13 -0
  412. package/lib/dist/helpers/cut-helpers.js +79 -0
  413. package/lib/dist/helpers/math-helpers.d.ts +2 -0
  414. package/lib/dist/helpers/math-helpers.js +6 -0
  415. package/lib/dist/helpers/normalize.d.ts +12 -0
  416. package/lib/dist/helpers/normalize.js +118 -0
  417. package/lib/dist/helpers/resolve-filters.d.ts +6 -0
  418. package/lib/dist/helpers/resolve-filters.js +25 -0
  419. package/lib/dist/helpers/resolve.d.ts +8 -0
  420. package/lib/dist/helpers/resolve.js +45 -0
  421. package/lib/dist/helpers/scene-helpers.d.ts +17 -0
  422. package/lib/dist/helpers/scene-helpers.js +67 -0
  423. package/lib/dist/helpers/types.d.ts +27 -0
  424. package/lib/dist/helpers/types.js +1 -0
  425. package/lib/dist/index.d.ts +37 -0
  426. package/lib/dist/index.js +75 -0
  427. package/lib/dist/io/file-export.d.ts +30 -0
  428. package/lib/dist/io/file-export.js +45 -0
  429. package/lib/dist/io/file-import.d.ts +8 -0
  430. package/lib/dist/io/file-import.js +81 -0
  431. package/lib/dist/load.d.ts +1 -0
  432. package/lib/dist/load.js +1 -0
  433. package/lib/dist/math/axis.d.ts +72 -0
  434. package/lib/dist/math/axis.js +157 -0
  435. package/lib/dist/math/axis.test.d.ts +1 -0
  436. package/lib/dist/math/axis.test.js +287 -0
  437. package/lib/dist/math/convert.d.ts +2 -0
  438. package/lib/dist/math/convert.js +1 -0
  439. package/lib/dist/math/coordinate-system.d.ts +43 -0
  440. package/lib/dist/math/coordinate-system.js +140 -0
  441. package/lib/dist/math/coordinate-system.test.d.ts +1 -0
  442. package/lib/dist/math/coordinate-system.test.js +308 -0
  443. package/lib/dist/math/index.d.ts +8 -0
  444. package/lib/dist/math/index.js +8 -0
  445. package/lib/dist/math/matrix4.d.ts +53 -0
  446. package/lib/dist/math/matrix4.js +336 -0
  447. package/lib/dist/math/matrix4.test.d.ts +1 -0
  448. package/lib/dist/math/matrix4.test.js +357 -0
  449. package/lib/dist/math/plane.d.ts +60 -0
  450. package/lib/dist/math/plane.js +243 -0
  451. package/lib/dist/math/plane.test.d.ts +1 -0
  452. package/lib/dist/math/plane.test.js +398 -0
  453. package/lib/dist/math/point.d.ts +73 -0
  454. package/lib/dist/math/point.js +227 -0
  455. package/lib/dist/math/point.test.d.ts +1 -0
  456. package/lib/dist/math/point.test.js +385 -0
  457. package/lib/dist/math/quaternion.d.ts +37 -0
  458. package/lib/dist/math/quaternion.js +234 -0
  459. package/lib/dist/math/quaternion.test.d.ts +1 -0
  460. package/lib/dist/math/quaternion.test.js +278 -0
  461. package/lib/dist/math/vector3d.d.ts +43 -0
  462. package/lib/dist/math/vector3d.js +143 -0
  463. package/lib/dist/math/vector3d.test.d.ts +1 -0
  464. package/lib/dist/math/vector3d.test.js +276 -0
  465. package/lib/dist/oc/boolean-ops.d.ts +36 -0
  466. package/lib/dist/oc/boolean-ops.js +337 -0
  467. package/lib/dist/oc/constraint-resolver.d.ts +7 -0
  468. package/lib/dist/oc/constraint-resolver.js +31 -0
  469. package/lib/dist/oc/constraints/constraint-helpers.d.ts +33 -0
  470. package/lib/dist/oc/constraints/constraint-helpers.js +252 -0
  471. package/lib/dist/oc/constraints/constraint-solver-adaptor.d.ts +22 -0
  472. package/lib/dist/oc/constraints/constraint-solver-adaptor.js +62 -0
  473. package/lib/dist/oc/constraints/constraint-solver.d.ts +18 -0
  474. package/lib/dist/oc/constraints/constraint-solver.js +2 -0
  475. package/lib/dist/oc/constraints/create-solver.d.ts +2 -0
  476. package/lib/dist/oc/constraints/create-solver.js +6 -0
  477. package/lib/dist/oc/constraints/curve/curve-constraint-solver.d.ts +13 -0
  478. package/lib/dist/oc/constraints/curve/curve-constraint-solver.js +18 -0
  479. package/lib/dist/oc/constraints/curve/tangent-circle-solver.d.ts +16 -0
  480. package/lib/dist/oc/constraints/curve/tangent-circle-solver.js +112 -0
  481. package/lib/dist/oc/constraints/curve/tangent-line-solver.d.ts +19 -0
  482. package/lib/dist/oc/constraints/curve/tangent-line-solver.js +83 -0
  483. package/lib/dist/oc/constraints/curve-constraint-solver.d.ts +1 -0
  484. package/lib/dist/oc/constraints/curve-constraint-solver.js +2 -0
  485. package/lib/dist/oc/constraints/geometric/geometric-constraint-solver.d.ts +12 -0
  486. package/lib/dist/oc/constraints/geometric/geometric-constraint-solver.js +17 -0
  487. package/lib/dist/oc/constraints/geometric/tangent-circle-solver.d.ts +21 -0
  488. package/lib/dist/oc/constraints/geometric/tangent-circle-solver.js +220 -0
  489. package/lib/dist/oc/constraints/geometric/tangent-line-solver.d.ts +19 -0
  490. package/lib/dist/oc/constraints/geometric/tangent-line-solver.js +92 -0
  491. package/lib/dist/oc/constraints/geometric-constraint-solver.d.ts +1 -0
  492. package/lib/dist/oc/constraints/geometric-constraint-solver.js +5 -0
  493. package/lib/dist/oc/convert.d.ts +42 -0
  494. package/lib/dist/oc/convert.js +231 -0
  495. package/lib/dist/oc/edge-ops.d.ts +37 -0
  496. package/lib/dist/oc/edge-ops.js +306 -0
  497. package/lib/dist/oc/edge-props.d.ts +11 -0
  498. package/lib/dist/oc/edge-props.js +45 -0
  499. package/lib/dist/oc/edge-query.d.ts +44 -0
  500. package/lib/dist/oc/edge-query.js +235 -0
  501. package/lib/dist/oc/explorer.d.ts +34 -0
  502. package/lib/dist/oc/explorer.js +179 -0
  503. package/lib/dist/oc/extrude-ops.d.ts +22 -0
  504. package/lib/dist/oc/extrude-ops.js +149 -0
  505. package/lib/dist/oc/face-maker.d.ts +14 -0
  506. package/lib/dist/oc/face-maker.js +191 -0
  507. package/lib/dist/oc/face-maker2.d.ts +10 -0
  508. package/lib/dist/oc/face-maker2.js +139 -0
  509. package/lib/dist/oc/face-ops.d.ts +28 -0
  510. package/lib/dist/oc/face-ops.js +252 -0
  511. package/lib/dist/oc/face-props.d.ts +12 -0
  512. package/lib/dist/oc/face-props.js +81 -0
  513. package/lib/dist/oc/face-query.d.ts +35 -0
  514. package/lib/dist/oc/face-query.js +341 -0
  515. package/lib/dist/oc/fillet-ops.d.ts +13 -0
  516. package/lib/dist/oc/fillet-ops.js +153 -0
  517. package/lib/dist/oc/geometry.d.ts +22 -0
  518. package/lib/dist/oc/geometry.js +231 -0
  519. package/lib/dist/oc/hit-test.d.ts +11 -0
  520. package/lib/dist/oc/hit-test.js +85 -0
  521. package/lib/dist/oc/index.d.ts +24 -0
  522. package/lib/dist/oc/index.js +21 -0
  523. package/lib/dist/oc/init.d.ts +3 -0
  524. package/lib/dist/oc/init.js +17 -0
  525. package/lib/dist/oc/intersection.d.ts +10 -0
  526. package/lib/dist/oc/intersection.js +107 -0
  527. package/lib/dist/oc/io.d.ts +49 -0
  528. package/lib/dist/oc/io.js +417 -0
  529. package/lib/dist/oc/loft-ops.d.ts +5 -0
  530. package/lib/dist/oc/loft-ops.js +26 -0
  531. package/lib/dist/oc/measure.d.ts +21 -0
  532. package/lib/dist/oc/measure.js +256 -0
  533. package/lib/dist/oc/mesh.d.ts +15 -0
  534. package/lib/dist/oc/mesh.js +110 -0
  535. package/lib/dist/oc/primitives.d.ts +5 -0
  536. package/lib/dist/oc/primitives.js +19 -0
  537. package/lib/dist/oc/props.d.ts +13 -0
  538. package/lib/dist/oc/props.js +18 -0
  539. package/lib/dist/oc/shape-ops.d.ts +34 -0
  540. package/lib/dist/oc/shape-ops.js +208 -0
  541. package/lib/dist/oc/shell-ops.d.ts +5 -0
  542. package/lib/dist/oc/shell-ops.js +25 -0
  543. package/lib/dist/oc/sweep-ops.d.ts +12 -0
  544. package/lib/dist/oc/sweep-ops.js +39 -0
  545. package/lib/dist/oc/tangent-circle-solver.d.ts +17 -0
  546. package/lib/dist/oc/tangent-circle-solver.js +72 -0
  547. package/lib/dist/oc/tangent-line-solver.d.ts +17 -0
  548. package/lib/dist/oc/tangent-line-solver.js +83 -0
  549. package/lib/dist/oc/tangent-solver.d.ts +14 -0
  550. package/lib/dist/oc/tangent-solver.js +199 -0
  551. package/lib/dist/oc/vertex-ops.d.ts +11 -0
  552. package/lib/dist/oc/vertex-ops.js +39 -0
  553. package/lib/dist/oc/wire-ops.d.ts +21 -0
  554. package/lib/dist/oc/wire-ops.js +176 -0
  555. package/lib/dist/rendering/builder-context.d.ts +16 -0
  556. package/lib/dist/rendering/builder-context.js +63 -0
  557. package/lib/dist/rendering/mesh-builder.d.ts +5 -0
  558. package/lib/dist/rendering/mesh-builder.js +43 -0
  559. package/lib/dist/rendering/render-edge.d.ts +3 -0
  560. package/lib/dist/rendering/render-edge.js +4 -0
  561. package/lib/dist/rendering/render-face.d.ts +2 -0
  562. package/lib/dist/rendering/render-face.js +5 -0
  563. package/lib/dist/rendering/render-solid.d.ts +3 -0
  564. package/lib/dist/rendering/render-solid.js +61 -0
  565. package/lib/dist/rendering/render-wire.d.ts +6 -0
  566. package/lib/dist/rendering/render-wire.js +27 -0
  567. package/lib/dist/rendering/render.d.ts +3 -0
  568. package/lib/dist/rendering/render.js +183 -0
  569. package/lib/dist/rendering/scene-compare.d.ts +4 -0
  570. package/lib/dist/rendering/scene-compare.js +41 -0
  571. package/lib/dist/rendering/scene.d.ts +81 -0
  572. package/lib/dist/rendering/scene.js +206 -0
  573. package/lib/dist/scene-manager.d.ts +32 -0
  574. package/lib/dist/scene-manager.js +120 -0
  575. package/lib/dist/tests/extrude.test.d.ts +1 -0
  576. package/lib/dist/tests/extrude.test.js +48 -0
  577. package/lib/dist/tests/features/2d/arc.test.d.ts +1 -0
  578. package/lib/dist/tests/features/2d/arc.test.js +40 -0
  579. package/lib/dist/tests/features/2d/circle.test.d.ts +1 -0
  580. package/lib/dist/tests/features/2d/circle.test.js +64 -0
  581. package/lib/dist/tests/features/2d/constrained.test.d.ts +1 -0
  582. package/lib/dist/tests/features/2d/constrained.test.js +202 -0
  583. package/lib/dist/tests/features/2d/line.test.d.ts +1 -0
  584. package/lib/dist/tests/features/2d/line.test.js +86 -0
  585. package/lib/dist/tests/features/2d/move.test.d.ts +1 -0
  586. package/lib/dist/tests/features/2d/move.test.js +74 -0
  587. package/lib/dist/tests/features/2d/offset.test.d.ts +1 -0
  588. package/lib/dist/tests/features/2d/offset.test.js +111 -0
  589. package/lib/dist/tests/features/2d/pmove.test.d.ts +1 -0
  590. package/lib/dist/tests/features/2d/pmove.test.js +43 -0
  591. package/lib/dist/tests/features/2d/polygon.test.d.ts +1 -0
  592. package/lib/dist/tests/features/2d/polygon.test.js +150 -0
  593. package/lib/dist/tests/features/2d/project.test.d.ts +1 -0
  594. package/lib/dist/tests/features/2d/project.test.js +22 -0
  595. package/lib/dist/tests/features/2d/rect.test.d.ts +1 -0
  596. package/lib/dist/tests/features/2d/rect.test.js +66 -0
  597. package/lib/dist/tests/features/2d/rmove.test.d.ts +1 -0
  598. package/lib/dist/tests/features/2d/rmove.test.js +29 -0
  599. package/lib/dist/tests/features/2d/slot-from-edge.test.d.ts +1 -0
  600. package/lib/dist/tests/features/2d/slot-from-edge.test.js +35 -0
  601. package/lib/dist/tests/features/2d/slot.test.d.ts +1 -0
  602. package/lib/dist/tests/features/2d/slot.test.js +44 -0
  603. package/lib/dist/tests/features/2d/tarc.test.d.ts +1 -0
  604. package/lib/dist/tests/features/2d/tarc.test.js +237 -0
  605. package/lib/dist/tests/features/2d/tcircle.test.d.ts +1 -0
  606. package/lib/dist/tests/features/2d/tcircle.test.js +28 -0
  607. package/lib/dist/tests/features/2d/tline.test.d.ts +1 -0
  608. package/lib/dist/tests/features/2d/tline.test.js +34 -0
  609. package/lib/dist/tests/features/axis.test.d.ts +1 -0
  610. package/lib/dist/tests/features/axis.test.js +143 -0
  611. package/lib/dist/tests/features/chamfer.test.d.ts +1 -0
  612. package/lib/dist/tests/features/chamfer.test.js +159 -0
  613. package/lib/dist/tests/features/color.test.d.ts +1 -0
  614. package/lib/dist/tests/features/color.test.js +96 -0
  615. package/lib/dist/tests/features/common2d.test.d.ts +1 -0
  616. package/lib/dist/tests/features/common2d.test.js +113 -0
  617. package/lib/dist/tests/features/copy-circular-2d.test.d.ts +1 -0
  618. package/lib/dist/tests/features/copy-circular-2d.test.js +40 -0
  619. package/lib/dist/tests/features/copy-circular.test.d.ts +1 -0
  620. package/lib/dist/tests/features/copy-circular.test.js +44 -0
  621. package/lib/dist/tests/features/copy-linear-2d.test.d.ts +1 -0
  622. package/lib/dist/tests/features/copy-linear-2d.test.js +35 -0
  623. package/lib/dist/tests/features/copy-linear.test.d.ts +1 -0
  624. package/lib/dist/tests/features/copy-linear.test.js +95 -0
  625. package/lib/dist/tests/features/copy.test.d.ts +1 -0
  626. package/lib/dist/tests/features/copy.test.js +158 -0
  627. package/lib/dist/tests/features/cut-symmetric.test.d.ts +1 -0
  628. package/lib/dist/tests/features/cut-symmetric.test.js +120 -0
  629. package/lib/dist/tests/features/cut-two-distances.test.d.ts +1 -0
  630. package/lib/dist/tests/features/cut-two-distances.test.js +125 -0
  631. package/lib/dist/tests/features/cut.test.d.ts +1 -0
  632. package/lib/dist/tests/features/cut.test.js +311 -0
  633. package/lib/dist/tests/features/dispose.test.d.ts +1 -0
  634. package/lib/dist/tests/features/dispose.test.js +189 -0
  635. package/lib/dist/tests/features/extrude-symmetric.test.d.ts +1 -0
  636. package/lib/dist/tests/features/extrude-symmetric.test.js +240 -0
  637. package/lib/dist/tests/features/extrude-to-face.test.d.ts +1 -0
  638. package/lib/dist/tests/features/extrude-to-face.test.js +256 -0
  639. package/lib/dist/tests/features/extrude-two-distances.test.d.ts +1 -0
  640. package/lib/dist/tests/features/extrude-two-distances.test.js +264 -0
  641. package/lib/dist/tests/features/extrude.test.d.ts +1 -0
  642. package/lib/dist/tests/features/extrude.test.js +640 -0
  643. package/lib/dist/tests/features/fillet.test.d.ts +1 -0
  644. package/lib/dist/tests/features/fillet.test.js +163 -0
  645. package/lib/dist/tests/features/fillet2d.test.d.ts +1 -0
  646. package/lib/dist/tests/features/fillet2d.test.js +69 -0
  647. package/lib/dist/tests/features/fuse.test.d.ts +1 -0
  648. package/lib/dist/tests/features/fuse.test.js +122 -0
  649. package/lib/dist/tests/features/fuse2d.test.d.ts +1 -0
  650. package/lib/dist/tests/features/fuse2d.test.js +80 -0
  651. package/lib/dist/tests/features/loft.test.d.ts +1 -0
  652. package/lib/dist/tests/features/loft.test.js +283 -0
  653. package/lib/dist/tests/features/mirror.test.d.ts +1 -0
  654. package/lib/dist/tests/features/mirror.test.js +112 -0
  655. package/lib/dist/tests/features/mirror2d.test.d.ts +1 -0
  656. package/lib/dist/tests/features/mirror2d.test.js +75 -0
  657. package/lib/dist/tests/features/part-pick.test.d.ts +1 -0
  658. package/lib/dist/tests/features/part-pick.test.js +73 -0
  659. package/lib/dist/tests/features/part-repeat.test.d.ts +1 -0
  660. package/lib/dist/tests/features/part-repeat.test.js +109 -0
  661. package/lib/dist/tests/features/part.test.d.ts +1 -0
  662. package/lib/dist/tests/features/part.test.js +356 -0
  663. package/lib/dist/tests/features/plane.test.d.ts +1 -0
  664. package/lib/dist/tests/features/plane.test.js +154 -0
  665. package/lib/dist/tests/features/repeat-circular.test.d.ts +1 -0
  666. package/lib/dist/tests/features/repeat-circular.test.js +114 -0
  667. package/lib/dist/tests/features/repeat-linear.test.d.ts +1 -0
  668. package/lib/dist/tests/features/repeat-linear.test.js +138 -0
  669. package/lib/dist/tests/features/revolve.test.d.ts +1 -0
  670. package/lib/dist/tests/features/revolve.test.js +205 -0
  671. package/lib/dist/tests/features/rotate.test.d.ts +1 -0
  672. package/lib/dist/tests/features/rotate.test.js +133 -0
  673. package/lib/dist/tests/features/rotate2d.test.d.ts +1 -0
  674. package/lib/dist/tests/features/rotate2d.test.js +74 -0
  675. package/lib/dist/tests/features/select.test.d.ts +1 -0
  676. package/lib/dist/tests/features/select.test.js +337 -0
  677. package/lib/dist/tests/features/shell.test.d.ts +1 -0
  678. package/lib/dist/tests/features/shell.test.js +230 -0
  679. package/lib/dist/tests/features/subtract.test.d.ts +1 -0
  680. package/lib/dist/tests/features/subtract.test.js +103 -0
  681. package/lib/dist/tests/features/sweep.test.d.ts +1 -0
  682. package/lib/dist/tests/features/sweep.test.js +312 -0
  683. package/lib/dist/tests/features/translate.test.d.ts +1 -0
  684. package/lib/dist/tests/features/translate.test.js +117 -0
  685. package/lib/dist/tests/global-setup.d.ts +1 -0
  686. package/lib/dist/tests/global-setup.js +5 -0
  687. package/lib/dist/tests/math/axis.test.d.ts +1 -0
  688. package/lib/dist/tests/math/axis.test.js +287 -0
  689. package/lib/dist/tests/math/coordinate-system.test.d.ts +1 -0
  690. package/lib/dist/tests/math/coordinate-system.test.js +308 -0
  691. package/lib/dist/tests/math/matrix4.test.d.ts +1 -0
  692. package/lib/dist/tests/math/matrix4.test.js +357 -0
  693. package/lib/dist/tests/math/plane.test.d.ts +1 -0
  694. package/lib/dist/tests/math/plane.test.js +398 -0
  695. package/lib/dist/tests/math/point.test.d.ts +1 -0
  696. package/lib/dist/tests/math/point.test.js +385 -0
  697. package/lib/dist/tests/math/quaternion.test.d.ts +1 -0
  698. package/lib/dist/tests/math/quaternion.test.js +278 -0
  699. package/lib/dist/tests/math/vector3d.test.d.ts +1 -0
  700. package/lib/dist/tests/math/vector3d.test.js +276 -0
  701. package/lib/dist/tests/setup.d.ts +5 -0
  702. package/lib/dist/tests/setup.js +14 -0
  703. package/lib/dist/tests/utils.d.ts +12 -0
  704. package/lib/dist/tests/utils.js +36 -0
  705. package/lib/dist/tsconfig.tsbuildinfo +1 -0
  706. package/package.json +83 -0
  707. package/server/dist/fluidcad-server.d.ts +32 -0
  708. package/server/dist/fluidcad-server.js +150 -0
  709. package/server/dist/index.d.ts +1 -0
  710. package/server/dist/index.js +290 -0
  711. package/server/dist/routes/actions.d.ts +3 -0
  712. package/server/dist/routes/actions.js +100 -0
  713. package/server/dist/routes/export.d.ts +3 -0
  714. package/server/dist/routes/export.js +55 -0
  715. package/server/dist/routes/properties.d.ts +3 -0
  716. package/server/dist/routes/properties.js +46 -0
  717. package/server/dist/routes/screenshot.d.ts +2 -0
  718. package/server/dist/routes/screenshot.js +76 -0
  719. package/server/dist/vite-manager.d.ts +10 -0
  720. package/server/dist/vite-manager.js +64 -0
  721. package/server/dist/ws-protocol.d.ts +138 -0
  722. package/server/dist/ws-protocol.js +4 -0
  723. package/ui/dist/assets/index-DXW2yo2v.css +2 -0
  724. package/ui/dist/assets/index-qqJ_mWi7.js +4732 -0
  725. package/ui/dist/icons/aline.png +0 -0
  726. package/ui/dist/icons/arc.png +0 -0
  727. package/ui/dist/icons/aslot.png +0 -0
  728. package/ui/dist/icons/axis.png +0 -0
  729. package/ui/dist/icons/box.png +0 -0
  730. package/ui/dist/icons/chamfer.png +0 -0
  731. package/ui/dist/icons/circle.png +0 -0
  732. package/ui/dist/icons/color.png +0 -0
  733. package/ui/dist/icons/common.png +0 -0
  734. package/ui/dist/icons/cone.png +0 -0
  735. package/ui/dist/icons/connect.png +0 -0
  736. package/ui/dist/icons/copy-circular.png +0 -0
  737. package/ui/dist/icons/copy-circular2d.png +0 -0
  738. package/ui/dist/icons/copy-linear.png +0 -0
  739. package/ui/dist/icons/copy-linear2d.png +0 -0
  740. package/ui/dist/icons/cut.png +0 -0
  741. package/ui/dist/icons/cylinder.png +0 -0
  742. package/ui/dist/icons/edge.png +0 -0
  743. package/ui/dist/icons/extrude.png +0 -0
  744. package/ui/dist/icons/fillet.png +0 -0
  745. package/ui/dist/icons/fillet2d.png +0 -0
  746. package/ui/dist/icons/fuse.png +0 -0
  747. package/ui/dist/icons/hline.png +0 -0
  748. package/ui/dist/icons/hole.png +0 -0
  749. package/ui/dist/icons/line.png +0 -0
  750. package/ui/dist/icons/load.png +0 -0
  751. package/ui/dist/icons/mirror.png +0 -0
  752. package/ui/dist/icons/mirror2d.png +0 -0
  753. package/ui/dist/icons/move.png +0 -0
  754. package/ui/dist/icons/plane.png +0 -0
  755. package/ui/dist/icons/polygon.png +0 -0
  756. package/ui/dist/icons/rect.png +0 -0
  757. package/ui/dist/icons/revolve.png +0 -0
  758. package/ui/dist/icons/rotate.png +0 -0
  759. package/ui/dist/icons/rotate2d.png +0 -0
  760. package/ui/dist/icons/select.png +0 -0
  761. package/ui/dist/icons/shell.png +0 -0
  762. package/ui/dist/icons/sketch.png +0 -0
  763. package/ui/dist/icons/slot.png +0 -0
  764. package/ui/dist/icons/solid.png +0 -0
  765. package/ui/dist/icons/sphere.png +0 -0
  766. package/ui/dist/icons/subtract.png +0 -0
  767. package/ui/dist/icons/tarc.png +0 -0
  768. package/ui/dist/icons/tline.png +0 -0
  769. package/ui/dist/icons/translate.png +0 -0
  770. package/ui/dist/icons/vline.png +0 -0
  771. package/ui/dist/icons/wire.png +0 -0
  772. package/ui/dist/index.html +13 -0
  773. package/ui/dist/logo.png +0 -0
@@ -0,0 +1,235 @@
1
+ import { getOC } from "./init.js";
2
+ import { Convert } from "./convert.js";
3
+ import { Point } from "../math/point.js";
4
+ import { Vector3d } from "../math/vector3d.js";
5
+ export class EdgeQuery {
6
+ // Wrapper methods (public API for external callers)
7
+ static isCircleEdge(edge, diameter) {
8
+ return EdgeQuery.isCircleEdgeRaw(edge.getShape(), diameter);
9
+ }
10
+ static isArcEdge(edge, radius) {
11
+ return EdgeQuery.isArcEdgeRaw(edge.getShape(), radius);
12
+ }
13
+ static isLineEdge(edge) {
14
+ return EdgeQuery.isLineEdgeRaw(edge.getShape());
15
+ }
16
+ static isEdgeOnPlane(edge, plane) {
17
+ const [gpPln, dispose] = Convert.toGpPln(plane);
18
+ const result = EdgeQuery.isEdgeOnPlaneRaw(edge.getShape(), gpPln);
19
+ dispose();
20
+ return result;
21
+ }
22
+ static isEdgeParallelToPlane(edge, planeNormal) {
23
+ const [gpVec, dispose] = Convert.toGpVec(planeNormal);
24
+ const result = EdgeQuery.isEdgeParallelToPlaneRaw(edge.getShape(), gpVec);
25
+ dispose();
26
+ return result;
27
+ }
28
+ static isEdgeAlignedWithNormal(edge, planeNormal) {
29
+ const [gpVec, dispose] = Convert.toGpVec(planeNormal);
30
+ const result = EdgeQuery.isEdgeAlignedWithNormalRaw(edge.getShape(), gpVec);
31
+ dispose();
32
+ return result;
33
+ }
34
+ static isEdgeClosedCurve(edge) {
35
+ return EdgeQuery.isEdgeClosedCurveRaw(edge.getShape());
36
+ }
37
+ static getEdgeCurveType(edge) {
38
+ return EdgeQuery.getEdgeCurveTypeRaw(edge.getShape());
39
+ }
40
+ static getEdgeCurveParams(edge) {
41
+ return EdgeQuery.getEdgeCurveParamsRaw(edge.getShape());
42
+ }
43
+ static sampleEdgeCurvePoint(edge, param) {
44
+ return EdgeQuery.sampleEdgeCurvePointRaw(edge.getShape(), param);
45
+ }
46
+ static getCircleDataFromEdge(edge) {
47
+ return EdgeQuery.getCircleDataFromEdgeRaw(edge.getShape());
48
+ }
49
+ // Raw methods (for oc-internal and common/ use)
50
+ static isCircleEdgeRaw(edge, diameter) {
51
+ const oc = getOC();
52
+ const ocEdge = oc.TopoDS.Edge(edge);
53
+ const curveAdaptor = new oc.BRepAdaptor_Curve(ocEdge);
54
+ const curveType = curveAdaptor.GetType();
55
+ if (curveType !== oc.GeomAbs_CurveType.GeomAbs_Circle) {
56
+ curveAdaptor.delete();
57
+ return false;
58
+ }
59
+ if (!curveAdaptor.IsClosed()) {
60
+ curveAdaptor.delete();
61
+ return false;
62
+ }
63
+ if (diameter === undefined) {
64
+ curveAdaptor.delete();
65
+ return true;
66
+ }
67
+ const circle = curveAdaptor.Circle();
68
+ const r = circle.Radius();
69
+ circle.delete();
70
+ curveAdaptor.delete();
71
+ return Math.abs(r - diameter / 2) <= oc.Precision.Confusion();
72
+ }
73
+ static isArcEdgeRaw(edge, radius) {
74
+ const oc = getOC();
75
+ const ocEdge = oc.TopoDS.Edge(edge);
76
+ const curveAdaptor = new oc.BRepAdaptor_Curve(ocEdge);
77
+ const curveType = curveAdaptor.GetType();
78
+ if (curveType !== oc.GeomAbs_CurveType.GeomAbs_Circle) {
79
+ curveAdaptor.delete();
80
+ return false;
81
+ }
82
+ if (curveAdaptor.IsClosed()) {
83
+ curveAdaptor.delete();
84
+ return false;
85
+ }
86
+ if (radius === undefined) {
87
+ curveAdaptor.delete();
88
+ return true;
89
+ }
90
+ const circle = curveAdaptor.Circle();
91
+ const r = circle.Radius();
92
+ circle.delete();
93
+ curveAdaptor.delete();
94
+ return Math.abs(r - radius) <= oc.Precision.Confusion();
95
+ }
96
+ static isLineEdgeRaw(edge) {
97
+ const oc = getOC();
98
+ const ocEdge = oc.TopoDS.Edge(edge);
99
+ const curveAdaptor = new oc.BRepAdaptor_Curve(ocEdge);
100
+ const curveType = curveAdaptor.GetType();
101
+ curveAdaptor.delete();
102
+ return curveType === oc.GeomAbs_CurveType.GeomAbs_Line;
103
+ }
104
+ static isEdgeOnPlaneRaw(edge, plane) {
105
+ const oc = getOC();
106
+ const ocEdge = oc.TopoDS.Edge(edge);
107
+ const curveAdaptor = new oc.BRepAdaptor_Curve(ocEdge);
108
+ const uMin = curveAdaptor.FirstParameter();
109
+ const uMax = curveAdaptor.LastParameter();
110
+ const uMid = (uMin + uMax) / 2.0;
111
+ const parameters = [uMin, uMid, uMax];
112
+ let allOnPlane = true;
113
+ for (const u of parameters) {
114
+ const point = curveAdaptor.Value(u);
115
+ const distance = plane.Distance(point);
116
+ if (Math.abs(distance) > oc.Precision.Confusion()) {
117
+ allOnPlane = false;
118
+ point.delete();
119
+ break;
120
+ }
121
+ point.delete();
122
+ }
123
+ curveAdaptor.delete();
124
+ return allOnPlane;
125
+ }
126
+ static isEdgeParallelToPlaneRaw(edge, planeNormal) {
127
+ const oc = getOC();
128
+ const ocEdge = oc.TopoDS.Edge(edge);
129
+ const adaptor = new oc.BRepAdaptor_Curve(ocEdge);
130
+ const curve = adaptor.Curve().Curve()?.get();
131
+ if (!curve) {
132
+ adaptor.delete();
133
+ return false;
134
+ }
135
+ const firstParam = curve.FirstParameter();
136
+ const lastParam = curve.LastParameter();
137
+ const midParam = (firstParam + lastParam) / 2;
138
+ const tangent = new oc.gp_Vec();
139
+ const tempPnt = new oc.gp_Pnt();
140
+ curve.D1(midParam, tempPnt, tangent);
141
+ const dotProduct = Math.abs(tangent.Dot(planeNormal));
142
+ const tolerance = 1e-6;
143
+ const result = dotProduct < tolerance;
144
+ tangent.delete();
145
+ tempPnt.delete();
146
+ adaptor.delete();
147
+ return result;
148
+ }
149
+ static isEdgeAlignedWithNormalRaw(edge, planeNormal) {
150
+ const oc = getOC();
151
+ const ocEdge = oc.TopoDS.Edge(edge);
152
+ const curveAdaptor = new oc.BRepAdaptor_Curve(ocEdge);
153
+ const uMin = curveAdaptor.FirstParameter();
154
+ const uMax = curveAdaptor.LastParameter();
155
+ const startPoint = curveAdaptor.Value(uMin);
156
+ const endPoint = curveAdaptor.Value(uMax);
157
+ const edgeVector = new oc.gp_Vec(startPoint, endPoint);
158
+ if (edgeVector.Magnitude() < oc.Precision.Confusion()) {
159
+ edgeVector.delete();
160
+ startPoint.delete();
161
+ endPoint.delete();
162
+ curveAdaptor.delete();
163
+ return false;
164
+ }
165
+ edgeVector.Normalize();
166
+ const planeNormalDir = new oc.gp_Dir(planeNormal.X(), planeNormal.Y(), planeNormal.Z());
167
+ const edgeDir = new oc.gp_Dir(edgeVector.X(), edgeVector.Y(), edgeVector.Z());
168
+ const reversedNormal = planeNormalDir.Reversed();
169
+ const equals = edgeDir.IsEqual(planeNormalDir, oc.Precision.Angular())
170
+ || edgeDir.IsEqual(reversedNormal, oc.Precision.Angular());
171
+ edgeVector.delete();
172
+ startPoint.delete();
173
+ endPoint.delete();
174
+ planeNormalDir.delete();
175
+ edgeDir.delete();
176
+ reversedNormal.delete();
177
+ curveAdaptor.delete();
178
+ return equals;
179
+ }
180
+ static isEdgeClosedCurveRaw(edge) {
181
+ const oc = getOC();
182
+ const curve = new oc.BRepAdaptor_Curve(edge);
183
+ const result = curve.IsClosed();
184
+ curve.delete();
185
+ return result;
186
+ }
187
+ static getEdgeCurveTypeRaw(edge) {
188
+ const oc = getOC();
189
+ const curve = new oc.BRepAdaptor_Curve(edge);
190
+ const curveType = curve.GetType();
191
+ curve.delete();
192
+ if (curveType === oc.GeomAbs_CurveType.GeomAbs_Line)
193
+ return "line";
194
+ if (curveType === oc.GeomAbs_CurveType.GeomAbs_Circle)
195
+ return "circle";
196
+ return "other";
197
+ }
198
+ static getEdgeCurveParamsRaw(edge) {
199
+ const oc = getOC();
200
+ const curve = new oc.BRepAdaptor_Curve(edge);
201
+ const first = curve.FirstParameter();
202
+ const last = curve.LastParameter();
203
+ curve.delete();
204
+ return { first, last };
205
+ }
206
+ static sampleEdgeCurvePointRaw(edge, param) {
207
+ const oc = getOC();
208
+ const curve = new oc.BRepAdaptor_Curve(edge);
209
+ const gp = curve.Value(param);
210
+ const point = new Point(gp.X(), gp.Y(), gp.Z());
211
+ gp.delete();
212
+ curve.delete();
213
+ return point;
214
+ }
215
+ static getCircleDataFromEdgeRaw(edge) {
216
+ const oc = getOC();
217
+ const curve = new oc.BRepAdaptor_Curve(edge);
218
+ const circle = curve.Circle();
219
+ const center = circle.Location();
220
+ const radius = circle.Radius();
221
+ const axis = circle.Axis();
222
+ const dir = axis.Direction();
223
+ const result = {
224
+ center: new Point(center.X(), center.Y(), center.Z()),
225
+ radius,
226
+ axisDirection: new Vector3d(dir.X(), dir.Y(), dir.Z()),
227
+ };
228
+ dir.delete();
229
+ axis.delete();
230
+ center.delete();
231
+ circle.delete();
232
+ curve.delete();
233
+ return result;
234
+ }
235
+ }
@@ -0,0 +1,34 @@
1
+ import type { TopAbs_ShapeEnum, TopoDS_Compound, TopoDS_Edge, TopoDS_Face, TopoDS_Shape, TopoDS_Solid, TopoDS_Wire, TopoDS_Vertex } from "occjs-wrapper";
2
+ import { Shape } from "../common/shape.js";
3
+ import { Face } from "../common/face.js";
4
+ import { Edge } from "../common/edge.js";
5
+ import { Wire } from "../common/wire.js";
6
+ import { Solid } from "../common/solid.js";
7
+ import { Vertex } from "../common/vertex.js";
8
+ export declare class Explorer {
9
+ static isWire(shape: TopoDS_Shape): boolean;
10
+ static isEdge(shape: TopoDS_Shape): boolean;
11
+ static isFace(shape: TopoDS_Shape): boolean;
12
+ static isVertex(shape: TopoDS_Shape): boolean;
13
+ static isCompound(shape: TopoDS_Shape): boolean;
14
+ static isShell(shape: TopoDS_Shape): boolean;
15
+ static isSolid(shape: TopoDS_Shape): boolean;
16
+ static isCompoundSolid(shape: TopoDS_Shape): boolean;
17
+ static getShapeType(shape: TopoDS_Shape): string;
18
+ static findShapes<T = TopoDS_Shape>(shape: TopoDS_Shape, lookFor: TopAbs_ShapeEnum): T[];
19
+ static findFirstShapeOfType<T = TopoDS_Shape>(shape: TopoDS_Shape, lookFor: TopAbs_ShapeEnum): T | null;
20
+ static findAllShapes(shape: TopoDS_Compound): any[];
21
+ static getOcShapeType(type: string): any;
22
+ static toSolid(shape: TopoDS_Shape): TopoDS_Solid;
23
+ static toFace(shape: TopoDS_Shape): TopoDS_Face;
24
+ static toWire(shape: TopoDS_Shape): TopoDS_Wire;
25
+ static toEdge(shape: TopoDS_Shape): TopoDS_Edge;
26
+ static toVertex(shape: TopoDS_Shape): TopoDS_Vertex;
27
+ static findFacesWrapped(shape: Shape): Face[];
28
+ static findEdgesWrapped(shape: Shape): Edge[];
29
+ static findEdgesInWireOrderWrapped(wire: Wire): Edge[];
30
+ static findSolidsWrapped(shape: Shape): Solid[];
31
+ static findVerticesWrapped(shape: Shape): Vertex[];
32
+ static findWiresWrapped(shape: Shape): Wire[];
33
+ static getShapeTypeFromWrapper(shape: Shape): string;
34
+ }
@@ -0,0 +1,179 @@
1
+ import { getOC } from "./init.js";
2
+ import { Face } from "../common/face.js";
3
+ import { Edge } from "../common/edge.js";
4
+ import { Wire } from "../common/wire.js";
5
+ import { Solid } from "../common/solid.js";
6
+ import { Vertex } from "../common/vertex.js";
7
+ export class Explorer {
8
+ static isWire(shape) {
9
+ const oc = getOC();
10
+ return shape.ShapeType() === oc.TopAbs_ShapeEnum.TopAbs_WIRE;
11
+ }
12
+ static isEdge(shape) {
13
+ const oc = getOC();
14
+ return shape.ShapeType() === oc.TopAbs_ShapeEnum.TopAbs_EDGE;
15
+ }
16
+ static isFace(shape) {
17
+ const oc = getOC();
18
+ return shape.ShapeType() === oc.TopAbs_ShapeEnum.TopAbs_FACE;
19
+ }
20
+ static isVertex(shape) {
21
+ const oc = getOC();
22
+ return shape.ShapeType() === oc.TopAbs_ShapeEnum.TopAbs_VERTEX;
23
+ }
24
+ static isCompound(shape) {
25
+ const oc = getOC();
26
+ return shape.ShapeType() === oc.TopAbs_ShapeEnum.TopAbs_COMPOUND;
27
+ }
28
+ static isShell(shape) {
29
+ const oc = getOC();
30
+ return shape.ShapeType() === oc.TopAbs_ShapeEnum.TopAbs_SHELL;
31
+ }
32
+ static isSolid(shape) {
33
+ const oc = getOC();
34
+ return shape.ShapeType() === oc.TopAbs_ShapeEnum.TopAbs_SOLID;
35
+ }
36
+ static isCompoundSolid(shape) {
37
+ const oc = getOC();
38
+ return shape.ShapeType() === oc.TopAbs_ShapeEnum.TopAbs_COMPSOLID;
39
+ }
40
+ static getShapeType(shape) {
41
+ if (Explorer.isWire(shape))
42
+ return "Wire";
43
+ if (Explorer.isEdge(shape))
44
+ return "Edge";
45
+ if (Explorer.isFace(shape))
46
+ return "Face";
47
+ if (Explorer.isVertex(shape))
48
+ return "Vertex";
49
+ if (Explorer.isCompound(shape))
50
+ return "Compound";
51
+ if (Explorer.isShell(shape))
52
+ return "Shell";
53
+ if (Explorer.isSolid(shape))
54
+ return "Solid";
55
+ if (Explorer.isCompoundSolid(shape))
56
+ return "CompoundSolid";
57
+ return "Unknown";
58
+ }
59
+ static findShapes(shape, lookFor) {
60
+ const oc = getOC();
61
+ const explorer = new oc.TopExp_Explorer(shape, lookFor, oc.TopAbs_ShapeEnum.TopAbs_SHAPE);
62
+ const map = new oc.TopTools_MapOfShape();
63
+ const result = [];
64
+ while (explorer.More()) {
65
+ const current = explorer.Current();
66
+ if (map.Add(current)) {
67
+ result.push(current);
68
+ }
69
+ explorer.Next();
70
+ }
71
+ explorer.delete();
72
+ return result;
73
+ }
74
+ static findFirstShapeOfType(shape, lookFor) {
75
+ const oc = getOC();
76
+ const explorer = new oc.TopExp_Explorer(shape, lookFor, oc.TopAbs_ShapeEnum.TopAbs_SHAPE);
77
+ let result = null;
78
+ if (explorer.More()) {
79
+ result = explorer.Current();
80
+ }
81
+ explorer.delete();
82
+ return result;
83
+ }
84
+ static findAllShapes(shape) {
85
+ const oc = getOC();
86
+ const shapes = [];
87
+ const iterator = new oc.TopoDS_Iterator();
88
+ iterator.Initialize(shape, true, true);
89
+ while (iterator.More()) {
90
+ const shape = iterator.Value();
91
+ if (shape.ShapeType() === oc.TopAbs_ShapeEnum.TopAbs_SHELL) {
92
+ const faces = Explorer.findShapes(shape, oc.TopAbs_ShapeEnum.TopAbs_FACE);
93
+ for (const face of faces) {
94
+ shapes.push(face);
95
+ }
96
+ }
97
+ else {
98
+ shapes.push(shape);
99
+ }
100
+ iterator.Next();
101
+ }
102
+ iterator.delete();
103
+ return shapes;
104
+ }
105
+ static getOcShapeType(type) {
106
+ const oc = getOC();
107
+ switch (type) {
108
+ case "edge":
109
+ return oc.TopAbs_ShapeEnum.TopAbs_EDGE;
110
+ case "wire":
111
+ return oc.TopAbs_ShapeEnum.TopAbs_WIRE;
112
+ case "face":
113
+ return oc.TopAbs_ShapeEnum.TopAbs_FACE;
114
+ case "solid":
115
+ return oc.TopAbs_ShapeEnum.TopAbs_SOLID;
116
+ case "vertex":
117
+ return oc.TopAbs_ShapeEnum.TopAbs_VERTEX;
118
+ }
119
+ }
120
+ static toSolid(shape) {
121
+ const oc = getOC();
122
+ return oc.TopoDS.Solid(shape);
123
+ }
124
+ static toFace(shape) {
125
+ const oc = getOC();
126
+ return oc.TopoDS.Face(shape);
127
+ }
128
+ static toWire(shape) {
129
+ const oc = getOC();
130
+ return oc.TopoDS.Wire(shape);
131
+ }
132
+ static toEdge(shape) {
133
+ const oc = getOC();
134
+ return oc.TopoDS.Edge(shape);
135
+ }
136
+ static toVertex(shape) {
137
+ const oc = getOC();
138
+ return oc.TopoDS.Vertex(shape);
139
+ }
140
+ static findFacesWrapped(shape) {
141
+ const oc = getOC();
142
+ const raw = Explorer.findShapes(shape.getShape(), oc.TopAbs_ShapeEnum.TopAbs_FACE);
143
+ return raw.map((f) => Face.fromTopoDSFace(Explorer.toFace(f)));
144
+ }
145
+ static findEdgesWrapped(shape) {
146
+ const oc = getOC();
147
+ const raw = Explorer.findShapes(shape.getShape(), oc.TopAbs_ShapeEnum.TopAbs_EDGE);
148
+ return raw.map((e) => Edge.fromTopoDSEdge(Explorer.toEdge(e)));
149
+ }
150
+ static findEdgesInWireOrderWrapped(wire) {
151
+ const oc = getOC();
152
+ const result = [];
153
+ const explorer = new oc.BRepTools_WireExplorer(wire.getShape());
154
+ while (explorer.More()) {
155
+ result.push(Edge.fromTopoDSEdge(Explorer.toEdge(explorer.Current())));
156
+ explorer.Next();
157
+ }
158
+ explorer.delete();
159
+ return result;
160
+ }
161
+ static findSolidsWrapped(shape) {
162
+ const oc = getOC();
163
+ const raw = Explorer.findShapes(shape.getShape(), oc.TopAbs_ShapeEnum.TopAbs_SOLID);
164
+ return raw.map((s) => Solid.fromTopoDSSolid(Explorer.toSolid(s)));
165
+ }
166
+ static findVerticesWrapped(shape) {
167
+ const oc = getOC();
168
+ const raw = Explorer.findShapes(shape.getShape(), oc.TopAbs_ShapeEnum.TopAbs_VERTEX);
169
+ return raw.map((e) => Vertex.fromTopoDSVertex(Explorer.toVertex(e)));
170
+ }
171
+ static findWiresWrapped(shape) {
172
+ const oc = getOC();
173
+ const raw = Explorer.findShapes(shape.getShape(), oc.TopAbs_ShapeEnum.TopAbs_WIRE);
174
+ return raw.map((w) => Wire.fromTopoDSWire(Explorer.toWire(w)));
175
+ }
176
+ static getShapeTypeFromWrapper(shape) {
177
+ return Explorer.getShapeType(shape.getShape());
178
+ }
179
+ }
@@ -0,0 +1,22 @@
1
+ import type { TopoDS_Shape } from "occjs-wrapper";
2
+ import { Vector3d } from "../math/vector3d.js";
3
+ import { Plane } from "../math/plane.js";
4
+ import { Axis } from "../math/axis.js";
5
+ import { Shape } from "../common/shape.js";
6
+ export declare class ExtrudeOps {
7
+ static makePrism(shape: Shape, direction: Vector3d, distance: number): Shape;
8
+ static makePrismFromVec(shape: Shape, vec: Vector3d): {
9
+ solid: Shape;
10
+ firstFace: Shape;
11
+ lastFace: Shape;
12
+ };
13
+ static makePrismInfinite(shape: Shape, direction: Vector3d): Shape;
14
+ static makePrismSymmetric(shape: Shape, direction: Vector3d): Shape;
15
+ static makeRevol(shape: Shape, axis: Axis, angle: number): Shape;
16
+ static applyDraftOnSideFaces(solid: Shape, firstFace: Shape, lastFace: Shape, plane: Plane, angle: number): {
17
+ solid: Shape;
18
+ firstFace: Shape;
19
+ lastFace: Shape;
20
+ };
21
+ static applyDraft(shape: TopoDS_Shape, direction: Vector3d, angle: number): TopoDS_Shape;
22
+ }
@@ -0,0 +1,149 @@
1
+ import { getOC } from "./init.js";
2
+ import { Convert } from "./convert.js";
3
+ import { Explorer } from "./explorer.js";
4
+ import { ShapeFactory } from "../common/shape-factory.js";
5
+ import { ShapeOps } from "./shape-ops.js";
6
+ export class ExtrudeOps {
7
+ static makePrism(shape, direction, distance) {
8
+ const oc = getOC();
9
+ const [vec, disposeVec] = Convert.toGpVec(direction.multiply(distance));
10
+ const prism = new oc.BRepPrimAPI_MakePrism(shape.getShape(), vec, false, true);
11
+ const result = prism.Shape();
12
+ prism.delete();
13
+ disposeVec();
14
+ return ShapeFactory.fromShape(result);
15
+ }
16
+ static makePrismFromVec(shape, vec) {
17
+ const oc = getOC();
18
+ const [gpVec, disposeVec] = Convert.toGpVec(vec);
19
+ const prism = new oc.BRepPrimAPI_MakePrism(shape.getShape(), gpVec, true, true);
20
+ if (!prism.IsDone()) {
21
+ prism.delete();
22
+ disposeVec();
23
+ throw new Error("Extrusion failed");
24
+ }
25
+ const solid = prism.Shape();
26
+ const firstFace = prism.FirstShape();
27
+ const lastFace = prism.LastShape();
28
+ prism.delete();
29
+ disposeVec();
30
+ return {
31
+ solid: ShapeFactory.fromShape(solid),
32
+ firstFace: ShapeFactory.fromShape(firstFace),
33
+ lastFace: ShapeFactory.fromShape(lastFace),
34
+ };
35
+ }
36
+ static makePrismInfinite(shape, direction) {
37
+ const oc = getOC();
38
+ const [vec, disposeVec] = Convert.toGpVec(direction);
39
+ const prism = new oc.BRepPrimAPI_MakePrism(shape.getShape(), vec, true, true);
40
+ const result = prism.Shape();
41
+ prism.delete();
42
+ disposeVec();
43
+ return ShapeFactory.fromShape(result);
44
+ }
45
+ static makePrismSymmetric(shape, direction) {
46
+ const oc = getOC();
47
+ const [dir, disposeDir] = Convert.toGpDir(direction);
48
+ const prism = new oc.BRepPrimAPI_MakePrism(shape.getShape(), dir, true, false, true);
49
+ if (!prism.IsDone()) {
50
+ prism.delete();
51
+ disposeDir();
52
+ throw new Error("Symmetric extrusion failed");
53
+ }
54
+ const result = prism.Shape();
55
+ prism.delete();
56
+ disposeDir();
57
+ return ShapeFactory.fromShape(result);
58
+ }
59
+ static makeRevol(shape, axis, angle) {
60
+ const oc = getOC();
61
+ const [ax1, disposeAx1] = Convert.toGpAx1(axis);
62
+ const revol = new oc.BRepPrimAPI_MakeRevol(shape.getShape(), ax1, angle, true);
63
+ const result = revol.Shape();
64
+ revol.delete();
65
+ disposeAx1();
66
+ const clean = ShapeOps.cleanShapeRaw(result);
67
+ return ShapeFactory.fromShape(clean);
68
+ }
69
+ static applyDraftOnSideFaces(solid, firstFace, lastFace, plane, angle) {
70
+ const oc = getOC();
71
+ const [dir, disposeDir] = Convert.toGpDir(plane.normal);
72
+ const [pln, disposePln] = Convert.toGpPln(plane);
73
+ const solidRaw = solid.getShape();
74
+ const firstFaceRaw = firstFace.getShape();
75
+ const lastFaceRaw = lastFace.getShape();
76
+ const draftMaker = new oc.BRepOffsetAPI_DraftAngle(solidRaw);
77
+ const sideFaces = Explorer.findShapes(solidRaw, Explorer.getOcShapeType("face")).filter(f => !f.IsSame(firstFaceRaw) && !f.IsSame(lastFaceRaw));
78
+ for (const face of sideFaces) {
79
+ draftMaker.Add(Explorer.toFace(face), dir, angle, pln, true);
80
+ }
81
+ const progress = new oc.Message_ProgressRange();
82
+ draftMaker.Build(progress);
83
+ progress.delete();
84
+ if (!draftMaker.IsDone()) {
85
+ draftMaker.delete();
86
+ disposeDir();
87
+ disposePln();
88
+ throw new Error("Draft application failed");
89
+ }
90
+ const modifiedFirst = ShapeOps.shapeListToArray(draftMaker.Modified(firstFaceRaw));
91
+ const modifiedLast = ShapeOps.shapeListToArray(draftMaker.Modified(lastFaceRaw));
92
+ const newFirstFace = modifiedFirst.length > 0
93
+ ? ShapeFactory.fromShape(modifiedFirst[0])
94
+ : firstFace;
95
+ const newLastFace = modifiedLast.length > 0
96
+ ? ShapeFactory.fromShape(modifiedLast[0])
97
+ : lastFace;
98
+ const result = draftMaker.Shape();
99
+ draftMaker.delete();
100
+ disposeDir();
101
+ disposePln();
102
+ return {
103
+ solid: ShapeFactory.fromShape(result),
104
+ firstFace: newFirstFace,
105
+ lastFace: newLastFace,
106
+ };
107
+ }
108
+ static applyDraft(shape, direction, angle) {
109
+ const oc = getOC();
110
+ const [dir, disposeDir] = Convert.toGpDir(direction);
111
+ const draftMaker = new oc.BRepOffsetAPI_DraftAngle(shape);
112
+ const explorer = new oc.TopExp_Explorer(shape, oc.TopAbs_ShapeEnum.TopAbs_FACE, oc.TopAbs_ShapeEnum.TopAbs_SHAPE);
113
+ while (explorer.More()) {
114
+ const face = oc.TopoDS.Face(explorer.Current());
115
+ const adaptor = new oc.BRepAdaptor_Surface(face, true);
116
+ if (adaptor.GetType() !== oc.GeomAbs_SurfaceType.GeomAbs_Plane) {
117
+ adaptor.delete();
118
+ explorer.Next();
119
+ continue;
120
+ }
121
+ const facePlane = adaptor.Plane();
122
+ const faceNormal = facePlane.Axis().Direction();
123
+ const dot = Math.abs(faceNormal.Dot(dir));
124
+ faceNormal.delete();
125
+ adaptor.delete();
126
+ if (dot > 0.999) {
127
+ facePlane.delete();
128
+ explorer.Next();
129
+ continue;
130
+ }
131
+ draftMaker.Add(face, dir, angle, facePlane, true);
132
+ facePlane.delete();
133
+ explorer.Next();
134
+ }
135
+ explorer.delete();
136
+ const progress = new oc.Message_ProgressRange();
137
+ draftMaker.Build(progress);
138
+ progress.delete();
139
+ if (!draftMaker.IsDone()) {
140
+ draftMaker.delete();
141
+ disposeDir();
142
+ throw new Error("Draft operation failed");
143
+ }
144
+ const result = draftMaker.Shape();
145
+ draftMaker.delete();
146
+ disposeDir();
147
+ return result;
148
+ }
149
+ }
@@ -0,0 +1,14 @@
1
+ import type { TopoDS_Compound, gp_Pln, TopoDS_Face, TopoDS_Wire } from "occjs-wrapper";
2
+ import type { BoundingBox, FaceInfo } from "../helpers/types.js";
3
+ export declare class OcFaceMaker {
4
+ static createFacesFromWires(wires: TopoDS_Wire[], gpPln: gp_Pln): TopoDS_Face[];
5
+ static fuseIntersectingFaces(faces: TopoDS_Face[]): TopoDS_Face[];
6
+ static unifyFaces(facesCompound: TopoDS_Compound): TopoDS_Face;
7
+ static boundingBoxesIntersect(bbox1: BoundingBox, bbox2: BoundingBox): boolean;
8
+ static getWiresFromFaces(faces: TopoDS_Face[]): TopoDS_Wire[];
9
+ static drillHoles(faceInfos: FaceInfo[]): FaceInfo[];
10
+ private static getFaceHoles;
11
+ private static wireIsInsideFace;
12
+ private static getFirstPointOfWire;
13
+ private static hitTest;
14
+ }