@ccpc/math 0.1.0 → 0.1.3

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 (459) hide show
  1. package/index.cjs +226 -0
  2. package/package.json +19 -37
  3. package/types/algorithm/bool_operate/bool2d/bool2d.d.ts +22 -0
  4. package/types/algorithm/bool_operate/bool2d/difference.d.ts +9 -0
  5. package/types/algorithm/bool_operate/bool2d/intersect.d.ts +9 -0
  6. package/types/algorithm/bool_operate/bool2d/split.d.ts +3 -0
  7. package/types/algorithm/bool_operate/bool2d/union.d.ts +9 -0
  8. package/types/algorithm/bool_operate/bool2d/utils.d.ts +40 -0
  9. package/types/algorithm/bool_operate/bool_operate_clipper.d.ts +18 -0
  10. package/types/algorithm/bool_operate/polycurve_polygon_bool.d.ts +13 -0
  11. package/types/algorithm/bool_operate_2d.d.ts +67 -0
  12. package/types/algorithm/calc_d.d.ts +85 -0
  13. package/types/algorithm/calc_offset.d.ts +70 -0
  14. package/types/algorithm/calc_overlap.d.ts +56 -0
  15. package/types/algorithm/calc_project.d.ts +29 -0
  16. package/types/algorithm/calc_x.d.ts +215 -0
  17. package/types/algorithm/calculate_util/geometry_subdevide_infos.d.ts +73 -0
  18. package/types/algorithm/calculate_util/iterative_method.d.ts +30 -0
  19. package/types/algorithm/discrete/discrete_curve.d.ts +31 -0
  20. package/types/algorithm/discrete/discrete_refiner.d.ts +35 -0
  21. package/types/algorithm/discrete/discrete_surface.d.ts +74 -0
  22. package/types/algorithm/discrete/discrete_topology.d.ts +32 -0
  23. package/types/algorithm/discrete/discrete_util.d.ts +96 -0
  24. package/types/algorithm/discrete/grid_discrete_data.d.ts +58 -0
  25. package/types/algorithm/discrete/libtess.d.ts +12 -0
  26. package/types/algorithm/discrete/uniform_grid_discrete.d.ts +3 -0
  27. package/types/algorithm/distance/base_calc_distance/curves_distance_util.d.ts +20 -0
  28. package/types/algorithm/distance/base_calc_distance/define_of_calculate_distance.d.ts +12 -0
  29. package/types/algorithm/distance/curve2ds_distance/arc2s_distance.d.ts +17 -0
  30. package/types/algorithm/distance/curve2ds_distance/line2d_to_arc2d_distance.d.ts +17 -0
  31. package/types/algorithm/distance/curve2ds_distance/line2s_distance.d.ts +15 -0
  32. package/types/algorithm/distance/curve2s_distance.d.ts +15 -0
  33. package/types/algorithm/distance/curve3ds_distance/line3d_to_line3d_distance_paramed.d.ts +12 -0
  34. package/types/algorithm/distance/curve3s_distance.d.ts +31 -0
  35. package/types/algorithm/distance/pt_to_curve2_signed_distance.d.ts +17 -0
  36. package/types/algorithm/distance/pt_to_curve3_distance.d.ts +25 -0
  37. package/types/algorithm/distance/pt_to_curve_distance_info.d.ts +12 -0
  38. package/types/algorithm/distance/pt_to_surface_distance.d.ts +17 -0
  39. package/types/algorithm/distance/pts_to_curves_distance.d.ts +13 -0
  40. package/types/algorithm/distance/pts_to_pts_distance.d.ts +7 -0
  41. package/types/algorithm/geometry_merge.d.ts +22 -0
  42. package/types/algorithm/index.d.ts +32 -0
  43. package/types/algorithm/intersect/box_cut_line.d.ts +6 -0
  44. package/types/algorithm/intersect/curve_self_x.d.ts +13 -0
  45. package/types/algorithm/intersect/curve_surface_x.d.ts +34 -0
  46. package/types/algorithm/intersect/curve_surface_x_util.d.ts +32 -0
  47. package/types/algorithm/intersect/curves_x/circulars_x.d.ts +35 -0
  48. package/types/algorithm/intersect/curves_x/linear_circular_x.d.ts +40 -0
  49. package/types/algorithm/intersect/curves_x/lines_x.d.ts +17 -0
  50. package/types/algorithm/intersect/curves_x/lines_x_util.d.ts +4 -0
  51. package/types/algorithm/intersect/curves_x.d.ts +26 -0
  52. package/types/algorithm/intersect/curves_x_util.d.ts +35 -0
  53. package/types/algorithm/intersect/intersect_info_util.d.ts +9 -0
  54. package/types/algorithm/intersect/surface_self_x.d.ts +8 -0
  55. package/types/algorithm/intersect/surfaces_x.d.ts +53 -0
  56. package/types/algorithm/intersect/surfaces_x_complex.d.ts +29 -0
  57. package/types/algorithm/intersect/surfaces_x_special.d.ts +16 -0
  58. package/types/algorithm/intersect/surfaces_x_util.d.ts +41 -0
  59. package/types/algorithm/intersect/x_info.d.ts +65 -0
  60. package/types/algorithm/loop_property/loop-area.d.ts +49 -0
  61. package/types/algorithm/loop_property/loop-centroid.d.ts +40 -0
  62. package/types/algorithm/merge_geometry/halfplane.d.ts +24 -0
  63. package/types/algorithm/merge_geometry/merge_curve.d.ts +14 -0
  64. package/types/algorithm/merge_geometry/merge_point.d.ts +18 -0
  65. package/types/algorithm/mesh/clip_mesh.d.ts +27 -0
  66. package/types/algorithm/mesh/extrude_clip.d.ts +236 -0
  67. package/types/algorithm/mesh/mesh_assist.d.ts +21 -0
  68. package/types/algorithm/mesh/mesh_contour.d.ts +26 -0
  69. package/types/algorithm/mesh/mesh_util.d.ts +115 -0
  70. package/types/algorithm/offset/loop2d_offset.d.ts +22 -0
  71. package/types/algorithm/offset/polygon_offset.d.ts +27 -0
  72. package/types/algorithm/overlap/curve_surface_coincide.d.ts +6 -0
  73. package/types/algorithm/overlap/curves_colinear.d.ts +38 -0
  74. package/types/algorithm/overlap/curves_merge.d.ts +74 -0
  75. package/types/algorithm/overlap/curves_overlap.d.ts +34 -0
  76. package/types/algorithm/overlap/i_overlap.d.ts +9 -0
  77. package/types/algorithm/overlap/surfaces_coplaner.d.ts +5 -0
  78. package/types/algorithm/pattern/blocks2Geometry.d.ts +50 -0
  79. package/types/algorithm/pattern/math.d.ts +42 -0
  80. package/types/algorithm/pattern/pattern.d.ts +43 -0
  81. package/types/algorithm/pattern/pattern_util.d.ts +53 -0
  82. package/types/algorithm/pattern/pave.d.ts +33 -0
  83. package/types/algorithm/pj/curves_oj.d.ts +19 -0
  84. package/types/algorithm/pj/curves_pj.d.ts +19 -0
  85. package/types/algorithm/pj/loops_pj.d.ts +13 -0
  86. package/types/algorithm/pj/pj_type.d.ts +46 -0
  87. package/types/algorithm/pj/pt_loop_pj.d.ts +24 -0
  88. package/types/algorithm/pj/pt_polygon_pj.d.ts +18 -0
  89. package/types/algorithm/pj/pt_polygon_position_judger.d.ts +11 -0
  90. package/types/algorithm/position_judge.d.ts +72 -0
  91. package/types/algorithm/project/curve3d_to_plane_project.d.ts +11 -0
  92. package/types/algorithm/project/curve_curve_project.d.ts +9 -0
  93. package/types/algorithm/search_graph/iloops_polygonex.d.ts +28 -0
  94. package/types/algorithm/search_graph/loop_tree_node.d.ts +30 -0
  95. package/types/algorithm/search_graph/loops_to_loop_tree_search_graph.d.ts +25 -0
  96. package/types/algorithm/search_graph/polygon_polygonex.d.ts +13 -0
  97. package/types/algorithm/search_graph/search_loop2d.d.ts +20 -0
  98. package/types/algorithm/search_graph/search_polyline.d.ts +11 -0
  99. package/types/algorithm/search_graph.d.ts +45 -0
  100. package/types/algorithm/topology_edit.d.ts +10 -0
  101. package/types/base/box.d.ts +100 -0
  102. package/types/base/box2.d.ts +17 -0
  103. package/types/base/box3.d.ts +20 -0
  104. package/types/base/coord.d.ts +10 -0
  105. package/types/base/coord2.d.ts +92 -0
  106. package/types/base/coord3.d.ts +139 -0
  107. package/types/base/discrete_param.d.ts +28 -0
  108. package/types/base/euler.d.ts +102 -0
  109. package/types/base/geo_element.d.ts +54 -0
  110. package/types/base/interval.d.ts +122 -0
  111. package/types/base/ivector.d.ts +126 -0
  112. package/types/base/matrix.d.ts +108 -0
  113. package/types/base/matrix3.d.ts +118 -0
  114. package/types/base/matrix4.d.ts +166 -0
  115. package/types/base/matrix_util.d.ts +5 -0
  116. package/types/base/period_inverval.d.ts +127 -0
  117. package/types/base/quaternion.d.ts +39 -0
  118. package/types/base/tangent_cone.d.ts +11 -0
  119. package/types/base/tilt_box.d.ts +11 -0
  120. package/types/base/tol.d.ts +120 -0
  121. package/types/base/vec.d.ts +46 -0
  122. package/types/base/vec2.d.ts +146 -0
  123. package/types/base/vec3.d.ts +158 -0
  124. package/types/brep-src/algorithm/alg_const.d.ts +23 -0
  125. package/types/brep-src/algorithm/alg_types.d.ts +47 -0
  126. package/types/brep-src/algorithm/algorithm_util/base_define.d.ts +7 -0
  127. package/types/brep-src/algorithm/algorithm_util/body_base_util.d.ts +4 -0
  128. package/types/brep-src/algorithm/algorithm_util/curve_solid_analysis.d.ts +28 -0
  129. package/types/brep-src/algorithm/algorithm_util/face_face_analysis.d.ts +39 -0
  130. package/types/brep-src/algorithm/algorithm_util/search_wire.d.ts +8 -0
  131. package/types/brep-src/algorithm/body_builder/basic_body_builder.d.ts +15 -0
  132. package/types/brep-src/algorithm/body_builder/extrude_body.d.ts +23 -0
  133. package/types/brep-src/algorithm/body_builder/sweep_body.d.ts +37 -0
  134. package/types/brep-src/algorithm/body_builder.d.ts +36 -0
  135. package/types/brep-src/algorithm/body_util.d.ts +21 -0
  136. package/types/brep-src/algorithm/bool_sk/brep_converter.d.ts +11 -0
  137. package/types/brep-src/algorithm/brep_calc_project.d.ts +50 -0
  138. package/types/brep-src/algorithm/brep_calc_x.d.ts +34 -0
  139. package/types/brep-src/algorithm/brep_pj.d.ts +47 -0
  140. package/types/brep-src/algorithm/index.d.ts +5 -0
  141. package/types/brep-src/algorithm/intersect/curve_face_overlap.d.ts +10 -0
  142. package/types/brep-src/algorithm/intersect/face_face_intersect.d.ts +22 -0
  143. package/types/brep-src/algorithm/intersect/face_faces_intersect.d.ts +15 -0
  144. package/types/brep-src/algorithm/intersect/line_face_intersect.d.ts +16 -0
  145. package/types/brep-src/algorithm/podition_judge/body_pj.d.ts +25 -0
  146. package/types/brep-src/algorithm/podition_judge/extrude_pj.d.ts +28 -0
  147. package/types/brep-src/algorithm/podition_judge/pt_body_pj.d.ts +32 -0
  148. package/types/brep-src/algorithm/project/body_project.d.ts +8 -0
  149. package/types/brep-src/algorithm/project/face_project.d.ts +20 -0
  150. package/types/brep-src/algorithm/project/face_surface_project.d.ts +8 -0
  151. package/types/brep-src/algorithm/project/space_project.d.ts +26 -0
  152. package/types/brep-src/algorithm/project/space_project_simple.d.ts +10 -0
  153. package/types/brep-src/algorithm/project/view_project.d.ts +25 -0
  154. package/types/brep-src/algorithm/shell_builder/create_shell_from_curves.d.ts +38 -0
  155. package/types/brep-src/algorithm/shell_builder.d.ts +25 -0
  156. package/types/brep-src/algorithm/shell_edit/add_edges/add_edges.d.ts +14 -0
  157. package/types/brep-src/algorithm/shell_edit/add_edges/add_edges_core.d.ts +11 -0
  158. package/types/brep-src/algorithm/shell_edit/copy_faces.d.ts +20 -0
  159. package/types/brep-src/algorithm/shell_edit/delete_faces_edges/delete_edge.d.ts +9 -0
  160. package/types/brep-src/algorithm/shell_edit/delete_faces_edges/delete_faces_edges.d.ts +17 -0
  161. package/types/brep-src/algorithm/shell_edit/faces_boolean/faces_boolean.d.ts +19 -0
  162. package/types/brep-src/algorithm/shell_edit/faces_boolean/faces_shells_boolean.d.ts +13 -0
  163. package/types/brep-src/algorithm/shell_edit/faces_boolean/octree.d.ts +11 -0
  164. package/types/brep-src/algorithm/shell_edit/isolate_faces.d.ts +21 -0
  165. package/types/brep-src/algorithm/shell_edit/merge_connect_faces.d.ts +14 -0
  166. package/types/brep-src/algorithm/shell_edit/merge_edges.d.ts +8 -0
  167. package/types/brep-src/algorithm/shell_edit/move_operators/move_edges.d.ts +31 -0
  168. package/types/brep-src/algorithm/shell_edit/move_operators/move_faces.d.ts +14 -0
  169. package/types/brep-src/algorithm/shell_edit/operator/dispose_topo.d.ts +2 -0
  170. package/types/brep-src/algorithm/shell_edit/operator/merge_connect_edge.d.ts +3 -0
  171. package/types/brep-src/algorithm/shell_edit/operator/merge_connect_face.d.ts +2 -0
  172. package/types/brep-src/algorithm/shell_edit/operator/merge_overlap_edge.d.ts +3 -0
  173. package/types/brep-src/algorithm/shell_edit/operator/merge_shell.d.ts +11 -0
  174. package/types/brep-src/algorithm/shell_edit/operator/merge_vertex.d.ts +2 -0
  175. package/types/brep-src/algorithm/shell_edit/operator/split_edge.d.ts +4 -0
  176. package/types/brep-src/algorithm/shell_edit/operator/split_shell.d.ts +6 -0
  177. package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face.d.ts +18 -0
  178. package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_core.d.ts +6 -0
  179. package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_preview.d.ts +16 -0
  180. package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_preview_core.d.ts +24 -0
  181. package/types/brep-src/algorithm/shell_edit/roundinng/2d_rounding.d.ts +22 -0
  182. package/types/brep-src/algorithm/shell_edit/shell_modeling_base.d.ts +10 -0
  183. package/types/brep-src/algorithm/shell_edit/shell_modeling_result.d.ts +21 -0
  184. package/types/brep-src/algorithm/shell_edit/smooth/detect_loop_util.d.ts +27 -0
  185. package/types/brep-src/algorithm/shell_edit/smooth/shell_modeling_util.d.ts +24 -0
  186. package/types/brep-src/algorithm/shell_edit/smooth/smooth_util.d.ts +22 -0
  187. package/types/brep-src/algorithm/shell_edit/split_edge.d.ts +10 -0
  188. package/types/brep-src/algorithm/shell_edit.d.ts +119 -0
  189. package/types/brep-src/algorithm/shell_valid/base_brep_topo_error.d.ts +176 -0
  190. package/types/brep-src/algorithm/shell_valid/diagnose_shell.d.ts +14 -0
  191. package/types/brep-src/brep/brep_body.d.ts +19 -0
  192. package/types/brep-src/brep/coedge3d.d.ts +83 -0
  193. package/types/brep-src/brep/edge.d.ts +96 -0
  194. package/types/brep-src/brep/face.d.ts +150 -0
  195. package/types/brep-src/brep/shell.d.ts +166 -0
  196. package/types/brep-src/brep/topo_object.d.ts +40 -0
  197. package/types/brep-src/brep/vertex.d.ts +48 -0
  198. package/types/brep-src/brep/wire.d.ts +66 -0
  199. package/types/brep-src/continuous/continuous_edge.d.ts +17 -0
  200. package/types/brep-src/continuous/continuous_face.d.ts +10 -0
  201. package/types/brep-src/continuous/continuous_util.d.ts +60 -0
  202. package/types/brep-src/continuous/continuous_uv.d.ts +24 -0
  203. package/types/brep-src/continuous/index.d.ts +4 -0
  204. package/types/brep-src/index.d.ts +14 -0
  205. package/types/brep-src/type_define/i_types.d.ts +46 -0
  206. package/types/brep-src/util/util.d.ts +23 -0
  207. package/types/conversion/units_conversion.d.ts +14 -0
  208. package/types/geometry/arc2d.d.ts +249 -0
  209. package/types/geometry/arc3d.d.ts +204 -0
  210. package/types/geometry/circle3d.d.ts +92 -0
  211. package/types/geometry/circular_surface.d.ts +52 -0
  212. package/types/geometry/coord_based_surface.d.ts +25 -0
  213. package/types/geometry/curve.d.ts +228 -0
  214. package/types/geometry/curve2.d.ts +62 -0
  215. package/types/geometry/curve3d.d.ts +66 -0
  216. package/types/geometry/cylinder.d.ts +73 -0
  217. package/types/geometry/discrete_arrow.d.ts +3 -0
  218. package/types/geometry/extend_curve2.d.ts +75 -0
  219. package/types/geometry/geometry2d.d.ts +35 -0
  220. package/types/geometry/geometry3d.d.ts +36 -0
  221. package/types/geometry/intersect_curve3.d.ts +90 -0
  222. package/types/geometry/ln2.d.ts +168 -0
  223. package/types/geometry/ln3.d.ts +152 -0
  224. package/types/geometry/nurbs_curve2.d.ts +106 -0
  225. package/types/geometry/nurbs_curve3.d.ts +191 -0
  226. package/types/geometry/offset_curve2.d.ts +63 -0
  227. package/types/geometry/offset_curve3.d.ts +97 -0
  228. package/types/geometry/offset_parameter_mapper.d.ts +72 -0
  229. package/types/geometry/plane.d.ts +109 -0
  230. package/types/geometry/polyline.d.ts +12 -0
  231. package/types/geometry/smooth_poly2.d.ts +78 -0
  232. package/types/geometry/smooth_poly3.d.ts +85 -0
  233. package/types/geometry/surface.d.ts +173 -0
  234. package/types/index.d.ts +78 -0
  235. package/types/io/obj_parser.d.ts +4 -0
  236. package/types/io/svgparser.d.ts +22 -0
  237. package/types/loader/loader.d.ts +23 -0
  238. package/types/loader/register_geo.d.ts +7 -0
  239. package/types/math/gauss_integration.d.ts +13 -0
  240. package/types/math/inv_bilinear.d.ts +33 -0
  241. package/types/solve_equations/cubic_equation.d.ts +7 -0
  242. package/types/solve_equations/linear_system.d.ts +6 -0
  243. package/types/solve_equations/nonlinear_system.d.ts +11 -0
  244. package/types/solve_equations/plurality.d.ts +9 -0
  245. package/types/solve_equations/polynomial_equation.d.ts +6 -0
  246. package/types/solve_equations/quadratic_equation.d.ts +6 -0
  247. package/types/solve_equations/quartic_equation.d.ts +6 -0
  248. package/types/solve_equations/solve_equation_util.d.ts +50 -0
  249. package/types/test_util/loop_generator.d.ts +21 -0
  250. package/types/topology/evolution_map.d.ts +90 -0
  251. package/types/topology/loop.d.ts +50 -0
  252. package/types/topology/polycurve.d.ts +109 -0
  253. package/types/topology/polygon.d.ts +118 -0
  254. package/types/topology/trimmed_surface.d.ts +136 -0
  255. package/types/type_define/const.d.ts +18 -0
  256. package/types/type_define/i_element.d.ts +9 -0
  257. package/types/type_define/i_element_type.d.ts +34 -0
  258. package/types/type_define/i_geometry.d.ts +191 -0
  259. package/types/type_define/i_types.d.ts +280 -0
  260. package/types/util/array_util.d.ts +8 -0
  261. package/types/util/assert.d.ts +21 -0
  262. package/types/util/clipper2_util.d.ts +5 -0
  263. package/types/util/clipper_format_converter.d.ts +21 -0
  264. package/types/util/clipper_util.d.ts +10 -0
  265. package/types/util/curve_util.d.ts +72 -0
  266. package/types/util/geom_util.d.ts +23 -0
  267. package/types/util/log.d.ts +19 -0
  268. package/types/util/math_error.d.ts +37 -0
  269. package/types/util/surface_util.d.ts +13 -0
  270. package/types/util/util.d.ts +18 -0
  271. package/types/util/uv_util.d.ts +68 -0
  272. package/types/verb/export_verb.d.ts +2 -0
  273. package/types/wasm/a2d.d.ts +19 -0
  274. package/types/wasm/bx2.d.ts +16 -0
  275. package/types/wasm/c2d.d.ts +29 -0
  276. package/types/wasm/elli.d.ts +19 -0
  277. package/types/wasm/grapher2d.d.ts +39 -0
  278. package/types/wasm/grapherutil.d.ts +9 -0
  279. package/types/wasm/l2d.d.ts +14 -0
  280. package/types/wasm/loader.d.ts +8 -0
  281. package/types/wasm/pt.d.ts +19 -0
  282. package/types/wasm/wasm-geom.d.ts +296 -0
  283. package/types/wasm/wasminstance.d.ts +19 -0
  284. package/types/wasm/wrapper.d.ts +82 -0
  285. package/README.md +0 -21
  286. package/dist/constants/geom_type.d.ts +0 -13
  287. package/dist/constants/geom_type.d.ts.map +0 -1
  288. package/dist/constants/geom_type.js +0 -17
  289. package/dist/constants/math_const.d.ts +0 -9
  290. package/dist/constants/math_const.d.ts.map +0 -1
  291. package/dist/constants/math_const.js +0 -12
  292. package/dist/core/box2.d.ts +0 -71
  293. package/dist/core/box2.d.ts.map +0 -1
  294. package/dist/core/box2.js +0 -243
  295. package/dist/core/coord2d.d.ts +0 -62
  296. package/dist/core/coord2d.d.ts.map +0 -1
  297. package/dist/core/coord2d.js +0 -155
  298. package/dist/core/geom_base.d.ts +0 -19
  299. package/dist/core/geom_base.d.ts.map +0 -1
  300. package/dist/core/geom_base.js +0 -18
  301. package/dist/core/mat3.d.ts +0 -101
  302. package/dist/core/mat3.d.ts.map +0 -1
  303. package/dist/core/mat3.js +0 -290
  304. package/dist/core/vec2.d.ts +0 -138
  305. package/dist/core/vec2.d.ts.map +0 -1
  306. package/dist/core/vec2.js +0 -297
  307. package/dist/curves/arc2.d.ts +0 -49
  308. package/dist/curves/arc2.d.ts.map +0 -1
  309. package/dist/curves/arc2.js +0 -265
  310. package/dist/curves/bspline2.d.ts +0 -150
  311. package/dist/curves/bspline2.d.ts.map +0 -1
  312. package/dist/curves/bspline2.js +0 -793
  313. package/dist/curves/circle2.d.ts +0 -42
  314. package/dist/curves/circle2.d.ts.map +0 -1
  315. package/dist/curves/circle2.js +0 -135
  316. package/dist/curves/circle_curve2.d.ts +0 -38
  317. package/dist/curves/circle_curve2.d.ts.map +0 -1
  318. package/dist/curves/circle_curve2.js +0 -112
  319. package/dist/curves/curve2.d.ts +0 -214
  320. package/dist/curves/curve2.d.ts.map +0 -1
  321. package/dist/curves/curve2.js +0 -238
  322. package/dist/curves/ellipse2.d.ts +0 -42
  323. package/dist/curves/ellipse2.d.ts.map +0 -1
  324. package/dist/curves/ellipse2.js +0 -125
  325. package/dist/curves/ellipse_arc2.d.ts +0 -49
  326. package/dist/curves/ellipse_arc2.d.ts.map +0 -1
  327. package/dist/curves/ellipse_arc2.js +0 -184
  328. package/dist/curves/ellipse_curve2.d.ts +0 -56
  329. package/dist/curves/ellipse_curve2.d.ts.map +0 -1
  330. package/dist/curves/ellipse_curve2.js +0 -262
  331. package/dist/curves/interval.d.ts +0 -112
  332. package/dist/curves/interval.d.ts.map +0 -1
  333. package/dist/curves/interval.js +0 -200
  334. package/dist/curves/line2.d.ts +0 -64
  335. package/dist/curves/line2.d.ts.map +0 -1
  336. package/dist/curves/line2.js +0 -193
  337. package/dist/curves/period_interval.d.ts +0 -129
  338. package/dist/curves/period_interval.d.ts.map +0 -1
  339. package/dist/curves/period_interval.js +0 -240
  340. package/dist/discretize/discretize_defaults.d.ts +0 -12
  341. package/dist/discretize/discretize_defaults.d.ts.map +0 -1
  342. package/dist/discretize/discretize_defaults.js +0 -12
  343. package/dist/discretize/discretize_engine.d.ts +0 -33
  344. package/dist/discretize/discretize_engine.d.ts.map +0 -1
  345. package/dist/discretize/discretize_engine.js +0 -347
  346. package/dist/discretize/discretize_errors.d.ts +0 -15
  347. package/dist/discretize/discretize_errors.d.ts.map +0 -1
  348. package/dist/discretize/discretize_errors.js +0 -30
  349. package/dist/discretize/discretize_options.d.ts +0 -18
  350. package/dist/discretize/discretize_options.d.ts.map +0 -1
  351. package/dist/discretize/discretize_options.js +0 -19
  352. package/dist/discretize/discretize_types.d.ts +0 -36
  353. package/dist/discretize/discretize_types.d.ts.map +0 -1
  354. package/dist/discretize/discretize_types.js +0 -1
  355. package/dist/discretize/internal/curve_guards.d.ts +0 -35
  356. package/dist/discretize/internal/curve_guards.d.ts.map +0 -1
  357. package/dist/discretize/internal/curve_guards.js +0 -62
  358. package/dist/discretize/internal/postprocess.d.ts +0 -5
  359. package/dist/discretize/internal/postprocess.d.ts.map +0 -1
  360. package/dist/discretize/internal/postprocess.js +0 -109
  361. package/dist/discretize/internal/sampling_utils.d.ts +0 -8
  362. package/dist/discretize/internal/sampling_utils.d.ts.map +0 -1
  363. package/dist/discretize/internal/sampling_utils.js +0 -36
  364. package/dist/discretize/register_builtin_strategies.d.ts +0 -3
  365. package/dist/discretize/register_builtin_strategies.d.ts.map +0 -1
  366. package/dist/discretize/register_builtin_strategies.js +0 -10
  367. package/dist/discretize/strategies/bspline_strategy.d.ts +0 -4
  368. package/dist/discretize/strategies/bspline_strategy.d.ts.map +0 -1
  369. package/dist/discretize/strategies/bspline_strategy.js +0 -115
  370. package/dist/discretize/strategies/circle_strategy.d.ts +0 -7
  371. package/dist/discretize/strategies/circle_strategy.d.ts.map +0 -1
  372. package/dist/discretize/strategies/circle_strategy.js +0 -55
  373. package/dist/discretize/strategies/ellipse_strategy.d.ts +0 -7
  374. package/dist/discretize/strategies/ellipse_strategy.d.ts.map +0 -1
  375. package/dist/discretize/strategies/ellipse_strategy.js +0 -86
  376. package/dist/discretize/strategies/line_strategy.d.ts +0 -4
  377. package/dist/discretize/strategies/line_strategy.d.ts.map +0 -1
  378. package/dist/discretize/strategies/line_strategy.js +0 -40
  379. package/dist/discretize/strategy_registry.d.ts +0 -9
  380. package/dist/discretize/strategy_registry.d.ts.map +0 -1
  381. package/dist/discretize/strategy_registry.js +0 -34
  382. package/dist/index.d.ts +0 -30
  383. package/dist/index.d.ts.map +0 -1
  384. package/dist/index.js +0 -24
  385. package/dist/intersections/analytic_x_algorithm.d.ts +0 -10
  386. package/dist/intersections/analytic_x_algorithm.d.ts.map +0 -1
  387. package/dist/intersections/analytic_x_algorithm.js +0 -83
  388. package/dist/intersections/curve_x_engine.d.ts +0 -9
  389. package/dist/intersections/curve_x_engine.d.ts.map +0 -1
  390. package/dist/intersections/curve_x_engine.js +0 -27
  391. package/dist/intersections/index.d.ts +0 -5
  392. package/dist/intersections/index.d.ts.map +0 -1
  393. package/dist/intersections/index.js +0 -11
  394. package/dist/intersections/internal/certification.d.ts +0 -34
  395. package/dist/intersections/internal/certification.d.ts.map +0 -1
  396. package/dist/intersections/internal/certification.js +0 -238
  397. package/dist/intersections/internal/interval_clipping.d.ts +0 -29
  398. package/dist/intersections/internal/interval_clipping.d.ts.map +0 -1
  399. package/dist/intersections/internal/interval_clipping.js +0 -123
  400. package/dist/intersections/internal/kind.d.ts +0 -4
  401. package/dist/intersections/internal/kind.d.ts.map +0 -1
  402. package/dist/intersections/internal/kind.js +0 -16
  403. package/dist/intersections/internal/pair.d.ts +0 -9
  404. package/dist/intersections/internal/pair.d.ts.map +0 -1
  405. package/dist/intersections/internal/pair.js +0 -14
  406. package/dist/intersections/internal/result.d.ts +0 -20
  407. package/dist/intersections/internal/result.d.ts.map +0 -1
  408. package/dist/intersections/internal/result.js +0 -125
  409. package/dist/intersections/internal/sampling.d.ts +0 -15
  410. package/dist/intersections/internal/sampling.d.ts.map +0 -1
  411. package/dist/intersections/internal/sampling.js +0 -131
  412. package/dist/intersections/internal/segment.d.ts +0 -32
  413. package/dist/intersections/internal/segment.d.ts.map +0 -1
  414. package/dist/intersections/internal/segment.js +0 -137
  415. package/dist/intersections/internal/tolerance.d.ts +0 -10
  416. package/dist/intersections/internal/tolerance.d.ts.map +0 -1
  417. package/dist/intersections/internal/tolerance.js +0 -20
  418. package/dist/intersections/intersector.d.ts +0 -6
  419. package/dist/intersections/intersector.d.ts.map +0 -1
  420. package/dist/intersections/intersector.js +0 -1
  421. package/dist/intersections/numeric_x_algorithm.d.ts +0 -10
  422. package/dist/intersections/numeric_x_algorithm.d.ts.map +0 -1
  423. package/dist/intersections/numeric_x_algorithm.js +0 -73
  424. package/dist/intersections/solvers/bspline_self_solver.d.ts +0 -7
  425. package/dist/intersections/solvers/bspline_self_solver.d.ts.map +0 -1
  426. package/dist/intersections/solvers/bspline_self_solver.js +0 -308
  427. package/dist/intersections/solvers/line_line_pair_solver.d.ts +0 -7
  428. package/dist/intersections/solvers/line_line_pair_solver.d.ts.map +0 -1
  429. package/dist/intersections/solvers/line_line_pair_solver.js +0 -35
  430. package/dist/intersections/solvers/pair_solvers.d.ts +0 -94
  431. package/dist/intersections/solvers/pair_solvers.d.ts.map +0 -1
  432. package/dist/intersections/solvers/pair_solvers.js +0 -1078
  433. package/dist/intersections/solvers/polyline_pair_intersector.d.ts +0 -51
  434. package/dist/intersections/solvers/polyline_pair_intersector.d.ts.map +0 -1
  435. package/dist/intersections/solvers/polyline_pair_intersector.js +0 -731
  436. package/dist/intersections/types.d.ts +0 -11
  437. package/dist/intersections/types.d.ts.map +0 -1
  438. package/dist/intersections/types.js +0 -1
  439. package/dist/serialize/dump_types.d.ts +0 -101
  440. package/dist/serialize/dump_types.d.ts.map +0 -1
  441. package/dist/serialize/dump_types.js +0 -5
  442. package/dist/serialize/geom_mgr.d.ts +0 -24
  443. package/dist/serialize/geom_mgr.d.ts.map +0 -1
  444. package/dist/serialize/geom_mgr.js +0 -30
  445. package/dist/types/type_define.d.ts +0 -29
  446. package/dist/types/type_define.d.ts.map +0 -1
  447. package/dist/types/type_define.js +0 -10
  448. package/dist/types/type_guard.d.ts +0 -46
  449. package/dist/types/type_guard.d.ts.map +0 -1
  450. package/dist/types/type_guard.js +0 -5
  451. package/dist/utils/math_error.d.ts +0 -16
  452. package/dist/utils/math_error.d.ts.map +0 -1
  453. package/dist/utils/math_error.js +0 -35
  454. package/dist/utils/math_utils.d.ts +0 -9
  455. package/dist/utils/math_utils.d.ts.map +0 -1
  456. package/dist/utils/math_utils.js +0 -25
  457. package/dist/utils/precision.d.ts +0 -29
  458. package/dist/utils/precision.d.ts.map +0 -1
  459. package/dist/utils/precision.js +0 -44
