@ccpc/math 0.1.0 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +226 -0
- package/package.json +19 -37
- package/types/algorithm/bool_operate/bool2d/bool2d.d.ts +22 -0
- package/types/algorithm/bool_operate/bool2d/difference.d.ts +9 -0
- package/types/algorithm/bool_operate/bool2d/intersect.d.ts +9 -0
- package/types/algorithm/bool_operate/bool2d/split.d.ts +3 -0
- package/types/algorithm/bool_operate/bool2d/union.d.ts +9 -0
- package/types/algorithm/bool_operate/bool2d/utils.d.ts +40 -0
- package/types/algorithm/bool_operate/bool_operate_clipper.d.ts +18 -0
- package/types/algorithm/bool_operate/polycurve_polygon_bool.d.ts +13 -0
- package/types/algorithm/bool_operate_2d.d.ts +67 -0
- package/types/algorithm/calc_d.d.ts +85 -0
- package/types/algorithm/calc_offset.d.ts +70 -0
- package/types/algorithm/calc_overlap.d.ts +56 -0
- package/types/algorithm/calc_project.d.ts +29 -0
- package/types/algorithm/calc_x.d.ts +215 -0
- package/types/algorithm/calculate_util/geometry_subdevide_infos.d.ts +73 -0
- package/types/algorithm/calculate_util/iterative_method.d.ts +30 -0
- package/types/algorithm/discrete/discrete_curve.d.ts +31 -0
- package/types/algorithm/discrete/discrete_refiner.d.ts +35 -0
- package/types/algorithm/discrete/discrete_surface.d.ts +74 -0
- package/types/algorithm/discrete/discrete_topology.d.ts +32 -0
- package/types/algorithm/discrete/discrete_util.d.ts +96 -0
- package/types/algorithm/discrete/grid_discrete_data.d.ts +58 -0
- package/types/algorithm/discrete/libtess.d.ts +12 -0
- package/types/algorithm/discrete/uniform_grid_discrete.d.ts +3 -0
- package/types/algorithm/distance/base_calc_distance/curves_distance_util.d.ts +20 -0
- package/types/algorithm/distance/base_calc_distance/define_of_calculate_distance.d.ts +12 -0
- package/types/algorithm/distance/curve2ds_distance/arc2s_distance.d.ts +17 -0
- package/types/algorithm/distance/curve2ds_distance/line2d_to_arc2d_distance.d.ts +17 -0
- package/types/algorithm/distance/curve2ds_distance/line2s_distance.d.ts +15 -0
- package/types/algorithm/distance/curve2s_distance.d.ts +15 -0
- package/types/algorithm/distance/curve3ds_distance/line3d_to_line3d_distance_paramed.d.ts +12 -0
- package/types/algorithm/distance/curve3s_distance.d.ts +31 -0
- package/types/algorithm/distance/pt_to_curve2_signed_distance.d.ts +17 -0
- package/types/algorithm/distance/pt_to_curve3_distance.d.ts +25 -0
- package/types/algorithm/distance/pt_to_curve_distance_info.d.ts +12 -0
- package/types/algorithm/distance/pt_to_surface_distance.d.ts +17 -0
- package/types/algorithm/distance/pts_to_curves_distance.d.ts +13 -0
- package/types/algorithm/distance/pts_to_pts_distance.d.ts +7 -0
- package/types/algorithm/geometry_merge.d.ts +22 -0
- package/types/algorithm/index.d.ts +32 -0
- package/types/algorithm/intersect/box_cut_line.d.ts +6 -0
- package/types/algorithm/intersect/curve_self_x.d.ts +13 -0
- package/types/algorithm/intersect/curve_surface_x.d.ts +34 -0
- package/types/algorithm/intersect/curve_surface_x_util.d.ts +32 -0
- package/types/algorithm/intersect/curves_x/circulars_x.d.ts +35 -0
- package/types/algorithm/intersect/curves_x/linear_circular_x.d.ts +40 -0
- package/types/algorithm/intersect/curves_x/lines_x.d.ts +17 -0
- package/types/algorithm/intersect/curves_x/lines_x_util.d.ts +4 -0
- package/types/algorithm/intersect/curves_x.d.ts +26 -0
- package/types/algorithm/intersect/curves_x_util.d.ts +35 -0
- package/types/algorithm/intersect/intersect_info_util.d.ts +9 -0
- package/types/algorithm/intersect/surface_self_x.d.ts +8 -0
- package/types/algorithm/intersect/surfaces_x.d.ts +53 -0
- package/types/algorithm/intersect/surfaces_x_complex.d.ts +29 -0
- package/types/algorithm/intersect/surfaces_x_special.d.ts +16 -0
- package/types/algorithm/intersect/surfaces_x_util.d.ts +41 -0
- package/types/algorithm/intersect/x_info.d.ts +65 -0
- package/types/algorithm/loop_property/loop-area.d.ts +49 -0
- package/types/algorithm/loop_property/loop-centroid.d.ts +40 -0
- package/types/algorithm/merge_geometry/halfplane.d.ts +24 -0
- package/types/algorithm/merge_geometry/merge_curve.d.ts +14 -0
- package/types/algorithm/merge_geometry/merge_point.d.ts +18 -0
- package/types/algorithm/mesh/clip_mesh.d.ts +27 -0
- package/types/algorithm/mesh/extrude_clip.d.ts +236 -0
- package/types/algorithm/mesh/mesh_assist.d.ts +21 -0
- package/types/algorithm/mesh/mesh_contour.d.ts +26 -0
- package/types/algorithm/mesh/mesh_util.d.ts +115 -0
- package/types/algorithm/offset/loop2d_offset.d.ts +22 -0
- package/types/algorithm/offset/polygon_offset.d.ts +27 -0
- package/types/algorithm/overlap/curve_surface_coincide.d.ts +6 -0
- package/types/algorithm/overlap/curves_colinear.d.ts +38 -0
- package/types/algorithm/overlap/curves_merge.d.ts +74 -0
- package/types/algorithm/overlap/curves_overlap.d.ts +34 -0
- package/types/algorithm/overlap/i_overlap.d.ts +9 -0
- package/types/algorithm/overlap/surfaces_coplaner.d.ts +5 -0
- package/types/algorithm/pattern/blocks2Geometry.d.ts +50 -0
- package/types/algorithm/pattern/math.d.ts +42 -0
- package/types/algorithm/pattern/pattern.d.ts +43 -0
- package/types/algorithm/pattern/pattern_util.d.ts +53 -0
- package/types/algorithm/pattern/pave.d.ts +33 -0
- package/types/algorithm/pj/curves_oj.d.ts +19 -0
- package/types/algorithm/pj/curves_pj.d.ts +19 -0
- package/types/algorithm/pj/loops_pj.d.ts +13 -0
- package/types/algorithm/pj/pj_type.d.ts +46 -0
- package/types/algorithm/pj/pt_loop_pj.d.ts +24 -0
- package/types/algorithm/pj/pt_polygon_pj.d.ts +18 -0
- package/types/algorithm/pj/pt_polygon_position_judger.d.ts +11 -0
- package/types/algorithm/position_judge.d.ts +72 -0
- package/types/algorithm/project/curve3d_to_plane_project.d.ts +11 -0
- package/types/algorithm/project/curve_curve_project.d.ts +9 -0
- package/types/algorithm/search_graph/iloops_polygonex.d.ts +28 -0
- package/types/algorithm/search_graph/loop_tree_node.d.ts +30 -0
- package/types/algorithm/search_graph/loops_to_loop_tree_search_graph.d.ts +25 -0
- package/types/algorithm/search_graph/polygon_polygonex.d.ts +13 -0
- package/types/algorithm/search_graph/search_loop2d.d.ts +20 -0
- package/types/algorithm/search_graph/search_polyline.d.ts +11 -0
- package/types/algorithm/search_graph.d.ts +45 -0
- package/types/algorithm/topology_edit.d.ts +10 -0
- package/types/base/box.d.ts +100 -0
- package/types/base/box2.d.ts +17 -0
- package/types/base/box3.d.ts +20 -0
- package/types/base/coord.d.ts +10 -0
- package/types/base/coord2.d.ts +92 -0
- package/types/base/coord3.d.ts +139 -0
- package/types/base/discrete_param.d.ts +28 -0
- package/types/base/euler.d.ts +102 -0
- package/types/base/geo_element.d.ts +54 -0
- package/types/base/interval.d.ts +122 -0
- package/types/base/ivector.d.ts +126 -0
- package/types/base/matrix.d.ts +108 -0
- package/types/base/matrix3.d.ts +118 -0
- package/types/base/matrix4.d.ts +166 -0
- package/types/base/matrix_util.d.ts +5 -0
- package/types/base/period_inverval.d.ts +127 -0
- package/types/base/quaternion.d.ts +39 -0
- package/types/base/tangent_cone.d.ts +11 -0
- package/types/base/tilt_box.d.ts +11 -0
- package/types/base/tol.d.ts +120 -0
- package/types/base/vec.d.ts +46 -0
- package/types/base/vec2.d.ts +146 -0
- package/types/base/vec3.d.ts +158 -0
- package/types/brep-src/algorithm/alg_const.d.ts +23 -0
- package/types/brep-src/algorithm/alg_types.d.ts +47 -0
- package/types/brep-src/algorithm/algorithm_util/base_define.d.ts +7 -0
- package/types/brep-src/algorithm/algorithm_util/body_base_util.d.ts +4 -0
- package/types/brep-src/algorithm/algorithm_util/curve_solid_analysis.d.ts +28 -0
- package/types/brep-src/algorithm/algorithm_util/face_face_analysis.d.ts +39 -0
- package/types/brep-src/algorithm/algorithm_util/search_wire.d.ts +8 -0
- package/types/brep-src/algorithm/body_builder/basic_body_builder.d.ts +15 -0
- package/types/brep-src/algorithm/body_builder/extrude_body.d.ts +23 -0
- package/types/brep-src/algorithm/body_builder/sweep_body.d.ts +37 -0
- package/types/brep-src/algorithm/body_builder.d.ts +36 -0
- package/types/brep-src/algorithm/body_util.d.ts +21 -0
- package/types/brep-src/algorithm/bool_sk/brep_converter.d.ts +11 -0
- package/types/brep-src/algorithm/brep_calc_project.d.ts +50 -0
- package/types/brep-src/algorithm/brep_calc_x.d.ts +34 -0
- package/types/brep-src/algorithm/brep_pj.d.ts +47 -0
- package/types/brep-src/algorithm/index.d.ts +5 -0
- package/types/brep-src/algorithm/intersect/curve_face_overlap.d.ts +10 -0
- package/types/brep-src/algorithm/intersect/face_face_intersect.d.ts +22 -0
- package/types/brep-src/algorithm/intersect/face_faces_intersect.d.ts +15 -0
- package/types/brep-src/algorithm/intersect/line_face_intersect.d.ts +16 -0
- package/types/brep-src/algorithm/podition_judge/body_pj.d.ts +25 -0
- package/types/brep-src/algorithm/podition_judge/extrude_pj.d.ts +28 -0
- package/types/brep-src/algorithm/podition_judge/pt_body_pj.d.ts +32 -0
- package/types/brep-src/algorithm/project/body_project.d.ts +8 -0
- package/types/brep-src/algorithm/project/face_project.d.ts +20 -0
- package/types/brep-src/algorithm/project/face_surface_project.d.ts +8 -0
- package/types/brep-src/algorithm/project/space_project.d.ts +26 -0
- package/types/brep-src/algorithm/project/space_project_simple.d.ts +10 -0
- package/types/brep-src/algorithm/project/view_project.d.ts +25 -0
- package/types/brep-src/algorithm/shell_builder/create_shell_from_curves.d.ts +38 -0
- package/types/brep-src/algorithm/shell_builder.d.ts +25 -0
- package/types/brep-src/algorithm/shell_edit/add_edges/add_edges.d.ts +14 -0
- package/types/brep-src/algorithm/shell_edit/add_edges/add_edges_core.d.ts +11 -0
- package/types/brep-src/algorithm/shell_edit/copy_faces.d.ts +20 -0
- package/types/brep-src/algorithm/shell_edit/delete_faces_edges/delete_edge.d.ts +9 -0
- package/types/brep-src/algorithm/shell_edit/delete_faces_edges/delete_faces_edges.d.ts +17 -0
- package/types/brep-src/algorithm/shell_edit/faces_boolean/faces_boolean.d.ts +19 -0
- package/types/brep-src/algorithm/shell_edit/faces_boolean/faces_shells_boolean.d.ts +13 -0
- package/types/brep-src/algorithm/shell_edit/faces_boolean/octree.d.ts +11 -0
- package/types/brep-src/algorithm/shell_edit/isolate_faces.d.ts +21 -0
- package/types/brep-src/algorithm/shell_edit/merge_connect_faces.d.ts +14 -0
- package/types/brep-src/algorithm/shell_edit/merge_edges.d.ts +8 -0
- package/types/brep-src/algorithm/shell_edit/move_operators/move_edges.d.ts +31 -0
- package/types/brep-src/algorithm/shell_edit/move_operators/move_faces.d.ts +14 -0
- package/types/brep-src/algorithm/shell_edit/operator/dispose_topo.d.ts +2 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_connect_edge.d.ts +3 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_connect_face.d.ts +2 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_overlap_edge.d.ts +3 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_shell.d.ts +11 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_vertex.d.ts +2 -0
- package/types/brep-src/algorithm/shell_edit/operator/split_edge.d.ts +4 -0
- package/types/brep-src/algorithm/shell_edit/operator/split_shell.d.ts +6 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face.d.ts +18 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_core.d.ts +6 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_preview.d.ts +16 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_preview_core.d.ts +24 -0
- package/types/brep-src/algorithm/shell_edit/roundinng/2d_rounding.d.ts +22 -0
- package/types/brep-src/algorithm/shell_edit/shell_modeling_base.d.ts +10 -0
- package/types/brep-src/algorithm/shell_edit/shell_modeling_result.d.ts +21 -0
- package/types/brep-src/algorithm/shell_edit/smooth/detect_loop_util.d.ts +27 -0
- package/types/brep-src/algorithm/shell_edit/smooth/shell_modeling_util.d.ts +24 -0
- package/types/brep-src/algorithm/shell_edit/smooth/smooth_util.d.ts +22 -0
- package/types/brep-src/algorithm/shell_edit/split_edge.d.ts +10 -0
- package/types/brep-src/algorithm/shell_edit.d.ts +119 -0
- package/types/brep-src/algorithm/shell_valid/base_brep_topo_error.d.ts +176 -0
- package/types/brep-src/algorithm/shell_valid/diagnose_shell.d.ts +14 -0
- package/types/brep-src/brep/brep_body.d.ts +19 -0
- package/types/brep-src/brep/coedge3d.d.ts +83 -0
- package/types/brep-src/brep/edge.d.ts +96 -0
- package/types/brep-src/brep/face.d.ts +150 -0
- package/types/brep-src/brep/shell.d.ts +166 -0
- package/types/brep-src/brep/topo_object.d.ts +40 -0
- package/types/brep-src/brep/vertex.d.ts +48 -0
- package/types/brep-src/brep/wire.d.ts +66 -0
- package/types/brep-src/continuous/continuous_edge.d.ts +17 -0
- package/types/brep-src/continuous/continuous_face.d.ts +10 -0
- package/types/brep-src/continuous/continuous_util.d.ts +60 -0
- package/types/brep-src/continuous/continuous_uv.d.ts +24 -0
- package/types/brep-src/continuous/index.d.ts +4 -0
- package/types/brep-src/index.d.ts +14 -0
- package/types/brep-src/type_define/i_types.d.ts +46 -0
- package/types/brep-src/util/util.d.ts +23 -0
- package/types/conversion/units_conversion.d.ts +14 -0
- package/types/geometry/arc2d.d.ts +249 -0
- package/types/geometry/arc3d.d.ts +204 -0
- package/types/geometry/circle3d.d.ts +92 -0
- package/types/geometry/circular_surface.d.ts +52 -0
- package/types/geometry/coord_based_surface.d.ts +25 -0
- package/types/geometry/curve.d.ts +228 -0
- package/types/geometry/curve2.d.ts +62 -0
- package/types/geometry/curve3d.d.ts +66 -0
- package/types/geometry/cylinder.d.ts +73 -0
- package/types/geometry/discrete_arrow.d.ts +3 -0
- package/types/geometry/extend_curve2.d.ts +75 -0
- package/types/geometry/geometry2d.d.ts +35 -0
- package/types/geometry/geometry3d.d.ts +36 -0
- package/types/geometry/intersect_curve3.d.ts +90 -0
- package/types/geometry/ln2.d.ts +168 -0
- package/types/geometry/ln3.d.ts +152 -0
- package/types/geometry/nurbs_curve2.d.ts +106 -0
- package/types/geometry/nurbs_curve3.d.ts +191 -0
- package/types/geometry/offset_curve2.d.ts +63 -0
- package/types/geometry/offset_curve3.d.ts +97 -0
- package/types/geometry/offset_parameter_mapper.d.ts +72 -0
- package/types/geometry/plane.d.ts +109 -0
- package/types/geometry/polyline.d.ts +12 -0
- package/types/geometry/smooth_poly2.d.ts +78 -0
- package/types/geometry/smooth_poly3.d.ts +85 -0
- package/types/geometry/surface.d.ts +173 -0
- package/types/index.d.ts +78 -0
- package/types/io/obj_parser.d.ts +4 -0
- package/types/io/svgparser.d.ts +22 -0
- package/types/loader/loader.d.ts +23 -0
- package/types/loader/register_geo.d.ts +7 -0
- package/types/math/gauss_integration.d.ts +13 -0
- package/types/math/inv_bilinear.d.ts +33 -0
- package/types/solve_equations/cubic_equation.d.ts +7 -0
- package/types/solve_equations/linear_system.d.ts +6 -0
- package/types/solve_equations/nonlinear_system.d.ts +11 -0
- package/types/solve_equations/plurality.d.ts +9 -0
- package/types/solve_equations/polynomial_equation.d.ts +6 -0
- package/types/solve_equations/quadratic_equation.d.ts +6 -0
- package/types/solve_equations/quartic_equation.d.ts +6 -0
- package/types/solve_equations/solve_equation_util.d.ts +50 -0
- package/types/test_util/loop_generator.d.ts +21 -0
- package/types/topology/evolution_map.d.ts +90 -0
- package/types/topology/loop.d.ts +50 -0
- package/types/topology/polycurve.d.ts +109 -0
- package/types/topology/polygon.d.ts +118 -0
- package/types/topology/trimmed_surface.d.ts +136 -0
- package/types/type_define/const.d.ts +18 -0
- package/types/type_define/i_element.d.ts +9 -0
- package/types/type_define/i_element_type.d.ts +34 -0
- package/types/type_define/i_geometry.d.ts +191 -0
- package/types/type_define/i_types.d.ts +280 -0
- package/types/util/array_util.d.ts +8 -0
- package/types/util/assert.d.ts +21 -0
- package/types/util/clipper2_util.d.ts +5 -0
- package/types/util/clipper_format_converter.d.ts +21 -0
- package/types/util/clipper_util.d.ts +10 -0
- package/types/util/curve_util.d.ts +72 -0
- package/types/util/geom_util.d.ts +23 -0
- package/types/util/log.d.ts +19 -0
- package/types/util/math_error.d.ts +37 -0
- package/types/util/surface_util.d.ts +13 -0
- package/types/util/util.d.ts +18 -0
- package/types/util/uv_util.d.ts +68 -0
- package/types/verb/export_verb.d.ts +2 -0
- package/types/wasm/a2d.d.ts +19 -0
- package/types/wasm/bx2.d.ts +16 -0
- package/types/wasm/c2d.d.ts +29 -0
- package/types/wasm/elli.d.ts +19 -0
- package/types/wasm/grapher2d.d.ts +39 -0
- package/types/wasm/grapherutil.d.ts +9 -0
- package/types/wasm/l2d.d.ts +14 -0
- package/types/wasm/loader.d.ts +8 -0
- package/types/wasm/pt.d.ts +19 -0
- package/types/wasm/wasm-geom.d.ts +296 -0
- package/types/wasm/wasminstance.d.ts +19 -0
- package/types/wasm/wrapper.d.ts +82 -0
- package/README.md +0 -21
- package/dist/constants/geom_type.d.ts +0 -13
- package/dist/constants/geom_type.d.ts.map +0 -1
- package/dist/constants/geom_type.js +0 -17
- package/dist/constants/math_const.d.ts +0 -9
- package/dist/constants/math_const.d.ts.map +0 -1
- package/dist/constants/math_const.js +0 -12
- package/dist/core/box2.d.ts +0 -71
- package/dist/core/box2.d.ts.map +0 -1
- package/dist/core/box2.js +0 -243
- package/dist/core/coord2d.d.ts +0 -62
- package/dist/core/coord2d.d.ts.map +0 -1
- package/dist/core/coord2d.js +0 -155
- package/dist/core/geom_base.d.ts +0 -19
- package/dist/core/geom_base.d.ts.map +0 -1
- package/dist/core/geom_base.js +0 -18
- package/dist/core/mat3.d.ts +0 -101
- package/dist/core/mat3.d.ts.map +0 -1
- package/dist/core/mat3.js +0 -290
- package/dist/core/vec2.d.ts +0 -138
- package/dist/core/vec2.d.ts.map +0 -1
- package/dist/core/vec2.js +0 -297
- package/dist/curves/arc2.d.ts +0 -49
- package/dist/curves/arc2.d.ts.map +0 -1
- package/dist/curves/arc2.js +0 -265
- package/dist/curves/bspline2.d.ts +0 -150
- package/dist/curves/bspline2.d.ts.map +0 -1
- package/dist/curves/bspline2.js +0 -793
- package/dist/curves/circle2.d.ts +0 -42
- package/dist/curves/circle2.d.ts.map +0 -1
- package/dist/curves/circle2.js +0 -135
- package/dist/curves/circle_curve2.d.ts +0 -38
- package/dist/curves/circle_curve2.d.ts.map +0 -1
- package/dist/curves/circle_curve2.js +0 -112
- package/dist/curves/curve2.d.ts +0 -214
- package/dist/curves/curve2.d.ts.map +0 -1
- package/dist/curves/curve2.js +0 -238
- package/dist/curves/ellipse2.d.ts +0 -42
- package/dist/curves/ellipse2.d.ts.map +0 -1
- package/dist/curves/ellipse2.js +0 -125
- package/dist/curves/ellipse_arc2.d.ts +0 -49
- package/dist/curves/ellipse_arc2.d.ts.map +0 -1
- package/dist/curves/ellipse_arc2.js +0 -184
- package/dist/curves/ellipse_curve2.d.ts +0 -56
- package/dist/curves/ellipse_curve2.d.ts.map +0 -1
- package/dist/curves/ellipse_curve2.js +0 -262
- package/dist/curves/interval.d.ts +0 -112
- package/dist/curves/interval.d.ts.map +0 -1
- package/dist/curves/interval.js +0 -200
- package/dist/curves/line2.d.ts +0 -64
- package/dist/curves/line2.d.ts.map +0 -1
- package/dist/curves/line2.js +0 -193
- package/dist/curves/period_interval.d.ts +0 -129
- package/dist/curves/period_interval.d.ts.map +0 -1
- package/dist/curves/period_interval.js +0 -240
- package/dist/discretize/discretize_defaults.d.ts +0 -12
- package/dist/discretize/discretize_defaults.d.ts.map +0 -1
- package/dist/discretize/discretize_defaults.js +0 -12
- package/dist/discretize/discretize_engine.d.ts +0 -33
- package/dist/discretize/discretize_engine.d.ts.map +0 -1
- package/dist/discretize/discretize_engine.js +0 -347
- package/dist/discretize/discretize_errors.d.ts +0 -15
- package/dist/discretize/discretize_errors.d.ts.map +0 -1
- package/dist/discretize/discretize_errors.js +0 -30
- package/dist/discretize/discretize_options.d.ts +0 -18
- package/dist/discretize/discretize_options.d.ts.map +0 -1
- package/dist/discretize/discretize_options.js +0 -19
- package/dist/discretize/discretize_types.d.ts +0 -36
- package/dist/discretize/discretize_types.d.ts.map +0 -1
- package/dist/discretize/discretize_types.js +0 -1
- package/dist/discretize/internal/curve_guards.d.ts +0 -35
- package/dist/discretize/internal/curve_guards.d.ts.map +0 -1
- package/dist/discretize/internal/curve_guards.js +0 -62
- package/dist/discretize/internal/postprocess.d.ts +0 -5
- package/dist/discretize/internal/postprocess.d.ts.map +0 -1
- package/dist/discretize/internal/postprocess.js +0 -109
- package/dist/discretize/internal/sampling_utils.d.ts +0 -8
- package/dist/discretize/internal/sampling_utils.d.ts.map +0 -1
- package/dist/discretize/internal/sampling_utils.js +0 -36
- package/dist/discretize/register_builtin_strategies.d.ts +0 -3
- package/dist/discretize/register_builtin_strategies.d.ts.map +0 -1
- package/dist/discretize/register_builtin_strategies.js +0 -10
- package/dist/discretize/strategies/bspline_strategy.d.ts +0 -4
- package/dist/discretize/strategies/bspline_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/bspline_strategy.js +0 -115
- package/dist/discretize/strategies/circle_strategy.d.ts +0 -7
- package/dist/discretize/strategies/circle_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/circle_strategy.js +0 -55
- package/dist/discretize/strategies/ellipse_strategy.d.ts +0 -7
- package/dist/discretize/strategies/ellipse_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/ellipse_strategy.js +0 -86
- package/dist/discretize/strategies/line_strategy.d.ts +0 -4
- package/dist/discretize/strategies/line_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/line_strategy.js +0 -40
- package/dist/discretize/strategy_registry.d.ts +0 -9
- package/dist/discretize/strategy_registry.d.ts.map +0 -1
- package/dist/discretize/strategy_registry.js +0 -34
- package/dist/index.d.ts +0 -30
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -24
- package/dist/intersections/analytic_x_algorithm.d.ts +0 -10
- package/dist/intersections/analytic_x_algorithm.d.ts.map +0 -1
- package/dist/intersections/analytic_x_algorithm.js +0 -83
- package/dist/intersections/curve_x_engine.d.ts +0 -9
- package/dist/intersections/curve_x_engine.d.ts.map +0 -1
- package/dist/intersections/curve_x_engine.js +0 -27
- package/dist/intersections/index.d.ts +0 -5
- package/dist/intersections/index.d.ts.map +0 -1
- package/dist/intersections/index.js +0 -11
- package/dist/intersections/internal/certification.d.ts +0 -34
- package/dist/intersections/internal/certification.d.ts.map +0 -1
- package/dist/intersections/internal/certification.js +0 -238
- package/dist/intersections/internal/interval_clipping.d.ts +0 -29
- package/dist/intersections/internal/interval_clipping.d.ts.map +0 -1
- package/dist/intersections/internal/interval_clipping.js +0 -123
- package/dist/intersections/internal/kind.d.ts +0 -4
- package/dist/intersections/internal/kind.d.ts.map +0 -1
- package/dist/intersections/internal/kind.js +0 -16
- package/dist/intersections/internal/pair.d.ts +0 -9
- package/dist/intersections/internal/pair.d.ts.map +0 -1
- package/dist/intersections/internal/pair.js +0 -14
- package/dist/intersections/internal/result.d.ts +0 -20
- package/dist/intersections/internal/result.d.ts.map +0 -1
- package/dist/intersections/internal/result.js +0 -125
- package/dist/intersections/internal/sampling.d.ts +0 -15
- package/dist/intersections/internal/sampling.d.ts.map +0 -1
- package/dist/intersections/internal/sampling.js +0 -131
- package/dist/intersections/internal/segment.d.ts +0 -32
- package/dist/intersections/internal/segment.d.ts.map +0 -1
- package/dist/intersections/internal/segment.js +0 -137
- package/dist/intersections/internal/tolerance.d.ts +0 -10
- package/dist/intersections/internal/tolerance.d.ts.map +0 -1
- package/dist/intersections/internal/tolerance.js +0 -20
- package/dist/intersections/intersector.d.ts +0 -6
- package/dist/intersections/intersector.d.ts.map +0 -1
- package/dist/intersections/intersector.js +0 -1
- package/dist/intersections/numeric_x_algorithm.d.ts +0 -10
- package/dist/intersections/numeric_x_algorithm.d.ts.map +0 -1
- package/dist/intersections/numeric_x_algorithm.js +0 -73
- package/dist/intersections/solvers/bspline_self_solver.d.ts +0 -7
- package/dist/intersections/solvers/bspline_self_solver.d.ts.map +0 -1
- package/dist/intersections/solvers/bspline_self_solver.js +0 -308
- package/dist/intersections/solvers/line_line_pair_solver.d.ts +0 -7
- package/dist/intersections/solvers/line_line_pair_solver.d.ts.map +0 -1
- package/dist/intersections/solvers/line_line_pair_solver.js +0 -35
- package/dist/intersections/solvers/pair_solvers.d.ts +0 -94
- package/dist/intersections/solvers/pair_solvers.d.ts.map +0 -1
- package/dist/intersections/solvers/pair_solvers.js +0 -1078
- package/dist/intersections/solvers/polyline_pair_intersector.d.ts +0 -51
- package/dist/intersections/solvers/polyline_pair_intersector.d.ts.map +0 -1
- package/dist/intersections/solvers/polyline_pair_intersector.js +0 -731
- package/dist/intersections/types.d.ts +0 -11
- package/dist/intersections/types.d.ts.map +0 -1
- package/dist/intersections/types.js +0 -1
- package/dist/serialize/dump_types.d.ts +0 -101
- package/dist/serialize/dump_types.d.ts.map +0 -1
- package/dist/serialize/dump_types.js +0 -5
- package/dist/serialize/geom_mgr.d.ts +0 -24
- package/dist/serialize/geom_mgr.d.ts.map +0 -1
- package/dist/serialize/geom_mgr.js +0 -30
- package/dist/types/type_define.d.ts +0 -29
- package/dist/types/type_define.d.ts.map +0 -1
- package/dist/types/type_define.js +0 -10
- package/dist/types/type_guard.d.ts +0 -46
- package/dist/types/type_guard.d.ts.map +0 -1
- package/dist/types/type_guard.js +0 -5
- package/dist/utils/math_error.d.ts +0 -16
- package/dist/utils/math_error.d.ts.map +0 -1
- package/dist/utils/math_error.js +0 -35
- package/dist/utils/math_utils.d.ts +0 -9
- package/dist/utils/math_utils.d.ts.map +0 -1
- package/dist/utils/math_utils.js +0 -25
- package/dist/utils/precision.d.ts +0 -29
- package/dist/utils/precision.d.ts.map +0 -1
- package/dist/utils/precision.js +0 -44
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { Curve2 } from '../geometry/curve2';
|
|
2
|
+
import { Curve3 } from '../geometry/curve3d';
|
|
3
|
+
import { Surface } from '../geometry/surface';
|
|
4
|
+
import { ICurvesXInfo2d, ICurvesXInfo3d, ICvSurfXInfo, ISurfacesXInfo } from './intersect/x_info';
|
|
5
|
+
import { Tol } from '../base/tol';
|
|
6
|
+
import { Interval } from '../base/interval';
|
|
7
|
+
import { Vec3 } from '../base/vec3';
|
|
8
|
+
import { Vec2 } from '../base/vec2';
|
|
9
|
+
import { types } from '../type_define/i_types';
|
|
10
|
+
import { Polygon } from '../topology/polygon';
|
|
11
|
+
/**
|
|
12
|
+
* 几何元素求交,线线求交,线面求交
|
|
13
|
+
*/
|
|
14
|
+
declare class X {
|
|
15
|
+
/**
|
|
16
|
+
* 曲线与曲线的交点,目前支持Line2d与Line2d的交点, Line2d和Arc2d的交点,Arc2d和Arc2d的交点
|
|
17
|
+
* 若两曲线重合,则交点为重合段内的某个交点
|
|
18
|
+
* @param curve1
|
|
19
|
+
* @param curve2
|
|
20
|
+
* @param tol 容差
|
|
21
|
+
*/
|
|
22
|
+
static curve2ds(curve1: Curve2, curve2: Curve2, tol?: Tol): ICurvesXInfo2d[];
|
|
23
|
+
/**
|
|
24
|
+
* 曲线与曲线的交点
|
|
25
|
+
* 若两曲线重合,则交点为重合段内的某个交点
|
|
26
|
+
* @param curve1
|
|
27
|
+
* @param curve2
|
|
28
|
+
* @param tol 容差
|
|
29
|
+
*/
|
|
30
|
+
static curve3ds(curve1: Curve3, curve2: Curve3, tol?: Tol): ICurvesXInfo3d[];
|
|
31
|
+
/**
|
|
32
|
+
* 在给定点附近,计算曲线与曲线的交点
|
|
33
|
+
* @param curve1
|
|
34
|
+
* @param curve2
|
|
35
|
+
* @param point 二维维参考点
|
|
36
|
+
*/
|
|
37
|
+
static curve2dsNearPoint(curve1: Curve2, curve2: Curve2, point: Vec2, tol?: Tol): ICurvesXInfo2d | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* 在给定参数附近,计算曲线与曲线的交点
|
|
40
|
+
* @param curve1
|
|
41
|
+
* @param curve2
|
|
42
|
+
* @param param1 curve1 上的参考参数
|
|
43
|
+
* @param param2 curve2 上的参考参数
|
|
44
|
+
*/
|
|
45
|
+
static curve2dsNearParams(curve1: Curve2, curve2: Curve2, param1: number, param2: number, tol?: Tol): ICurvesXInfo2d | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* 在给定点附近,计算曲线与曲线的交点
|
|
48
|
+
* @param curve1
|
|
49
|
+
* @param curve2
|
|
50
|
+
* @param point 三维参考点
|
|
51
|
+
*/
|
|
52
|
+
static curve3dsNearPoint(curve1: Curve3, curve2: Curve3, point: Vec3, tol?: Tol): ICurvesXInfo3d | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* 在给定参数附近,计算曲线与曲线的交点
|
|
55
|
+
* @param curve1
|
|
56
|
+
* @param curve2
|
|
57
|
+
* @param param1 curve1 上的参考参数
|
|
58
|
+
* @param param2 curve2 上的参考参数
|
|
59
|
+
*/
|
|
60
|
+
static curve3dsNearParams(curve1: Curve3, curve2: Curve3, param1: number, param2: number, tol?: Tol): ICurvesXInfo3d | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* 二维曲线间的重合判断
|
|
63
|
+
* @param curve1
|
|
64
|
+
* @param curve2
|
|
65
|
+
* @param tol
|
|
66
|
+
* @deprecated 请使用 Overlap.Curve2ds 替代
|
|
67
|
+
*/
|
|
68
|
+
static curve2dsOverlap(curve1: Curve2, curve2: Curve2, tol?: Tol): ICurvesXInfo2d[];
|
|
69
|
+
/**
|
|
70
|
+
* 三维曲线间的重合判断
|
|
71
|
+
* @param curve1
|
|
72
|
+
* @param curve2
|
|
73
|
+
* @param tol
|
|
74
|
+
* @deprecated 请使用 Overlap.Curve3ds 替代
|
|
75
|
+
*/
|
|
76
|
+
static curve3dsOverlap(curve1: Curve3, curve2: Curve3, tol?: Tol): ICurvesXInfo3d[];
|
|
77
|
+
/**
|
|
78
|
+
* 二维曲线的自交点计算,主要针对nurbs曲线和extend曲线。(目前还未完善,计算自交点不全,不建议外部使用)
|
|
79
|
+
* @param curve
|
|
80
|
+
* @param tol
|
|
81
|
+
*/
|
|
82
|
+
static curve2dSelfX(curve: Curve2, tol?: Tol): ICurvesXInfo2d[];
|
|
83
|
+
/**
|
|
84
|
+
* 判断二维曲线是否自相交
|
|
85
|
+
* @param curve
|
|
86
|
+
* @param tol
|
|
87
|
+
* @returns
|
|
88
|
+
*/
|
|
89
|
+
static isCurve2dSelfX(curve: Curve2, tol?: Tol): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* 三维曲线的自交点计算,主要针对nurbs曲线和extend曲线。(目前还未完善,计算自交点不全,不建议外部使用)
|
|
92
|
+
* @param curve
|
|
93
|
+
* @param tol
|
|
94
|
+
*/
|
|
95
|
+
static curve3dSelfX(curve: Curve3, tol?: Tol): ICurvesXInfo3d[];
|
|
96
|
+
/**
|
|
97
|
+
* 计算三维曲线与曲面的交点集
|
|
98
|
+
* @param curve 曲线
|
|
99
|
+
* @param surface 曲面
|
|
100
|
+
* @param tol 容差
|
|
101
|
+
* @param surfRangeUV 给定曲面的参数域UV
|
|
102
|
+
* @returns 交可能不止一个,故返回交点的数组
|
|
103
|
+
*/
|
|
104
|
+
static curveSurface(curve: Curve3, surface: Surface, tol?: Tol, surfRangeUV?: Interval[]): Vec3[];
|
|
105
|
+
/**
|
|
106
|
+
* 三维曲线与曲面的交:可能包含交线,交点
|
|
107
|
+
* @param curve 曲线
|
|
108
|
+
* @param surface 曲面
|
|
109
|
+
* @param tol 容差
|
|
110
|
+
* @param surfRangeUV 给定曲面的参数域UV
|
|
111
|
+
* @returns 交可能不止一个,故返回交点的数组
|
|
112
|
+
*/
|
|
113
|
+
static curveSurfaceAll(curve: Curve3, surface: Surface, tol?: Tol, surfRangeUV?: Interval[]): ICvSurfXInfo[];
|
|
114
|
+
/**
|
|
115
|
+
* 给定一个参考点,返回距离参考点最近的一个交点
|
|
116
|
+
* @param curve 曲线
|
|
117
|
+
* @param surface 曲面
|
|
118
|
+
* @returns 交点
|
|
119
|
+
*/
|
|
120
|
+
static curveSurfaceNearPoint(curve: Curve3, surface: Surface, refPoint: Vec3, tol?: Tol): Vec3 | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* 给定一个参考参数uv和t,返回附近的一个交点
|
|
123
|
+
* @param curve 曲线
|
|
124
|
+
* @param surface 曲面
|
|
125
|
+
* @returns 交点
|
|
126
|
+
*/
|
|
127
|
+
static curveSurfaceNearParams(curve: Curve3, surface: Surface, refT: number, refUV: types.IXY, tol?: Tol): Vec3 | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* 判断曲线曲面是否有交
|
|
130
|
+
* @param curve 曲线
|
|
131
|
+
* @param surface 曲面
|
|
132
|
+
* @param surfBoundary 曲面的参数区间
|
|
133
|
+
* @returns 返回是否有交
|
|
134
|
+
*/
|
|
135
|
+
static isIntersectCurveSurface(curve: Curve3, surface: Surface, surfBoundary?: Polygon, tol?: Tol): boolean;
|
|
136
|
+
/**
|
|
137
|
+
* !!!注意:暂不完善,请不要调用此接口
|
|
138
|
+
* 曲面与曲面相交:可能为交线,交点,或者重合的surface
|
|
139
|
+
* 使用建议:求交最好能传入求交曲面的大概参数域,特别是对于平面、柱面、锥面这样参数域无穷大的,传入UV有利于提高计算效率
|
|
140
|
+
* @param surf1 曲面1
|
|
141
|
+
* @param surf2 曲面2
|
|
142
|
+
* @param rangeU1 曲面1的参数域U
|
|
143
|
+
* @param rangeV1 曲面1的参数域V
|
|
144
|
+
* @param rangeU2 曲面2的参数域U
|
|
145
|
+
* @param rangeV2 曲面2的参数域V
|
|
146
|
+
* @param tol:
|
|
147
|
+
* @returns 交线可能不止一条,故返回交线的数组
|
|
148
|
+
*/
|
|
149
|
+
static surfaces(surf1: Surface, surf2: Surface, rangeU1?: Interval, rangeV1?: Interval, rangeU2?: Interval, rangeV2?: Interval, tol?: Tol): ISurfacesXInfo[];
|
|
150
|
+
/**
|
|
151
|
+
* !!!注意:暂不完善,请不要调用此接口
|
|
152
|
+
* 曲面与曲面相交: 只返回交线(忽略交点、重合面),重合的情况返回重合区域边界curve3d
|
|
153
|
+
* 使用建议:求交最好能传入求交曲面的大概参数域,特别是对于平面、柱面、锥面这样参数域无穷大的,传入UV有利于提高计算效率
|
|
154
|
+
* @param surf1 曲面1
|
|
155
|
+
* @param surf2 曲面2
|
|
156
|
+
* @param rangeU1 曲面1的参数域U
|
|
157
|
+
* @param rangeV1 曲面1的参数域V
|
|
158
|
+
* @param rangeU2 曲面2的参数域U
|
|
159
|
+
* @param rangeV2 曲面2的参数域V
|
|
160
|
+
* @param tol
|
|
161
|
+
* @returns 交线可能不止一条,故返回交线的数组
|
|
162
|
+
*/
|
|
163
|
+
static surfacesSimplified(surf1: Surface, surf2: Surface, rangeU1?: Interval, rangeV1?: Interval, rangeU2?: Interval, rangeV2?: Interval, tol?: Tol, useHighPrecision?: boolean, convertToNurbs?: boolean): Curve3[];
|
|
164
|
+
/**
|
|
165
|
+
* 曲面与曲面相交: 给定一个参考点,返回交线距离参考点最近的一条交线(使用简单方法计算交线,不使用混合求交方法,没有surfacesNearPoint方法稳定)
|
|
166
|
+
* @param surf1 曲面
|
|
167
|
+
* @param surf2 曲面
|
|
168
|
+
* @param refPoint 参考点,最好是交线上的点,或者是距离交线很近的点
|
|
169
|
+
* @param refDir 参考点位置的参考切向
|
|
170
|
+
* @returns 返回距离参考点最近的一条交线 // 如果没有交线或者计算失败返回undefined
|
|
171
|
+
*/
|
|
172
|
+
static surfacesNearPointSimple(surf1: Surface, surf2: Surface, refPoint: Vec3, refDir?: Vec3, tol?: Tol, useHighPrecision?: boolean): Curve3 | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* 曲面与曲面相交: 给定两个点之间的交线段。用于已经计算到了交线curve的两个端点,需要求出两点之间的那一段交线。
|
|
175
|
+
* @param surf1 曲面
|
|
176
|
+
* @param surf2 曲面
|
|
177
|
+
* @param point1 交线上的起点
|
|
178
|
+
* @param point2 交线上的终点
|
|
179
|
+
* @param refDir 起点位置的参考切向.如果交线是周期性的,建议给出refDir,否则不知道取哪一段交线(类似圆被分割为两段,取优弧还是劣弧)
|
|
180
|
+
* @returns 返回距离参考点最近的一条交线 // 如果没有交线或者计算失败返回undefined
|
|
181
|
+
*/
|
|
182
|
+
static surfacesBetweenTwoPoints(surf1: Surface, surf2: Surface, point1: Vec3, point2: Vec3, refDir?: Vec3, tol?: Tol, useHighPrecision?: boolean): Curve3 | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* 曲面与曲面相交: 给定一个参考点,返回交线距离参考点最近的一条交线
|
|
185
|
+
* @param surf1 曲面
|
|
186
|
+
* @param surf2 曲面
|
|
187
|
+
* @param refPoint 参考点,最好是交线上的点,或者是距离交线很近的点
|
|
188
|
+
* @param refDir 参考点位置的参考切向
|
|
189
|
+
* @param tol 求交容差参数
|
|
190
|
+
* @param useHighPrecision 是否使用高精度求交
|
|
191
|
+
* @param convertToNurbs 是否将求交结果为IntersectCurve3d的转为nurbs曲线
|
|
192
|
+
* @returns 返回距离参考点最近的一条交线 // 如果没有交线或者计算失败返回undefined
|
|
193
|
+
*/
|
|
194
|
+
static surfacesNearPoint(surf1: Surface, surf2: Surface, refPoint: Vec3, refDir?: Vec3, tol?: Tol, useHighPrecision?: boolean, convertToNurbs?: boolean): Curve3 | undefined;
|
|
195
|
+
/**
|
|
196
|
+
* 给定一个参考点,返回交线距离参考点最近的交线(可用于曲面自交求交线)
|
|
197
|
+
* @param surf1 曲面
|
|
198
|
+
* @param surf2 曲面
|
|
199
|
+
* @param refUV1 参考uv
|
|
200
|
+
* @param refUV2 参考uv
|
|
201
|
+
* @param refDir 参考点位置的参考切向
|
|
202
|
+
* @returns 返回距离参考点最近的一条自交交线 // 如果没有交线或者计算失败返回undefined
|
|
203
|
+
*/
|
|
204
|
+
static surfacesNearParams(surf1: Surface, surf2: Surface, refUV1: types.IXY, refUV2: types.IXY, refDir?: Vec3, tol?: Tol, useHighPrecision?: boolean): Curve3 | undefined;
|
|
205
|
+
/**
|
|
206
|
+
* 曲面自交求交线: 给定一个参考点,返回交线距离参考点最近的交线
|
|
207
|
+
* @param surf 曲面
|
|
208
|
+
* @param refUV1 参考uv
|
|
209
|
+
* @param refUV2 参考uv
|
|
210
|
+
* @param refDir 参考点位置的参考切向
|
|
211
|
+
* @returns 返回距离参考点最近的一条自交交线 // 如果没有交线或者计算失败返回undefined
|
|
212
|
+
*/
|
|
213
|
+
static surfacesSelfIntersect(surf: Surface, refUV1: types.IXY, refUV2: types.IXY, refDir?: Vec3, tol?: Tol, useHighPrecision?: boolean): Curve3 | undefined;
|
|
214
|
+
}
|
|
215
|
+
export { X };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Interval } from '../../base/interval';
|
|
2
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
3
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
4
|
+
import { Box3 } from '../../base/box3';
|
|
5
|
+
import { Surface } from '../../geometry/surface';
|
|
6
|
+
import { Vec2 } from '../../base/vec2';
|
|
7
|
+
import { Box2 } from '../../base/box2';
|
|
8
|
+
import { Vec3 } from '../../base/vec3';
|
|
9
|
+
import { Vec } from '../../base/vec';
|
|
10
|
+
import { Curve } from '../../geometry/curve';
|
|
11
|
+
import { Box } from '../../base/box';
|
|
12
|
+
export declare abstract class CurveSegment<VectorType extends Vec> {
|
|
13
|
+
static getEndPoints<VectorType extends Vec>(segs: CurveSegment<VectorType>[]): VectorType[];
|
|
14
|
+
static subdivideCurveSegment<VectorType extends Vec>(curveSeg: CurveSegment<VectorType>, subCurveSegs: CurveSegment<VectorType>[]): void;
|
|
15
|
+
curve: Curve<VectorType>;
|
|
16
|
+
range: Interval;
|
|
17
|
+
child: CurveSegment<VectorType>[];
|
|
18
|
+
depth: number;
|
|
19
|
+
protected _box?: Box<VectorType>;
|
|
20
|
+
abstract getSegBox(): Box2 | Box3;
|
|
21
|
+
}
|
|
22
|
+
export declare class Curve2dSegment extends CurveSegment<Vec2> {
|
|
23
|
+
curve: Curve2;
|
|
24
|
+
child: Curve2dSegment[];
|
|
25
|
+
protected _box?: Box2;
|
|
26
|
+
constructor(curv: Curve2);
|
|
27
|
+
getSegBox(): Box2;
|
|
28
|
+
}
|
|
29
|
+
export declare class Curve3dSegment extends CurveSegment<Vec3> {
|
|
30
|
+
curve: Curve3;
|
|
31
|
+
child: Curve3dSegment[];
|
|
32
|
+
protected _box?: Box3;
|
|
33
|
+
constructor(curv: Curve3);
|
|
34
|
+
getSegBox(): Box3;
|
|
35
|
+
}
|
|
36
|
+
export declare class CurveSegmentPair<VectorType extends Vec> {
|
|
37
|
+
static combineCurveSegmentPairs<VectorType extends Vec>(curveSegmentPairs: CurveSegmentPair<VectorType>[], newCurveSegmentPairs: CurveSegmentPair<VectorType>[]): boolean;
|
|
38
|
+
static refreshCurveSegments<VectorType extends Vec>(curveSegmentPair: CurveSegmentPair<VectorType>[], curveSegments1: CurveSegment<VectorType>[], curveSegments2: CurveSegment<VectorType>[]): void;
|
|
39
|
+
protected _segment1: CurveSegment<VectorType>;
|
|
40
|
+
protected _segment2: CurveSegment<VectorType>;
|
|
41
|
+
get segment1(): CurveSegment<VectorType>;
|
|
42
|
+
get segment2(): CurveSegment<VectorType>;
|
|
43
|
+
protected _boxMinDist?: number;
|
|
44
|
+
constructor(segm1: CurveSegment<VectorType>, segm2: CurveSegment<VectorType>);
|
|
45
|
+
getTwoBoxsMinDistance(): number;
|
|
46
|
+
}
|
|
47
|
+
export declare class Curve2dSegmentPair extends CurveSegmentPair<Vec2> {
|
|
48
|
+
get segment1(): Curve2dSegment;
|
|
49
|
+
get segment2(): Curve2dSegment;
|
|
50
|
+
}
|
|
51
|
+
export declare class Curve3dSegmentPair extends CurveSegmentPair<Vec3> {
|
|
52
|
+
get segment1(): Curve3dSegment;
|
|
53
|
+
get segment2(): Curve3dSegment;
|
|
54
|
+
}
|
|
55
|
+
export declare class SurfacePatch {
|
|
56
|
+
static subdivideSurfacePatch(surfPatch: SurfacePatch, maxSubTimes?: number): SurfacePatch[];
|
|
57
|
+
surface: Surface;
|
|
58
|
+
rangeU: Interval;
|
|
59
|
+
rangeV: Interval;
|
|
60
|
+
child: SurfacePatch[];
|
|
61
|
+
depth: number;
|
|
62
|
+
private _box?;
|
|
63
|
+
constructor(surf: Surface, rangeUV?: Interval[]);
|
|
64
|
+
getPatchBox3d(): Box3;
|
|
65
|
+
}
|
|
66
|
+
export interface ICurveSurfacePair {
|
|
67
|
+
segment: Curve3dSegment;
|
|
68
|
+
patch: SurfacePatch;
|
|
69
|
+
}
|
|
70
|
+
export interface ISurfacePatchPair {
|
|
71
|
+
patch1: SurfacePatch;
|
|
72
|
+
patch2: SurfacePatch;
|
|
73
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Tol } from '../../base/tol';
|
|
2
|
+
import { Vec } from '../../base/vec';
|
|
3
|
+
import { Vec2 } from '../../base/vec2';
|
|
4
|
+
import { Vec3 } from '../../base/vec3';
|
|
5
|
+
import { Curve } from '../../geometry/curve';
|
|
6
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
7
|
+
import { Surface } from '../../geometry/surface';
|
|
8
|
+
import { types } from '../../type_define/i_types';
|
|
9
|
+
export interface ICurvePtInfo<PointType extends Vec> {
|
|
10
|
+
t: number;
|
|
11
|
+
pt: PointType;
|
|
12
|
+
}
|
|
13
|
+
export interface ICurve2dPtInfo extends ICurvePtInfo<Vec2> {
|
|
14
|
+
}
|
|
15
|
+
export interface ICurve3dPtInfo extends ICurvePtInfo<Vec3> {
|
|
16
|
+
}
|
|
17
|
+
export interface ISurfacePtInfo {
|
|
18
|
+
uv: types.IXY;
|
|
19
|
+
pt: Vec3;
|
|
20
|
+
}
|
|
21
|
+
export declare function calSurfaceFootParamIteratively(pt: Vec, surf: Surface, refT: types.IXY, tol?: number): ISurfacePtInfo | undefined;
|
|
22
|
+
export declare function estimateRootMultiplicity(sqrDistProportions: number[]): number;
|
|
23
|
+
export declare function calcNextCurvesIteration<VectorType extends Vec>(curve1: Curve<VectorType>, curve2: Curve<VectorType>, iteration: number[]): number[];
|
|
24
|
+
export declare function curvesIteration<VectorType extends Vec>(curve1: Curve<VectorType>, curve2: Curve<VectorType>, params: number[], tol?: Tol): boolean;
|
|
25
|
+
export declare function calcNextSurfaceSurfaceIterationSimple(surface1: Surface, surface2: Surface, iteration: types.IXY[]): number[];
|
|
26
|
+
export declare function calcNextSurfaceSurfaceIteration(surface1: Surface, surface2: Surface, iteration: types.IXY[]): number[];
|
|
27
|
+
export declare function calcNextIterationCurveSurface(curve: Curve3, surf: Surface, iteration: number[], newIteration: number[]): boolean;
|
|
28
|
+
export declare function calcNextIterationThreeSurfaces(surface1: Surface, surface2: Surface, surface3: Surface, iteration: types.IXY[]): number[];
|
|
29
|
+
export declare function surfaceSurfaceIteration(surface1: Surface, surface2: Surface, iteration: types.IXY[], lengthEps?: number, normalIteration?: boolean): boolean;
|
|
30
|
+
export declare function threeSurfacesIteration(surface1: Surface, surface2: Surface, surface3: Surface, iteration: types.IXY[], lengthEps?: number): boolean;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DiscreteParam } from '../../base/discrete_param';
|
|
2
|
+
import { Vec } from '../../base/vec';
|
|
3
|
+
import { Vec2 } from '../../base/vec2';
|
|
4
|
+
import { Vec3 } from '../../base/vec3';
|
|
5
|
+
import { Curve } from '../../geometry/curve';
|
|
6
|
+
import { types } from '../../type_define/i_types';
|
|
7
|
+
export interface IParamedPoint<PointType extends Vec> {
|
|
8
|
+
point: PointType;
|
|
9
|
+
param: number;
|
|
10
|
+
}
|
|
11
|
+
export type IParamedPoint2d = IParamedPoint<Vec2>;
|
|
12
|
+
export type IParamedPoint3d = IParamedPoint<Vec3>;
|
|
13
|
+
export declare class DiscreteCurve {
|
|
14
|
+
/**
|
|
15
|
+
* 离散三维曲线
|
|
16
|
+
* @param curve 曲线
|
|
17
|
+
* @param params 离散参数
|
|
18
|
+
*/
|
|
19
|
+
static execute<PointType extends Vec>(curve: Curve<PointType>, params: DiscreteParam): {
|
|
20
|
+
point: PointType;
|
|
21
|
+
param: number;
|
|
22
|
+
}[];
|
|
23
|
+
static nurbsDiscrete<PointType extends Vec>(curve: Curve<PointType>, start: number, end: number, params: DiscreteParam): {
|
|
24
|
+
point: PointType;
|
|
25
|
+
param: number;
|
|
26
|
+
}[];
|
|
27
|
+
static general<PointType extends Vec>(getPoint: (t: number) => PointType, getTangent: (t: number) => PointType, range: types.IInterval, singularities: number[] | undefined, params: DiscreteParam): IParamedPoint<PointType>[];
|
|
28
|
+
static getSpecificParams<PointType extends Vec>(curve: Curve<PointType>, params: DiscreteParam): DiscreteParam;
|
|
29
|
+
private static _getArcHintSegment;
|
|
30
|
+
private static _getNurbsHintSegment;
|
|
31
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Vec3 } from '../../base/vec3';
|
|
2
|
+
import { Surface } from '../../geometry/surface';
|
|
3
|
+
import { types } from '../../type_define/i_types';
|
|
4
|
+
import { DiscreteParam } from '../../base/discrete_param';
|
|
5
|
+
export interface IMesh2d {
|
|
6
|
+
vertices: types.IXY[];
|
|
7
|
+
faces: number[];
|
|
8
|
+
}
|
|
9
|
+
export declare class DiscreteRefiner {
|
|
10
|
+
static refine(surface: Surface, mesh2d: IMesh2d, params?: DiscreteParam): types.IMesh;
|
|
11
|
+
surface: Surface;
|
|
12
|
+
uvs: types.IXY[];
|
|
13
|
+
faces: number[];
|
|
14
|
+
params: DiscreteParam;
|
|
15
|
+
pts: Vec3[];
|
|
16
|
+
private _twinMap;
|
|
17
|
+
private _nodeMap;
|
|
18
|
+
private _queue;
|
|
19
|
+
private constructor();
|
|
20
|
+
private _execute;
|
|
21
|
+
private _init;
|
|
22
|
+
private _getNodeIndex;
|
|
23
|
+
private _remesh;
|
|
24
|
+
/** 对需要优化拆分的边进行排序 */
|
|
25
|
+
private _enQueue;
|
|
26
|
+
/** 拆分三角边 */
|
|
27
|
+
private _dequeue;
|
|
28
|
+
/**
|
|
29
|
+
* split triangle
|
|
30
|
+
* @param fi coedge to split
|
|
31
|
+
* @param idx3 new point's index
|
|
32
|
+
* @param toenQueue new coedges to enqueue
|
|
33
|
+
*/
|
|
34
|
+
private _splitCoedge;
|
|
35
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { DiscreteParam } from '../../base/discrete_param';
|
|
2
|
+
import { Tol } from '../../base/tol';
|
|
3
|
+
import { Vec3 } from '../../base/vec3';
|
|
4
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
5
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
6
|
+
import { Surface } from '../../geometry/surface';
|
|
7
|
+
import { types } from '../../type_define/i_types';
|
|
8
|
+
import { IMesh2d } from './discrete_refiner';
|
|
9
|
+
export type IDirectedCurve = IDirectedCurve2d | IDirectedCurve3d;
|
|
10
|
+
export interface IDirectedCurve3d {
|
|
11
|
+
curve: Curve3;
|
|
12
|
+
isSameDirection: boolean;
|
|
13
|
+
startPoint: Vec3;
|
|
14
|
+
endPoint: Vec3;
|
|
15
|
+
discretePts?: Vec3[];
|
|
16
|
+
}
|
|
17
|
+
export interface IDirectedCurve2d {
|
|
18
|
+
pCurve: Curve2;
|
|
19
|
+
}
|
|
20
|
+
export declare class DiscreteSurface {
|
|
21
|
+
/**
|
|
22
|
+
* 根据各参数曲线的离散结果来离散曲面。圆柱、圆锥支持跨周期域造型,椭球暂不支持跨周期域造型(受插点时的内外判定算法限制)
|
|
23
|
+
* @param surface 待离散的曲面
|
|
24
|
+
* @param curveLoops 由有向曲线组成的 Loops。第一个 Loop 为外环,其余为内环。数据会根据需要优化
|
|
25
|
+
* @param surfaceDirection 离散结果是否与曲面默认方向一致
|
|
26
|
+
* @param params 离散参数
|
|
27
|
+
* @param tol 计算容差
|
|
28
|
+
* @param constrainPt3ds 边界约束点
|
|
29
|
+
*/
|
|
30
|
+
static execute(surface: Surface, curveLoops: IDirectedCurve[][], surfaceDirection?: boolean, params?: DiscreteParam, tol?: Tol, constrainPt3ds?: Vec3[]): types.IMesh;
|
|
31
|
+
/**
|
|
32
|
+
* 根据已知曲面的loop2ds的离散点,计算surface的离散mesh数据
|
|
33
|
+
* @param surface 曲面
|
|
34
|
+
* @param pt2dsFromLoops loop2ds的离散点,二维数组。一个loop一个数组,多个loop就是二维数组
|
|
35
|
+
* @param surfaceDirection face方向是否与surface同向
|
|
36
|
+
* @param params 离散参数
|
|
37
|
+
*/
|
|
38
|
+
static dircreteFromLoopPts(surface: Surface, p2Loops: types.IXY[][], surfaceDirection: boolean | undefined, params: DiscreteParam | undefined, uvEps: types.IXY): types.IMesh;
|
|
39
|
+
/**
|
|
40
|
+
* 计算插值点,用于计算包围盒
|
|
41
|
+
* @param surface
|
|
42
|
+
* @param curveLoops
|
|
43
|
+
* @param params
|
|
44
|
+
* @param tol
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
static simplePoints(surface: Surface, curveLoops: IDirectedCurve[][], params?: DiscreteParam, tol?: Tol): types.IXYZ[];
|
|
48
|
+
static mesh2dto3d(surface: Surface, mesh2d: IMesh2d): types.IMesh;
|
|
49
|
+
/**
|
|
50
|
+
* 尝试快速离散类矩形无洞边界
|
|
51
|
+
* @param p2Loops
|
|
52
|
+
* @param faceDir
|
|
53
|
+
* @param uvHint
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
56
|
+
/** 将三维曲线转化为二维点环 */
|
|
57
|
+
private static _discreteSurfaceLoops;
|
|
58
|
+
/** 将三维曲线转为离散参数曲线点 */
|
|
59
|
+
private static _getPCurvePoints;
|
|
60
|
+
/** 尝试获取一些复杂曲面的简单参数曲线,用于边面每次都反求参数,以提升离散速度 */
|
|
61
|
+
private static _getSimplePCurve;
|
|
62
|
+
/**
|
|
63
|
+
* 给定极点处参数曲线的首尾端点,返回需要差值的点
|
|
64
|
+
* @param pt1 首点
|
|
65
|
+
* @param pt2 尾点
|
|
66
|
+
* @param uHintCache 插值时的参考u值,范围为 [0~2 period],包含首尾点
|
|
67
|
+
* @param uEps u向容差
|
|
68
|
+
*/
|
|
69
|
+
private static _getPoleDiscreteUvs;
|
|
70
|
+
/** 根据曲面类型分别计算u向、v向插值点密度 */
|
|
71
|
+
private static _getInnerPointHint;
|
|
72
|
+
/** 筛选插值点,得到处于 loop 范围内的插值点 */
|
|
73
|
+
private static _getPointsInside;
|
|
74
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PolyCurve, Vec2 } from '../..';
|
|
2
|
+
import { DiscreteParam } from '../../base/discrete_param';
|
|
3
|
+
import { Polygon } from '../../topology/polygon';
|
|
4
|
+
import { IMesh2d } from './discrete_refiner';
|
|
5
|
+
export declare class DiscreteTopology {
|
|
6
|
+
/**
|
|
7
|
+
* 网格化PolygonEx,得到三角面片
|
|
8
|
+
* @param polygon
|
|
9
|
+
* @param params 离散精度
|
|
10
|
+
* @param startIdx
|
|
11
|
+
*/
|
|
12
|
+
static tessPolygonEx(polygon: Polygon, params?: DiscreteParam, _startIdx?: number): IMesh2d;
|
|
13
|
+
/**
|
|
14
|
+
* 网格化polygon,得到三角面片
|
|
15
|
+
* @param _polygon
|
|
16
|
+
* @param params 离散精度
|
|
17
|
+
* @param bCalPolygonEx
|
|
18
|
+
*/
|
|
19
|
+
static tessPolygon(_polygon: Polygon, params?: DiscreteParam, bCalPolygonEx?: boolean): IMesh2d;
|
|
20
|
+
/**
|
|
21
|
+
* 离散polycurve,得到离散的点集
|
|
22
|
+
* @param curve2ds
|
|
23
|
+
* @param params 离散精度
|
|
24
|
+
*/
|
|
25
|
+
static discretePolyline(curve2ds: PolyCurve, params?: DiscreteParam): Vec2[];
|
|
26
|
+
/**
|
|
27
|
+
* 离散polygon的边界,得到离散的点集
|
|
28
|
+
* @param polygon
|
|
29
|
+
* @param params 离散精度
|
|
30
|
+
*/
|
|
31
|
+
static discretePolygon(polygon: Polygon, params?: DiscreteParam): Vec2[][];
|
|
32
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { types } from '../../type_define/i_types';
|
|
2
|
+
import { Vec } from '../../base/vec';
|
|
3
|
+
import { Vec2 } from '../../base/vec2';
|
|
4
|
+
import { Vec3 } from '../../base/vec3';
|
|
5
|
+
import { Tol } from '../../base/tol';
|
|
6
|
+
import { DiscreteParam } from '../../base/discrete_param';
|
|
7
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
8
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
9
|
+
import { Surface } from '../../geometry/surface';
|
|
10
|
+
import { Ln2 } from '../../geometry/ln2';
|
|
11
|
+
import { IMesh2d } from './discrete_refiner';
|
|
12
|
+
import { Curve } from '../../geometry/curve';
|
|
13
|
+
import { IDirectedCurve } from './discrete_surface';
|
|
14
|
+
import { IParamedPoint } from './discrete_curve';
|
|
15
|
+
/**
|
|
16
|
+
* @author tiansk
|
|
17
|
+
* 离散算法,对曲线、曲面离散算法进行了封装
|
|
18
|
+
*/
|
|
19
|
+
declare class DiscreteUtil {
|
|
20
|
+
private static readonly _POLY2TRI_ANGLE_EPS;
|
|
21
|
+
/**
|
|
22
|
+
* 调用 Libtess 进行离散,适用于直纹面
|
|
23
|
+
* @param loops
|
|
24
|
+
* @param stepLenth
|
|
25
|
+
* @param startIdx
|
|
26
|
+
*/
|
|
27
|
+
static tessVector2(loops: types.IXY[][]): IMesh2d;
|
|
28
|
+
/**
|
|
29
|
+
* 调用 poly2tri 进行离散,适用一般曲面
|
|
30
|
+
* @param loops
|
|
31
|
+
* @param points
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
static tessByPoly2tri(loops: types.IXY[][], points?: types.IXY[]): IMesh2d;
|
|
35
|
+
/**
|
|
36
|
+
* 离散二维直线段,按照给定的步距
|
|
37
|
+
* @param line2d
|
|
38
|
+
* @param stepLenth
|
|
39
|
+
*/
|
|
40
|
+
static discreteLine2d(line2d: Ln2, stepLenth: number): Ln2[];
|
|
41
|
+
/**
|
|
42
|
+
* 离散二维曲线
|
|
43
|
+
* @param curve 曲线
|
|
44
|
+
* @param params 离散参数
|
|
45
|
+
*/
|
|
46
|
+
static discreteCurve2d(curve: Curve2, params?: DiscreteParam): Vec2[];
|
|
47
|
+
/**
|
|
48
|
+
* 离散三维曲线
|
|
49
|
+
* @param curve 曲线
|
|
50
|
+
* @param params 离散参数
|
|
51
|
+
*/
|
|
52
|
+
static discreteCurve3d(curve: Curve3, params?: DiscreteParam): Vec3[];
|
|
53
|
+
/**
|
|
54
|
+
* 离散三维曲线
|
|
55
|
+
* @param curve 曲线
|
|
56
|
+
* @param params 离散参数
|
|
57
|
+
*/
|
|
58
|
+
static discreteCurve<PointType extends Vec>(curve: Curve<PointType>, params: DiscreteParam): IParamedPoint<PointType>[];
|
|
59
|
+
/**
|
|
60
|
+
* 根据曲面曲率离散其参数曲线
|
|
61
|
+
* @param curve 参数曲线
|
|
62
|
+
* @param surface 曲面
|
|
63
|
+
* @param params 离散参数
|
|
64
|
+
*/
|
|
65
|
+
static discreteCurve2dOnSurface(curve: Curve2, surface: Surface, params?: DiscreteParam): {
|
|
66
|
+
points: Vec3[];
|
|
67
|
+
uvs: Vec2[];
|
|
68
|
+
};
|
|
69
|
+
static discreteGeneralCurve<PointType extends Vec>(getPoint: (t: number) => PointType, getTangent: (t: number) => PointType, range: types.IInterval, singularities: number[] | undefined, params: DiscreteParam): IParamedPoint<PointType>[];
|
|
70
|
+
/**
|
|
71
|
+
* 根据各参数曲线的离散结果来离散曲面。圆柱、圆锥支持跨周期域造型,椭球暂不支持跨周期域造型(受插点时的内外判定算法限制)
|
|
72
|
+
* @param surface 待离散的曲面
|
|
73
|
+
* @param curveLoops 由有向曲线组成的 Loops。第一个 Loop 为外环,其余为内环。数据会根据需要优化
|
|
74
|
+
* @param surfaceDirection 离散结果是否与曲面默认方向一致
|
|
75
|
+
* @param params 离散参数
|
|
76
|
+
* @param tol 计算容差
|
|
77
|
+
*/
|
|
78
|
+
static discreteSurface(surface: Surface, curveLoops: IDirectedCurve[][], surfaceDirection?: boolean, params?: DiscreteParam, tol?: Tol, constrainPt3ds?: Vec3[]): types.IMesh;
|
|
79
|
+
/**
|
|
80
|
+
* 将面离散成点
|
|
81
|
+
* @param surface
|
|
82
|
+
* @param curveLoops
|
|
83
|
+
* @param params
|
|
84
|
+
* @param tol
|
|
85
|
+
* @returns
|
|
86
|
+
*/
|
|
87
|
+
static discreteSurfaceIntoPoints(surface: Surface, curveLoops: IDirectedCurve[][], params?: DiscreteParam, tol?: Tol): types.IXYZ[];
|
|
88
|
+
/**
|
|
89
|
+
* 使用细分三角边的方式对 Mesh 进行优化
|
|
90
|
+
* @param surface 待离散的曲面
|
|
91
|
+
* @param mesh2d 二维离散结果
|
|
92
|
+
* @param params 离散参数
|
|
93
|
+
*/
|
|
94
|
+
static refineMesh3d(surface: Surface, mesh2d: IMesh2d, params?: DiscreteParam): types.IMesh;
|
|
95
|
+
}
|
|
96
|
+
export { DiscreteUtil };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { types } from '../..';
|
|
2
|
+
export interface IPoint extends types.IXY {
|
|
3
|
+
id: number;
|
|
4
|
+
}
|
|
5
|
+
export interface IEdge {
|
|
6
|
+
pt1: IPoint;
|
|
7
|
+
pt2: IPoint;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 仅供网格离散的三角形数据结构
|
|
11
|
+
*
|
|
12
|
+
* 0
|
|
13
|
+
* / \
|
|
14
|
+
* / \
|
|
15
|
+
* / \
|
|
16
|
+
* n2 / \ n1
|
|
17
|
+
* / \
|
|
18
|
+
* / \
|
|
19
|
+
* 1-------------2
|
|
20
|
+
* neighbors0
|
|
21
|
+
*
|
|
22
|
+
* neighbors和constrainedEdge以及delaunayEdge序号一致
|
|
23
|
+
*/
|
|
24
|
+
export declare class Triangle {
|
|
25
|
+
pts: IPoint[];
|
|
26
|
+
neighbors: (Triangle | undefined)[];
|
|
27
|
+
constrainedEdge: boolean[];
|
|
28
|
+
delaunayEdge: boolean[];
|
|
29
|
+
visit: boolean;
|
|
30
|
+
constructor(p1: IPoint, p2: IPoint, p3: IPoint);
|
|
31
|
+
containsPt(point: IPoint): boolean;
|
|
32
|
+
containsEdge(edge: IEdge): boolean;
|
|
33
|
+
containsPts(p1: IPoint, p2: IPoint): boolean;
|
|
34
|
+
markNeighborPointers(p1: IPoint, p2: IPoint, t: Triangle): void;
|
|
35
|
+
markNeighbor(t: Triangle): void;
|
|
36
|
+
clearNeighbors(): void;
|
|
37
|
+
clearDelaunayEdges(): void;
|
|
38
|
+
pointCW(p: IPoint): IPoint | null;
|
|
39
|
+
pointCCW(p: IPoint): IPoint | undefined;
|
|
40
|
+
neighborCW(p: IPoint): Triangle | undefined;
|
|
41
|
+
neighborCCW(p: IPoint): Triangle | undefined;
|
|
42
|
+
getConstrainedEdgeCW(p: IPoint): boolean;
|
|
43
|
+
getConstrainedEdgeCCW(p: IPoint): boolean;
|
|
44
|
+
getConstrainedEdgeAcross(p: IPoint): boolean;
|
|
45
|
+
setConstrainedEdgeCW(p: IPoint, ce: boolean): void;
|
|
46
|
+
setConstrainedEdgeCCW(p: IPoint, ce: boolean): void;
|
|
47
|
+
getDelaunayEdgeCW(p: IPoint): boolean;
|
|
48
|
+
getDelaunayEdgeCCW(p: IPoint): boolean;
|
|
49
|
+
setDelaunayEdgeCW(p: IPoint, e: boolean): void;
|
|
50
|
+
setDelaunayEdgeCCW(p: IPoint, e: boolean): void;
|
|
51
|
+
neighborAcross(p: IPoint): Triangle | undefined;
|
|
52
|
+
oppositePoint(t: Triangle, p: IPoint): IPoint | null;
|
|
53
|
+
legalize(opoint: IPoint, npoint: IPoint): void;
|
|
54
|
+
index(p: IPoint): 2 | 1 | 0;
|
|
55
|
+
edgeIndex(p1: IPoint, p2: IPoint): 2 | 1 | 0 | -1;
|
|
56
|
+
markConstrainedEdgeByEdge(edge: IEdge): void;
|
|
57
|
+
markConstrainedEdgeByPoints(p: IPoint, q: IPoint): void;
|
|
58
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function tessTriangulate(contours: number[][][], normal: number[]): number[][];
|
|
2
|
+
/**
|
|
3
|
+
* Represent a vertex with index, internally used to improve performance.
|
|
4
|
+
*/
|
|
5
|
+
export declare class LibtessVertex extends Array<number> {
|
|
6
|
+
index: number;
|
|
7
|
+
constructor(v: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
z?: number;
|
|
11
|
+
}, idx: number);
|
|
12
|
+
}
|