@ccpc/math 0.1.0 → 0.1.7
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.
- package/index.cjs +226 -0
- package/package.json +19 -37
- package/types/algorithm/bool_operate/bool2d/bool2d.d.ts +22 -0
- package/types/algorithm/bool_operate/bool2d/difference.d.ts +9 -0
- package/types/algorithm/bool_operate/bool2d/intersect.d.ts +9 -0
- package/types/algorithm/bool_operate/bool2d/split.d.ts +3 -0
- package/types/algorithm/bool_operate/bool2d/union.d.ts +9 -0
- package/types/algorithm/bool_operate/bool2d/utils.d.ts +40 -0
- package/types/algorithm/bool_operate/bool_operate_clipper.d.ts +18 -0
- package/types/algorithm/bool_operate/polycurve_polygon_bool.d.ts +13 -0
- package/types/algorithm/bool_operate_2d.d.ts +67 -0
- package/types/algorithm/calc_d.d.ts +85 -0
- package/types/algorithm/calc_offset.d.ts +70 -0
- package/types/algorithm/calc_overlap.d.ts +56 -0
- package/types/algorithm/calc_project.d.ts +29 -0
- package/types/algorithm/calc_x.d.ts +215 -0
- package/types/algorithm/calculate_util/geometry_subdevide_infos.d.ts +73 -0
- package/types/algorithm/calculate_util/iterative_method.d.ts +30 -0
- package/types/algorithm/discrete/discrete_curve.d.ts +31 -0
- package/types/algorithm/discrete/discrete_refiner.d.ts +35 -0
- package/types/algorithm/discrete/discrete_surface.d.ts +74 -0
- package/types/algorithm/discrete/discrete_topology.d.ts +32 -0
- package/types/algorithm/discrete/discrete_util.d.ts +96 -0
- package/types/algorithm/discrete/grid_discrete_data.d.ts +58 -0
- package/types/algorithm/discrete/libtess.d.ts +12 -0
- package/types/algorithm/discrete/uniform_grid_discrete.d.ts +3 -0
- package/types/algorithm/distance/base_calc_distance/curves_distance_util.d.ts +20 -0
- package/types/algorithm/distance/base_calc_distance/define_of_calculate_distance.d.ts +12 -0
- package/types/algorithm/distance/curve2ds_distance/arc2s_distance.d.ts +17 -0
- package/types/algorithm/distance/curve2ds_distance/line2d_to_arc2d_distance.d.ts +17 -0
- package/types/algorithm/distance/curve2ds_distance/line2s_distance.d.ts +15 -0
- package/types/algorithm/distance/curve2s_distance.d.ts +15 -0
- package/types/algorithm/distance/curve3ds_distance/line3d_to_line3d_distance_paramed.d.ts +12 -0
- package/types/algorithm/distance/curve3s_distance.d.ts +31 -0
- package/types/algorithm/distance/pt_to_curve2_signed_distance.d.ts +17 -0
- package/types/algorithm/distance/pt_to_curve3_distance.d.ts +25 -0
- package/types/algorithm/distance/pt_to_curve_distance_info.d.ts +12 -0
- package/types/algorithm/distance/pt_to_surface_distance.d.ts +17 -0
- package/types/algorithm/distance/pts_to_curves_distance.d.ts +13 -0
- package/types/algorithm/distance/pts_to_pts_distance.d.ts +7 -0
- package/types/algorithm/geometry_merge.d.ts +22 -0
- package/types/algorithm/index.d.ts +32 -0
- package/types/algorithm/intersect/box_cut_line.d.ts +6 -0
- package/types/algorithm/intersect/curve_self_x.d.ts +13 -0
- package/types/algorithm/intersect/curve_surface_x.d.ts +34 -0
- package/types/algorithm/intersect/curve_surface_x_util.d.ts +32 -0
- package/types/algorithm/intersect/curves_x/circulars_x.d.ts +35 -0
- package/types/algorithm/intersect/curves_x/linear_circular_x.d.ts +40 -0
- package/types/algorithm/intersect/curves_x/lines_x.d.ts +17 -0
- package/types/algorithm/intersect/curves_x/lines_x_util.d.ts +4 -0
- package/types/algorithm/intersect/curves_x.d.ts +26 -0
- package/types/algorithm/intersect/curves_x_util.d.ts +35 -0
- package/types/algorithm/intersect/intersect_info_util.d.ts +9 -0
- package/types/algorithm/intersect/surface_self_x.d.ts +8 -0
- package/types/algorithm/intersect/surfaces_x.d.ts +53 -0
- package/types/algorithm/intersect/surfaces_x_complex.d.ts +29 -0
- package/types/algorithm/intersect/surfaces_x_special.d.ts +16 -0
- package/types/algorithm/intersect/surfaces_x_util.d.ts +41 -0
- package/types/algorithm/intersect/x_info.d.ts +65 -0
- package/types/algorithm/loop_property/loop-area.d.ts +49 -0
- package/types/algorithm/loop_property/loop-centroid.d.ts +40 -0
- package/types/algorithm/merge_geometry/halfplane.d.ts +24 -0
- package/types/algorithm/merge_geometry/merge_curve.d.ts +14 -0
- package/types/algorithm/merge_geometry/merge_point.d.ts +18 -0
- package/types/algorithm/mesh/clip_mesh.d.ts +27 -0
- package/types/algorithm/mesh/extrude_clip.d.ts +236 -0
- package/types/algorithm/mesh/mesh_assist.d.ts +21 -0
- package/types/algorithm/mesh/mesh_contour.d.ts +26 -0
- package/types/algorithm/mesh/mesh_util.d.ts +115 -0
- package/types/algorithm/offset/loop2d_offset.d.ts +22 -0
- package/types/algorithm/offset/polygon_offset.d.ts +27 -0
- package/types/algorithm/overlap/curve_surface_coincide.d.ts +6 -0
- package/types/algorithm/overlap/curves_colinear.d.ts +38 -0
- package/types/algorithm/overlap/curves_merge.d.ts +74 -0
- package/types/algorithm/overlap/curves_overlap.d.ts +34 -0
- package/types/algorithm/overlap/i_overlap.d.ts +9 -0
- package/types/algorithm/overlap/surfaces_coplaner.d.ts +5 -0
- package/types/algorithm/pattern/blocks2Geometry.d.ts +50 -0
- package/types/algorithm/pattern/math.d.ts +42 -0
- package/types/algorithm/pattern/pattern.d.ts +43 -0
- package/types/algorithm/pattern/pattern_util.d.ts +53 -0
- package/types/algorithm/pattern/pave.d.ts +33 -0
- package/types/algorithm/pj/curves_oj.d.ts +19 -0
- package/types/algorithm/pj/curves_pj.d.ts +19 -0
- package/types/algorithm/pj/loops_pj.d.ts +13 -0
- package/types/algorithm/pj/pj_type.d.ts +46 -0
- package/types/algorithm/pj/pt_loop_pj.d.ts +24 -0
- package/types/algorithm/pj/pt_polygon_pj.d.ts +18 -0
- package/types/algorithm/pj/pt_polygon_position_judger.d.ts +11 -0
- package/types/algorithm/position_judge.d.ts +72 -0
- package/types/algorithm/project/curve3d_to_plane_project.d.ts +11 -0
- package/types/algorithm/project/curve_curve_project.d.ts +9 -0
- package/types/algorithm/search_graph/iloops_polygonex.d.ts +28 -0
- package/types/algorithm/search_graph/loop_tree_node.d.ts +30 -0
- package/types/algorithm/search_graph/loops_to_loop_tree_search_graph.d.ts +25 -0
- package/types/algorithm/search_graph/polygon_polygonex.d.ts +13 -0
- package/types/algorithm/search_graph/search_loop2d.d.ts +20 -0
- package/types/algorithm/search_graph/search_polyline.d.ts +11 -0
- package/types/algorithm/search_graph.d.ts +45 -0
- package/types/algorithm/topology_edit.d.ts +10 -0
- package/types/base/box.d.ts +100 -0
- package/types/base/box2.d.ts +17 -0
- package/types/base/box3.d.ts +20 -0
- package/types/base/coord.d.ts +10 -0
- package/types/base/coord2.d.ts +92 -0
- package/types/base/coord3.d.ts +139 -0
- package/types/base/discrete_param.d.ts +28 -0
- package/types/base/euler.d.ts +102 -0
- package/types/base/geo_element.d.ts +54 -0
- package/types/base/interval.d.ts +122 -0
- package/types/base/ivector.d.ts +126 -0
- package/types/base/matrix.d.ts +108 -0
- package/types/base/matrix3.d.ts +118 -0
- package/types/base/matrix4.d.ts +166 -0
- package/types/base/matrix_util.d.ts +5 -0
- package/types/base/period_inverval.d.ts +127 -0
- package/types/base/quaternion.d.ts +39 -0
- package/types/base/tangent_cone.d.ts +11 -0
- package/types/base/tilt_box.d.ts +11 -0
- package/types/base/tol.d.ts +120 -0
- package/types/base/vec.d.ts +46 -0
- package/types/base/vec2.d.ts +146 -0
- package/types/base/vec3.d.ts +158 -0
- package/types/brep-src/algorithm/alg_const.d.ts +23 -0
- package/types/brep-src/algorithm/alg_types.d.ts +47 -0
- package/types/brep-src/algorithm/algorithm_util/base_define.d.ts +7 -0
- package/types/brep-src/algorithm/algorithm_util/body_base_util.d.ts +4 -0
- package/types/brep-src/algorithm/algorithm_util/curve_solid_analysis.d.ts +28 -0
- package/types/brep-src/algorithm/algorithm_util/face_face_analysis.d.ts +39 -0
- package/types/brep-src/algorithm/algorithm_util/search_wire.d.ts +8 -0
- package/types/brep-src/algorithm/body_builder/basic_body_builder.d.ts +15 -0
- package/types/brep-src/algorithm/body_builder/extrude_body.d.ts +23 -0
- package/types/brep-src/algorithm/body_builder/sweep_body.d.ts +37 -0
- package/types/brep-src/algorithm/body_builder.d.ts +36 -0
- package/types/brep-src/algorithm/body_util.d.ts +21 -0
- package/types/brep-src/algorithm/bool_sk/brep_converter.d.ts +11 -0
- package/types/brep-src/algorithm/brep_calc_project.d.ts +50 -0
- package/types/brep-src/algorithm/brep_calc_x.d.ts +34 -0
- package/types/brep-src/algorithm/brep_pj.d.ts +47 -0
- package/types/brep-src/algorithm/index.d.ts +5 -0
- package/types/brep-src/algorithm/intersect/curve_face_overlap.d.ts +10 -0
- package/types/brep-src/algorithm/intersect/face_face_intersect.d.ts +22 -0
- package/types/brep-src/algorithm/intersect/face_faces_intersect.d.ts +15 -0
- package/types/brep-src/algorithm/intersect/line_face_intersect.d.ts +16 -0
- package/types/brep-src/algorithm/podition_judge/body_pj.d.ts +25 -0
- package/types/brep-src/algorithm/podition_judge/extrude_pj.d.ts +28 -0
- package/types/brep-src/algorithm/podition_judge/pt_body_pj.d.ts +32 -0
- package/types/brep-src/algorithm/project/body_project.d.ts +8 -0
- package/types/brep-src/algorithm/project/face_project.d.ts +20 -0
- package/types/brep-src/algorithm/project/face_surface_project.d.ts +8 -0
- package/types/brep-src/algorithm/project/space_project.d.ts +26 -0
- package/types/brep-src/algorithm/project/space_project_simple.d.ts +10 -0
- package/types/brep-src/algorithm/project/view_project.d.ts +25 -0
- package/types/brep-src/algorithm/shell_builder/create_shell_from_curves.d.ts +38 -0
- package/types/brep-src/algorithm/shell_builder.d.ts +25 -0
- package/types/brep-src/algorithm/shell_edit/add_edges/add_edges.d.ts +14 -0
- package/types/brep-src/algorithm/shell_edit/add_edges/add_edges_core.d.ts +11 -0
- package/types/brep-src/algorithm/shell_edit/copy_faces.d.ts +20 -0
- package/types/brep-src/algorithm/shell_edit/delete_faces_edges/delete_edge.d.ts +9 -0
- package/types/brep-src/algorithm/shell_edit/delete_faces_edges/delete_faces_edges.d.ts +17 -0
- package/types/brep-src/algorithm/shell_edit/faces_boolean/faces_boolean.d.ts +19 -0
- package/types/brep-src/algorithm/shell_edit/faces_boolean/faces_shells_boolean.d.ts +13 -0
- package/types/brep-src/algorithm/shell_edit/faces_boolean/octree.d.ts +11 -0
- package/types/brep-src/algorithm/shell_edit/isolate_faces.d.ts +21 -0
- package/types/brep-src/algorithm/shell_edit/merge_connect_faces.d.ts +14 -0
- package/types/brep-src/algorithm/shell_edit/merge_edges.d.ts +8 -0
- package/types/brep-src/algorithm/shell_edit/move_operators/move_edges.d.ts +31 -0
- package/types/brep-src/algorithm/shell_edit/move_operators/move_faces.d.ts +14 -0
- package/types/brep-src/algorithm/shell_edit/operator/dispose_topo.d.ts +2 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_connect_edge.d.ts +3 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_connect_face.d.ts +2 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_overlap_edge.d.ts +3 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_shell.d.ts +11 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_vertex.d.ts +2 -0
- package/types/brep-src/algorithm/shell_edit/operator/split_edge.d.ts +4 -0
- package/types/brep-src/algorithm/shell_edit/operator/split_shell.d.ts +6 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face.d.ts +18 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_core.d.ts +6 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_preview.d.ts +16 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_preview_core.d.ts +24 -0
- package/types/brep-src/algorithm/shell_edit/roundinng/2d_rounding.d.ts +22 -0
- package/types/brep-src/algorithm/shell_edit/shell_modeling_base.d.ts +10 -0
- package/types/brep-src/algorithm/shell_edit/shell_modeling_result.d.ts +21 -0
- package/types/brep-src/algorithm/shell_edit/smooth/detect_loop_util.d.ts +27 -0
- package/types/brep-src/algorithm/shell_edit/smooth/shell_modeling_util.d.ts +24 -0
- package/types/brep-src/algorithm/shell_edit/smooth/smooth_util.d.ts +22 -0
- package/types/brep-src/algorithm/shell_edit/split_edge.d.ts +10 -0
- package/types/brep-src/algorithm/shell_edit.d.ts +119 -0
- package/types/brep-src/algorithm/shell_valid/base_brep_topo_error.d.ts +176 -0
- package/types/brep-src/algorithm/shell_valid/diagnose_shell.d.ts +14 -0
- package/types/brep-src/brep/brep_body.d.ts +19 -0
- package/types/brep-src/brep/coedge3d.d.ts +83 -0
- package/types/brep-src/brep/edge.d.ts +96 -0
- package/types/brep-src/brep/face.d.ts +150 -0
- package/types/brep-src/brep/shell.d.ts +166 -0
- package/types/brep-src/brep/topo_object.d.ts +40 -0
- package/types/brep-src/brep/vertex.d.ts +48 -0
- package/types/brep-src/brep/wire.d.ts +66 -0
- package/types/brep-src/continuous/continuous_edge.d.ts +17 -0
- package/types/brep-src/continuous/continuous_face.d.ts +10 -0
- package/types/brep-src/continuous/continuous_util.d.ts +60 -0
- package/types/brep-src/continuous/continuous_uv.d.ts +24 -0
- package/types/brep-src/continuous/index.d.ts +4 -0
- package/types/brep-src/index.d.ts +14 -0
- package/types/brep-src/type_define/i_types.d.ts +46 -0
- package/types/brep-src/util/util.d.ts +23 -0
- package/types/conversion/units_conversion.d.ts +14 -0
- package/types/geometry/arc2d.d.ts +249 -0
- package/types/geometry/arc3d.d.ts +204 -0
- package/types/geometry/circle3d.d.ts +92 -0
- package/types/geometry/circular_surface.d.ts +52 -0
- package/types/geometry/coord_based_surface.d.ts +25 -0
- package/types/geometry/curve.d.ts +228 -0
- package/types/geometry/curve2.d.ts +62 -0
- package/types/geometry/curve3d.d.ts +66 -0
- package/types/geometry/cylinder.d.ts +73 -0
- package/types/geometry/discrete_arrow.d.ts +3 -0
- package/types/geometry/extend_curve2.d.ts +75 -0
- package/types/geometry/geometry2d.d.ts +35 -0
- package/types/geometry/geometry3d.d.ts +36 -0
- package/types/geometry/intersect_curve3.d.ts +90 -0
- package/types/geometry/ln2.d.ts +168 -0
- package/types/geometry/ln3.d.ts +152 -0
- package/types/geometry/nurbs_curve2.d.ts +106 -0
- package/types/geometry/nurbs_curve3.d.ts +191 -0
- package/types/geometry/offset_curve2.d.ts +63 -0
- package/types/geometry/offset_curve3.d.ts +97 -0
- package/types/geometry/offset_parameter_mapper.d.ts +72 -0
- package/types/geometry/plane.d.ts +109 -0
- package/types/geometry/polyline.d.ts +12 -0
- package/types/geometry/smooth_poly2.d.ts +78 -0
- package/types/geometry/smooth_poly3.d.ts +85 -0
- package/types/geometry/surface.d.ts +173 -0
- package/types/index.d.ts +78 -0
- package/types/io/obj_parser.d.ts +4 -0
- package/types/io/svgparser.d.ts +22 -0
- package/types/loader/loader.d.ts +23 -0
- package/types/loader/register_geo.d.ts +7 -0
- package/types/math/gauss_integration.d.ts +13 -0
- package/types/math/inv_bilinear.d.ts +33 -0
- package/types/solve_equations/cubic_equation.d.ts +7 -0
- package/types/solve_equations/linear_system.d.ts +6 -0
- package/types/solve_equations/nonlinear_system.d.ts +11 -0
- package/types/solve_equations/plurality.d.ts +9 -0
- package/types/solve_equations/polynomial_equation.d.ts +6 -0
- package/types/solve_equations/quadratic_equation.d.ts +6 -0
- package/types/solve_equations/quartic_equation.d.ts +6 -0
- package/types/solve_equations/solve_equation_util.d.ts +50 -0
- package/types/test_util/loop_generator.d.ts +21 -0
- package/types/topology/evolution_map.d.ts +90 -0
- package/types/topology/loop.d.ts +50 -0
- package/types/topology/polycurve.d.ts +109 -0
- package/types/topology/polygon.d.ts +118 -0
- package/types/topology/trimmed_surface.d.ts +136 -0
- package/types/type_define/const.d.ts +18 -0
- package/types/type_define/i_element.d.ts +9 -0
- package/types/type_define/i_element_type.d.ts +34 -0
- package/types/type_define/i_geometry.d.ts +191 -0
- package/types/type_define/i_types.d.ts +280 -0
- package/types/util/array_util.d.ts +8 -0
- package/types/util/assert.d.ts +21 -0
- package/types/util/clipper2_util.d.ts +5 -0
- package/types/util/clipper_format_converter.d.ts +21 -0
- package/types/util/clipper_util.d.ts +10 -0
- package/types/util/curve_util.d.ts +72 -0
- package/types/util/geom_util.d.ts +23 -0
- package/types/util/log.d.ts +19 -0
- package/types/util/math_error.d.ts +37 -0
- package/types/util/surface_util.d.ts +13 -0
- package/types/util/util.d.ts +18 -0
- package/types/util/uv_util.d.ts +68 -0
- package/types/verb/export_verb.d.ts +2 -0
- package/types/wasm/a2d.d.ts +19 -0
- package/types/wasm/bx2.d.ts +16 -0
- package/types/wasm/c2d.d.ts +29 -0
- package/types/wasm/elli.d.ts +19 -0
- package/types/wasm/grapher2d.d.ts +39 -0
- package/types/wasm/grapherutil.d.ts +9 -0
- package/types/wasm/l2d.d.ts +14 -0
- package/types/wasm/loader.d.ts +8 -0
- package/types/wasm/pt.d.ts +19 -0
- package/types/wasm/wasm-geom.d.ts +296 -0
- package/types/wasm/wasminstance.d.ts +19 -0
- package/types/wasm/wrapper.d.ts +82 -0
- package/README.md +0 -21
- package/dist/constants/geom_type.d.ts +0 -13
- package/dist/constants/geom_type.d.ts.map +0 -1
- package/dist/constants/geom_type.js +0 -17
- package/dist/constants/math_const.d.ts +0 -9
- package/dist/constants/math_const.d.ts.map +0 -1
- package/dist/constants/math_const.js +0 -12
- package/dist/core/box2.d.ts +0 -71
- package/dist/core/box2.d.ts.map +0 -1
- package/dist/core/box2.js +0 -243
- package/dist/core/coord2d.d.ts +0 -62
- package/dist/core/coord2d.d.ts.map +0 -1
- package/dist/core/coord2d.js +0 -155
- package/dist/core/geom_base.d.ts +0 -19
- package/dist/core/geom_base.d.ts.map +0 -1
- package/dist/core/geom_base.js +0 -18
- package/dist/core/mat3.d.ts +0 -101
- package/dist/core/mat3.d.ts.map +0 -1
- package/dist/core/mat3.js +0 -290
- package/dist/core/vec2.d.ts +0 -138
- package/dist/core/vec2.d.ts.map +0 -1
- package/dist/core/vec2.js +0 -297
- package/dist/curves/arc2.d.ts +0 -49
- package/dist/curves/arc2.d.ts.map +0 -1
- package/dist/curves/arc2.js +0 -265
- package/dist/curves/bspline2.d.ts +0 -150
- package/dist/curves/bspline2.d.ts.map +0 -1
- package/dist/curves/bspline2.js +0 -793
- package/dist/curves/circle2.d.ts +0 -42
- package/dist/curves/circle2.d.ts.map +0 -1
- package/dist/curves/circle2.js +0 -135
- package/dist/curves/circle_curve2.d.ts +0 -38
- package/dist/curves/circle_curve2.d.ts.map +0 -1
- package/dist/curves/circle_curve2.js +0 -112
- package/dist/curves/curve2.d.ts +0 -214
- package/dist/curves/curve2.d.ts.map +0 -1
- package/dist/curves/curve2.js +0 -238
- package/dist/curves/ellipse2.d.ts +0 -42
- package/dist/curves/ellipse2.d.ts.map +0 -1
- package/dist/curves/ellipse2.js +0 -125
- package/dist/curves/ellipse_arc2.d.ts +0 -49
- package/dist/curves/ellipse_arc2.d.ts.map +0 -1
- package/dist/curves/ellipse_arc2.js +0 -184
- package/dist/curves/ellipse_curve2.d.ts +0 -56
- package/dist/curves/ellipse_curve2.d.ts.map +0 -1
- package/dist/curves/ellipse_curve2.js +0 -262
- package/dist/curves/interval.d.ts +0 -112
- package/dist/curves/interval.d.ts.map +0 -1
- package/dist/curves/interval.js +0 -200
- package/dist/curves/line2.d.ts +0 -64
- package/dist/curves/line2.d.ts.map +0 -1
- package/dist/curves/line2.js +0 -193
- package/dist/curves/period_interval.d.ts +0 -129
- package/dist/curves/period_interval.d.ts.map +0 -1
- package/dist/curves/period_interval.js +0 -240
- package/dist/discretize/discretize_defaults.d.ts +0 -12
- package/dist/discretize/discretize_defaults.d.ts.map +0 -1
- package/dist/discretize/discretize_defaults.js +0 -12
- package/dist/discretize/discretize_engine.d.ts +0 -33
- package/dist/discretize/discretize_engine.d.ts.map +0 -1
- package/dist/discretize/discretize_engine.js +0 -347
- package/dist/discretize/discretize_errors.d.ts +0 -15
- package/dist/discretize/discretize_errors.d.ts.map +0 -1
- package/dist/discretize/discretize_errors.js +0 -30
- package/dist/discretize/discretize_options.d.ts +0 -18
- package/dist/discretize/discretize_options.d.ts.map +0 -1
- package/dist/discretize/discretize_options.js +0 -19
- package/dist/discretize/discretize_types.d.ts +0 -36
- package/dist/discretize/discretize_types.d.ts.map +0 -1
- package/dist/discretize/discretize_types.js +0 -1
- package/dist/discretize/internal/curve_guards.d.ts +0 -35
- package/dist/discretize/internal/curve_guards.d.ts.map +0 -1
- package/dist/discretize/internal/curve_guards.js +0 -62
- package/dist/discretize/internal/postprocess.d.ts +0 -5
- package/dist/discretize/internal/postprocess.d.ts.map +0 -1
- package/dist/discretize/internal/postprocess.js +0 -109
- package/dist/discretize/internal/sampling_utils.d.ts +0 -8
- package/dist/discretize/internal/sampling_utils.d.ts.map +0 -1
- package/dist/discretize/internal/sampling_utils.js +0 -36
- package/dist/discretize/register_builtin_strategies.d.ts +0 -3
- package/dist/discretize/register_builtin_strategies.d.ts.map +0 -1
- package/dist/discretize/register_builtin_strategies.js +0 -10
- package/dist/discretize/strategies/bspline_strategy.d.ts +0 -4
- package/dist/discretize/strategies/bspline_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/bspline_strategy.js +0 -115
- package/dist/discretize/strategies/circle_strategy.d.ts +0 -7
- package/dist/discretize/strategies/circle_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/circle_strategy.js +0 -55
- package/dist/discretize/strategies/ellipse_strategy.d.ts +0 -7
- package/dist/discretize/strategies/ellipse_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/ellipse_strategy.js +0 -86
- package/dist/discretize/strategies/line_strategy.d.ts +0 -4
- package/dist/discretize/strategies/line_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/line_strategy.js +0 -40
- package/dist/discretize/strategy_registry.d.ts +0 -9
- package/dist/discretize/strategy_registry.d.ts.map +0 -1
- package/dist/discretize/strategy_registry.js +0 -34
- package/dist/index.d.ts +0 -30
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -24
- package/dist/intersections/analytic_x_algorithm.d.ts +0 -10
- package/dist/intersections/analytic_x_algorithm.d.ts.map +0 -1
- package/dist/intersections/analytic_x_algorithm.js +0 -83
- package/dist/intersections/curve_x_engine.d.ts +0 -9
- package/dist/intersections/curve_x_engine.d.ts.map +0 -1
- package/dist/intersections/curve_x_engine.js +0 -27
- package/dist/intersections/index.d.ts +0 -5
- package/dist/intersections/index.d.ts.map +0 -1
- package/dist/intersections/index.js +0 -11
- package/dist/intersections/internal/certification.d.ts +0 -34
- package/dist/intersections/internal/certification.d.ts.map +0 -1
- package/dist/intersections/internal/certification.js +0 -238
- package/dist/intersections/internal/interval_clipping.d.ts +0 -29
- package/dist/intersections/internal/interval_clipping.d.ts.map +0 -1
- package/dist/intersections/internal/interval_clipping.js +0 -123
- package/dist/intersections/internal/kind.d.ts +0 -4
- package/dist/intersections/internal/kind.d.ts.map +0 -1
- package/dist/intersections/internal/kind.js +0 -16
- package/dist/intersections/internal/pair.d.ts +0 -9
- package/dist/intersections/internal/pair.d.ts.map +0 -1
- package/dist/intersections/internal/pair.js +0 -14
- package/dist/intersections/internal/result.d.ts +0 -20
- package/dist/intersections/internal/result.d.ts.map +0 -1
- package/dist/intersections/internal/result.js +0 -125
- package/dist/intersections/internal/sampling.d.ts +0 -15
- package/dist/intersections/internal/sampling.d.ts.map +0 -1
- package/dist/intersections/internal/sampling.js +0 -131
- package/dist/intersections/internal/segment.d.ts +0 -32
- package/dist/intersections/internal/segment.d.ts.map +0 -1
- package/dist/intersections/internal/segment.js +0 -137
- package/dist/intersections/internal/tolerance.d.ts +0 -10
- package/dist/intersections/internal/tolerance.d.ts.map +0 -1
- package/dist/intersections/internal/tolerance.js +0 -20
- package/dist/intersections/intersector.d.ts +0 -6
- package/dist/intersections/intersector.d.ts.map +0 -1
- package/dist/intersections/intersector.js +0 -1
- package/dist/intersections/numeric_x_algorithm.d.ts +0 -10
- package/dist/intersections/numeric_x_algorithm.d.ts.map +0 -1
- package/dist/intersections/numeric_x_algorithm.js +0 -73
- package/dist/intersections/solvers/bspline_self_solver.d.ts +0 -7
- package/dist/intersections/solvers/bspline_self_solver.d.ts.map +0 -1
- package/dist/intersections/solvers/bspline_self_solver.js +0 -308
- package/dist/intersections/solvers/line_line_pair_solver.d.ts +0 -7
- package/dist/intersections/solvers/line_line_pair_solver.d.ts.map +0 -1
- package/dist/intersections/solvers/line_line_pair_solver.js +0 -35
- package/dist/intersections/solvers/pair_solvers.d.ts +0 -94
- package/dist/intersections/solvers/pair_solvers.d.ts.map +0 -1
- package/dist/intersections/solvers/pair_solvers.js +0 -1078
- package/dist/intersections/solvers/polyline_pair_intersector.d.ts +0 -51
- package/dist/intersections/solvers/polyline_pair_intersector.d.ts.map +0 -1
- package/dist/intersections/solvers/polyline_pair_intersector.js +0 -731
- package/dist/intersections/types.d.ts +0 -11
- package/dist/intersections/types.d.ts.map +0 -1
- package/dist/intersections/types.js +0 -1
- package/dist/serialize/dump_types.d.ts +0 -101
- package/dist/serialize/dump_types.d.ts.map +0 -1
- package/dist/serialize/dump_types.js +0 -5
- package/dist/serialize/geom_mgr.d.ts +0 -24
- package/dist/serialize/geom_mgr.d.ts.map +0 -1
- package/dist/serialize/geom_mgr.js +0 -30
- package/dist/types/type_define.d.ts +0 -29
- package/dist/types/type_define.d.ts.map +0 -1
- package/dist/types/type_define.js +0 -10
- package/dist/types/type_guard.d.ts +0 -46
- package/dist/types/type_guard.d.ts.map +0 -1
- package/dist/types/type_guard.js +0 -5
- package/dist/utils/math_error.d.ts +0 -16
- package/dist/utils/math_error.d.ts.map +0 -1
- package/dist/utils/math_error.js +0 -35
- package/dist/utils/math_utils.d.ts +0 -9
- package/dist/utils/math_utils.d.ts.map +0 -1
- package/dist/utils/math_utils.js +0 -25
- package/dist/utils/precision.d.ts +0 -29
- package/dist/utils/precision.d.ts.map +0 -1
- package/dist/utils/precision.js +0 -44
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Face } from '../../../brep/face';
|
|
2
|
+
import { Shell } from '../../../brep/shell';
|
|
3
|
+
/**
|
|
4
|
+
* 依据连接关系,合并shell
|
|
5
|
+
* @param faces 待合并的面
|
|
6
|
+
* @param priorityShells 优先合并到的shell
|
|
7
|
+
*/
|
|
8
|
+
export declare function mergeShells(faces: Face[], priorityShells?: Shell[], useBFS?: boolean): {
|
|
9
|
+
deleteShell: Shell[];
|
|
10
|
+
addFaceMap: Map<Shell, Face[]>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Vec3 } from '../../../..';
|
|
2
|
+
import ShellModelingBase from '../shell_modeling_base';
|
|
3
|
+
import { IShellModelingResult } from '../shell_modeling_result';
|
|
4
|
+
import { Face } from '../../../brep/face';
|
|
5
|
+
import { Shell } from '../../../brep/shell';
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* 推拉面算法
|
|
9
|
+
*/
|
|
10
|
+
export default class PullPushFace extends ShellModelingBase {
|
|
11
|
+
private _face;
|
|
12
|
+
private _pullPushVec;
|
|
13
|
+
private _bExtrudeBehavior;
|
|
14
|
+
private _bTopFaceDeal;
|
|
15
|
+
private _bBoolean;
|
|
16
|
+
constructor(face: Face, vec: Vec3, context: Shell[], extrudeBehavior: boolean, bTopFaceDeal?: boolean, bBoolean?: boolean);
|
|
17
|
+
protected _executeImpl(): IShellModelingResult;
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Vec3 } from '../../../..';
|
|
2
|
+
import { IShellModelingResult } from '../shell_modeling_result';
|
|
3
|
+
import { Face } from '../../../brep/face';
|
|
4
|
+
import { Shell } from '../../../brep/shell';
|
|
5
|
+
export declare function checkPullPushCondition(face: Face, pullPushVec: Vec3): void;
|
|
6
|
+
export declare function pullPushFaceCore(face: Face, pullPushVec: Vec3, model: Shell[], bExtrudeBehavior: boolean, bTopFaceDeal: boolean, bBoolean: boolean, result: IShellModelingResult): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Vec3 } from '../../../..';
|
|
2
|
+
import ShellModelingBase from '../shell_modeling_base';
|
|
3
|
+
import { IShellModelingResult } from '../shell_modeling_result';
|
|
4
|
+
import { Face } from '../../../brep/face';
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* 推拉面算法
|
|
8
|
+
*/
|
|
9
|
+
export default class PullPushFacePreview extends ShellModelingBase {
|
|
10
|
+
private _face;
|
|
11
|
+
private _pullPushVec;
|
|
12
|
+
private _bExtrudeBehavior;
|
|
13
|
+
constructor(face: Face, vec: Vec3, extrudeBehavior: boolean);
|
|
14
|
+
protected _executeImpl(): IShellModelingResult;
|
|
15
|
+
protected _validateResult(): boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Vec3 } from '../../../..';
|
|
2
|
+
import { IShellModelingResult } from '../shell_modeling_result';
|
|
3
|
+
import { Face } from '../../../brep/face';
|
|
4
|
+
export declare class PullPushFacePreviewUtil {
|
|
5
|
+
private _face;
|
|
6
|
+
private _pullPushVec;
|
|
7
|
+
private _bClosedBottom;
|
|
8
|
+
constructor(face: Face, pullPushVec: Vec3, bClosedBottom: boolean);
|
|
9
|
+
execute(): IShellModelingResult;
|
|
10
|
+
private _dealVertexesAndSideEdges;
|
|
11
|
+
private _dealSideFaces;
|
|
12
|
+
private _newSideSurface;
|
|
13
|
+
private _isSurfacePerpendicularPlane;
|
|
14
|
+
private _handleNewNew;
|
|
15
|
+
private _handleTanslateNew;
|
|
16
|
+
private _handleNewTanslate;
|
|
17
|
+
/**
|
|
18
|
+
* 根据顶点序列重新生成face的wire,face的tag保持不变
|
|
19
|
+
* @param face
|
|
20
|
+
* @param vertexesArr
|
|
21
|
+
*/
|
|
22
|
+
private _regenerateFaceByVertexes;
|
|
23
|
+
}
|
|
24
|
+
export declare function pullPushFacePreviewCore(face: Face, pullPushVec: Vec3, bExtrudeBehavior: boolean): IShellModelingResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Edge } from '../../../brep/edge';
|
|
2
|
+
import { Shell } from '../../../brep/shell';
|
|
3
|
+
import ShellModelingBase from '../shell_modeling_base';
|
|
4
|
+
import { IShellModelingResult } from '../shell_modeling_result';
|
|
5
|
+
/**
|
|
6
|
+
* 相邻的两个edge倒圆角, errorCode: 1 success,-1 不相邻,不倒圆角, -2 不是直线,-3 edge不存在face,-4 edge相关联的face个数大于1
|
|
7
|
+
* @param edge1 输入edge1
|
|
8
|
+
* @param edge2 输入edge2
|
|
9
|
+
* @param radius 输入倒圆角半径
|
|
10
|
+
*/
|
|
11
|
+
export declare class Rounding2D extends ShellModelingBase {
|
|
12
|
+
private _edge1;
|
|
13
|
+
private _edge2;
|
|
14
|
+
private _radius;
|
|
15
|
+
private _useSmooth;
|
|
16
|
+
private _commonV;
|
|
17
|
+
private _commonF;
|
|
18
|
+
constructor(edge1: Edge, edge2: Edge, radius: number, context: Shell[], useSmooth: boolean);
|
|
19
|
+
protected _executeImpl(): IShellModelingResult;
|
|
20
|
+
private _canRounding;
|
|
21
|
+
private _calRoundingArc3d;
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Shell } from '../../brep/shell';
|
|
2
|
+
import { IShellModelingResult } from './shell_modeling_result';
|
|
3
|
+
export default abstract class ShellModelingBase {
|
|
4
|
+
protected _contextShells: Shell[];
|
|
5
|
+
constructor(contextShells: Shell[]);
|
|
6
|
+
protected abstract _executeImpl(): IShellModelingResult;
|
|
7
|
+
getContextShells(): Shell[];
|
|
8
|
+
execute(): IShellModelingResult;
|
|
9
|
+
protected _validateResult(): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GeoElement } from '../../..';
|
|
2
|
+
import { Shell } from '../../brep/shell';
|
|
3
|
+
import { Face } from '../../brep/face';
|
|
4
|
+
import { BaseBRepTopoError } from '../shell_valid/base_brep_topo_error';
|
|
5
|
+
import { TopoObject } from '../../brep/topo_object';
|
|
6
|
+
export interface IShellModifyInfo {
|
|
7
|
+
addFaces?: Face[];
|
|
8
|
+
deleteFaces?: Face[];
|
|
9
|
+
modifiedFaces?: Face[];
|
|
10
|
+
}
|
|
11
|
+
export interface IShellModelingResult {
|
|
12
|
+
errorStr?: string;
|
|
13
|
+
addShells?: Shell[];
|
|
14
|
+
deleteShells?: Shell[];
|
|
15
|
+
modifiedShellsMap?: Map<Shell, IShellModifyInfo>;
|
|
16
|
+
evolutionMap?: Map<string | GeoElement, string[]>;
|
|
17
|
+
topoErrors?: BaseBRepTopoError[];
|
|
18
|
+
}
|
|
19
|
+
export declare function addShellModifyInfo(map: Map<Shell, IShellModifyInfo>, shell: Shell, addFaces?: Face[], deleteFaces?: Face[], modifyFaces?: Face[]): void;
|
|
20
|
+
export declare function mergeShellModelingResult(r1: IShellModelingResult, r2: IShellModelingResult): void;
|
|
21
|
+
export declare function addEvolutionInfo(r: IShellModelingResult, oldTopo: TopoObject | GeoElement, newTopo: TopoObject): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Plane, Curve3, Box3, Curve2, Vec2 } from '../../../..';
|
|
2
|
+
import { Edge } from '../../../brep/edge';
|
|
3
|
+
export declare class VirtualLoop {
|
|
4
|
+
edges: Array<{
|
|
5
|
+
edge: Edge;
|
|
6
|
+
bSameDir: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
bc3ds: Curve3[];
|
|
9
|
+
box: Box3;
|
|
10
|
+
bc2ds: Curve2[];
|
|
11
|
+
approxPts: Vec2[];
|
|
12
|
+
private _area?;
|
|
13
|
+
constructor();
|
|
14
|
+
add(e: Edge, dir: boolean): void;
|
|
15
|
+
getArea(plane: Plane): number;
|
|
16
|
+
prepareData(plane: Plane): void;
|
|
17
|
+
reverse(): void;
|
|
18
|
+
}
|
|
19
|
+
export declare class VirtualFace {
|
|
20
|
+
loops: VirtualLoop[];
|
|
21
|
+
plane: Plane;
|
|
22
|
+
constructor(loops: VirtualLoop[], plane: Plane);
|
|
23
|
+
outerLoop(): VirtualLoop;
|
|
24
|
+
addInnerLoop(inner: VirtualLoop): void;
|
|
25
|
+
}
|
|
26
|
+
export declare function detectLoopFromEdges(startEdge: Edge, sameDir: boolean, piPlane: Plane, bLeft: boolean, allEdgeSet?: Set<Edge>): VirtualLoop | undefined;
|
|
27
|
+
export declare function virtualLoopsToFaces(loops: VirtualLoop[], origin: Plane, removeFirstNegativeLoop?: boolean): VirtualFace[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Plane, Vec3, Curve3 } from '../../../..';
|
|
2
|
+
import { Edge } from '../../../brep/edge';
|
|
3
|
+
import { Face } from '../../../brep/face';
|
|
4
|
+
import { VirtualLoop } from './detect_loop_util';
|
|
5
|
+
export declare class ShellModelingUtil {
|
|
6
|
+
/**
|
|
7
|
+
* 将一些面按照共surface进行分组
|
|
8
|
+
* @param faces 待分组的面
|
|
9
|
+
* @param facesCenter 面的大致中心点,减少误差
|
|
10
|
+
*/
|
|
11
|
+
static divideFacesIntoCoplanarGroups(faces: Iterable<Face>, facesCenter?: Vec3): Face[][];
|
|
12
|
+
/**
|
|
13
|
+
* 将一些面按照拓扑连接关系进行分组
|
|
14
|
+
* @param faces 待分组的面
|
|
15
|
+
* @param vertexConnect 考虑共点的连接,默认为true
|
|
16
|
+
*/
|
|
17
|
+
static divideFacesIntoConnectGroups(faces: Iterable<Face>, vertexConnect?: boolean): Face[][];
|
|
18
|
+
static detectFacesFromEdges(edges: Edge[], plane: Plane): VirtualLoop[][];
|
|
19
|
+
static getCoplanarPlane(curves: Curve3[]): {
|
|
20
|
+
plane: Plane | undefined;
|
|
21
|
+
state: number;
|
|
22
|
+
};
|
|
23
|
+
private static _getFaceGroup;
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Curve3, SmoothPoly3, Curve2 } from '../../../..';
|
|
2
|
+
import { Vertex } from '../../../brep/vertex';
|
|
3
|
+
import { Edge } from '../../../brep/edge';
|
|
4
|
+
declare class SmoothUtil {
|
|
5
|
+
static decomposeSmoothPoly(originCurves: (Curve2 | Curve3)[]): (Curve2 | Curve3)[];
|
|
6
|
+
static hasSmoothInfo(edge: Edge): boolean;
|
|
7
|
+
static getSmoothInfo(edge: Edge): SmoothPoly3 | undefined;
|
|
8
|
+
static clearSmoothInfo(edge: Edge): void;
|
|
9
|
+
static isSameSmoothPoly(c1: Curve2 | Curve3, c2: Curve2 | Curve3): boolean;
|
|
10
|
+
static copySmoothInfo(source: {
|
|
11
|
+
userData: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
}, target: {
|
|
15
|
+
userData: {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
}): void;
|
|
19
|
+
static updateSmoothVertex(vertex: Vertex): void;
|
|
20
|
+
static udpateSmoothVertices(vertices: Set<Vertex>): void;
|
|
21
|
+
}
|
|
22
|
+
export { SmoothUtil };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Vec3 } from '../../..';
|
|
2
|
+
import { Edge } from '../../brep/edge';
|
|
3
|
+
import ShellModelingBase from './shell_modeling_base';
|
|
4
|
+
import { IShellModelingResult } from './shell_modeling_result';
|
|
5
|
+
export default class SplitEdge extends ShellModelingBase {
|
|
6
|
+
private _edge;
|
|
7
|
+
private _pts;
|
|
8
|
+
constructor(edge: Edge, pts: Vec3[]);
|
|
9
|
+
protected _executeImpl(): IShellModelingResult;
|
|
10
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Curve3, Vec3, Matrix4, Plane, Tol, Cylinder } from '../..';
|
|
2
|
+
import { Shell } from '../brep/shell';
|
|
3
|
+
import { IShellModelingResult } from './shell_edit/shell_modeling_result';
|
|
4
|
+
import { Face } from '../brep/face';
|
|
5
|
+
import { IIsolateFacesResult } from './shell_edit/isolate_faces';
|
|
6
|
+
import { Edge } from '../brep/edge';
|
|
7
|
+
export declare class ShellEdit {
|
|
8
|
+
/**
|
|
9
|
+
* 往模型中加入线条,分割面或者形成新的面
|
|
10
|
+
* @param curves 输入线条
|
|
11
|
+
* @param context 当前模型中所有的shell
|
|
12
|
+
*/
|
|
13
|
+
static addEdges(curves: Curve3[], context?: Shell[], curvePlane?: Plane | Cylinder | undefined): IShellModelingResult;
|
|
14
|
+
/**
|
|
15
|
+
* 用指定的点将边拆分
|
|
16
|
+
* @param edge 被拆分的边
|
|
17
|
+
* @param pts 拆分点
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
static splitEdge(edge: Edge, pts: Vec3[]): IShellModelingResult;
|
|
21
|
+
/**
|
|
22
|
+
* 将一些边合并起来
|
|
23
|
+
* @param edges 被合并的边
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
static mergeEdges(edges: Edge[]): IShellModelingResult;
|
|
27
|
+
/**
|
|
28
|
+
* 移动模型中的edges,预览效果
|
|
29
|
+
* @param edges 输入要移动的edges
|
|
30
|
+
* @param moveVect 移动的向量
|
|
31
|
+
*/
|
|
32
|
+
static moveEdgesPreview(edges: Edge[], moveVect: Vec3): IShellModelingResult;
|
|
33
|
+
/**
|
|
34
|
+
* 移动模型中的edges,移动后如果跟其他face相交,会分割形成新的面。//注:如果希望移动后不与场景内其他的shell求交分割,可传入空的shells
|
|
35
|
+
* @param edges 输入要移动的edges
|
|
36
|
+
* @param moveVect 移动的向量
|
|
37
|
+
* @param context 当前场景中所有的shell, 用于移动后的求交。如果未传入shells,则不会与场景中已有的face求交分割
|
|
38
|
+
*/
|
|
39
|
+
static moveEdges(edges: Edge[], moveVect: Vec3, context?: Shell[]): IShellModelingResult;
|
|
40
|
+
/**
|
|
41
|
+
* 移动模型中的faces,移动后如果跟其他face相交,会分割形成新的面。//注:如果希望移动后不与场景内其他的shell求交分割,可传入空的shells
|
|
42
|
+
* @param faces 输入要移动的faces
|
|
43
|
+
* @param moveVect 移动的向量
|
|
44
|
+
* @param context 当前场景中所有的shell, 用于移动后的求交。如果未传入shells,则不会与场景中已有的face求交分割
|
|
45
|
+
*/
|
|
46
|
+
static moveFaces(faces: Face[], moveVect: Vec3, context?: Shell[]): IShellModelingResult;
|
|
47
|
+
/**
|
|
48
|
+
* 将多个面合并到场景中
|
|
49
|
+
* @param faces 待合并的面
|
|
50
|
+
* @param context 当前模型中所有的shell
|
|
51
|
+
* @param checkOverlap1 待合并面存在自相交,需要处理
|
|
52
|
+
* @param preResult 之前操作的结果
|
|
53
|
+
*/
|
|
54
|
+
static facesAndShellsMerge(faces: Face[], context: Shell[], checkOverlap1?: boolean, preResult?: IShellModelingResult, tolerance?: Tol): IShellModelingResult;
|
|
55
|
+
/**
|
|
56
|
+
* 将相邻的面进行合并,变成大的面
|
|
57
|
+
* 不做布尔运算,(暂时只支持平面,不支持曲面)
|
|
58
|
+
* @param faces 待合并的面
|
|
59
|
+
* @param preResult 之前操作的结果
|
|
60
|
+
*/
|
|
61
|
+
static mergeConnectedFaces(faces: Face[], preResult?: IShellModelingResult): IShellModelingResult;
|
|
62
|
+
/**
|
|
63
|
+
* 推拉一个面
|
|
64
|
+
* @param face 被推拉的面
|
|
65
|
+
* @param vec 推拉方向 + 距离
|
|
66
|
+
* @param context 当前模型中所有的shell
|
|
67
|
+
* @param extrudeBehavior 是否使用拉伸的行为-->保留底面
|
|
68
|
+
* @param bTopFaceDeal 顶面合并后,成为另外一个面的内环,则进行删除
|
|
69
|
+
* @param bBoolean 侧面和顶面是否需要进行布尔合并
|
|
70
|
+
*/
|
|
71
|
+
static pullPushFace(face: Face, vec: Vec3, context?: Shell[], extrudeBehavior?: boolean, bTopFaceDeal?: boolean, bBoolean?: boolean): IShellModelingResult;
|
|
72
|
+
/**
|
|
73
|
+
* 预览面推拉,比面推拉要快,但是结果不一定对,只能保证看起来对
|
|
74
|
+
* @param face 被推拉的面
|
|
75
|
+
* @param vec 推拉方向 + 距离
|
|
76
|
+
* @param extrudeBehavior 是否使用拉伸的行为-->保留底面
|
|
77
|
+
*/
|
|
78
|
+
static pullPushFacePreview(face: Face, vec: Vec3, extrudeBehavior?: boolean): IShellModelingResult;
|
|
79
|
+
/**
|
|
80
|
+
* 将originShell中的faces,转移到新的独立的shell中
|
|
81
|
+
* 新的shell中同时生成所需的edge和vertex,不会重用tag(用于成组操作)。
|
|
82
|
+
* originShell中会删除输入的faces
|
|
83
|
+
* @param originShell
|
|
84
|
+
* @param faces
|
|
85
|
+
*/
|
|
86
|
+
static isolateFaces(originShell: Shell, faces: Set<Face>): IIsolateFacesResult;
|
|
87
|
+
/**
|
|
88
|
+
* 复制多个面到新的位置.
|
|
89
|
+
* 面可以属于不同的shell
|
|
90
|
+
* @param faces 待复制的面
|
|
91
|
+
* @param reuseTag 是否重用tag
|
|
92
|
+
* @param matrix 新位置的变换矩阵
|
|
93
|
+
* @returns origin face -> new face map
|
|
94
|
+
*/
|
|
95
|
+
static copyFaces(faces: Face[], reuseTag?: boolean, matrix?: Matrix4): IShellModelingResult;
|
|
96
|
+
/**
|
|
97
|
+
* 删除多个面和多个边
|
|
98
|
+
* 从模型中删除edges,并且删除和edge关联的coedges,但不会删除edge关联的vertex。删除coedge之后wire不成环也要删去。
|
|
99
|
+
* @param faces 待删除的面
|
|
100
|
+
* @param edges 待删除的边
|
|
101
|
+
* @param mergeEdge 是否合并相邻的断边
|
|
102
|
+
*/
|
|
103
|
+
static deleteFacesAndEdges(faces: Face[], edges: Edge[], mergeEdge?: boolean): IShellModelingResult;
|
|
104
|
+
/**
|
|
105
|
+
* 2d倒圆角:相邻的两个edge倒圆角
|
|
106
|
+
* @param edge1 输入倒圆角的edge1
|
|
107
|
+
* @param edge2 输入倒圆角的edge2
|
|
108
|
+
* @param radius 输入倒圆角半径
|
|
109
|
+
* @param context 当前模型中所有的shell
|
|
110
|
+
* @param useSmoothPoly 使用连续边(true -> 真圆弧,false -> 离散的连续边)
|
|
111
|
+
*/
|
|
112
|
+
static makeRounding2D(edge1: Edge, edge2: Edge, radius: number, context?: Shell[], useSmoothPoly?: boolean): IShellModelingResult;
|
|
113
|
+
/**
|
|
114
|
+
* 将shell进行矩阵变换
|
|
115
|
+
* @param shells
|
|
116
|
+
* @param m
|
|
117
|
+
*/
|
|
118
|
+
static transformShells(shells: Shell[], m: Matrix4): IShellModelingResult;
|
|
119
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { Curve2 } from '../../..';
|
|
2
|
+
import { TopoObject } from '../../brep/topo_object';
|
|
3
|
+
import { Face } from '../../brep/face';
|
|
4
|
+
import { Shell } from '../../brep/shell';
|
|
5
|
+
import { Wire } from '../../brep/wire';
|
|
6
|
+
import { Coedge3d } from '../../brep/coedge3d';
|
|
7
|
+
import { Edge } from '../../brep/edge';
|
|
8
|
+
import { Vertex } from '../../brep/vertex';
|
|
9
|
+
export declare enum EN_BREP_INVALID_TYPE {
|
|
10
|
+
NULL = 0,
|
|
11
|
+
SHELL_VERTEX_SIZE_ERROR = 1,
|
|
12
|
+
SHELL_EDGE_SIZE_ERROR = 2,
|
|
13
|
+
SHELL_EDGE_ERROR = 3,
|
|
14
|
+
SHELL_VERTEX_ERROR = 4,
|
|
15
|
+
FACE_PARENT_ERROR = 5,
|
|
16
|
+
FACE_NO_WIRE_ERROR = 6,
|
|
17
|
+
FACE_NO_SURFACE_ERROR = 7,
|
|
18
|
+
WIRE_PARENT_ERROR = 8,
|
|
19
|
+
WIRE_NO_COEDGE_ERROR = 9,
|
|
20
|
+
COEDGE_PARENT_ERROR = 10,
|
|
21
|
+
COEDGE_CONNECT_ERROR = 11,
|
|
22
|
+
COEDGE_EDGE_ERROR = 12,
|
|
23
|
+
COEDGE_PCURVE_ERROR = 13,
|
|
24
|
+
EDGE_PARENT_ERROR = 14,
|
|
25
|
+
CURVE_NULL_ERROR = 15,
|
|
26
|
+
CURVE_VERTEX_ERROR = 16,
|
|
27
|
+
VERTEX_PARENT_ERROR = 17,
|
|
28
|
+
VERTEX_EDGE_ERROR = 18
|
|
29
|
+
}
|
|
30
|
+
export declare class BaseBRepTopoError {
|
|
31
|
+
protected _shell: Shell;
|
|
32
|
+
protected _topoObj: TopoObject;
|
|
33
|
+
constructor(_shell: Shell, _topoObj: TopoObject);
|
|
34
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
35
|
+
canFix(): boolean;
|
|
36
|
+
fix(): void;
|
|
37
|
+
message(): string;
|
|
38
|
+
toString(): string;
|
|
39
|
+
}
|
|
40
|
+
export declare class BRepShellEdgeSizeError extends BaseBRepTopoError {
|
|
41
|
+
protected _shell: Shell;
|
|
42
|
+
protected _topoObj: Shell;
|
|
43
|
+
constructor(_shell: Shell, _topoObj: Shell);
|
|
44
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
45
|
+
canFix(): boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare class BRepShellEdgeError extends BaseBRepTopoError {
|
|
48
|
+
protected _shell: Shell;
|
|
49
|
+
protected _topoObj: Shell;
|
|
50
|
+
protected _edge: Edge;
|
|
51
|
+
constructor(_shell: Shell, _topoObj: Shell, _edge: Edge);
|
|
52
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
53
|
+
canFix(): boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare class BRepShellVertexSizeError extends BaseBRepTopoError {
|
|
56
|
+
protected _shell: Shell;
|
|
57
|
+
protected _topoObj: Shell;
|
|
58
|
+
constructor(_shell: Shell, _topoObj: Shell);
|
|
59
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
60
|
+
canFix(): boolean;
|
|
61
|
+
}
|
|
62
|
+
export declare class BRepShellVertexError extends BaseBRepTopoError {
|
|
63
|
+
protected _shell: Shell;
|
|
64
|
+
protected _topoObj: Shell;
|
|
65
|
+
protected _vertex: Vertex;
|
|
66
|
+
constructor(_shell: Shell, _topoObj: Shell, _vertex: Vertex);
|
|
67
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
68
|
+
canFix(): boolean;
|
|
69
|
+
}
|
|
70
|
+
export declare class BRepFaceParentError extends BaseBRepTopoError {
|
|
71
|
+
protected _shell: Shell;
|
|
72
|
+
protected _topoObj: Face;
|
|
73
|
+
constructor(_shell: Shell, _topoObj: Face);
|
|
74
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
75
|
+
fix(): void;
|
|
76
|
+
}
|
|
77
|
+
export declare class BRepEmptyFaceError extends BaseBRepTopoError {
|
|
78
|
+
protected _shell: Shell;
|
|
79
|
+
protected _topoObj: Face;
|
|
80
|
+
constructor(_shell: Shell, _topoObj: Face);
|
|
81
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
82
|
+
canFix(): boolean;
|
|
83
|
+
}
|
|
84
|
+
export declare class BRepFaceNoSurfaceError extends BaseBRepTopoError {
|
|
85
|
+
protected _shell: Shell;
|
|
86
|
+
protected _topoObj: Face;
|
|
87
|
+
constructor(_shell: Shell, _topoObj: Face);
|
|
88
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
89
|
+
canFix(): boolean;
|
|
90
|
+
}
|
|
91
|
+
export declare class BRepWireParentError extends BaseBRepTopoError {
|
|
92
|
+
protected _shell: Shell;
|
|
93
|
+
protected _topoObj: Wire;
|
|
94
|
+
private _face;
|
|
95
|
+
constructor(_shell: Shell, _topoObj: Wire, _face: Face);
|
|
96
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
97
|
+
fix(): void;
|
|
98
|
+
}
|
|
99
|
+
export declare class BRepEmptyWireError extends BaseBRepTopoError {
|
|
100
|
+
protected _shell: Shell;
|
|
101
|
+
protected _topoObj: Wire;
|
|
102
|
+
constructor(_shell: Shell, _topoObj: Wire);
|
|
103
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
104
|
+
canFix(): boolean;
|
|
105
|
+
}
|
|
106
|
+
export declare class BRepCoedgeParentError extends BaseBRepTopoError {
|
|
107
|
+
protected _shell: Shell;
|
|
108
|
+
protected _topoObj: Coedge3d;
|
|
109
|
+
private _wire;
|
|
110
|
+
constructor(_shell: Shell, _topoObj: Coedge3d, _wire: Wire);
|
|
111
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
112
|
+
fix(): void;
|
|
113
|
+
}
|
|
114
|
+
export declare class BRepCoedgePCurveError extends BaseBRepTopoError {
|
|
115
|
+
protected _shell: Shell;
|
|
116
|
+
protected _topoObj: Coedge3d;
|
|
117
|
+
protected _pCurve: Curve2;
|
|
118
|
+
constructor(_shell: Shell, _topoObj: Coedge3d, _pCurve: Curve2);
|
|
119
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
120
|
+
canFix(): boolean;
|
|
121
|
+
}
|
|
122
|
+
export declare class BRepCoedgeNotConnectedError extends BaseBRepTopoError {
|
|
123
|
+
protected _shell: Shell;
|
|
124
|
+
protected _topoObj: Wire;
|
|
125
|
+
protected _curCoedge: Coedge3d;
|
|
126
|
+
protected _nxtCoedge: Coedge3d;
|
|
127
|
+
constructor(_shell: Shell, _topoObj: Wire, _curCoedge: Coedge3d, _nxtCoedge: Coedge3d);
|
|
128
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
129
|
+
canFix(): boolean;
|
|
130
|
+
}
|
|
131
|
+
export declare class BRepCoedgeEdgeError extends BaseBRepTopoError {
|
|
132
|
+
protected _shell: Shell;
|
|
133
|
+
protected _topoObj: Coedge3d;
|
|
134
|
+
protected _edge: Edge;
|
|
135
|
+
constructor(_shell: Shell, _topoObj: Coedge3d, _edge: Edge);
|
|
136
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
137
|
+
canFix(): boolean;
|
|
138
|
+
}
|
|
139
|
+
export declare class BRepEdgeParentError extends BaseBRepTopoError {
|
|
140
|
+
protected _shell: Shell;
|
|
141
|
+
protected _topoObj: Edge;
|
|
142
|
+
constructor(_shell: Shell, _topoObj: Edge);
|
|
143
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
144
|
+
fix(): void;
|
|
145
|
+
}
|
|
146
|
+
export declare class BRepCurveNullError extends BaseBRepTopoError {
|
|
147
|
+
protected _shell: Shell;
|
|
148
|
+
protected _topoObj: Edge;
|
|
149
|
+
constructor(_shell: Shell, _topoObj: Edge);
|
|
150
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
151
|
+
canFix(): boolean;
|
|
152
|
+
fix(): void;
|
|
153
|
+
}
|
|
154
|
+
export declare class BRepCurveVertexError extends BaseBRepTopoError {
|
|
155
|
+
protected _shell: Shell;
|
|
156
|
+
protected _topoObj: Edge;
|
|
157
|
+
protected _vertex: Vertex;
|
|
158
|
+
constructor(_shell: Shell, _topoObj: Edge, _vertex: Vertex);
|
|
159
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
160
|
+
canFix(): boolean;
|
|
161
|
+
}
|
|
162
|
+
export declare class BRepVertexParentError extends BaseBRepTopoError {
|
|
163
|
+
protected _shell: Shell;
|
|
164
|
+
protected _topoObj: Vertex;
|
|
165
|
+
constructor(_shell: Shell, _topoObj: Vertex);
|
|
166
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
167
|
+
fix(): void;
|
|
168
|
+
}
|
|
169
|
+
export declare class BRepVertexEdgeError extends BaseBRepTopoError {
|
|
170
|
+
protected _shell: Shell;
|
|
171
|
+
protected _topoObj: Vertex;
|
|
172
|
+
protected _edge: Edge;
|
|
173
|
+
constructor(_shell: Shell, _topoObj: Vertex, _edge: Edge);
|
|
174
|
+
getType(): EN_BREP_INVALID_TYPE;
|
|
175
|
+
canFix(): boolean;
|
|
176
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Shell } from '../../brep/shell';
|
|
2
|
+
import { BaseBRepTopoError } from './base_brep_topo_error';
|
|
3
|
+
export declare class DiagnoseShell {
|
|
4
|
+
static execute(shell: Shell): BaseBRepTopoError[];
|
|
5
|
+
/**
|
|
6
|
+
* 校验拓扑合法性,失败则抛异常
|
|
7
|
+
* @param shell
|
|
8
|
+
*/
|
|
9
|
+
static validate(shell: Shell): void;
|
|
10
|
+
private static _validateFace;
|
|
11
|
+
private static _validateWire;
|
|
12
|
+
private static _validateEdge;
|
|
13
|
+
private static _validateVertex;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EN_GEO_TYPE } from '../../type_define/i_element_type';
|
|
2
|
+
import { Shell } from './shell';
|
|
3
|
+
/**
|
|
4
|
+
* brep体, 包含一个或多个的shell
|
|
5
|
+
*/
|
|
6
|
+
declare class BrepBody extends Shell {
|
|
7
|
+
/**
|
|
8
|
+
* 拓扑是否合法,一个edge关联2个coedge
|
|
9
|
+
*/
|
|
10
|
+
isTopoValid(): boolean;
|
|
11
|
+
clone(): BrepBody;
|
|
12
|
+
getType(): EN_GEO_TYPE.BREP_BODY;
|
|
13
|
+
/**
|
|
14
|
+
* 分离出lump,Array<Shell>的第一个shell是外壳(面的方向朝外),其余的是空腔(面的方向朝内)
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
toLump(): Shell[][];
|
|
18
|
+
}
|
|
19
|
+
export { BrepBody };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { TopoObject } from './topo_object';
|
|
2
|
+
import { Wire } from './wire';
|
|
3
|
+
import { Face } from './face';
|
|
4
|
+
import { Edge } from './edge';
|
|
5
|
+
import { Shell } from './shell';
|
|
6
|
+
import { IDBCoedge3d } from '../type_define/i_types';
|
|
7
|
+
import { Vertex } from './vertex';
|
|
8
|
+
import { Box3 } from '../../base/box3';
|
|
9
|
+
import { Vec3 } from '../../base/vec3';
|
|
10
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
11
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
12
|
+
import { EN_GEO_TYPE } from '../../type_define/i_element_type';
|
|
13
|
+
/**
|
|
14
|
+
* 三维半边结构
|
|
15
|
+
*/
|
|
16
|
+
declare class Coedge3d extends TopoObject {
|
|
17
|
+
private _edgeTag;
|
|
18
|
+
private _sameDirWithEdge;
|
|
19
|
+
private _edge;
|
|
20
|
+
private _pCurve;
|
|
21
|
+
constructor();
|
|
22
|
+
constructor(edge: Edge, sameDirWithEdge: boolean, pCurve?: Curve2);
|
|
23
|
+
getEdgeTag(): string;
|
|
24
|
+
getSameDirWithEdge(): boolean;
|
|
25
|
+
setSameDirWithEdge(sameDir: boolean): void;
|
|
26
|
+
/**
|
|
27
|
+
* 设置Edge
|
|
28
|
+
* @param edge
|
|
29
|
+
*/
|
|
30
|
+
setEdge(edge: Edge): void;
|
|
31
|
+
/**
|
|
32
|
+
* 获取coedge对应的起始Vertex
|
|
33
|
+
*/
|
|
34
|
+
getStartVertex(): Vertex;
|
|
35
|
+
/**
|
|
36
|
+
* 获取coedge对应的终止Vertex
|
|
37
|
+
*/
|
|
38
|
+
getEndVertex(): Vertex;
|
|
39
|
+
/**
|
|
40
|
+
* 获取和半边对应的有界曲线,方向和半边的方向同向
|
|
41
|
+
*/
|
|
42
|
+
getCurve(): Curve3;
|
|
43
|
+
getPCurve(): Curve2 | undefined;
|
|
44
|
+
setPCurve(curve: Curve2 | undefined): void;
|
|
45
|
+
reverse(): void;
|
|
46
|
+
/**
|
|
47
|
+
* 获取所属Wire
|
|
48
|
+
*/
|
|
49
|
+
getWire(): Wire | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* 获取所属Face
|
|
52
|
+
*/
|
|
53
|
+
getFace(): Face | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* 获取所属Boby
|
|
56
|
+
*/
|
|
57
|
+
getShell(): Shell | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* 获取其对应edge
|
|
60
|
+
*/
|
|
61
|
+
getEdge(): Edge | undefined;
|
|
62
|
+
dispose(): void;
|
|
63
|
+
isEdgeInfoValid(): boolean;
|
|
64
|
+
getIndexInWire(): number;
|
|
65
|
+
getPrevCoedge(): Coedge3d | undefined;
|
|
66
|
+
getNextCoedge(): Coedge3d | undefined;
|
|
67
|
+
getStartTangent(): Vec3;
|
|
68
|
+
getEndTangent(): Vec3;
|
|
69
|
+
getTwin(): Coedge3d | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* 获取共享Edge的边
|
|
72
|
+
*/
|
|
73
|
+
getTwins(): Coedge3d[];
|
|
74
|
+
getBBox(): Box3;
|
|
75
|
+
getType(): EN_GEO_TYPE.BREP_COEDGE;
|
|
76
|
+
/**
|
|
77
|
+
* 抽取元数据,用于序列化
|
|
78
|
+
* @returns 返回js对象
|
|
79
|
+
*/
|
|
80
|
+
dump(): IDBCoedge3d;
|
|
81
|
+
load({ tag, flag, data, eTag, dir, pCrv, _d }: IDBCoedge3d): this;
|
|
82
|
+
}
|
|
83
|
+
export { Coedge3d };
|