@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
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { Precision } from '../../utils/precision';
|
|
2
|
-
import { assertDiscretize, DISCRETIZE_ERROR_PREFIX } from '../discretize_errors';
|
|
3
|
-
function cloneSample(sample) {
|
|
4
|
-
return { u: sample.u, p: sample.p.clone() };
|
|
5
|
-
}
|
|
6
|
-
function deduplicateAdjacent(samples, tol) {
|
|
7
|
-
if (samples.length <= 1)
|
|
8
|
-
return samples;
|
|
9
|
-
const deduped = [samples[0]];
|
|
10
|
-
for (let i = 1; i < samples.length; i++) {
|
|
11
|
-
const prev = deduped[deduped.length - 1];
|
|
12
|
-
const cur = samples[i];
|
|
13
|
-
if (prev.p.distanceTo(cur.p) <= tol)
|
|
14
|
-
continue;
|
|
15
|
-
deduped.push(cur);
|
|
16
|
-
}
|
|
17
|
-
return deduped;
|
|
18
|
-
}
|
|
19
|
-
function removeTrailingEndpoint(samples, endParam, endPoint, tol) {
|
|
20
|
-
while (samples.length > 1) {
|
|
21
|
-
const last = samples[samples.length - 1];
|
|
22
|
-
if (Math.abs(last.u - endParam) <= Precision.CURVE_PARAM_EPS || last.p.distanceTo(endPoint) <= tol) {
|
|
23
|
-
samples.pop();
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
break;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function ensureOpenEndIncluded(samples, endParam, endPoint, tol) {
|
|
30
|
-
const endSample = { u: endParam, p: endPoint.clone() };
|
|
31
|
-
if (samples.length === 0) {
|
|
32
|
-
samples.push(endSample);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const last = samples[samples.length - 1];
|
|
36
|
-
if (Math.abs(last.u - endParam) <= Precision.CURVE_PARAM_EPS || last.p.distanceTo(endPoint) <= tol) {
|
|
37
|
-
samples[samples.length - 1] = endSample;
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (endParam > last.u + Precision.CURVE_PARAM_EPS) {
|
|
41
|
-
samples.push(endSample);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
samples[samples.length - 1] = endSample;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function removeClosedDuplicateTail(samples, tol) {
|
|
48
|
-
while (samples.length > 1) {
|
|
49
|
-
const first = samples[0];
|
|
50
|
-
const last = samples[samples.length - 1];
|
|
51
|
-
if (first.p.distanceTo(last.p) <= tol) {
|
|
52
|
-
samples.pop();
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
export function postprocessDiscretizeResult(curve, raw, options) {
|
|
59
|
-
const range = curve.getRange();
|
|
60
|
-
const startParam = range.start;
|
|
61
|
-
const endParam = range.end;
|
|
62
|
-
const startPoint = curve.pointAt(startParam);
|
|
63
|
-
const endPoint = curve.pointAt(endParam);
|
|
64
|
-
let samples = raw.samples.map(cloneSample);
|
|
65
|
-
if (samples.length === 0) {
|
|
66
|
-
samples = [{ u: startParam, p: startPoint.clone() }];
|
|
67
|
-
}
|
|
68
|
-
samples = deduplicateAdjacent(samples, options.effectivePointMergeTol);
|
|
69
|
-
samples[0] = { u: startParam, p: startPoint.clone() };
|
|
70
|
-
if (raw.closed) {
|
|
71
|
-
removeClosedDuplicateTail(samples, options.effectivePointMergeTol);
|
|
72
|
-
}
|
|
73
|
-
else if (options.includeEnd) {
|
|
74
|
-
ensureOpenEndIncluded(samples, endParam, endPoint, options.effectivePointMergeTol);
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
removeTrailingEndpoint(samples, endParam, endPoint, options.effectivePointMergeTol);
|
|
78
|
-
}
|
|
79
|
-
if (samples.length === 0) {
|
|
80
|
-
samples.push({ u: startParam, p: startPoint.clone() });
|
|
81
|
-
}
|
|
82
|
-
const result = { samples, closed: raw.closed };
|
|
83
|
-
assertDiscretizeResult(curve, result, options);
|
|
84
|
-
return result;
|
|
85
|
-
}
|
|
86
|
-
export function assertDiscretizeResult(curve, result, options) {
|
|
87
|
-
assertDiscretize(result.samples.length > 0, DISCRETIZE_ERROR_PREFIX.convergence, 'empty discretize result');
|
|
88
|
-
for (let i = 1; i < result.samples.length; i++) {
|
|
89
|
-
const prev = result.samples[i - 1];
|
|
90
|
-
const cur = result.samples[i];
|
|
91
|
-
assertDiscretize(cur.u > prev.u, DISCRETIZE_ERROR_PREFIX.convergence, 'sample parameters must be strictly increasing');
|
|
92
|
-
}
|
|
93
|
-
const range = curve.getRange();
|
|
94
|
-
const start = range.start;
|
|
95
|
-
const end = range.end;
|
|
96
|
-
const first = result.samples[0];
|
|
97
|
-
assertDiscretize(Math.abs(first.u - start) <= Precision.CURVE_PARAM_EPS, DISCRETIZE_ERROR_PREFIX.convergence, 'first sample must match range start');
|
|
98
|
-
if (result.closed) {
|
|
99
|
-
if (result.samples.length > 1) {
|
|
100
|
-
const last = result.samples[result.samples.length - 1];
|
|
101
|
-
assertDiscretize(first.p.distanceTo(last.p) > options.effectivePointMergeTol, DISCRETIZE_ERROR_PREFIX.convergence, 'closed result must not duplicate head/tail points');
|
|
102
|
-
}
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
if (!options.includeEnd)
|
|
106
|
-
return;
|
|
107
|
-
const last = result.samples[result.samples.length - 1];
|
|
108
|
-
assertDiscretize(Math.abs(last.u - end) <= Precision.CURVE_PARAM_EPS, DISCRETIZE_ERROR_PREFIX.convergence, 'last sample must match range end');
|
|
109
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Vec2 } from '../../core/vec2';
|
|
2
|
-
import type { Curve2 } from '../../curves/curve2';
|
|
3
|
-
export declare const CHORD_CHECK_FRACTIONS: readonly [0.25, 0.5, 0.75];
|
|
4
|
-
export declare function lerpNumber(a: number, b: number, t: number): number;
|
|
5
|
-
export declare function distancePointToSegment(point: Vec2, segStart: Vec2, segEnd: Vec2): number;
|
|
6
|
-
export declare function tangentTurnAbs(curve: Curve2, u0: number, u1: number): number;
|
|
7
|
-
export declare function maxChordDeviationAtFractions(curve: Curve2, u0: number, u1: number, p0: Vec2, p1: Vec2, fractions?: readonly [0.25, 0.5, 0.75]): number;
|
|
8
|
-
//# sourceMappingURL=sampling_utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sampling_utils.d.ts","sourceRoot":"","sources":["../../../src/discretize/internal/sampling_utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAEjD,eAAO,MAAM,qBAAqB,4BAA6B,CAAA;AAE/D,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAEzD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,UAW/E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UAOnE;AAED,wBAAgB,4BAA4B,CACxC,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,IAAI,EACR,EAAE,EAAE,IAAI,EACR,SAAS,6BAAwB,UAYpC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Precision } from '../../utils/precision';
|
|
2
|
-
export const CHORD_CHECK_FRACTIONS = [0.25, 0.5, 0.75];
|
|
3
|
-
export function lerpNumber(a, b, t) {
|
|
4
|
-
return a + (b - a) * t;
|
|
5
|
-
}
|
|
6
|
-
export function distancePointToSegment(point, segStart, segEnd) {
|
|
7
|
-
const edge = segEnd.subtracted(segStart);
|
|
8
|
-
const lenSq = edge.lenSq();
|
|
9
|
-
if (lenSq <= Precision.CURVE_LENGTH_EPS * Precision.CURVE_LENGTH_EPS) {
|
|
10
|
-
return point.distanceTo(segStart);
|
|
11
|
-
}
|
|
12
|
-
const rel = point.subtracted(segStart);
|
|
13
|
-
const t = Math.max(0, Math.min(1, rel.dot(edge) / lenSq));
|
|
14
|
-
const proj = segStart.added(edge.scaled(t));
|
|
15
|
-
return point.distanceTo(proj);
|
|
16
|
-
}
|
|
17
|
-
export function tangentTurnAbs(curve, u0, u1) {
|
|
18
|
-
const t0 = curve.tangentAt(u0);
|
|
19
|
-
const t1 = curve.tangentAt(u1);
|
|
20
|
-
if (t0.lenSq() <= Precision.CURVE_NEWTON_EPS || t1.lenSq() <= Precision.CURVE_NEWTON_EPS) {
|
|
21
|
-
return 0;
|
|
22
|
-
}
|
|
23
|
-
return Math.abs(t0.angleTo(t1));
|
|
24
|
-
}
|
|
25
|
-
export function maxChordDeviationAtFractions(curve, u0, u1, p0, p1, fractions = CHORD_CHECK_FRACTIONS) {
|
|
26
|
-
let maxDeviation = 0;
|
|
27
|
-
for (const fraction of fractions) {
|
|
28
|
-
const um = lerpNumber(u0, u1, fraction);
|
|
29
|
-
const pm = curve.pointAt(um);
|
|
30
|
-
const deviation = distancePointToSegment(pm, p0, p1);
|
|
31
|
-
if (deviation > maxDeviation) {
|
|
32
|
-
maxDeviation = deviation;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return maxDeviation;
|
|
36
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"register_builtin_strategies.d.ts","sourceRoot":"","sources":["../../src/discretize/register_builtin_strategies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAMhE,wBAAgB,mCAAmC,CAAC,QAAQ,EAAE,0BAA0B,QAKvF"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { bsplineDiscretizeStrategy } from './strategies/bspline_strategy';
|
|
2
|
-
import { circleDiscretizeStrategy } from './strategies/circle_strategy';
|
|
3
|
-
import { ellipseDiscretizeStrategy } from './strategies/ellipse_strategy';
|
|
4
|
-
import { lineDiscretizeStrategy } from './strategies/line_strategy';
|
|
5
|
-
export function registerBuiltinDiscretizeStrategies(registry) {
|
|
6
|
-
registry.register(lineDiscretizeStrategy);
|
|
7
|
-
registry.register(circleDiscretizeStrategy);
|
|
8
|
-
registry.register(ellipseDiscretizeStrategy);
|
|
9
|
-
registry.register(bsplineDiscretizeStrategy);
|
|
10
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { BSpline2 } from '../../curves/bspline2';
|
|
2
|
-
import type { DiscretizeResult, ResolvedDiscretizeOptions } from '../discretize_types';
|
|
3
|
-
export declare function discretizeBSplineCurve(curve: BSpline2, options: ResolvedDiscretizeOptions): DiscretizeResult;
|
|
4
|
-
//# sourceMappingURL=bspline_strategy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bspline_strategy.d.ts","sourceRoot":"","sources":["../../../src/discretize/strategies/bspline_strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAGhD,OAAO,KAAK,EAAE,gBAAgB,EAAkB,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAqHtG,wBAAgB,sBAAsB,CAClC,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,yBAAyB,GACnC,gBAAgB,CA2BlB"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { Precision } from '../../utils/precision';
|
|
2
|
-
import { throwDiscretizeConvergenceError, throwDiscretizeOverflowError } from '../discretize_errors';
|
|
3
|
-
import { maxChordDeviationAtFractions, tangentTurnAbs } from '../internal/sampling_utils';
|
|
4
|
-
function getContinuityBreaks(curve) {
|
|
5
|
-
const knots = curve.expandedKnots;
|
|
6
|
-
const degree = curve.degree;
|
|
7
|
-
const range = curve.getRange();
|
|
8
|
-
const breaks = [];
|
|
9
|
-
for (let i = 0; i < knots.length;) {
|
|
10
|
-
const knot = knots[i];
|
|
11
|
-
let multiplicity = 1;
|
|
12
|
-
i++;
|
|
13
|
-
while (i < knots.length && Math.abs(knots[i] - knot) <= Precision.CURVE_PARAM_EPS) {
|
|
14
|
-
multiplicity++;
|
|
15
|
-
i++;
|
|
16
|
-
}
|
|
17
|
-
if (multiplicity >= degree && knot > range.start + Precision.CURVE_PARAM_EPS && knot < range.end - Precision.CURVE_PARAM_EPS) {
|
|
18
|
-
breaks.push(knot);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return breaks;
|
|
22
|
-
}
|
|
23
|
-
function buildInitialSegments(curve, options) {
|
|
24
|
-
const range = curve.getRange();
|
|
25
|
-
const span = range.length();
|
|
26
|
-
const boundaries = new Set([range.start, range.end, ...getContinuityBreaks(curve)]);
|
|
27
|
-
for (let i = 1; i < options.minSegments; i++) {
|
|
28
|
-
boundaries.add(range.start + (span * i) / options.minSegments);
|
|
29
|
-
}
|
|
30
|
-
const sorted = [...boundaries].sort((a, b) => a - b);
|
|
31
|
-
const segments = [];
|
|
32
|
-
for (let i = 0; i < sorted.length - 1; i++) {
|
|
33
|
-
const u0 = sorted[i];
|
|
34
|
-
const u1 = sorted[i + 1];
|
|
35
|
-
if (u1 - u0 <= Precision.CURVE_PARAM_EPS)
|
|
36
|
-
continue;
|
|
37
|
-
segments.push({
|
|
38
|
-
u0,
|
|
39
|
-
u1,
|
|
40
|
-
p0: curve.pointAt(u0),
|
|
41
|
-
p1: curve.pointAt(u1),
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
return segments;
|
|
45
|
-
}
|
|
46
|
-
function shouldSplitSegment(curve, segment, options) {
|
|
47
|
-
const chordLength = segment.p0.distanceTo(segment.p1);
|
|
48
|
-
const deviation = maxChordDeviationAtFractions(curve, segment.u0, segment.u1, segment.p0, segment.p1);
|
|
49
|
-
const turn = tangentTurnAbs(curve, segment.u0, segment.u1);
|
|
50
|
-
const violateMaxLength = chordLength > options.maxSegmentLength;
|
|
51
|
-
const violateChord = deviation > options.effectiveChordTol;
|
|
52
|
-
const violateTurn = turn > options.angleTolRad;
|
|
53
|
-
if (!violateMaxLength && !violateChord && !violateTurn)
|
|
54
|
-
return 'ok';
|
|
55
|
-
if (chordLength <= options.minSegmentLengthInternal) {
|
|
56
|
-
return 'blocked';
|
|
57
|
-
}
|
|
58
|
-
return 'split';
|
|
59
|
-
}
|
|
60
|
-
function refineSegments(curve, initialSegments, options) {
|
|
61
|
-
const segments = [...initialSegments];
|
|
62
|
-
for (let i = 0; i < segments.length; i++) {
|
|
63
|
-
const segment = segments[i];
|
|
64
|
-
const verdict = shouldSplitSegment(curve, segment, options);
|
|
65
|
-
if (verdict === 'ok')
|
|
66
|
-
continue;
|
|
67
|
-
if (verdict === 'blocked') {
|
|
68
|
-
throwDiscretizeOverflowError('bspline strategy cannot satisfy constraints within internal segment limit');
|
|
69
|
-
}
|
|
70
|
-
if (segments.length >= options.maxSegments) {
|
|
71
|
-
throwDiscretizeOverflowError('bspline strategy exceeds maxSegments constraints');
|
|
72
|
-
}
|
|
73
|
-
const mid = (segment.u0 + segment.u1) * 0.5;
|
|
74
|
-
if (Math.abs(mid - segment.u0) <= Precision.CURVE_PARAM_EPS || Math.abs(segment.u1 - mid) <= Precision.CURVE_PARAM_EPS) {
|
|
75
|
-
throwDiscretizeConvergenceError('bspline strategy failed to converge');
|
|
76
|
-
}
|
|
77
|
-
const pm = curve.pointAt(mid);
|
|
78
|
-
segments.splice(i, 1, { u0: segment.u0, u1: mid, p0: segment.p0, p1: pm }, { u0: mid, u1: segment.u1, p0: pm, p1: segment.p1 });
|
|
79
|
-
i--;
|
|
80
|
-
}
|
|
81
|
-
return segments;
|
|
82
|
-
}
|
|
83
|
-
function toSamples(segments) {
|
|
84
|
-
const samples = [{ u: segments[0].u0, p: segments[0].p0.clone() }];
|
|
85
|
-
for (const segment of segments) {
|
|
86
|
-
samples.push({ u: segment.u1, p: segment.p1.clone() });
|
|
87
|
-
}
|
|
88
|
-
return samples;
|
|
89
|
-
}
|
|
90
|
-
export function discretizeBSplineCurve(curve, options) {
|
|
91
|
-
const range = curve.getRange();
|
|
92
|
-
const span = range.length();
|
|
93
|
-
const curveLen = curve.length();
|
|
94
|
-
if (curveLen <= Precision.CURVE_LENGTH_EPS || span <= Precision.CURVE_PARAM_EPS) {
|
|
95
|
-
return {
|
|
96
|
-
closed: false,
|
|
97
|
-
samples: [{ u: range.start, p: curve.pointAt(range.start) }],
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
const initialSegments = buildInitialSegments(curve, options);
|
|
101
|
-
if (initialSegments.length === 0) {
|
|
102
|
-
return {
|
|
103
|
-
closed: false,
|
|
104
|
-
samples: [{ u: range.start, p: curve.pointAt(range.start) }],
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
if (initialSegments.length > options.maxSegments) {
|
|
108
|
-
throwDiscretizeOverflowError('bspline strategy exceeds maxSegments constraints');
|
|
109
|
-
}
|
|
110
|
-
const refined = refineSegments(curve, initialSegments, options);
|
|
111
|
-
return {
|
|
112
|
-
closed: false,
|
|
113
|
-
samples: toSamples(refined),
|
|
114
|
-
};
|
|
115
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Arc2 } from '../../curves/arc2';
|
|
2
|
-
import { Circle2 } from '../../curves/circle2';
|
|
3
|
-
import type { DiscretizeResult, ResolvedDiscretizeOptions } from '../discretize_types';
|
|
4
|
-
type CircleLikeCurve = Circle2 | Arc2;
|
|
5
|
-
export declare function discretizeCircleLikeCurve(curve: CircleLikeCurve, options: ResolvedDiscretizeOptions): DiscretizeResult;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=circle_strategy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"circle_strategy.d.ts","sourceRoot":"","sources":["../../../src/discretize/strategies/circle_strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAG9C,OAAO,KAAK,EAAE,gBAAgB,EAAkB,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAEtG,KAAK,eAAe,GAAG,OAAO,GAAG,IAAI,CAAA;AAwBrC,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,yBAAyB,GACnC,gBAAgB,CAoClB"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Circle2 } from '../../curves/circle2';
|
|
2
|
-
import { Precision } from '../../utils/precision';
|
|
3
|
-
import { throwDiscretizeOverflowError } from '../discretize_errors';
|
|
4
|
-
function dThetaByChord(radius, chordTol) {
|
|
5
|
-
const ratio = 1 - chordTol / radius;
|
|
6
|
-
if (ratio <= -1)
|
|
7
|
-
return Math.PI * 2;
|
|
8
|
-
const clamped = Math.min(1, Math.max(-1, ratio));
|
|
9
|
-
return 2 * Math.acos(clamped);
|
|
10
|
-
}
|
|
11
|
-
function buildCircleLikeSamples(curve, segmentCount, closed) {
|
|
12
|
-
const range = curve.getRange();
|
|
13
|
-
const start = range.start;
|
|
14
|
-
const span = range.length();
|
|
15
|
-
const steps = closed ? segmentCount : segmentCount + 1;
|
|
16
|
-
const samples = [];
|
|
17
|
-
for (let i = 0; i < steps; i++) {
|
|
18
|
-
const t = i / segmentCount;
|
|
19
|
-
const u = start + span * t;
|
|
20
|
-
samples.push({ u, p: curve.pointAt(u) });
|
|
21
|
-
}
|
|
22
|
-
return samples;
|
|
23
|
-
}
|
|
24
|
-
export function discretizeCircleLikeCurve(curve, options) {
|
|
25
|
-
const range = curve.getRange();
|
|
26
|
-
const sweep = range.length();
|
|
27
|
-
const radius = curve.radius;
|
|
28
|
-
const totalLen = curve.length();
|
|
29
|
-
const closed = curve instanceof Circle2 || Math.abs(sweep - Math.PI * 2) <= Precision.CURVE_PARAM_EPS;
|
|
30
|
-
if (totalLen <= Precision.CURVE_LENGTH_EPS || sweep <= Precision.CURVE_PARAM_EPS) {
|
|
31
|
-
return {
|
|
32
|
-
closed,
|
|
33
|
-
samples: [{ u: range.start, p: curve.pointAt(range.start) }],
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
const maxByInternal = Math.max(1, Math.floor(totalLen / options.minSegmentLengthInternal));
|
|
37
|
-
const dThetaChord = dThetaByChord(radius, options.effectiveChordTol);
|
|
38
|
-
const dThetaAngle = options.angleTolRad;
|
|
39
|
-
const dThetaLength = options.maxSegmentLength === Number.POSITIVE_INFINITY
|
|
40
|
-
? Number.POSITIVE_INFINITY
|
|
41
|
-
: options.maxSegmentLength / radius;
|
|
42
|
-
const dTheta = Math.max(Precision.CURVE_PARAM_EPS, Math.min(dThetaChord, dThetaAngle, dThetaLength));
|
|
43
|
-
const requiredSegments = Math.max(1, Math.ceil(sweep / dTheta));
|
|
44
|
-
if (requiredSegments > options.maxSegments || requiredSegments > maxByInternal) {
|
|
45
|
-
throwDiscretizeOverflowError('circle strategy exceeds maxSegments constraints');
|
|
46
|
-
}
|
|
47
|
-
const segmentCount = Math.max(requiredSegments, options.minSegments);
|
|
48
|
-
if (segmentCount > options.maxSegments || segmentCount > maxByInternal) {
|
|
49
|
-
throwDiscretizeOverflowError('circle strategy exceeds maxSegments constraints');
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
closed,
|
|
53
|
-
samples: buildCircleLikeSamples(curve, segmentCount, closed),
|
|
54
|
-
};
|
|
55
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Ellipse2 } from '../../curves/ellipse2';
|
|
2
|
-
import { EllipseArc2 } from '../../curves/ellipse_arc2';
|
|
3
|
-
import type { DiscretizeResult, ResolvedDiscretizeOptions } from '../discretize_types';
|
|
4
|
-
type EllipseLikeCurve = Ellipse2 | EllipseArc2;
|
|
5
|
-
export declare function discretizeEllipseLikeCurve(curve: EllipseLikeCurve, options: ResolvedDiscretizeOptions): DiscretizeResult;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=ellipse_strategy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ellipse_strategy.d.ts","sourceRoot":"","sources":["../../../src/discretize/strategies/ellipse_strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAGvD,OAAO,KAAK,EAAE,gBAAgB,EAAkB,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAGtG,KAAK,gBAAgB,GAAG,QAAQ,GAAG,WAAW,CAAA;AAyF9C,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,yBAAyB,GACnC,gBAAgB,CA2BlB"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Ellipse2 } from '../../curves/ellipse2';
|
|
2
|
-
import { Precision } from '../../utils/precision';
|
|
3
|
-
import { throwDiscretizeConvergenceError, throwDiscretizeOverflowError } from '../discretize_errors';
|
|
4
|
-
import { maxChordDeviationAtFractions, tangentTurnAbs } from '../internal/sampling_utils';
|
|
5
|
-
function shouldSplitSegment(curve, segment, options) {
|
|
6
|
-
const chordLength = segment.p0.distanceTo(segment.p1);
|
|
7
|
-
const deviation = maxChordDeviationAtFractions(curve, segment.u0, segment.u1, segment.p0, segment.p1);
|
|
8
|
-
const turn = tangentTurnAbs(curve, segment.u0, segment.u1);
|
|
9
|
-
const violateMaxLength = chordLength > options.maxSegmentLength;
|
|
10
|
-
const violateChord = deviation > options.effectiveChordTol;
|
|
11
|
-
const violateTurn = turn > options.angleTolRad;
|
|
12
|
-
if (!violateMaxLength && !violateChord && !violateTurn)
|
|
13
|
-
return 'ok';
|
|
14
|
-
if (chordLength <= options.minSegmentLengthInternal) {
|
|
15
|
-
return 'blocked';
|
|
16
|
-
}
|
|
17
|
-
return 'split';
|
|
18
|
-
}
|
|
19
|
-
function buildInitialSegments(curve, segmentCount) {
|
|
20
|
-
const range = curve.getRange();
|
|
21
|
-
const start = range.start;
|
|
22
|
-
const span = range.length();
|
|
23
|
-
const segments = [];
|
|
24
|
-
for (let i = 0; i < segmentCount; i++) {
|
|
25
|
-
const u0 = start + (span * i) / segmentCount;
|
|
26
|
-
const u1 = start + (span * (i + 1)) / segmentCount;
|
|
27
|
-
segments.push({
|
|
28
|
-
u0,
|
|
29
|
-
u1,
|
|
30
|
-
p0: curve.pointAt(u0),
|
|
31
|
-
p1: curve.pointAt(u1),
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return segments;
|
|
35
|
-
}
|
|
36
|
-
function refineAdaptiveSegments(curve, initialSegments, options) {
|
|
37
|
-
const segments = [...initialSegments];
|
|
38
|
-
for (let i = 0; i < segments.length; i++) {
|
|
39
|
-
const segment = segments[i];
|
|
40
|
-
const verdict = shouldSplitSegment(curve, segment, options);
|
|
41
|
-
if (verdict === 'ok')
|
|
42
|
-
continue;
|
|
43
|
-
if (verdict === 'blocked') {
|
|
44
|
-
throwDiscretizeOverflowError('ellipse strategy cannot satisfy constraints within internal segment limit');
|
|
45
|
-
}
|
|
46
|
-
if (segments.length >= options.maxSegments) {
|
|
47
|
-
throwDiscretizeOverflowError('ellipse strategy exceeds maxSegments constraints');
|
|
48
|
-
}
|
|
49
|
-
const mid = (segment.u0 + segment.u1) * 0.5;
|
|
50
|
-
if (Math.abs(mid - segment.u0) <= Precision.CURVE_PARAM_EPS || Math.abs(segment.u1 - mid) <= Precision.CURVE_PARAM_EPS) {
|
|
51
|
-
throwDiscretizeConvergenceError('ellipse strategy failed to converge');
|
|
52
|
-
}
|
|
53
|
-
const pm = curve.pointAt(mid);
|
|
54
|
-
segments.splice(i, 1, { u0: segment.u0, u1: mid, p0: segment.p0, p1: pm }, { u0: mid, u1: segment.u1, p0: pm, p1: segment.p1 });
|
|
55
|
-
i--;
|
|
56
|
-
}
|
|
57
|
-
return segments;
|
|
58
|
-
}
|
|
59
|
-
function segmentsToSamples(segments) {
|
|
60
|
-
const samples = [{ u: segments[0].u0, p: segments[0].p0.clone() }];
|
|
61
|
-
for (const segment of segments) {
|
|
62
|
-
samples.push({ u: segment.u1, p: segment.p1.clone() });
|
|
63
|
-
}
|
|
64
|
-
return samples;
|
|
65
|
-
}
|
|
66
|
-
export function discretizeEllipseLikeCurve(curve, options) {
|
|
67
|
-
const range = curve.getRange();
|
|
68
|
-
const span = range.length();
|
|
69
|
-
const curveLen = curve.length();
|
|
70
|
-
const closed = curve instanceof Ellipse2 || Math.abs(span - Math.PI * 2) <= Precision.CURVE_PARAM_EPS;
|
|
71
|
-
if (curveLen <= Precision.CURVE_LENGTH_EPS || span <= Precision.CURVE_PARAM_EPS) {
|
|
72
|
-
return {
|
|
73
|
-
closed,
|
|
74
|
-
samples: [{ u: range.start, p: curve.pointAt(range.start) }],
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
const initialSegmentCount = Math.max(1, options.minSegments);
|
|
78
|
-
if (initialSegmentCount > options.maxSegments) {
|
|
79
|
-
throwDiscretizeOverflowError('ellipse strategy exceeds maxSegments constraints');
|
|
80
|
-
}
|
|
81
|
-
const segments = refineAdaptiveSegments(curve, buildInitialSegments(curve, initialSegmentCount), options);
|
|
82
|
-
return {
|
|
83
|
-
closed,
|
|
84
|
-
samples: segmentsToSamples(segments),
|
|
85
|
-
};
|
|
86
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Line2 } from '../../curves/line2';
|
|
2
|
-
import type { DiscretizeResult, ResolvedDiscretizeOptions } from '../discretize_types';
|
|
3
|
-
export declare function discretizeLineCurve(curve: Line2, options: ResolvedDiscretizeOptions): DiscretizeResult;
|
|
4
|
-
//# sourceMappingURL=line_strategy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"line_strategy.d.ts","sourceRoot":"","sources":["../../../src/discretize/strategies/line_strategy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAkB,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAetG,wBAAgB,mBAAmB,CAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,yBAAyB,GACnC,gBAAgB,CA8BlB"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Precision } from '../../utils/precision';
|
|
2
|
-
import { throwDiscretizeOverflowError } from '../discretize_errors';
|
|
3
|
-
function buildUniformLineSamples(curve, segmentCount) {
|
|
4
|
-
const range = curve.getRange();
|
|
5
|
-
const start = range.start;
|
|
6
|
-
const span = range.length();
|
|
7
|
-
const samples = [];
|
|
8
|
-
for (let i = 0; i <= segmentCount; i++) {
|
|
9
|
-
const u = start + (span * i) / segmentCount;
|
|
10
|
-
samples.push({ u, p: curve.pointAt(u) });
|
|
11
|
-
}
|
|
12
|
-
return samples;
|
|
13
|
-
}
|
|
14
|
-
export function discretizeLineCurve(curve, options) {
|
|
15
|
-
const curveLen = curve.length();
|
|
16
|
-
const range = curve.getRange();
|
|
17
|
-
if (curveLen <= Precision.CURVE_LENGTH_EPS || range.length() <= Precision.CURVE_PARAM_EPS) {
|
|
18
|
-
return {
|
|
19
|
-
closed: false,
|
|
20
|
-
samples: [{ u: range.start, p: curve.pointAt(range.start) }],
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
const requiredByMaxLen = options.maxSegmentLength === Number.POSITIVE_INFINITY
|
|
24
|
-
? 1
|
|
25
|
-
: Math.max(1, Math.ceil(curveLen / options.maxSegmentLength));
|
|
26
|
-
const maxByInternal = Math.max(1, Math.floor(curveLen / options.minSegmentLengthInternal));
|
|
27
|
-
if (requiredByMaxLen > options.maxSegments || requiredByMaxLen > maxByInternal) {
|
|
28
|
-
throwDiscretizeOverflowError('line strategy exceeds maxSegments constraints');
|
|
29
|
-
}
|
|
30
|
-
const segmentCount = options.minSegmentsExplicit
|
|
31
|
-
? Math.max(requiredByMaxLen, options.minSegments)
|
|
32
|
-
: requiredByMaxLen;
|
|
33
|
-
if (segmentCount > options.maxSegments || segmentCount > maxByInternal) {
|
|
34
|
-
throwDiscretizeOverflowError('line strategy exceeds maxSegments constraints');
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
closed: false,
|
|
38
|
-
samples: buildUniformLineSamples(curve, segmentCount),
|
|
39
|
-
};
|
|
40
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Curve2 } from '../curves/curve2';
|
|
2
|
-
import type { DiscretizeStrategy } from './discretize_types';
|
|
3
|
-
export declare class DiscretizeStrategyRegistry {
|
|
4
|
-
private _entries;
|
|
5
|
-
private _nextOrder;
|
|
6
|
-
register<T extends Curve2>(strategy: DiscretizeStrategy<T>): void;
|
|
7
|
-
resolve(curve: Curve2): DiscretizeStrategy<Curve2> | null;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=strategy_registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"strategy_registry.d.ts","sourceRoot":"","sources":["../../src/discretize/strategy_registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAO5D,qBAAa,0BAA0B;IACnC,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,UAAU,CAAI;IAEf,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAc1D,OAAO,CAAC,KAAK,EAAE,MAAM;CAe/B"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { throwDiscretizeOptionsError } from './discretize_errors';
|
|
2
|
-
export class DiscretizeStrategyRegistry {
|
|
3
|
-
constructor() {
|
|
4
|
-
this._entries = [];
|
|
5
|
-
this._nextOrder = 0;
|
|
6
|
-
}
|
|
7
|
-
register(strategy) {
|
|
8
|
-
if (strategy.ctor) {
|
|
9
|
-
const duplicated = this._entries.some((entry) => entry.strategy.ctor === strategy.ctor);
|
|
10
|
-
if (duplicated) {
|
|
11
|
-
throwDiscretizeOptionsError(`duplicated strategy constructor registration: ${strategy.id}`);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
this._entries.push({
|
|
15
|
-
order: this._nextOrder++,
|
|
16
|
-
strategy: strategy,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
resolve(curve) {
|
|
20
|
-
const ctorMatches = this._entries.filter((entry) => entry.strategy.ctor === curve.constructor);
|
|
21
|
-
if (ctorMatches.length > 1) {
|
|
22
|
-
throwDiscretizeOptionsError('ambiguous strategy constructor match');
|
|
23
|
-
}
|
|
24
|
-
if (ctorMatches.length === 1) {
|
|
25
|
-
return ctorMatches[0].strategy;
|
|
26
|
-
}
|
|
27
|
-
const guardMatches = this._entries
|
|
28
|
-
.filter((entry) => entry.strategy.canHandle(curve))
|
|
29
|
-
.sort((a, b) => a.order - b.order);
|
|
30
|
-
if (guardMatches.length === 0)
|
|
31
|
-
return null;
|
|
32
|
-
return guardMatches[0].strategy;
|
|
33
|
-
}
|
|
34
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export { Vec2 } from './core/vec2';
|
|
2
|
-
export { Mat3 } from './core/mat3';
|
|
3
|
-
export { Box2 } from './core/box2';
|
|
4
|
-
export { Coord2D } from './core/coord2d';
|
|
5
|
-
export { GeomBase } from './core/geom_base';
|
|
6
|
-
export { MathConst } from './constants/math_const';
|
|
7
|
-
export { Curve2 } from './curves/curve2';
|
|
8
|
-
export { Interval } from './curves/interval';
|
|
9
|
-
export { PeriodInterval } from './curves/period_interval';
|
|
10
|
-
export { CircleCurve2 } from './curves/circle_curve2';
|
|
11
|
-
export { EllipseCurve2 } from './curves/ellipse_curve2';
|
|
12
|
-
export { Line2 } from './curves/line2';
|
|
13
|
-
export { Circle2 } from './curves/circle2';
|
|
14
|
-
export { Arc2 } from './curves/arc2';
|
|
15
|
-
export { Ellipse2 } from './curves/ellipse2';
|
|
16
|
-
export { EllipseArc2 } from './curves/ellipse_arc2';
|
|
17
|
-
export { BSpline2 } from './curves/bspline2';
|
|
18
|
-
export type { IBSpline2Options } from './curves/bspline2';
|
|
19
|
-
export { Precision } from './utils/precision';
|
|
20
|
-
export { MathUtils } from './utils/math_utils';
|
|
21
|
-
export { MathError } from './utils/math_error';
|
|
22
|
-
export { DiscretizeEngine } from './discretize/discretize_engine';
|
|
23
|
-
export { DiscretizeOptions } from './discretize/discretize_options';
|
|
24
|
-
export { intersectCurveCurve, intersectCurveSelf } from './intersections';
|
|
25
|
-
export type { CurveXInfo } from './intersections';
|
|
26
|
-
export { GeomMgr, geomMgr, RegisterGeom } from './serialize/geom_mgr';
|
|
27
|
-
export type { IDumpable, ILoadable } from './serialize/geom_mgr';
|
|
28
|
-
export type { IDB, IDBVec2, IDBMat3, IDBBox2, IDBCoord2D, IDBLine2, IDBCircle2, IDBArc2, IDBEllipse2, IDBEllipseArc2, IDBBSpline2, } from './serialize/dump_types';
|
|
29
|
-
export type { IVec2, IClosestPointResult } from './types/type_define';
|
|
30
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACrE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChE,YAAY,EACR,GAAG,EACH,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,UAAU,EACV,OAAO,EACP,WAAW,EACX,cAAc,EACd,WAAW,GACd,MAAM,wBAAwB,CAAA;AAE/B,YAAY,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export { Vec2 } from './core/vec2';
|
|
2
|
-
export { Mat3 } from './core/mat3';
|
|
3
|
-
export { Box2 } from './core/box2';
|
|
4
|
-
export { Coord2D } from './core/coord2d';
|
|
5
|
-
export { GeomBase } from './core/geom_base';
|
|
6
|
-
export { MathConst } from './constants/math_const';
|
|
7
|
-
export { Curve2 } from './curves/curve2';
|
|
8
|
-
export { Interval } from './curves/interval';
|
|
9
|
-
export { PeriodInterval } from './curves/period_interval';
|
|
10
|
-
export { CircleCurve2 } from './curves/circle_curve2';
|
|
11
|
-
export { EllipseCurve2 } from './curves/ellipse_curve2';
|
|
12
|
-
export { Line2 } from './curves/line2';
|
|
13
|
-
export { Circle2 } from './curves/circle2';
|
|
14
|
-
export { Arc2 } from './curves/arc2';
|
|
15
|
-
export { Ellipse2 } from './curves/ellipse2';
|
|
16
|
-
export { EllipseArc2 } from './curves/ellipse_arc2';
|
|
17
|
-
export { BSpline2 } from './curves/bspline2';
|
|
18
|
-
export { Precision } from './utils/precision';
|
|
19
|
-
export { MathUtils } from './utils/math_utils';
|
|
20
|
-
export { MathError } from './utils/math_error';
|
|
21
|
-
export { DiscretizeEngine } from './discretize/discretize_engine';
|
|
22
|
-
export { DiscretizeOptions } from './discretize/discretize_options';
|
|
23
|
-
export { intersectCurveCurve, intersectCurveSelf } from './intersections';
|
|
24
|
-
export { GeomMgr, geomMgr, RegisterGeom } from './serialize/geom_mgr';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Curve2 } from '../curves/curve2';
|
|
2
|
-
import type { CurveXInfo } from './types';
|
|
3
|
-
export declare class AnalyticXAlgorithm {
|
|
4
|
-
private readonly map;
|
|
5
|
-
private readonly retryMap;
|
|
6
|
-
intersect(c1: Curve2, c2: Curve2): CurveXInfo[];
|
|
7
|
-
private shouldRetry;
|
|
8
|
-
private boxesLikelyIntersect;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=analytic_x_algorithm.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analytic_x_algorithm.d.ts","sourceRoot":"","sources":["../../src/intersections/analytic_x_algorithm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAyB9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAoBnB;IAED,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAQxB;IAEM,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,UAAU,EAAE;IA2BtD,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,oBAAoB;CAM/B"}
|