@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,24 @@
|
|
|
1
|
+
import { PtLoopPJType } from './pj_type';
|
|
2
|
+
import { Vec2 } from '../../base/vec2';
|
|
3
|
+
import { Loop } from '../../topology/loop';
|
|
4
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* 点与Loop的位置关系判断
|
|
8
|
+
* [参考文献](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.88.5498&rep=rep1&type=pdf)
|
|
9
|
+
*/
|
|
10
|
+
declare class PtLoopPJ {
|
|
11
|
+
/**
|
|
12
|
+
* @param point
|
|
13
|
+
* @param loop
|
|
14
|
+
* @param tolerance
|
|
15
|
+
* @returns `CurvesPJType`
|
|
16
|
+
*/
|
|
17
|
+
static execute(pt: Vec2, loop: Loop, eps?: number): {
|
|
18
|
+
type: PtLoopPJType;
|
|
19
|
+
curve?: Curve2;
|
|
20
|
+
};
|
|
21
|
+
private static _dealHorizontalLineLoop;
|
|
22
|
+
private static _getRefPt;
|
|
23
|
+
}
|
|
24
|
+
export { PtLoopPJ };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PtLoopPJType } from './pj_type';
|
|
2
|
+
import { Vec2 } from '../../base/vec2';
|
|
3
|
+
import { Polygon } from '../../topology/polygon';
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* 点和PolygonEx的位置关系判断
|
|
7
|
+
*/
|
|
8
|
+
export declare class PtPolygonPJ {
|
|
9
|
+
/**
|
|
10
|
+
* 点与Polygon的位置关系判断
|
|
11
|
+
*
|
|
12
|
+
* @param point
|
|
13
|
+
* @param polygon
|
|
14
|
+
* @param tolerance
|
|
15
|
+
* @returns `CurvesPJType`
|
|
16
|
+
*/
|
|
17
|
+
static execute(pt: Vec2, polygon: Polygon, tolerance?: number): PtLoopPJType;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { types } from '../../type_define/i_types';
|
|
2
|
+
import { PtLoopPJType } from './pj_type';
|
|
3
|
+
/**
|
|
4
|
+
* 仅用于点和多边形的内外关系判断
|
|
5
|
+
* 通过对边的排序,使得对多个点的判断效率为 O(n log(m)),n为点数,m为边数
|
|
6
|
+
*/
|
|
7
|
+
export declare class PtPolygonPositionJudger {
|
|
8
|
+
private _tree;
|
|
9
|
+
constructor(pointLoops: types.IXY[][]);
|
|
10
|
+
judge(point: types.IXY, eps?: number): PtLoopPJType;
|
|
11
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { CurvesPJType, LoopsPJType, PtLoopPJType } from './pj/pj_type';
|
|
2
|
+
import { Vec } from '../base/vec';
|
|
3
|
+
import { Curve } from '../geometry/curve';
|
|
4
|
+
import { Vec3 } from '../base/vec3';
|
|
5
|
+
import { Plane } from '../geometry/plane';
|
|
6
|
+
import { Loop } from '../topology/loop';
|
|
7
|
+
import { Vec2 } from '../base/vec2';
|
|
8
|
+
import { Polygon } from '../topology/polygon';
|
|
9
|
+
import { Curve2 } from '../geometry/curve2';
|
|
10
|
+
export interface IPtLoopResult {
|
|
11
|
+
type: PtLoopPJType;
|
|
12
|
+
curve?: Curve2;
|
|
13
|
+
}
|
|
14
|
+
declare class PJ {
|
|
15
|
+
/**
|
|
16
|
+
* 点是否在平面的右侧,
|
|
17
|
+
*
|
|
18
|
+
* 规定:点在平面法线一侧为右侧,否则为左侧
|
|
19
|
+
*
|
|
20
|
+
* @param point 任意一点
|
|
21
|
+
* @param plane 任意平面
|
|
22
|
+
*/
|
|
23
|
+
static isPtAbovePlane(point: Vec3, plane: Plane): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 曲线与曲线的位置关系判断:相交,重叠,不相交。
|
|
26
|
+
* 支持 直线和圆弧
|
|
27
|
+
* @param curve1
|
|
28
|
+
* @param curve2
|
|
29
|
+
* @param tolerance
|
|
30
|
+
* @returns `CurvesPJType`
|
|
31
|
+
*/
|
|
32
|
+
static curveToCurve<PointType extends Vec>(curve1: Curve<PointType>, curve2: Curve<PointType>, distanceTol?: number, angleTol?: number): CurvesPJType;
|
|
33
|
+
/**
|
|
34
|
+
* 曲线和曲线是否重叠关系判断:不重叠,重叠,部分重叠
|
|
35
|
+
* 支持直线、圆弧
|
|
36
|
+
* @param curve1
|
|
37
|
+
* @param curve2
|
|
38
|
+
* @param distanceTol
|
|
39
|
+
* @param angleTol
|
|
40
|
+
*/
|
|
41
|
+
static curvesOverlap<PointType extends Vec>(curve1: Curve<PointType>, curve2: Curve<PointType>, distanceTol?: number, angleTol?: number): CurvesPJType;
|
|
42
|
+
/**
|
|
43
|
+
* 点与Loop的位置关系判断:ONEDGE, ONVERTEX,IN,OUT
|
|
44
|
+
*
|
|
45
|
+
* @param point
|
|
46
|
+
* @param loop
|
|
47
|
+
* @param tolerance
|
|
48
|
+
* @returns `CurvesPJType`
|
|
49
|
+
*/
|
|
50
|
+
static ptToLoop(pt: Vec2, loop: Loop, tolerance?: number): IPtLoopResult;
|
|
51
|
+
/**
|
|
52
|
+
* 点与Polygon的位置关系判断
|
|
53
|
+
*
|
|
54
|
+
* @param point
|
|
55
|
+
* @param Polygon
|
|
56
|
+
* @param tol
|
|
57
|
+
* @returns `CurvesPJType`
|
|
58
|
+
*/
|
|
59
|
+
static ptToPolygon(pt: Vec2, polygon: Polygon, tol?: number): PtLoopPJType;
|
|
60
|
+
/**
|
|
61
|
+
* Loop1与Loop2的位置关系判断:相离、外切、相交、内切、包含
|
|
62
|
+
* 逆时针的环为外环,顺时针的环为内环
|
|
63
|
+
*
|
|
64
|
+
* @param curve 2d曲线
|
|
65
|
+
* @param loop
|
|
66
|
+
* @param tolerance
|
|
67
|
+
* @param tangentIsIntersect 如果是true将内切和外切的情况判断为intersect;如果是false,则外切的情况认为是out,内切的情况认为是contain或者in。默认为false
|
|
68
|
+
* @returns `CurvesPJType`
|
|
69
|
+
*/
|
|
70
|
+
static loopToLoop(loop1: Loop, loop2: Loop, tol?: number, tangentIsIntersect?: boolean): LoopsPJType;
|
|
71
|
+
}
|
|
72
|
+
export { PJ };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Plane } from '../../geometry/plane';
|
|
2
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
3
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
4
|
+
import { Tol } from '../../base/tol';
|
|
5
|
+
export declare class Curve3ProjectToPlane {
|
|
6
|
+
private _plane;
|
|
7
|
+
private _curve;
|
|
8
|
+
private _tol;
|
|
9
|
+
constructor(curve: Curve3, plane: Plane, tol?: Tol);
|
|
10
|
+
execute(): Curve2 | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Interval } from '../../base/interval';
|
|
2
|
+
import { ILine } from '../../type_define/i_geometry';
|
|
3
|
+
import { Vec } from '../../base/vec';
|
|
4
|
+
/**
|
|
5
|
+
* curve1 向 curve2 投影,返回一个区间,该区间代表投影后的线在 curve2 参数域上的区间
|
|
6
|
+
*/
|
|
7
|
+
export declare class CurvesProject {
|
|
8
|
+
static lines<VectorType extends Vec>(line1: ILine<VectorType>, line2: ILine<VectorType>): Interval;
|
|
9
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Loop } from '../../topology/loop';
|
|
2
|
+
interface INestedLoop {
|
|
3
|
+
loop: ILoop;
|
|
4
|
+
nesting: INestedLoop[];
|
|
5
|
+
level: number;
|
|
6
|
+
isCCW: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface ILoop {
|
|
9
|
+
reverse(): any;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Polygon变成PolygonEx
|
|
13
|
+
*/
|
|
14
|
+
export declare class ILoopsToPolygonExes {
|
|
15
|
+
/**
|
|
16
|
+
* 根据Polygon内部环的嵌套包含关系,将Polygon拆分成polygonEx
|
|
17
|
+
* 条件:Polygon环之间不相交
|
|
18
|
+
* @param polygon
|
|
19
|
+
* @param keepPositive 是否保持结果都是正向的(外环逆时针,内环顺时针)
|
|
20
|
+
* @param considerLoopDir 是否考虑环之间的相对方向(如果不考虑,则会将所有的直接子环作为内环,如果考虑,则只会将方向相反的直接子环作为内环)
|
|
21
|
+
* @param convertToLoop 转换成Loop的方法
|
|
22
|
+
*/
|
|
23
|
+
static execute<T>(polygon: ILoop[], keepPositive: boolean, considerLoopDir?: boolean, convertToLoop?: (iLoop: T) => Loop): T[][];
|
|
24
|
+
static getNestedLoops(loops: ILoop[], convertToLoop: (iLoop: ILoop) => Loop): INestedLoop[];
|
|
25
|
+
static createFaces(nestedLoop: INestedLoop, considerLoopDir: boolean, usedLoopMap: Map<ILoop, boolean>, newFaces: INestedLoop[][]): void;
|
|
26
|
+
private static _loopContainsLoop;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Loop } from '../../topology/loop';
|
|
2
|
+
import { Polygon } from '../../topology/polygon';
|
|
3
|
+
/**
|
|
4
|
+
* 根据包含关系创建的loop树节点
|
|
5
|
+
*/
|
|
6
|
+
declare class LoopTreeNode {
|
|
7
|
+
children: LoopTreeNode[];
|
|
8
|
+
data?: Loop;
|
|
9
|
+
addToChild(node: LoopTreeNode): void;
|
|
10
|
+
isPolygonValid(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 转成一个合法的polygon
|
|
13
|
+
*/
|
|
14
|
+
makeValid(isAntiClock: boolean): void;
|
|
15
|
+
/**
|
|
16
|
+
* 搜集所有的loop
|
|
17
|
+
*/
|
|
18
|
+
collectLoops(loops: Loop[]): void;
|
|
19
|
+
/**
|
|
20
|
+
* 搜集所有的loop
|
|
21
|
+
*/
|
|
22
|
+
collectHoles(polygons: Polygon[]): void;
|
|
23
|
+
/**
|
|
24
|
+
* 搜集所有的PolygonExes
|
|
25
|
+
*/
|
|
26
|
+
collectNewPolygonExes(polygons: Polygon[]): void;
|
|
27
|
+
private _makeClockwise;
|
|
28
|
+
private _makeAnticlockwise;
|
|
29
|
+
}
|
|
30
|
+
export { LoopTreeNode };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LoopTreeNode } from './loop_tree_node';
|
|
2
|
+
import { Loop } from '../../topology/loop';
|
|
3
|
+
/**
|
|
4
|
+
* 根据包含关系,将loop[],组成polygon
|
|
5
|
+
*/
|
|
6
|
+
declare class LoopsToLoopTreeSearchGraph {
|
|
7
|
+
static scale: number;
|
|
8
|
+
/**
|
|
9
|
+
* 根据包含关系,将loop[],组成polygon
|
|
10
|
+
* @param curve
|
|
11
|
+
* @param polygon
|
|
12
|
+
*/
|
|
13
|
+
static execute(loops: Loop[]): LoopTreeNode;
|
|
14
|
+
private static _ptToKey;
|
|
15
|
+
private static _ptsToKey;
|
|
16
|
+
private static _polyTreeToLoopTree;
|
|
17
|
+
/**
|
|
18
|
+
* clipper布尔运算时会自动合并边,并且会圆整整数,因此采用一个点去拓扑追踪原来的环
|
|
19
|
+
* @param path
|
|
20
|
+
* @param originLoops
|
|
21
|
+
* @param loops
|
|
22
|
+
*/
|
|
23
|
+
private static _findLoop;
|
|
24
|
+
}
|
|
25
|
+
export { LoopsToLoopTreeSearchGraph };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Polygon } from '../../topology/polygon';
|
|
2
|
+
/**
|
|
3
|
+
* Polygon变成PolygonEx
|
|
4
|
+
*/
|
|
5
|
+
export declare class PolygonToPolygonExes {
|
|
6
|
+
/**
|
|
7
|
+
* 根据Polygon内部环的嵌套包含关系,将Polygon拆分成polygonEx
|
|
8
|
+
* 条件:Polygon环之间不相交
|
|
9
|
+
* @param polygon
|
|
10
|
+
* @returns polygon[]
|
|
11
|
+
*/
|
|
12
|
+
static execute(polygon: Polygon): Polygon[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
2
|
+
import { Loop } from '../../topology/loop';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* 搜索环
|
|
6
|
+
*/
|
|
7
|
+
export declare class SearchLoop2D {
|
|
8
|
+
/**
|
|
9
|
+
* 从输入的有向曲线中找到所有的最小环
|
|
10
|
+
* 条件:曲线已经求交打断过的,且没有同向完全重叠的曲线
|
|
11
|
+
* @param curve2ds 输入的有向曲线
|
|
12
|
+
* @param bMin true -> 找最小环, false -> 找最大环
|
|
13
|
+
* @param distTol 距离容差
|
|
14
|
+
*/
|
|
15
|
+
static execute(curve2ds: Curve2[], bMin: boolean, distTol?: number): Loop[];
|
|
16
|
+
private static _findMaxTurning2D;
|
|
17
|
+
private static _getAppropriateUnitStepLength;
|
|
18
|
+
private static _calcStepAngle;
|
|
19
|
+
private static _getAppropriateParamStep;
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
2
|
+
import { PolyCurve } from '../../topology/polycurve';
|
|
3
|
+
import { Loop } from '../../topology/loop';
|
|
4
|
+
/**
|
|
5
|
+
* 搜索简单Polyline,简单Polyline就是Coedge只在端点处相交,且交点最多连接2条线
|
|
6
|
+
*/
|
|
7
|
+
export declare class SearchSimpleLoop {
|
|
8
|
+
static execute(_curve2ds: Curve2[], tolerance?: number): (PolyCurve | Loop)[];
|
|
9
|
+
private static _findAndRemoveLongestCurve;
|
|
10
|
+
private static _findAndRemoveNextCurve;
|
|
11
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Curve2 } from '../geometry/curve2';
|
|
2
|
+
import { Polygon } from '../topology/polygon';
|
|
3
|
+
import { Loop } from '../topology/loop';
|
|
4
|
+
import { PolyCurve } from '../topology/polycurve';
|
|
5
|
+
/**
|
|
6
|
+
* 搜索算法:搜环,搜polygon,搜洞
|
|
7
|
+
*/
|
|
8
|
+
declare class SearchGraph {
|
|
9
|
+
/**
|
|
10
|
+
* 从一堆有向的曲线中搜索环
|
|
11
|
+
* @param curves
|
|
12
|
+
* @param bMin true则找到最小环,false则找到最大环
|
|
13
|
+
* @param distanceTol
|
|
14
|
+
*/
|
|
15
|
+
static searchLoop2D(curves: Curve2[], bMin: boolean, distanceTol?: number): Loop[];
|
|
16
|
+
/**
|
|
17
|
+
* 搜索简单环
|
|
18
|
+
* 假设输入的曲线中,每个连接点处,最多只有两个曲线
|
|
19
|
+
* @param curves
|
|
20
|
+
* @param polygon
|
|
21
|
+
*/
|
|
22
|
+
static simpleLoop(curves: Curve2[], tolerance?: number): (PolyCurve | Loop)[];
|
|
23
|
+
/**
|
|
24
|
+
* 输入一堆线,按包含关系搜索出合法polygon
|
|
25
|
+
* 假设输入的曲线中,每个连接点处,最多只有两个曲线
|
|
26
|
+
* @param curves
|
|
27
|
+
* @param polygon
|
|
28
|
+
*/
|
|
29
|
+
static simplePolygon(curves: Curve2[], tolerance?: number): Polygon | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* 根据包含关系,将loop[],组成polygonEx
|
|
32
|
+
* 条件:环之间不相交
|
|
33
|
+
* @param loops
|
|
34
|
+
* @returns polygon[]
|
|
35
|
+
*/
|
|
36
|
+
static loopsToPolygonExes(loops: Loop[]): Polygon[];
|
|
37
|
+
/**
|
|
38
|
+
* 根据包含关系,将polygon,组成polygonEx
|
|
39
|
+
* 条件:Polygon环之间不相交
|
|
40
|
+
* @param polygon
|
|
41
|
+
* @returns polygon[]
|
|
42
|
+
*/
|
|
43
|
+
static polygonToPolygonExes(polygon: Polygon): Polygon[];
|
|
44
|
+
}
|
|
45
|
+
export { SearchGraph };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Loop } from '../topology/loop';
|
|
2
|
+
import { Polygon } from '../topology/polygon';
|
|
3
|
+
export declare class TopologyEdit {
|
|
4
|
+
/**
|
|
5
|
+
* 只支持一个外环多个内环,不支持多个外环
|
|
6
|
+
* @param polygon 要分割的polygon
|
|
7
|
+
*/
|
|
8
|
+
static splitPolygonRegion(polygon: Polygon): Loop;
|
|
9
|
+
private static _splitLoopLoopRegion;
|
|
10
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Vec } from './vec';
|
|
2
|
+
import { types } from '../type_define/i_types';
|
|
3
|
+
/**
|
|
4
|
+
* AABB包围盒
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class Box<PointType extends Vec> {
|
|
7
|
+
max: PointType;
|
|
8
|
+
min: PointType;
|
|
9
|
+
constructor();
|
|
10
|
+
abstract clone(): Box<PointType>;
|
|
11
|
+
/**
|
|
12
|
+
* 包围盒置空,改变自己
|
|
13
|
+
*/
|
|
14
|
+
abstract makeEmpty(): this;
|
|
15
|
+
/**
|
|
16
|
+
* 包围盒扩展,改变自己
|
|
17
|
+
* @param point
|
|
18
|
+
*/
|
|
19
|
+
abstract expandByPoint(...point: types.IXY[] | PointType[]): this;
|
|
20
|
+
/**
|
|
21
|
+
* 是否包含点
|
|
22
|
+
* @param point
|
|
23
|
+
* @param tolerance
|
|
24
|
+
*/
|
|
25
|
+
abstract containsPt(point: types.IXY | PointType, tolerance: number): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 计算到点或包围盒的平方距离
|
|
28
|
+
* @param that
|
|
29
|
+
*/
|
|
30
|
+
abstract getSquareDistanceTo(that: types.IXY | PointType | Box<PointType>): number;
|
|
31
|
+
/**
|
|
32
|
+
* 根据传入的中心点和包围盒尺寸重置包围盒,改变自己
|
|
33
|
+
* @param center
|
|
34
|
+
* @param size
|
|
35
|
+
*/
|
|
36
|
+
abstract setFromCenterAndSize(center: types.IXY | PointType, size: types.IXY | PointType): this;
|
|
37
|
+
/**
|
|
38
|
+
* 获取包围盒的角点
|
|
39
|
+
*/
|
|
40
|
+
abstract getCornerPts(): PointType[];
|
|
41
|
+
/**
|
|
42
|
+
* 包围盒扩展,改变自己
|
|
43
|
+
* @param point
|
|
44
|
+
*/
|
|
45
|
+
expandByScalar(scale: number): this;
|
|
46
|
+
/**
|
|
47
|
+
* 根据传入的点重置包围盒,改变自己
|
|
48
|
+
* @param points
|
|
49
|
+
*/
|
|
50
|
+
setFromPoints(points?: types.IXY[] | PointType[]): this;
|
|
51
|
+
/**
|
|
52
|
+
* 获取中点
|
|
53
|
+
*/
|
|
54
|
+
getCenter(): PointType;
|
|
55
|
+
/**
|
|
56
|
+
* 获取包围盒大小,最大点减去最小点
|
|
57
|
+
*/
|
|
58
|
+
getSize(): PointType;
|
|
59
|
+
/**
|
|
60
|
+
* 是否包含包围盒
|
|
61
|
+
* @param box
|
|
62
|
+
* @param eps
|
|
63
|
+
*/
|
|
64
|
+
containsBox(box: Box<PointType>, eps?: number): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* 是否和另一个包围盒有交
|
|
67
|
+
* @param box
|
|
68
|
+
* @param tolerance
|
|
69
|
+
*/
|
|
70
|
+
intersectsBox(box: Box<PointType>, tolerance?: number): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* 包围盒的合并,改变自己
|
|
73
|
+
* @param box
|
|
74
|
+
*/
|
|
75
|
+
union(box: Box<PointType>): this;
|
|
76
|
+
/**
|
|
77
|
+
* 包围盒是否退化,即在x、或y、或z方向长度为0
|
|
78
|
+
*/
|
|
79
|
+
isZeroSizeBox(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* 包围盒是否合法,max >= min
|
|
82
|
+
*/
|
|
83
|
+
isValid(): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 包围盒是否相等
|
|
86
|
+
* @param other
|
|
87
|
+
* @param tol
|
|
88
|
+
*/
|
|
89
|
+
equals(other: Box<PointType>, tol?: number): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* 包围盒的平移,改变自己
|
|
92
|
+
* @param offset
|
|
93
|
+
*/
|
|
94
|
+
translate(offset: types.IXY | PointType): this;
|
|
95
|
+
/**
|
|
96
|
+
* 复制,使得自己和另一个包围盒一样大小,改变自己
|
|
97
|
+
* @param another
|
|
98
|
+
*/
|
|
99
|
+
copy(another: Box<PointType>): this;
|
|
100
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Box } from './box';
|
|
2
|
+
import { Vec2 } from './vec2';
|
|
3
|
+
import { types } from '../type_define/i_types';
|
|
4
|
+
/**
|
|
5
|
+
* 二维AABB包围盒
|
|
6
|
+
*/
|
|
7
|
+
declare class Box2 extends Box<Vec2> {
|
|
8
|
+
constructor(points?: types.IXY[]);
|
|
9
|
+
makeEmpty(): this;
|
|
10
|
+
getCornerPts(): Vec2[];
|
|
11
|
+
expandByPoint(...points: types.IXY[]): this;
|
|
12
|
+
containsPt(point: types.IXY, tolerance?: number): boolean;
|
|
13
|
+
getSquareDistanceTo(that: types.IXY | Box2): number;
|
|
14
|
+
setFromCenterAndSize(center: types.IXY, size: types.IXY): this;
|
|
15
|
+
clone(): Box2;
|
|
16
|
+
}
|
|
17
|
+
export { Box2 };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Box } from './box';
|
|
2
|
+
import { Vec3 } from './vec3';
|
|
3
|
+
import { types } from '../type_define/i_types';
|
|
4
|
+
/**
|
|
5
|
+
* 三维AABB包围盒
|
|
6
|
+
*/
|
|
7
|
+
declare class Box3 extends Box<Vec3> {
|
|
8
|
+
constructor(points?: types.IXYZ[]);
|
|
9
|
+
makeEmpty(): this;
|
|
10
|
+
/**
|
|
11
|
+
* 前四个点为底面角点,后四个为顶面角点,点顺序为逆时针(从上往下看)
|
|
12
|
+
*/
|
|
13
|
+
getCornerPts(): Vec3[];
|
|
14
|
+
expandByPoint(...points: types.IXYZ[]): this;
|
|
15
|
+
containsPt(point: types.IXYZ, tolerance?: number): boolean;
|
|
16
|
+
getSquareDistanceTo(that: types.IXYZ | Box3): number;
|
|
17
|
+
setFromCenterAndSize(center: types.IXYZ, size: types.IXYZ): this;
|
|
18
|
+
clone(): Box3;
|
|
19
|
+
}
|
|
20
|
+
export { Box3 };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GeoElement } from './geo_element';
|
|
2
|
+
import { Vec } from './vec';
|
|
3
|
+
/**
|
|
4
|
+
* 坐标系
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class Coord<VectorType extends Vec> extends GeoElement {
|
|
7
|
+
constructor();
|
|
8
|
+
abstract getDx(): VectorType;
|
|
9
|
+
abstract getDy(): VectorType;
|
|
10
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Vec2 } from './vec2';
|
|
2
|
+
import { types } from '../type_define/i_types';
|
|
3
|
+
import { EN_GEO_TYPE } from '../type_define/i_element_type';
|
|
4
|
+
import { Coord } from './coord';
|
|
5
|
+
import { Matrix3 } from './matrix3';
|
|
6
|
+
/**
|
|
7
|
+
* 二维坐标系
|
|
8
|
+
*/
|
|
9
|
+
export declare class Coord2 extends Coord<Vec2> {
|
|
10
|
+
/**
|
|
11
|
+
* 构造XOY坐标系
|
|
12
|
+
*/
|
|
13
|
+
static XOY(): Coord2;
|
|
14
|
+
private _origin;
|
|
15
|
+
private _xDir;
|
|
16
|
+
private _yDir;
|
|
17
|
+
constructor(origin?: types.IXY, xDir?: types.IXY);
|
|
18
|
+
/**
|
|
19
|
+
* 获取X方向
|
|
20
|
+
*/
|
|
21
|
+
getDx(): Vec2;
|
|
22
|
+
/**
|
|
23
|
+
* 设置X方向
|
|
24
|
+
* @param v
|
|
25
|
+
*/
|
|
26
|
+
setDx(v: types.IXY): void;
|
|
27
|
+
/**
|
|
28
|
+
* 获取Y方向
|
|
29
|
+
*/
|
|
30
|
+
getDy(): Vec2;
|
|
31
|
+
/**
|
|
32
|
+
* 获取原点
|
|
33
|
+
*/
|
|
34
|
+
getOrigin(): Vec2;
|
|
35
|
+
/**
|
|
36
|
+
* 设置原点
|
|
37
|
+
*/
|
|
38
|
+
setOrigin(origin: types.IXY): void;
|
|
39
|
+
/**
|
|
40
|
+
* 将当前坐标系平移,改变自己
|
|
41
|
+
* @param delta
|
|
42
|
+
*/
|
|
43
|
+
translate(delta: types.IXY): this;
|
|
44
|
+
/**
|
|
45
|
+
* 坐标系平移,得到一个新的坐标系对象
|
|
46
|
+
* @param delta
|
|
47
|
+
*/
|
|
48
|
+
translated(delta: types.IXY): Coord2;
|
|
49
|
+
/**
|
|
50
|
+
* 将当前坐标系变换,改变自己。非等比缩放时,保证 dx 方向能正确变换
|
|
51
|
+
* @param matrix
|
|
52
|
+
*/
|
|
53
|
+
transform(matrix: types.IMatrix3 | types.numberArrs3X3): this;
|
|
54
|
+
/**
|
|
55
|
+
* 坐标系变换,得到一个新的坐标系对象。非等比缩放时,保证 dx 方向能正确变换
|
|
56
|
+
* @param matrix
|
|
57
|
+
*/
|
|
58
|
+
transformed(matrix: types.IMatrix3 | types.numberArrs3X3): Coord2;
|
|
59
|
+
/**
|
|
60
|
+
* 根据局部坐标系的点获取世界坐标系的点
|
|
61
|
+
* @param uv
|
|
62
|
+
*/
|
|
63
|
+
getWorldPtAt(uv: types.IXY): Vec2;
|
|
64
|
+
/**
|
|
65
|
+
* 根据世界坐标系的点获取局部坐标系的点
|
|
66
|
+
* @param worldPt
|
|
67
|
+
*/
|
|
68
|
+
getLocalPtAt(worldPt: types.IXY): Vec2;
|
|
69
|
+
/**
|
|
70
|
+
* 根据局部坐标系的向量获取世界坐标系的向量
|
|
71
|
+
* @param localVec
|
|
72
|
+
*/
|
|
73
|
+
getWorldVectorAt(localVec: types.IXY): Vec2;
|
|
74
|
+
/**
|
|
75
|
+
* 根据世界坐标系的向量获取局部坐标系的向量
|
|
76
|
+
* @param worldVec
|
|
77
|
+
*/
|
|
78
|
+
getLocalVectorAt(worldVec: types.IXY): Vec2;
|
|
79
|
+
/**
|
|
80
|
+
* 构造一个矩阵,将局部坐标系的(x, y)变换到世界坐标系
|
|
81
|
+
*/
|
|
82
|
+
getLocalToWorldMatrix(): Matrix3;
|
|
83
|
+
/**
|
|
84
|
+
* 构造一个矩阵,将世界坐标系位置变换到局部坐标系
|
|
85
|
+
*/
|
|
86
|
+
getWorldToLocalMatrix(): Matrix3;
|
|
87
|
+
dump(): types.IDBCoordinate2;
|
|
88
|
+
load({ data: [o, x] }: types.IDBCoordinate2): this;
|
|
89
|
+
clone(): Coord2;
|
|
90
|
+
getType(): EN_GEO_TYPE.COORD_2;
|
|
91
|
+
private _updateY;
|
|
92
|
+
}
|