@@ -0,0 +1,34 @@
1
+ import { Curve3, PolyCurve, Loop, Tol, Ln3, Vec3 } from '../..';
2
+ import { Face } from '../brep/face';
3
+ /**
4
+ * 几何元素求交,线线求交,线面求交
5
+ */
6
+ export declare class BRepCalcX {
7
+ /**
8
+ * Face与Face相交,结果为交线(交点可认为是退化成的线)
9
+ * @param face1
10
+ * @param face2
11
+ * @returns 交线可能不止一条,故返回交线的数组,若无交线,则返回空数组
12
+ */
13
+ static faces(face1: Face, face2: Face, tolerance?: number): Curve3[];
14
+ /**
15
+ * Face 与 多个Face分别求交,然后将交线封装成Polyline[]
16
+ *
17
+ * 数组内的元素有可能是loop,也有可能是Polyline
18
+ * @param face
19
+ * @param faces
20
+ */
21
+ static faceFaces(face: Face, faces: Face[], tolerance?: number): (PolyCurve | Loop)[];
22
+ /**
23
+ * 计算line与Face的有交点
24
+ * @param line
25
+ * @param face
26
+ */
27
+ static line3dFace(line: Ln3, face: Face, tol?: Tol): Vec3[];
28
+ /**
29
+ * 计算line与Face的有交点
30
+ * @param line
31
+ * @param face
32
+ */
33
+ static isIntersectLine3dFace(curve: Curve3, face: Face, tol?: Tol): boolean;
34
+ }
@@ -0,0 +1,47 @@
1
+ import { Vec3, Tol } from '../..';
2
+ import { BrepBody } from '..';
3
+ import { Face } from '../brep/face';
4
+ import { BrepBodyPositionType } from './podition_judge/body_pj';
5
+ import { ExtrudeInfo } from './podition_judge/extrude_pj';
6
+ import { PtBodyPositionType } from './podition_judge/pt_body_pj';
7
+ export declare class BrepPJ {
8
+ /**
9
+ * 点是否在Face内
10
+ *
11
+ * @param point 任意一点
12
+ * @param face
13
+ */
14
+ static isPtInFace(point: Vec3, face: Face, tolerance?: number): boolean;
15
+ /**
16
+ * 点是否在Face的上侧
17
+ *
18
+ * 规定:点在平面法线一侧为上侧,否则为下侧
19
+ *
20
+ * @param point 任意一点
21
+ * @param plane 任意平面
22
+ */
23
+ static isPtAboveFace(point: Vec3, face: Face): boolean;
24
+ /**
25
+ * 点和brep的位置关系判断
26
+ * 通过(1,0,0)方向将射线与face求交,判断点位置
27
+ * @param point
28
+ * @param body 默认自封闭的body
29
+ * @param tol
30
+ * @param useBoundBox 使用包围盒计算,快速判断,如果此项为true,点在body上统一为ON_FACE
31
+ */
32
+ static pointBrepBodyPositionJudge(point: Vec3, body: BrepBody, eps?: number, useBoundBox?: boolean): PtBodyPositionType;
33
+ /**
34
+ * brep体之间的位置关系判断,一般来说直接采用包围和计算能满足大多数情况,如果需要较为精确的关系,例如已知某个物件的大致形状以及可能关系,可以采用一个brep为包围盒点情况
35
+ * 对于均不采用包围盒的情况,存在曲面的情况下求交可能会导致比较慢
36
+ * @param body1 默认自封闭body
37
+ * @param body2 默认自封闭body
38
+ * @param eps
39
+ * @param useBoundBox1 body1是否使用包围盒计算
40
+ * @param useBoundBox2 body2是否使用包围盒计算
41
+ * @returns
42
+ */
43
+ static BrepBodiesPositionJudge(body1: BrepBody, body2: BrepBody, eps?: number, useBoundBox1?: boolean, useBoundBox2?: boolean): BrepBodyPositionType;
44
+ static ExtrudeBodiesPositionJudge(body1: ExtrudeInfo, body2: ExtrudeInfo, info?: {
45
+ tol: Tol;
46
+ }): BrepBodyPositionType;
47
+ }
@@ -0,0 +1,5 @@
1
+ export { BodyBuilder } from './body_builder';
2
+ export { BrepPJ } from './brep_pj';
3
+ export type { ISweepTopo, IExtrudeTopo, IBool3dTopo } from './alg_types';
4
+ export { BodyUtil } from './body_util';
5
+ export { ShellEdit } from './shell_edit';
@@ -0,0 +1,10 @@
1
+ import { Tol, Curve3, Interval, Polygon } from '../../..';
2
+ import { Face } from '../../brep/face';
3
+ export declare class CurveFacesOverlap {
4
+ /**
5
+ * 计算line与Face的有交点
6
+ * @param curve
7
+ * @param face
8
+ */
9
+ static execute(curve: Curve3, face: Face, tol?: Tol, facePoly?: Polygon): Interval[];
10
+ }
@@ -0,0 +1,22 @@
1
+ import { Curve3 } from '../../..';
2
+ import { Face } from '../../brep/face';
3
+ /**
4
+ * face 与 face求交,返回值为交线
5
+ */
6
+ export declare class FacesX {
7
+ /**
8
+ * Face与Face相交,结果为交线(交点可认为是退化成的线)
9
+ * @param face1
10
+ * @param face2
11
+ * @returns 交线可能不止一条,故返回交线的数组,若无交线,则返回空数组
12
+ */
13
+ static execute(face1: Face, face2: Face, tolerance?: number): Curve3[];
14
+ /**
15
+ * 取 curve 在 face 上的参数区域(默认 curve 在 face 上)
16
+ * @param curve
17
+ * @param face
18
+ * @param face 额外的需要求交的线段
19
+ * @returns [start, end]
20
+ */
21
+ private static _getInterRanges;
22
+ }
@@ -0,0 +1,15 @@
1
+ import { PolyCurve, Loop } from '../../..';
2
+ import { Face } from '../../brep/face';
3
+ /**
4
+ * Face 与 多个Face分别求交,然后将交线封装成Polyline[]
5
+ */
6
+ declare class FaceFacesIntersect {
7
+ /**
8
+ * Face 与 多个Face分别求交,然后将交线封装成Polyline[]
9
+ * @param face1
10
+ * @param faces
11
+ * @returns 返回Loop的数组
12
+ */
13
+ static execute(face: Face, faces: Face[], tolerance?: number): (PolyCurve | Loop)[];
14
+ }
15
+ export { FaceFacesIntersect };
@@ -0,0 +1,16 @@
1
+ import { Ln3, Tol, Vec3, Curve3 } from '../../..';
2
+ import { Face } from '../../brep/face';
3
+ export declare class LineFacesIntersect {
4
+ /**
5
+ * 计算line与Face的有交点
6
+ * @param line
7
+ * @param face
8
+ */
9
+ static execute(line: Ln3, face: Face, tol?: Tol): Vec3[];
10
+ /**
11
+ * 计算line与Face的有交点
12
+ * @param curve
13
+ * @param face
14
+ */
15
+ static hasIntersect(curve: Curve3, face: Face, tol?: Tol): boolean;
16
+ }
@@ -0,0 +1,25 @@
1
+ import { BrepBody } from '../..';
2
+ export declare enum BrepBodyPositionType {
3
+ INTERSECT = "INTERSECT",
4
+ OUTSIDE = "OUTSIDE",
5
+ INSIDE = "INSIDE",
6
+ CONTAIN = "CONTAIN",
7
+ EQUAL = "EQUAL",
8
+ INSIDE_AND_TANGENCY = "INSIDE_AND_TANGENCY",
9
+ OUTSIDE_AND_TANGENCY = "OUTSIDE_AND_TANGENCY",
10
+ CONTAIN_AND_TANGENCY = "CONTAIN_AND_TANGENCY"
11
+ }
12
+ export declare class BrepBodyPJ {
13
+ /**
14
+ * 处理brepbody间的位置关系
15
+ * body1和body2的关系可能为相交,相离,被包含,包含
16
+ */
17
+ static PJ(body1: BrepBody, body2: BrepBody, eps?: number, useBoundBox1?: boolean, useBoundBox2?: boolean): BrepBodyPositionType;
18
+ /**
19
+ * 处理brepbody间的位置关系
20
+ * body1和body2的关系可能为相交,相离,被包含,包含
21
+ */
22
+ static PositionJudgeSimple(body1: BrepBody, body2: BrepBody, eps?: number, useBoundBox1?: boolean, useBoundBox2?: boolean): BrepBodyPositionType;
23
+ static PositionJudgeComplex(body1: BrepBody, body2: BrepBody, eps?: number): BrepBodyPositionType;
24
+ private static _generalBodyPositionJudge;
25
+ }
@@ -0,0 +1,28 @@
1
+ import { Coord3, Polygon, Tol, Vec3 } from '../../..';
2
+ import { BrepBodyPositionType } from './body_pj';
3
+ export interface ExtrudeInfo {
4
+ coordinate: Coord3;
5
+ polygon: Polygon;
6
+ dir: Vec3;
7
+ startHeight: number;
8
+ endHeight: number;
9
+ }
10
+ /**
11
+ * @author jinxin
12
+ * 拉伸体位置关系判断
13
+ */
14
+ export declare class ExtrudeBodyPJ {
15
+ /**
16
+ * 处理brepbody间的位置关系
17
+ * body1和body2的关系可能为相交,相离,被包含,包含
18
+ */
19
+ static PJ(body1: ExtrudeInfo, body2: ExtrudeInfo, info?: {
20
+ tol?: Tol;
21
+ ignoreOBBJudge?: boolean;
22
+ }): BrepBodyPositionType;
23
+ private static _sameDirectionJudeg;
24
+ /**
25
+ * 通过三次投影判断两拉伸体的位置关系,三次投影的方向分别为 dir1、dir2、cross(dir1, dir2)
26
+ */
27
+ private static _projectionJudge;
28
+ }
@@ -0,0 +1,32 @@
1
+ import { Vec3, Box3 } from '../../..';
2
+ import { BrepBody, Face } from '../..';
3
+ export declare enum PtBodyPositionType {
4
+ INSIDE = 0,
5
+ OUTSIDE = 1,
6
+ ON_VERTEX = 2,
7
+ ON_EDGE = 3,
8
+ ON_FACE = 4
9
+ }
10
+ export interface IPtBodyPositionContext {
11
+ bodyBox: Box3;
12
+ faceBoxMap: Map<Face, Box3>;
13
+ }
14
+ export declare class PtBodyPosition {
15
+ /**
16
+ * 通过(1,0,0)方向将射线与face求交,判断点位置
17
+ * @param point
18
+ * @param body 默认自封闭的body
19
+ * @param tol
20
+ * @param useBoundBox 使用包围盒计算,快速判断,如果点在body上,统一为ON_FACE
21
+ * @param context 缓存信息,避免重复计算
22
+ */
23
+ static PJ(point: Vec3, body: BrepBody, eps?: number, useBoundBox?: boolean, context?: IPtBodyPositionContext): PtBodyPositionType;
24
+ /**
25
+ * x正方向平行线与box求交,特殊处理
26
+ * @param line
27
+ * @param box
28
+ */
29
+ private static _isIntersectBox;
30
+ private static _calUVPosition;
31
+ private static _farthestDis;
32
+ }
@@ -0,0 +1,8 @@
1
+ import { Coord3, Polygon } from '../../..';
2
+ import { BrepBody } from '../../brep/brep_body';
3
+ /**
4
+ * 将body投影到一个局部坐标系下,得到polygon
5
+ */
6
+ export declare class BodyProject {
7
+ static execute(brepbody: BrepBody, coordinate: Coord3): Polygon;
8
+ }
@@ -0,0 +1,20 @@
1
+ import { Polygon, PolyCurve, Coord3, Vec2 } from '../../..';
2
+ import { Face } from '../../brep/face';
3
+ /**
4
+ * line1向line2投影,返回一个区间,该区间代表投影后的线在line2上的区间
5
+ */
6
+ declare class FaceProject {
7
+ static execute(face: Face, coordinate: Coord3): PolyCurve[] | Polygon;
8
+ static toDiscretePolygons(face: Face, coordinate: Coord3): Polygon[];
9
+ static mergeLines(paths: Vec2[][]): PolyCurve[];
10
+ /**
11
+ * 针对垂直平面的柱面,投影一定是二维圆弧,整体逻辑为:
12
+ * 构造圆弧,针对每条投影曲线设置正确的参数域
13
+ * @param cylinder
14
+ * @param curve2d
15
+ * @param projPlace
16
+ * @returns
17
+ */
18
+ private static _makeArc2d;
19
+ }
20
+ export { FaceProject };
@@ -0,0 +1,8 @@
1
+ import { Surface, Polygon } from '../../..';
2
+ import { Face } from '../../brep/face';
3
+ /**
4
+ * line1向line2投影,返回一个区间,该区间代表投影后的线在line2参数域上的区间
5
+ */
6
+ export declare class FaceProjectToSurface {
7
+ static execute(face1: Face, face2: Surface): Polygon;
8
+ }
@@ -0,0 +1,26 @@
1
+ import { Coord3, Polygon } from '../../..';
2
+ import { BrepBody } from '../../brep/brep_body';
3
+ import { Face } from '../../brep/face';
4
+ import { IProjectInfo } from '../alg_types';
5
+ /**
6
+ * 投影求取body对应的polygon与距离
7
+ * 目前仅支持brep面为平面的情况,同时对于body上面有内孔的平面支持不完善,接口兼容
8
+ */
9
+ export declare class SpaceProject {
10
+ private _projectFace;
11
+ private _projectedBodies;
12
+ private _canProjectedBody;
13
+ private _baseLoop;
14
+ private _projectPlane;
15
+ private _onPlaneBody;
16
+ private _tol;
17
+ constructor(_projectFace: Face, _projectCoord: Coord3, _projectedBodies: BrepBody[]);
18
+ canProject(): boolean;
19
+ execute(): Map<Polygon, IProjectInfo>;
20
+ private _projectBodies;
21
+ private _getDistanceFromLoop;
22
+ private _GetMinDistance;
23
+ private _analyseLoop;
24
+ private _polygonPosition;
25
+ private _judgeBodyPosition;
26
+ }
@@ -0,0 +1,10 @@
1
+ import { Coord3, Polygon } from '../../..';
2
+ import { BrepBody } from '../..';
3
+ import { IProjectInfo } from '../alg_types';
4
+ export declare class SpaceProjectSimple {
5
+ static spaceProjectSimple(coord: Coord3, bodies: BrepBody[]): {
6
+ poly: Polygon;
7
+ info: IProjectInfo[];
8
+ } | undefined;
9
+ private static _judgeBodyPosition;
10
+ }
@@ -0,0 +1,25 @@
1
+ import { Coord3, Polygon } from '../../..';
2
+ import { BrepBody } from '../../brep/brep_body';
3
+ import { Face } from '../../brep/face';
4
+ import { IProjectInfo } from '../alg_types';
5
+ /**
6
+ * 视图投影,实现类似线框视图的效果
7
+ */
8
+ export declare class ViewProject {
9
+ private _projectFace;
10
+ private _projectedBodies;
11
+ private _canProjectedBody;
12
+ private _baseLoop;
13
+ private _projectPlane;
14
+ private _onPlaneBody;
15
+ private _tol;
16
+ constructor(_projectFace: Face, _projectCoord: Coord3, _projectedBodies: BrepBody[]);
17
+ canProject(): boolean;
18
+ execute(): Map<Polygon, IProjectInfo>;
19
+ private _projectBodies;
20
+ private _getDistanceFromLoop;
21
+ private _analyseLoop;
22
+ private _sortInfo;
23
+ private _polygonPosition;
24
+ private _judgeBodyPosition;
25
+ }
@@ -0,0 +1,38 @@
1
+ import { Curve3, Surface, Tol } from '../../..';
2
+ import { Shell } from '../../brep/shell';
3
+ /**
4
+ * 构造face组成的壳:目前只支持surface为平面、且只有一个外环多个内环的face的壳
5
+ */
6
+ export declare class createShellFromCurve3ds {
7
+ /**
8
+ * @author
9
+ * function 输入一个组curve3d和一个surface,构造有一个face的shell。//会检查curve3ds是否首尾相接。不检查逆时针、自交等,所以调用接口时需保证逆时针成环。
10
+ * @param surf 输入curve3d所在的surface曲面
11
+ * @param curve3ds 输入一组curve3d,要求:1.curve3ds必须都在的surf曲面上,2.curve3ds必须首尾相接,封闭成一个环,3.curve3d环逆时针,且不自交
12
+ */
13
+ static createSingWireShell(surf: Surface, curve3ds: Curve3[], tolerance?: Tol): Shell;
14
+ /**
15
+ * @author //当前只支持一个外环多个内环的情况,后续有需求再修改支持多外环。
16
+ * function 输入一个curve3d二维数组和一个surface,构造有一个外环多个内环的face的shell。会检查curve3ds是否首尾相接。不检查逆时针、自交等。
17
+ * @param surf 输入curve3d所在的surface曲面
18
+ * @param curve3ds curve3d的二维数组。每个一维数组为一个环,规定第一个curve3d数组为外环,其余都为内环
19
+ */
20
+ static createShell(surf: Surface, curve3dss: Curve3[][], tolerance?: Tol): Shell;
21
+ static createShells(surf: Surface, faceObjs: Curve3[][][], option?: {
22
+ checkOverlap?: boolean;
23
+ smoothTess?: boolean;
24
+ ratio?: number;
25
+ }, tolerance?: Tol): Shell[];
26
+ /**
27
+ * @author
28
+ * 检查输入的curve3ds是否合法:检查是否首尾相接,是否封闭。不检查是否自交。
29
+ * @param curve3ds 输入一个组curve3d
30
+ */
31
+ private static _checkCurve3dsStrictValid;
32
+ /**
33
+ * @author
34
+ * 传入一组curve3d生成shell的wire
35
+ */
36
+ private static _createWireFromCurve3ds;
37
+ private static _createWireFromCurve3dsWithCache;
38
+ }
@@ -0,0 +1,25 @@
1
+ import { Surface, Curve3, Tol } from '../..';
2
+ import { IShellModelingResult } from './shell_edit/shell_modeling_result';
3
+ /**
4
+ * 构造壳:目前只支持surface为平面、且只有一个外环多个内环的face的壳
5
+ */
6
+ export declare class ShellBuilder {
7
+ /**
8
+ * @author //当前只支持一个外环多个内环的情况,后续有需求再修改支持多外环。
9
+ * function 输入一个curve3d二维数组和一个surface,构造有一个外环多个内环的face的shell。会检查curve3ds是否首尾相接。不检查逆时针、自交等。
10
+ * @param surf 输入curve3d所在的surface曲面
11
+ * @param curve3ds curve3d的二维数组。每个一维数组为一个环,规定第一个curve3d数组为外环,其余都为内环
12
+ */
13
+ static createShell(surf: Surface, curve3dss: Curve3[][], tolerance?: Tol): IShellModelingResult;
14
+ /**
15
+ * 通过几何数据,创建一些面
16
+ * @param surf 输入curve3d所在的surface曲面
17
+ * @param faceObjs curve3d的三维数组。第一维是面,第二维是环(外环+内环),第三维是曲线
18
+ * @param option 配置参数(checkOverlap -- 检查重叠的点、边, 不会创建重复的拓扑)
19
+ */
20
+ static createFacesFromCurves(surf: Surface, faceObjs: Curve3[][][], option?: {
21
+ checkOverlap?: boolean;
22
+ smoothTess?: boolean;
23
+ ratio?: number;
24
+ }, tolerance?: Tol): IShellModelingResult;
25
+ }
@@ -0,0 +1,14 @@
1
+ import { Curve3, Cylinder, Plane } from '../../../..';
2
+ import ShellModelingBase from '../shell_modeling_base';
3
+ import { Shell } from '../../../brep/shell';
4
+ import { IShellModelingResult } from '../shell_modeling_result';
5
+ /**
6
+ *
7
+ * 加边成面
8
+ */
9
+ export default class AddEdges extends ShellModelingBase {
10
+ private _curves;
11
+ private _curvePlane;
12
+ constructor(curves: Curve3[], plane: Plane | Cylinder | undefined, context: Shell[]);
13
+ protected _executeImpl(): IShellModelingResult;
14
+ }
@@ -0,0 +1,11 @@
1
+ import { Face } from '../../../brep/face';
2
+ import { Shell } from '../../../brep/shell';
3
+ import { IShellModelingResult } from '../shell_modeling_result';
4
+ import { Plane } from '../../../../geometry/plane';
5
+ import { Cylinder } from '../../../../geometry/cylinder';
6
+ import { Curve3 } from '../../../../geometry/curve3d';
7
+ export interface IAddEdgesResult extends IShellModelingResult {
8
+ faceSplitMap: Map<Face, Face[]>;
9
+ newOuterFaces: Face[];
10
+ }
11
+ export declare function addEdgesCore(cc: Curve3[], curvePlane: Plane | Cylinder | undefined, model: Shell[], result: IAddEdgesResult): void;
@@ -0,0 +1,20 @@
1
+ import { Matrix4 } from '../../..';
2
+ import { Shell } from '../../brep/shell';
3
+ import { Face } from '../../brep/face';
4
+ import { IShellModelingResult } from './shell_modeling_result';
5
+ import ShellModelingBase from './shell_modeling_base';
6
+ export default class CopyFaces extends ShellModelingBase {
7
+ private _faces;
8
+ private _reuseTag;
9
+ private _matrix;
10
+ constructor(faces: Face[], reuseTag?: boolean, matrix?: Matrix4, context?: Shell[]);
11
+ /**
12
+ * 复制面到新的位置,深拷贝
13
+ * @param this._faces source face
14
+ * @param this._reuseTag
15
+ * @param this._matrix
16
+ * @returns origin face --> new face map
17
+ */
18
+ protected _executeImpl(): IShellModelingResult;
19
+ private _cloneFacesByShell;
20
+ }
@@ -0,0 +1,9 @@
1
+ import { Edge } from '../../../brep/edge';
2
+ import { IShellModelingResult } from '../shell_modeling_result';
3
+ export default class DeleteEdges {
4
+ static execute(deleteEdges: Edge[]): IShellModelingResult;
5
+ private static _findFaceGroup;
6
+ private static _reverseFaces;
7
+ private static _getSourceFace;
8
+ private static _processCylinder;
9
+ }
@@ -0,0 +1,17 @@
1
+ import { Edge } from '../../../brep/edge';
2
+ import { Face } from '../../../brep/face';
3
+ import { Shell } from '../../../brep/shell';
4
+ import ShellModelingBase from '../shell_modeling_base';
5
+ import { IShellModelingResult } from '../shell_modeling_result';
6
+ /**
7
+ * 删除多个面、边;
8
+ * 如果边是曲面的边,则直接将该曲面删除;
9
+ * 如果边是平面的边,则在平面上重新搜环(DeleteEdges);
10
+ */
11
+ export default class DeleteFacesEdges extends ShellModelingBase {
12
+ private _faces;
13
+ private _edges;
14
+ private _mergeEdge;
15
+ constructor(faces: Face[], edges: Edge[], mergeEdge?: boolean, context?: Shell[]);
16
+ protected _executeImpl(): IShellModelingResult;
17
+ }
@@ -0,0 +1,19 @@
1
+ import { Tol } from '../../../..';
2
+ import { Face } from '../../../brep/face';
3
+ import { IShellModelingResult } from '../shell_modeling_result';
4
+ export declare function addToSetInMap(map: Map<any, any>, key: any, value: any): void;
5
+ export declare function addOverlapInfo<T>(infos: Set<T>[], a: T, b: T): void;
6
+ export declare enum BooleanType {
7
+ kUnion = 0,
8
+ kIntersect = 1,
9
+ kSubtract = 2,
10
+ kXor = 3,
11
+ kSplit = 4
12
+ }
13
+ export interface IFacesBooleanResult extends IShellModelingResult {
14
+ resultFaces: Face[];
15
+ }
16
+ export declare function facesBooleanCore(fs1: Face[], fs2: Face[], type: BooleanType, updateSmooth?: boolean, noOverlap1?: boolean, noOverlap2?: boolean, tol?: Tol): IFacesBooleanResult;
17
+ export declare function facesUnion(faces1: Face[], faces2: Face[], updateSmooth?: boolean): IFacesBooleanResult;
18
+ export declare function facesSubtract(faces1: Face[], faces2: Face[], updateSmooth?: boolean): IFacesBooleanResult;
19
+ export declare function facesSplit(faces1: Face[], faces2: Face[], updateSmooth?: boolean): IFacesBooleanResult;
@@ -0,0 +1,13 @@
1
+ import { Tol } from '../../../..';
2
+ import { Face } from '../../../brep/face';
3
+ import { IShellModelingResult } from '../shell_modeling_result';
4
+ import { Shell } from '../../../brep/shell';
5
+ import ShellModelingBase from '../shell_modeling_base';
6
+ export default class FacesShellsMerge extends ShellModelingBase {
7
+ private _faces;
8
+ private _checkOverlap;
9
+ private _updateSmooth;
10
+ private _tolerance;
11
+ constructor(faces: Face[], context: Shell[], checkFacesOverlap?: boolean, updateSmooth?: boolean, tolerance?: Tol);
12
+ protected _executeImpl(): IShellModelingResult;
13
+ }
@@ -0,0 +1,11 @@
1
+ import { Vec3 } from '../../../..';
2
+ export declare class Octree<T> {
3
+ private _root;
4
+ private _getBound;
5
+ private _maxDepth;
6
+ private _objectIndexMap;
7
+ constructor(objs: T[], getBound: (t: T) => Vec3[], origin?: Vec3, halfLength?: number, maxDepth?: number);
8
+ getCandidateOverlaps(obj: T, objBound?: Vec3[]): T[];
9
+ remove(objs: T[]): void;
10
+ add(obj: T, objBound?: Vec3[]): void;
11
+ }
@@ -0,0 +1,21 @@
1
+ import { Shell } from '../../brep/shell';
2
+ import { Face } from '../../brep/face';
3
+ import { IShellModelingResult } from './shell_modeling_result';
4
+ import ShellModelingBase from './shell_modeling_base';
5
+ export interface IIsolateFacesResult extends IShellModelingResult {
6
+ newShell: Shell;
7
+ edgesDelete: string[];
8
+ }
9
+ export default class IsolateFaces extends ShellModelingBase {
10
+ private _faces;
11
+ private _originShell;
12
+ constructor(faces: Face[], originShell: Shell, context?: Shell[]);
13
+ /**
14
+ * @static
15
+ * @param {Shell} this._originShell 原shell
16
+ * @param {Face[]} this._faces 构成新组合的faces
17
+ * @return {*} {Shell} 新shell
18
+ * @memberof GroupShell
19
+ */
20
+ protected _executeImpl(): IIsolateFacesResult;
21
+ }
@@ -0,0 +1,14 @@
1
+ import { Face } from '../../brep/face';
2
+ import { IShellModelingResult } from './shell_modeling_result';
3
+ import { Shell } from '../../brep/shell';
4
+ import ShellModelingBase from './shell_modeling_base';
5
+ export default class MergeConnectFaces extends ShellModelingBase {
6
+ private _faces;
7
+ constructor(faces: Face[], context?: Shell[]);
8
+ /**
9
+ * 将一堆面中,满足共surface, 且相邻的情况,进行合并。
10
+ * 不做布尔运算,(暂时只支持平面,不支持曲面)
11
+ * @param faces 待合并的面
12
+ */
13
+ protected _executeImpl(): IShellModelingResult;
14
+ }
@@ -0,0 +1,8 @@
1
+ import { Edge } from '../../brep/edge';
2
+ import ShellModelingBase from './shell_modeling_base';
3
+ import { IShellModelingResult } from './shell_modeling_result';
4
+ export default class MergeEdges extends ShellModelingBase {
5
+ private _edges;
6
+ constructor(edges: Edge[]);
7
+ protected _executeImpl(): IShellModelingResult;
8
+ }
@@ -0,0 +1,31 @@
1
+ import { Vec3 } from '../../../..';
2
+ import { Edge } from '../../../brep/edge';
3
+ import { Shell } from '../../../brep/shell';
4
+ import { IShellModelingResult } from '../shell_modeling_result';
5
+ import ShellModelingBase from '../shell_modeling_base';
6
+ /**
7
+ * 输入:要移动的edges,移动的起始点和终止点,场景内所有的shell(或者移动edges后所有可能相交的shell),如果不穿shells则不会求交分割
8
+ * 限制:目前不允许移动edge之后face自交
9
+ */
10
+ export declare class MoveEdges extends ShellModelingBase {
11
+ private _edges;
12
+ private _transVect;
13
+ private _overlapInfo;
14
+ private _shell;
15
+ constructor(edges: Edge[], moveVect: Vec3, context?: Shell[]);
16
+ preview(): IShellModelingResult;
17
+ /**
18
+ * move edges and connect vertices
19
+ */
20
+ protected _executeImpl(): IShellModelingResult;
21
+ private _moveEdgesCore;
22
+ private _previewCore;
23
+ private _getAllConnectElems;
24
+ private _getAllAdjacentEdges;
25
+ private _getAllAdjacentFaces;
26
+ private _canUseTransVect;
27
+ private _judgeSelfIntersect;
28
+ private _dealAdjacentCurves;
29
+ private _dealAdjacentFaces;
30
+ private _dealDegeneratedCase;
31
+ }
@@ -0,0 +1,14 @@
1
+ import { Vec3 } from '../../../..';
2
+ import { Face } from '../../../brep/face';
3
+ import { IShellModelingResult } from '../shell_modeling_result';
4
+ import ShellModelingBase from '../shell_modeling_base';
5
+ import { Shell } from '../../../brep/shell';
6
+ export declare class MoveFaces extends ShellModelingBase {
7
+ private _faces;
8
+ private _transVect;
9
+ constructor(faces: Face[], moveVect: Vec3, context?: Shell[]);
10
+ /**
11
+ * move faces and connect edges, vertices. // move face不会导致移动的face自相交,因此后续可改进,移动edge不用判断自相交。或者都继承自一个基类 //
12
+ */
13
+ protected _executeImpl(): IShellModelingResult;
14
+ }
@@ -0,0 +1,2 @@
1
+ import { Face } from '../../../brep/face';
2
+ export declare function disposeFace(face: Face): void;
@@ -0,0 +1,3 @@
1
+ import { Edge } from '../../../brep/edge';
2
+ import { Vertex } from '../../../brep/vertex';
3
+ export declare function mergeConnectedEdge(edge1: Edge, edge2: Edge, commonV: Vertex): Edge | undefined;