@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.
- 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,29 @@
|
|
|
1
|
+
import { Surface } from '../../geometry/surface';
|
|
2
|
+
import { Vec3 } from '../../base/vec3';
|
|
3
|
+
import { Tol } from '../../base/tol';
|
|
4
|
+
import { ISurfacesXInfo } from './x_info';
|
|
5
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
6
|
+
export declare class SurfacesXComplex {
|
|
7
|
+
private _surface1;
|
|
8
|
+
private _surface2;
|
|
9
|
+
private _surfacePatchs1;
|
|
10
|
+
private _surfacePatchs2;
|
|
11
|
+
private _singularCurvePatchs1;
|
|
12
|
+
private _singularCurvePatchs2;
|
|
13
|
+
private _tol;
|
|
14
|
+
constructor(surf1: Surface, surf2: Surface, tol?: Tol);
|
|
15
|
+
allIntersects(): ISurfacesXInfo[];
|
|
16
|
+
singleIntersectCurve(refPoint: Vec3, refDir?: Vec3, useHighPrecision?: boolean, convertToNurbs?: boolean): Curve3 | undefined;
|
|
17
|
+
private _splitSurface;
|
|
18
|
+
private _getNextPatchPairForOnePtCurve;
|
|
19
|
+
private _updateConnectPatchPairs;
|
|
20
|
+
private _getNextPatchPair;
|
|
21
|
+
private _spliceIntersectCurves;
|
|
22
|
+
/**
|
|
23
|
+
* 在intercurve首部或者尾部拼接另一条交线
|
|
24
|
+
* @ curve 用于拼接的曲线 // 目前仅支持直线
|
|
25
|
+
* @ tol 容差
|
|
26
|
+
*/
|
|
27
|
+
private _spliceCurve;
|
|
28
|
+
private _getOverlapSurfaceIntersection;
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Tol } from '../../base/tol';
|
|
2
|
+
import { Surface } from '../../geometry/surface';
|
|
3
|
+
import { ISurfacesXInfo } from './x_info';
|
|
4
|
+
/**
|
|
5
|
+
* (内部使用)几何法和解析法计算得到交线,限于一些特殊情况求交
|
|
6
|
+
* @param surface 曲面
|
|
7
|
+
* @param surface 曲面
|
|
8
|
+
* @returns 交线可能不止一条,故返回交线的数组
|
|
9
|
+
*/
|
|
10
|
+
export declare class SurfacesXSpecial {
|
|
11
|
+
static execute(surface1: Surface, surface2: Surface, tol?: Tol): ISurfacesXInfo[] | undefined;
|
|
12
|
+
private static _planePlane;
|
|
13
|
+
private static _planeCylinder;
|
|
14
|
+
private static _planeEllipseCylinder;
|
|
15
|
+
private static _cylinderCylinder;
|
|
16
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ISurfacesXInfo, ISurfaceSurfaceIntersectPointInfo } from './x_info';
|
|
2
|
+
import { Surface } from '../../geometry/surface';
|
|
3
|
+
import { Interval } from '../../base/interval';
|
|
4
|
+
import { Tol } from '../../base/tol';
|
|
5
|
+
import { Vec3 } from '../../base/vec3';
|
|
6
|
+
import { types } from '../../type_define/i_types';
|
|
7
|
+
export declare class SurfacesXUtil {
|
|
8
|
+
private _surface;
|
|
9
|
+
private _surf1BoundaryUVs;
|
|
10
|
+
private _surf2BoundaryUVs;
|
|
11
|
+
private _useHighPrecision;
|
|
12
|
+
private _tol;
|
|
13
|
+
constructor(surf1: Surface, surf2: Surface, tol?: Tol, surf1RangeUV?: Interval[], surf2RangeUV?: Interval[]);
|
|
14
|
+
/**
|
|
15
|
+
* 标准的surface与surface通用求交的函数,会返回所有的交(交线、交点、重合面(未实现))
|
|
16
|
+
* 数值方法(迭代法)计算得到交线,通用曲面求交
|
|
17
|
+
* @returns 交线可能不止一条,故返回交线的数组
|
|
18
|
+
*/
|
|
19
|
+
calAllIntersects(rangeU1?: Interval, rangeV1?: Interval, rangeU2?: Interval, rangeV2?: Interval, useHighPrecision?: boolean): ISurfacesXInfo[];
|
|
20
|
+
calSingleIntersect(referPoint: Vec3, referDir?: Vec3, useHighPrecision?: boolean): ISurfacesXInfo | undefined;
|
|
21
|
+
findSurfaceIntersectPoint(referPoint: Vec3): ISurfaceSurfaceIntersectPointInfo | undefined;
|
|
22
|
+
calSingleSelfIntersect(refUV1: types.IXY, refUV2: types.IXY, referDir?: Vec3, useHighPrecision?: boolean): ISurfacesXInfo | undefined;
|
|
23
|
+
private _initBoudaryUVs;
|
|
24
|
+
private _initSurfacePatch;
|
|
25
|
+
private _shrinkSurfacePatchRangesByAnotherSurfaceBox;
|
|
26
|
+
private _isSurfaceRangeUVFinite;
|
|
27
|
+
private _shrinkSurfacePatchRanges;
|
|
28
|
+
private _surfacePatchsIntersectPoints;
|
|
29
|
+
private _combineSurfacePatchPairs;
|
|
30
|
+
private _FilterSurfacePatchPairs;
|
|
31
|
+
private _refreshSurfacePatchs;
|
|
32
|
+
private _calcSurfacePatchPairIntersectPoint;
|
|
33
|
+
private _removeInitialIntersectPts;
|
|
34
|
+
private _calTwoSurfaceSingleIntersect;
|
|
35
|
+
private _estimateNewIntersectPt;
|
|
36
|
+
private _calcNextInterscetPointInfo;
|
|
37
|
+
private _estimateSurfaceUV;
|
|
38
|
+
private _estimateCurveT;
|
|
39
|
+
private _adjustEstimatedPtByBoundary;
|
|
40
|
+
private _refineNewIntersectPtIteratively;
|
|
41
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
2
|
+
import { Vec3 } from '../../base/vec3';
|
|
3
|
+
import { Interval } from '../../base/interval';
|
|
4
|
+
import { Vec } from '../../base/vec';
|
|
5
|
+
import { Surface } from '../../geometry/surface';
|
|
6
|
+
import { types } from '../../type_define/i_types';
|
|
7
|
+
import { Vec2 } from '../../base/vec2';
|
|
8
|
+
/**
|
|
9
|
+
* 曲线与曲线的交点信息
|
|
10
|
+
*/
|
|
11
|
+
export interface ICurvesXInfo<PointType extends Vec> {
|
|
12
|
+
/** 交点 */
|
|
13
|
+
point: PointType;
|
|
14
|
+
/** 交点在第一条曲线上的参数 */
|
|
15
|
+
param1: number;
|
|
16
|
+
/** 交点在第二条曲线上的参数 */
|
|
17
|
+
param2: number;
|
|
18
|
+
/** 是否重合 */
|
|
19
|
+
isOverlap: boolean;
|
|
20
|
+
/** 若是重合,重合段在第一条曲线上的参数 */
|
|
21
|
+
overlap1?: Interval;
|
|
22
|
+
/** 若是重合,重合段在第二条曲线上的参数 */
|
|
23
|
+
overlap2?: Interval;
|
|
24
|
+
/** 若是重合,两重合段同向时为 true */
|
|
25
|
+
overlapSameDirection?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface ICurvesXInfo2d extends ICurvesXInfo<Vec2> {
|
|
28
|
+
}
|
|
29
|
+
export interface ICurvesXInfo3d extends ICurvesXInfo<Vec3> {
|
|
30
|
+
}
|
|
31
|
+
export interface ICurveSurfXPointInfo {
|
|
32
|
+
point: Vec3;
|
|
33
|
+
curveT: number;
|
|
34
|
+
uvPara: types.IXY;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 曲线与曲面的求交信息
|
|
38
|
+
*/
|
|
39
|
+
export interface ICvSurfXInfo {
|
|
40
|
+
/** 交点 */
|
|
41
|
+
point: Vec3;
|
|
42
|
+
/** 交点在曲线上的参数 */
|
|
43
|
+
curveT: number;
|
|
44
|
+
/** 交点在曲面上的参数uv */
|
|
45
|
+
surfaceUV: types.IXY;
|
|
46
|
+
/** 若是重合,返回重合段的交线的参数域 */
|
|
47
|
+
overlapRange?: Interval;
|
|
48
|
+
}
|
|
49
|
+
export interface ISurfaceSurfaceIntersectPointInfo {
|
|
50
|
+
point: Vec3;
|
|
51
|
+
uvPara1: types.IXY;
|
|
52
|
+
uvPara2: types.IXY;
|
|
53
|
+
isSingularity?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 曲面与曲面的求交信息
|
|
57
|
+
*/
|
|
58
|
+
export interface ISurfacesXInfo {
|
|
59
|
+
/** 交线 */
|
|
60
|
+
curve?: Curve3;
|
|
61
|
+
/** 交点(仅一点相交) */
|
|
62
|
+
point?: Vec3;
|
|
63
|
+
/** 交面(面面重合) */
|
|
64
|
+
surface?: Surface;
|
|
65
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { types } from '../../type_define/i_types';
|
|
2
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
3
|
+
import { Vec3 } from '../../base/vec3';
|
|
4
|
+
import { DiscreteParam } from '../../base/discrete_param';
|
|
5
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* 计算二维区域面积
|
|
9
|
+
*/
|
|
10
|
+
export declare class LoopArea {
|
|
11
|
+
/**
|
|
12
|
+
* 计算有序点所围成的二维区域面积
|
|
13
|
+
* http://en.wikipedia.org/wiki/Shoelace_formula
|
|
14
|
+
* @param pts
|
|
15
|
+
*/
|
|
16
|
+
static areaOfPoints(pts: types.IXY[]): number;
|
|
17
|
+
/**
|
|
18
|
+
* 计算二维曲线所围成的区域面积
|
|
19
|
+
* https://en.wikipedia.org/wiki/Green%27s_theorem
|
|
20
|
+
* @param loop
|
|
21
|
+
*/
|
|
22
|
+
static areaOfLoop(loop: Curve2[]): number;
|
|
23
|
+
/**
|
|
24
|
+
* 计算有序点列在投影方向围成的区域面积
|
|
25
|
+
* @param pts 三维点序列
|
|
26
|
+
* @param refDir 参考方向向量
|
|
27
|
+
*/
|
|
28
|
+
static areaOfPoint3ds(points: types.IXYZ[], refDir: Vec3): number;
|
|
29
|
+
/**
|
|
30
|
+
* 计算有序点列的区域面积向量。向量方向为多边形最大投影面积方向,长度为该投影面积
|
|
31
|
+
* @param points
|
|
32
|
+
*/
|
|
33
|
+
static areaVectorOfPoint3ds(points: types.IXYZ[]): Vec3;
|
|
34
|
+
/**
|
|
35
|
+
* 用离散的方法计算有序曲线组的区域面积向量。向量方向为多边形最大投影面积方向,长度为该投影面积
|
|
36
|
+
* @param curves
|
|
37
|
+
* @param discreteParam
|
|
38
|
+
*/
|
|
39
|
+
static areaVectorOfCurve3ds(curves: Curve3[], discreteParam?: DiscreteParam): Vec3;
|
|
40
|
+
private static _areaOfCurve2d;
|
|
41
|
+
/**
|
|
42
|
+
* 返回三角形的面积
|
|
43
|
+
* 注意:p1 p2 会被用作临时变量而发生变化
|
|
44
|
+
* @param p1
|
|
45
|
+
* @param p2
|
|
46
|
+
* @param p3
|
|
47
|
+
*/
|
|
48
|
+
private static _areaOfTriangle;
|
|
49
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { types } from '../../type_define/i_types';
|
|
2
|
+
import { Vec2 } from '../../base/vec2';
|
|
3
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
4
|
+
import { Vec3 } from '../../base/vec3';
|
|
5
|
+
import { DiscreteParam } from '../../base/discrete_param';
|
|
6
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* 计算二维区域形心
|
|
10
|
+
*/
|
|
11
|
+
export declare class LoopCentroid {
|
|
12
|
+
/**
|
|
13
|
+
* 计算有序点所围成的二维区域的形心
|
|
14
|
+
* https://en.wikipedia.org/wiki/Centroid#CITEREFBourke1997
|
|
15
|
+
* @param pts
|
|
16
|
+
* @param tol
|
|
17
|
+
*/
|
|
18
|
+
static centroidOfPoints(pts: types.IXY[], tol?: number): Vec2;
|
|
19
|
+
/**
|
|
20
|
+
* 计算二维曲线所围成的区域形心
|
|
21
|
+
* @param loop
|
|
22
|
+
*/
|
|
23
|
+
static centroidOfLoop(loop: Curve2[], areaEps?: number): Vec2;
|
|
24
|
+
static centroidOfPoint3ds(pts: types.IXYZ[], areaEps?: number): Vec3;
|
|
25
|
+
static centroidInfoOfPoint3ds(pts: types.IXYZ[], areaEps?: number): {
|
|
26
|
+
centroid: Vec3;
|
|
27
|
+
area: number;
|
|
28
|
+
areaNormal: Vec3;
|
|
29
|
+
};
|
|
30
|
+
static centroidOfCurve3ds(curves: Curve3[], discreteParam?: DiscreteParam, areaEps?: number): Vec3;
|
|
31
|
+
static centroidInfoOfCurve3ds(curves: Curve3[], discreteParam?: DiscreteParam, areaEps?: number): {
|
|
32
|
+
centroid: Vec3;
|
|
33
|
+
area: number;
|
|
34
|
+
areaNormal: Vec3;
|
|
35
|
+
};
|
|
36
|
+
private static _integralForCurve2d;
|
|
37
|
+
private static _integralForLine2d;
|
|
38
|
+
private static _integralForPoints;
|
|
39
|
+
private static _integralForArc2d;
|
|
40
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Ln2 } from '../../geometry/ln2';
|
|
2
|
+
import { Vec2 } from '../../base/vec2';
|
|
3
|
+
import { types } from '../../type_define/i_types';
|
|
4
|
+
export declare class HalfPlane {
|
|
5
|
+
static createByLine2d(line: Ln2): HalfPlane;
|
|
6
|
+
w: types.IXY;
|
|
7
|
+
b: number;
|
|
8
|
+
constructor(w: types.IXY, b: types.IXY | number);
|
|
9
|
+
get normal(): Vec2;
|
|
10
|
+
distance(p: types.IXY): number;
|
|
11
|
+
clone(): HalfPlane;
|
|
12
|
+
toLine2d(): Ln2;
|
|
13
|
+
offset(c: number): HalfPlane;
|
|
14
|
+
intersect(h: HalfPlane): types.IXY;
|
|
15
|
+
parallel(h: HalfPlane, tol?: number): boolean;
|
|
16
|
+
dump(): {
|
|
17
|
+
w: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
b: number;
|
|
22
|
+
};
|
|
23
|
+
load(data: any): HalfPlane;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
2
|
+
import { Ln2 } from '../../geometry/ln2';
|
|
3
|
+
import { IMergeCurveInfo } from '../geometry_merge';
|
|
4
|
+
export declare class MergeCurve {
|
|
5
|
+
/**
|
|
6
|
+
* 仅支持 arc 和 line
|
|
7
|
+
* 默认容差为1e-6
|
|
8
|
+
*/
|
|
9
|
+
static mergeCurve2d(curves: Curve2[], distol?: number): Curve2[];
|
|
10
|
+
static mergeCurve2dEx(curves: Curve2[], distol?: number): IMergeCurveInfo;
|
|
11
|
+
static mergeCurveLine2d(curves: Curve2[], distol: number): Curve2[];
|
|
12
|
+
static mergeCurveLine2dEx(lines: Ln2[], distol: number): IMergeCurveInfo;
|
|
13
|
+
static mergeArc2d(curves: Curve2[], eps?: number): IMergeCurveInfo;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class Disjoint {
|
|
2
|
+
set: number[];
|
|
3
|
+
constructor();
|
|
4
|
+
clear(): void;
|
|
5
|
+
find(a: number): number;
|
|
6
|
+
merge(a: number, b: number): void;
|
|
7
|
+
}
|
|
8
|
+
export declare class MergePoint {
|
|
9
|
+
private _tmp;
|
|
10
|
+
private _disjoint;
|
|
11
|
+
constructor();
|
|
12
|
+
clear(): void;
|
|
13
|
+
merge(points: ([number, number] | [number, number, number])[], tol?: number): {
|
|
14
|
+
index: number[];
|
|
15
|
+
points: ([number, number] | [number, number, number])[];
|
|
16
|
+
};
|
|
17
|
+
private _mergeex;
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { types } from '../../type_define/i_types';
|
|
2
|
+
import { Plane } from '../../geometry/plane';
|
|
3
|
+
import { Polygon } from '../../topology/polygon';
|
|
4
|
+
export interface IMeshClipResult {
|
|
5
|
+
clipped: boolean;
|
|
6
|
+
aboveMesh: types.IRenderMesh;
|
|
7
|
+
downMesh?: types.IRenderMesh;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 平面切Mesh
|
|
11
|
+
*/
|
|
12
|
+
export declare class ClipMesh {
|
|
13
|
+
/**
|
|
14
|
+
* 平面切mesh
|
|
15
|
+
* @param rn mesh
|
|
16
|
+
* @param plane 平面
|
|
17
|
+
* @param keepDoubleSide 保留平面两侧的mesh(默认只保留上方 keepDoubleSide = false)
|
|
18
|
+
* @param deleteCoplanar 删除共面的三角面片(default deleteCoplanar = true)
|
|
19
|
+
*/
|
|
20
|
+
static clipFaceMesh(rn: types.IRenderMesh, plane: Plane, keepDoubleSide?: boolean, deleteCoplanar?: boolean): IMeshClipResult;
|
|
21
|
+
static meshPlaneIntersect(rn: types.IRenderMesh, plane: Plane): Polygon;
|
|
22
|
+
private static _calIntersectInfo;
|
|
23
|
+
private static _getVertexInfo;
|
|
24
|
+
private static _cloneRenderMesh;
|
|
25
|
+
private static _calNormal;
|
|
26
|
+
private static _reorderPts;
|
|
27
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { Loop, Ln2, Ln3, Matrix4, Box2, Box3, Vec3 } from '../..';
|
|
2
|
+
import { types } from '../../type_define/i_types';
|
|
3
|
+
import { Coord3 } from '../../base/coord3';
|
|
4
|
+
declare enum PositionType {
|
|
5
|
+
inner = -1,
|
|
6
|
+
on = 0,
|
|
7
|
+
outer = 1
|
|
8
|
+
}
|
|
9
|
+
export interface ITypedTriangleVertex {
|
|
10
|
+
type: PositionType;
|
|
11
|
+
pos: types.IXYZ;
|
|
12
|
+
}
|
|
13
|
+
interface IVertex {
|
|
14
|
+
v: types.IXYZ;
|
|
15
|
+
n: types.IXYZ;
|
|
16
|
+
uv: types.IXY;
|
|
17
|
+
uv1?: types.IXY;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 1. 草图不能包含曲线,如果存在曲线,需事先做离散处理
|
|
21
|
+
* 2. 草图不能为凹,如果遇到草图为凹的情况,需事先将草图拆分为多个凸多边形处理
|
|
22
|
+
*/
|
|
23
|
+
export declare class Extruder {
|
|
24
|
+
private _coord;
|
|
25
|
+
private _loop;
|
|
26
|
+
private _height;
|
|
27
|
+
private _localLine3dsCache;
|
|
28
|
+
private _line2dsCache;
|
|
29
|
+
private _planeCache;
|
|
30
|
+
boundingBox2: Box2;
|
|
31
|
+
curveBoundingBoxList: Box2[];
|
|
32
|
+
private _boundingBox3;
|
|
33
|
+
private _lpts;
|
|
34
|
+
constructor(_c: Coord3, _l: Loop, _h: number);
|
|
35
|
+
/**
|
|
36
|
+
* 草图轮廓
|
|
37
|
+
*/
|
|
38
|
+
get loop(): Loop;
|
|
39
|
+
/**
|
|
40
|
+
* 平面原点
|
|
41
|
+
*/
|
|
42
|
+
get origin(): Vec3;
|
|
43
|
+
/**
|
|
44
|
+
* 平面法向
|
|
45
|
+
*/
|
|
46
|
+
get normal(): Vec3;
|
|
47
|
+
/**
|
|
48
|
+
* 三维包围盒
|
|
49
|
+
* */
|
|
50
|
+
get localBoundingBox3(): Box3;
|
|
51
|
+
get worldBoundingBox3(): Box3;
|
|
52
|
+
get localLine3ds(): Ln3[];
|
|
53
|
+
get line2ds(): Ln2[];
|
|
54
|
+
get height(): number;
|
|
55
|
+
get world2localMatrix(): Matrix4;
|
|
56
|
+
get local2worldMatrix(): Matrix4;
|
|
57
|
+
/**
|
|
58
|
+
* 所有角点在世界坐标系中的位置
|
|
59
|
+
*/
|
|
60
|
+
get worldCorners(): types.IXYZ[];
|
|
61
|
+
/**
|
|
62
|
+
* 所有角点在草图平面局部坐标系中的位置
|
|
63
|
+
*/
|
|
64
|
+
get localCorners(): types.IXYZ[];
|
|
65
|
+
/**
|
|
66
|
+
* 将mesh变换到局部坐标系下
|
|
67
|
+
*/
|
|
68
|
+
transformWorldMesh2Local(mesh: types.IFlatMeshPlus): types.IFlatMeshPlus;
|
|
69
|
+
/**
|
|
70
|
+
* 将本地坐标系下的mesh转换到世界坐标系
|
|
71
|
+
*/
|
|
72
|
+
transformLocalMesh2World(mesh: types.IFlatMesh): types.IFlatMesh;
|
|
73
|
+
private transformMesh;
|
|
74
|
+
getUVAt(pt: types.IXYZ): types.IXY;
|
|
75
|
+
intersect(mesh: types.IFlatMesh, localcoordinate?: boolean): boolean;
|
|
76
|
+
edgeBoxInterTri(vertex1: IVertex, vertex2: IVertex, vertex3: IVertex): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 基于pnpoly算法判断点是否在多边形内部
|
|
79
|
+
* @param point
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
inside(point: types.IXY): boolean;
|
|
83
|
+
log(): void;
|
|
84
|
+
}
|
|
85
|
+
export declare class ExtrudeClip {
|
|
86
|
+
static tol: number;
|
|
87
|
+
/**
|
|
88
|
+
* 入口:针对硬装背景墙定制接口,所有的face以mesh数组的形式传入、传出,但是补面则以独立mesh传出
|
|
89
|
+
* @param extruder 拉伸体
|
|
90
|
+
* @param meshes 待裁切的mesh集合
|
|
91
|
+
* @param option transformed - 是否已经变换到extruder的局部坐标系之下 fill: 是否需要补面
|
|
92
|
+
* @return clipped - 和传入的mesh一一对应 patch - 补面结果
|
|
93
|
+
*/
|
|
94
|
+
static multiClip(extruder: Extruder, meshes: types.IFlatMesh[], option?: {
|
|
95
|
+
transformed?: boolean;
|
|
96
|
+
fill?: boolean;
|
|
97
|
+
}): {
|
|
98
|
+
clipped: types.IFlatMesh[];
|
|
99
|
+
patch?: types.IFlatMesh;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* 入口:拉伸体切割mesh。尽量在外部将mesh转换到extruder的局部坐标系内
|
|
103
|
+
* @param extruder 拉伸体
|
|
104
|
+
* @param mesh 被切割mesh对象
|
|
105
|
+
* @param keepOuter true - 保留拉伸体外部的mesh false - 保留拉伸体内部的mesh
|
|
106
|
+
* @param option.transformed true - 输入mesh已经转换至extruder局部坐标系 false - 输入的mesh为世界坐标系,需在内部转换到局部坐标系
|
|
107
|
+
* @param option.fill true - 补面 false - 不补面
|
|
108
|
+
* @param option.faceEdgeMap 仅在multiClip时需要传入
|
|
109
|
+
*/
|
|
110
|
+
static clip(extruder: Extruder, mesh: types.IFlatMeshPlus, option?: {
|
|
111
|
+
transformed?: boolean;
|
|
112
|
+
fill?: boolean;
|
|
113
|
+
faceEdgeMap?: Map<Ln2, Ln3[]>;
|
|
114
|
+
}): types.IFlatMeshPlus;
|
|
115
|
+
/**
|
|
116
|
+
* 合并相同顶点
|
|
117
|
+
* @param faceMesh 传入facemesh
|
|
118
|
+
*/
|
|
119
|
+
private static mergeVertex;
|
|
120
|
+
/**
|
|
121
|
+
* 对切割后的mesh进行补面,默认mesh在extruder的局部坐标系下
|
|
122
|
+
* @param extruder 原拉伸体
|
|
123
|
+
* @param mesh 待切割mesh
|
|
124
|
+
*/
|
|
125
|
+
private static fillClip;
|
|
126
|
+
/**
|
|
127
|
+
* 将三角面片插入到mesh中
|
|
128
|
+
* @param tri 三角面片
|
|
129
|
+
* @param normal 法向
|
|
130
|
+
* @param uvTransform uv矩阵
|
|
131
|
+
* @param mesh 待插入的mesh
|
|
132
|
+
*/
|
|
133
|
+
private static insertTriangle;
|
|
134
|
+
/**
|
|
135
|
+
* 准备补面数据使用:计算边是否在草图轮廓线上
|
|
136
|
+
* @param line 局部坐标系下的二维草图轮廓线
|
|
137
|
+
* @param v1 起点
|
|
138
|
+
* @param v2 终点
|
|
139
|
+
* @returns
|
|
140
|
+
*/
|
|
141
|
+
private static calcLinePlaneEdge;
|
|
142
|
+
/**
|
|
143
|
+
* 切割三角面片,得到切割后的三角面片
|
|
144
|
+
* 待优化:一次计算好三角面片的顶点顺序,避免矫正
|
|
145
|
+
*/
|
|
146
|
+
private static cutTriangle;
|
|
147
|
+
/**
|
|
148
|
+
* 垂直于草图平面的三角面片被拉伸体切割算法
|
|
149
|
+
* @param extruder 拉伸体
|
|
150
|
+
* @param v1 顶点1
|
|
151
|
+
* @param v2 顶点2
|
|
152
|
+
* @param v3 顶点3
|
|
153
|
+
* @returns 切割后的三角面片
|
|
154
|
+
*/
|
|
155
|
+
private static cutVerticalTriangle;
|
|
156
|
+
/**
|
|
157
|
+
* 三角面片被平面上的线条代表的拉伸矩形区域切割
|
|
158
|
+
* @param extruder 拉伸体
|
|
159
|
+
* @param triPlane 三角面片所在的平面
|
|
160
|
+
* @param vertex1 顶点1
|
|
161
|
+
* @param vertex2 顶点2
|
|
162
|
+
* @param vertex3 顶点3
|
|
163
|
+
* @param cutLines 代表切割区域的线条
|
|
164
|
+
* @returns 切割结果
|
|
165
|
+
*/
|
|
166
|
+
private static cutVerticalTriangleByLines;
|
|
167
|
+
/**
|
|
168
|
+
* 非垂直于草图平面的三角面片被拉伸体切割算法
|
|
169
|
+
* 投影后求交,重新三角化
|
|
170
|
+
* @param extruder 拉伸体
|
|
171
|
+
* @param v1 顶点1
|
|
172
|
+
* @param v2 顶点2
|
|
173
|
+
* @param v3 顶点3
|
|
174
|
+
* @returns 切割后的三角面片
|
|
175
|
+
*/
|
|
176
|
+
private static cutInVerticalTriangle;
|
|
177
|
+
/**
|
|
178
|
+
* 纠正三角面片的方向
|
|
179
|
+
* @param vtx 三角面片的顶点
|
|
180
|
+
* @param dir 基准方向: 必须是单位向量
|
|
181
|
+
*/
|
|
182
|
+
private static reviseTriangleDir;
|
|
183
|
+
/**
|
|
184
|
+
* 给定三角面片的三个顶点,计算面积
|
|
185
|
+
* @param v1 顶点1
|
|
186
|
+
* @param v2 顶点2
|
|
187
|
+
* @param v3 顶点3
|
|
188
|
+
*/
|
|
189
|
+
private static calcTriangleArea;
|
|
190
|
+
/**
|
|
191
|
+
* 获取归一化的三角面片法向
|
|
192
|
+
* @param v1 第一个顶点
|
|
193
|
+
* @param v2 第二个顶点
|
|
194
|
+
* @param v3 第三个顶点
|
|
195
|
+
* @returns 法向 - 单位化
|
|
196
|
+
*/
|
|
197
|
+
private static getTriangleNorm;
|
|
198
|
+
/**
|
|
199
|
+
* 给定三角面片,计算其对应的uvTransform矩阵
|
|
200
|
+
* @param vertex1
|
|
201
|
+
* @param vertex2
|
|
202
|
+
* @param vertex3
|
|
203
|
+
*/
|
|
204
|
+
private static getTriangleUVTransform;
|
|
205
|
+
/**
|
|
206
|
+
* 对xyz坐标进行矩阵变换
|
|
207
|
+
* @param v 坐标点
|
|
208
|
+
* @param mt 变换矩阵
|
|
209
|
+
*/
|
|
210
|
+
private static transformXYZ;
|
|
211
|
+
/**
|
|
212
|
+
* 求顶点的uv值
|
|
213
|
+
* @param v 顶点坐标
|
|
214
|
+
* @param uvTransform 变换矩阵
|
|
215
|
+
*/
|
|
216
|
+
private static getUVByUVTransform;
|
|
217
|
+
/**
|
|
218
|
+
* 基于分割关系求uv
|
|
219
|
+
* @param v 带求顶点
|
|
220
|
+
* @param vertex1 原三角面片顶点1
|
|
221
|
+
* @param vertex2 原三角面片顶点2
|
|
222
|
+
* @param vertex3 原三角面片顶点3
|
|
223
|
+
*/
|
|
224
|
+
private static getUVBySplit;
|
|
225
|
+
private static sameDirection;
|
|
226
|
+
private static crossVector3;
|
|
227
|
+
private static V3SQLength;
|
|
228
|
+
/**
|
|
229
|
+
* 判断两个顶点是否共点
|
|
230
|
+
* @param va 顶点a
|
|
231
|
+
* @param vb 顶点b
|
|
232
|
+
* @returns
|
|
233
|
+
*/
|
|
234
|
+
private static sameVertex;
|
|
235
|
+
}
|
|
236
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Coord3 } from '../../base/coord3';
|
|
2
|
+
import { types } from '../../type_define/i_types';
|
|
3
|
+
export declare class MeshAssist {
|
|
4
|
+
static getEdgeNeighbourMap(faces: number[]): Map<number, number>;
|
|
5
|
+
/**
|
|
6
|
+
* 从给定的 seedF0s 出发,通过相邻关系找到满足条件的面片
|
|
7
|
+
* @param faces 原始面片集
|
|
8
|
+
* @param newFaces 找到的面片会添加到该数组中
|
|
9
|
+
* @param seedF0s 种子面片的 face 序号
|
|
10
|
+
* @param isF0Valid 面片是否满足条件
|
|
11
|
+
* @returns 返回添加的面片在原面片集中的序号(包含种子面片)
|
|
12
|
+
*/
|
|
13
|
+
static pickNeighbourFaces(faces: number[], newFaces: number[], seedF0s: number[], isF0Valid: (fj0: number) => boolean, edgeNeighbourMap?: Map<number, number>): Set<number>;
|
|
14
|
+
/**
|
|
15
|
+
* 根据 nextMap,将对应点投影到 coord 平面上,生成一系列多边形
|
|
16
|
+
* @param mesh
|
|
17
|
+
* @param nextMap
|
|
18
|
+
* @param coord
|
|
19
|
+
*/
|
|
20
|
+
static getLoop2ds(mesh: types.IFlatMesh, nextMap: Map<number, number[]>, coord: Coord3): types.IXY[][][];
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { types } from '../../type_define/i_types';
|
|
2
|
+
export declare class MeshContour {
|
|
3
|
+
static execute(mesh: types.IFlatMesh): types.IXY[][][];
|
|
4
|
+
static getUpMesh(mesh: types.IFlatMesh): types.IFlatMesh[];
|
|
5
|
+
/**
|
|
6
|
+
* 在投影平面上
|
|
7
|
+
* @param mesh
|
|
8
|
+
* @param point
|
|
9
|
+
*/
|
|
10
|
+
static getHeightAtProjectPoint(mesh: types.IFlatMesh, point: types.IXY): number[];
|
|
11
|
+
private static _isFacesUp;
|
|
12
|
+
private static _splitMesh;
|
|
13
|
+
private static _getOuterLoop;
|
|
14
|
+
private static _idFiMap2NextMap;
|
|
15
|
+
private static _filterLoops;
|
|
16
|
+
/**
|
|
17
|
+
* 对 mesh 排序,返回的 mesh 数组按从下到上排序
|
|
18
|
+
* @param meshes
|
|
19
|
+
* @param outerLoops
|
|
20
|
+
*/
|
|
21
|
+
private static _sortMeshes;
|
|
22
|
+
private static _isMeshLower;
|
|
23
|
+
private static _mixContours;
|
|
24
|
+
private static _filterSmallLoops;
|
|
25
|
+
private static _getArea;
|
|
26
|
+
}
|