@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,14 @@
|
|
|
1
|
+
import * as alg from './algorithm';
|
|
2
|
+
import * as Continuous from './continuous';
|
|
3
|
+
import { v4 as uuid } from 'uuid';
|
|
4
|
+
export { Vertex } from './brep/vertex';
|
|
5
|
+
export { Edge } from './brep/edge';
|
|
6
|
+
export { Coedge3d } from './brep/coedge3d';
|
|
7
|
+
export { Face } from './brep/face';
|
|
8
|
+
export { Wire } from './brep/wire';
|
|
9
|
+
export { Shell } from './brep/shell';
|
|
10
|
+
export { BrepBody } from './brep/brep_body';
|
|
11
|
+
export { BrepUtil } from './util/util';
|
|
12
|
+
export { alg };
|
|
13
|
+
export { Continuous };
|
|
14
|
+
export { uuid };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { EN_GEO_TYPE } from '../../type_define/i_element_type';
|
|
2
|
+
import { types } from '../../type_define/i_types';
|
|
3
|
+
export interface IDBTopoObject extends types.IDBLibGeo {
|
|
4
|
+
tag: string;
|
|
5
|
+
flag?: number;
|
|
6
|
+
data?: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface IDBVertex extends IDBTopoObject {
|
|
11
|
+
type: EN_GEO_TYPE.BREP_VERTEX;
|
|
12
|
+
p: types.IXYZArr;
|
|
13
|
+
}
|
|
14
|
+
export interface IDBEdge extends IDBTopoObject {
|
|
15
|
+
type: EN_GEO_TYPE.BREP_EDGE;
|
|
16
|
+
c: types.IDBCurve3d | undefined;
|
|
17
|
+
sVTag: string;
|
|
18
|
+
eVTag: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IDBCoedge3d extends IDBTopoObject {
|
|
21
|
+
type: EN_GEO_TYPE.BREP_COEDGE;
|
|
22
|
+
eTag: string;
|
|
23
|
+
dir: number;
|
|
24
|
+
pCrv?: types.IDBCurve2d;
|
|
25
|
+
}
|
|
26
|
+
export interface IDBWire extends IDBTopoObject {
|
|
27
|
+
type: EN_GEO_TYPE.BREP_WIRE;
|
|
28
|
+
ces: IDBCoedge3d[];
|
|
29
|
+
}
|
|
30
|
+
export interface IDBFace extends IDBTopoObject {
|
|
31
|
+
type: EN_GEO_TYPE.BREP_FACE;
|
|
32
|
+
dir: number;
|
|
33
|
+
s: types.IDBSurface;
|
|
34
|
+
ws: IDBWire[];
|
|
35
|
+
}
|
|
36
|
+
export interface IDBShell extends IDBTopoObject {
|
|
37
|
+
fs: IDBFace[];
|
|
38
|
+
es: IDBEdge[];
|
|
39
|
+
vs: IDBVertex[];
|
|
40
|
+
}
|
|
41
|
+
export interface IDBBrepBody extends IDBShell {
|
|
42
|
+
type: EN_GEO_TYPE.BREP_BODY;
|
|
43
|
+
}
|
|
44
|
+
export interface ITopoDebugData {
|
|
45
|
+
debugTag: string;
|
|
46
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 定义一些工具类方法
|
|
3
|
+
*/
|
|
4
|
+
export declare class BrepUtil {
|
|
5
|
+
/**
|
|
6
|
+
* 生成UUID
|
|
7
|
+
*/
|
|
8
|
+
static generateUUID(): string;
|
|
9
|
+
/**
|
|
10
|
+
* 生成8位短的UUID
|
|
11
|
+
*/
|
|
12
|
+
static generateShortUUID(): string;
|
|
13
|
+
static dumpMapObj(map?: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}): {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
} | undefined;
|
|
18
|
+
static loadMapObj(dataObj?: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}): {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
} | undefined;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum UnitType {
|
|
2
|
+
MM = 0,
|
|
3
|
+
METER = 1,
|
|
4
|
+
INCH = 2
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 内部实现单位制转换,为了计算效率更高,都采用二的倍数,不是标准的缩放倍数
|
|
8
|
+
*/
|
|
9
|
+
export declare class UnitsConversion {
|
|
10
|
+
static getScale(unitType?: UnitType): number;
|
|
11
|
+
}
|
|
12
|
+
export declare class NormalUnitsConversion {
|
|
13
|
+
static getScale(unitType?: UnitType): number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { Curve2 } from './curve2';
|
|
2
|
+
import { types } from '../type_define/i_types';
|
|
3
|
+
import { Vec2 } from '../base/vec2';
|
|
4
|
+
import { EN_GEO_TYPE } from '../type_define/i_element_type';
|
|
5
|
+
import { PeriodInterval } from '../base/period_inverval';
|
|
6
|
+
import { Tol } from '../base/tol';
|
|
7
|
+
import { Coord2 } from '../base/coord2';
|
|
8
|
+
import { Interval } from '../base/interval';
|
|
9
|
+
import { DiscreteParam } from '../base/discrete_param';
|
|
10
|
+
import { IArc } from '../type_define/i_geometry';
|
|
11
|
+
import { Box2 } from '../base/box2';
|
|
12
|
+
import { NurbsCurve2 } from './nurbs_curve2';
|
|
13
|
+
export declare enum ArcType {
|
|
14
|
+
HalfArc = 0,
|
|
15
|
+
SmallArc = -1,
|
|
16
|
+
BigArc = 1
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 二维圆弧
|
|
20
|
+
* range.min [0, 2PI), range.length [0 ~ 2PI];
|
|
21
|
+
* Arc2 有顺逆时针之分,参数变化可参看 reverse() 函数
|
|
22
|
+
* @example 对于某 Arc2,其局部坐标系 { origin = (0, 0), dx = (1, 0) } 、半径 a = b = 1 ,参数域上 0、PI / 2、PI、3/2 PI 的点:
|
|
23
|
+
* 当其为逆时针时(isCCW = true),对应为 (1, 0), (0, 1), (-1, 0), (0, -1)
|
|
24
|
+
* 当其为顺时针时(isCCW = false),对应为 (1, 0), (0, -1), (-1, 0), (0, 1)
|
|
25
|
+
*/
|
|
26
|
+
export declare class Arc2 extends Curve2 implements IArc<Vec2> {
|
|
27
|
+
/**
|
|
28
|
+
* 创建一条圆弧:使用圆心,半径,起始角,顺逆时针标记
|
|
29
|
+
* @param center
|
|
30
|
+
* @param radius
|
|
31
|
+
* @param startAngle
|
|
32
|
+
* @param endAngle
|
|
33
|
+
* @param isCCW
|
|
34
|
+
*/
|
|
35
|
+
static makeArcByStartEndAngles(center: types.IXY, radius: number, startAngle: number, endAngle: number, isCCW: boolean): Arc2;
|
|
36
|
+
/**
|
|
37
|
+
* 创建圆弧:使用起点,圆弧上一点,终点
|
|
38
|
+
* @param startPoint
|
|
39
|
+
* @param refPoint
|
|
40
|
+
* @param endPoint
|
|
41
|
+
*/
|
|
42
|
+
static makeArcByThreePoints(startPoint: types.IXY, refPoint: types.IXY, endPoint: types.IXY): Arc2 | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* 创建圆弧:使用圆心,起点,终点,顺逆时针标记
|
|
45
|
+
* @param center
|
|
46
|
+
* @param startPoint
|
|
47
|
+
* @param endPoint
|
|
48
|
+
* @param isCCW
|
|
49
|
+
*/
|
|
50
|
+
static makeArcByStartEndPoints(center: types.IXY, startPoint: types.IXY, endPoint: types.IXY, isCCW: boolean): Arc2;
|
|
51
|
+
/**
|
|
52
|
+
* 创建椭圆弧:圆心,长轴端点,短轴参考点,起始点,终止点
|
|
53
|
+
* 短轴参考点会影响结果的顺逆时针方向
|
|
54
|
+
* @param center
|
|
55
|
+
* @param aPoint
|
|
56
|
+
* @param bPoint
|
|
57
|
+
* @param startPoint
|
|
58
|
+
* @param endPoint
|
|
59
|
+
* @param tol
|
|
60
|
+
*/
|
|
61
|
+
static makeEllipseByFivePoints(center: types.IXY, aPoint: types.IXY, bPoint: types.IXY, startPoint: types.IXY, endPoint: types.IXY, tol?: Tol): Arc2 | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* 创建椭圆弧:圆心,以及椭圆上的四个点。首末点的位置决定参数域
|
|
64
|
+
* @param center
|
|
65
|
+
* @param points 四个点的x和y的坐标的绝对值不能完全相等,也就是不能在轴对称位置
|
|
66
|
+
* @param clockSign 默认为逆时针
|
|
67
|
+
*/
|
|
68
|
+
static makeEllipseByCenterAndThreePoints(center: types.IXY, points: types.IXY[], clockSign?: number): Arc2 | undefined;
|
|
69
|
+
static makeEllipseByFiveArcPoints(points: types.IXY[], clockSign?: number): Arc2 | undefined;
|
|
70
|
+
protected _range: PeriodInterval;
|
|
71
|
+
private _a;
|
|
72
|
+
private _b;
|
|
73
|
+
private _coord;
|
|
74
|
+
private _clockSign;
|
|
75
|
+
constructor();
|
|
76
|
+
/**
|
|
77
|
+
* 构造椭圆弧,参数周期会自动调整至参数域 [0, 4PI)
|
|
78
|
+
* @param coord 局部坐标系,圆心在坐标系原点,x、y轴为椭圆的a、b轴
|
|
79
|
+
* @param a x方向半轴长
|
|
80
|
+
* @param b y方向半轴长
|
|
81
|
+
* @param isCCW 是否为逆时针方向
|
|
82
|
+
* @param range 参数域
|
|
83
|
+
*/
|
|
84
|
+
constructor(coord: Coord2, a: number, b: number, isCCW: boolean, range?: types.IInterval);
|
|
85
|
+
/**
|
|
86
|
+
* 获取 a 轴长度
|
|
87
|
+
*/
|
|
88
|
+
getA(): number;
|
|
89
|
+
/**
|
|
90
|
+
* 设置 a 轴长度
|
|
91
|
+
*/
|
|
92
|
+
setA(v: number): void;
|
|
93
|
+
/**
|
|
94
|
+
* 获取 b 轴长度
|
|
95
|
+
*/
|
|
96
|
+
getB(): number;
|
|
97
|
+
/**
|
|
98
|
+
* 设置 b 轴长度
|
|
99
|
+
*/
|
|
100
|
+
setB(v: number): void;
|
|
101
|
+
/**
|
|
102
|
+
* 获取当前坐标系
|
|
103
|
+
*/
|
|
104
|
+
getCoord(): Coord2;
|
|
105
|
+
/**
|
|
106
|
+
* 设置当前坐标系
|
|
107
|
+
*/
|
|
108
|
+
setCoord(v: Coord2): void;
|
|
109
|
+
/**
|
|
110
|
+
* 获取参数范围
|
|
111
|
+
*/
|
|
112
|
+
getRange(): PeriodInterval;
|
|
113
|
+
getCenter(): Vec2;
|
|
114
|
+
/**
|
|
115
|
+
* 获取平均半径长度
|
|
116
|
+
*/
|
|
117
|
+
getRadius(): number;
|
|
118
|
+
/**
|
|
119
|
+
* 逆时针的标记,true --> 逆时针,false --> 顺时针
|
|
120
|
+
*/
|
|
121
|
+
isCCW(): boolean;
|
|
122
|
+
/**
|
|
123
|
+
* 获取某参数对应的点
|
|
124
|
+
*/
|
|
125
|
+
getPtAt(t: number): Vec2;
|
|
126
|
+
/**
|
|
127
|
+
* 获取某参数对应的点,在圆上的角度,参考方向(1, 0)
|
|
128
|
+
* @param t
|
|
129
|
+
*/
|
|
130
|
+
getAngleFromParam(t: number): number;
|
|
131
|
+
/**
|
|
132
|
+
* 获取圆弧的起始角度
|
|
133
|
+
*/
|
|
134
|
+
getStartAngle(): number;
|
|
135
|
+
/**
|
|
136
|
+
* 获取圆弧的终止角度
|
|
137
|
+
*/
|
|
138
|
+
getEndAngle(): number;
|
|
139
|
+
/**
|
|
140
|
+
* 获取圆弧的类型,半圆弧->(0),优弧->(1),劣弧->(-1)
|
|
141
|
+
*/
|
|
142
|
+
getArcType(): ArcType;
|
|
143
|
+
IsInRangeInner(pt: Vec2, startpt: Vec2, endpt: Vec2): boolean;
|
|
144
|
+
getBBox(rRange?: Interval): Box2;
|
|
145
|
+
/**
|
|
146
|
+
* 获取某点对应的参数,返回值值域为 [range.Min, range.Min + PI2)
|
|
147
|
+
*/
|
|
148
|
+
getParamAt(point2d: types.IXY, lengthEps?: number): number;
|
|
149
|
+
/**
|
|
150
|
+
* 获取某点在曲线上的投影点参数集,返回值值域为 [range.Min, range.Min + PI2)
|
|
151
|
+
*/
|
|
152
|
+
getAllFootParams(point: types.IXY, lengthEps?: number): number[];
|
|
153
|
+
/**
|
|
154
|
+
* 获取圆弧上,两点之间的参数域范围,沿着参数增加的方向
|
|
155
|
+
* @param startPt
|
|
156
|
+
* @param endPt
|
|
157
|
+
*/
|
|
158
|
+
getParamRangeAt(startPt: types.IXY, endPt: types.IXY): PeriodInterval;
|
|
159
|
+
/**
|
|
160
|
+
* 获取某参数处的切线
|
|
161
|
+
*/
|
|
162
|
+
getTangentAt(t: number): Vec2;
|
|
163
|
+
/**
|
|
164
|
+
* 获取range参数域的切线锥
|
|
165
|
+
*/
|
|
166
|
+
/**
|
|
167
|
+
* 椭圆长短轴是否相等
|
|
168
|
+
*/
|
|
169
|
+
isEqualAB(): boolean;
|
|
170
|
+
/**
|
|
171
|
+
* 获取某参数t处的几阶导数
|
|
172
|
+
* t : 参数t
|
|
173
|
+
* n : 导数的阶数 // 譬如n = 2,会计算曲线在参数t处的0阶导(即曲线点)、1阶导、2阶导
|
|
174
|
+
*/
|
|
175
|
+
getDerivatives(t: number, nth: number): Vec2[];
|
|
176
|
+
/**
|
|
177
|
+
* 获取曲线(给定参数域区间段的)长度
|
|
178
|
+
*/
|
|
179
|
+
getLength(range?: Interval): number;
|
|
180
|
+
/**
|
|
181
|
+
* 判断是否为封闭圆形
|
|
182
|
+
*/
|
|
183
|
+
isClosed(): boolean;
|
|
184
|
+
/**
|
|
185
|
+
* 反向
|
|
186
|
+
*/
|
|
187
|
+
reverse(): this;
|
|
188
|
+
/**
|
|
189
|
+
* 将圆弧进行分割,使用参数值。
|
|
190
|
+
* 如果输入参数,不在圆弧范围内,则返回空数组
|
|
191
|
+
* @param params
|
|
192
|
+
* @param tolerance
|
|
193
|
+
*/
|
|
194
|
+
split(params: number[], tolerance?: number): Curve2[];
|
|
195
|
+
/**
|
|
196
|
+
* 按给定距离进行偏移,改变自己
|
|
197
|
+
* @param dDist 等距量:>0 = 右侧;<0 = 左侧
|
|
198
|
+
* @returns 是否等距成功:true = 是;false = 否
|
|
199
|
+
* @deprecated 使用 OffsetCurve2.makeByCurve() 来代替
|
|
200
|
+
*/
|
|
201
|
+
offset(dDist: number): boolean;
|
|
202
|
+
/**
|
|
203
|
+
* 进行一次放射变换
|
|
204
|
+
* @param m 3x3矩阵,表示2维放射变换,一个二维线性变换加一次平移。
|
|
205
|
+
*/
|
|
206
|
+
transform(m: types.IMatrix3 | types.numberArrs3X3): this;
|
|
207
|
+
/**
|
|
208
|
+
* 平移,改变自己
|
|
209
|
+
*/
|
|
210
|
+
translate(offset: types.IXY): this;
|
|
211
|
+
/**
|
|
212
|
+
* 绕坐标轴/点的旋转,改变自己
|
|
213
|
+
* @param angle 旋转的角度
|
|
214
|
+
* @param pivot 旋转轴上一点
|
|
215
|
+
*/
|
|
216
|
+
rotate(angle: number, pivot?: types.IXY): this;
|
|
217
|
+
/**
|
|
218
|
+
* 缩放,改变自己
|
|
219
|
+
* 不支持非等比,只支持等比例缩放
|
|
220
|
+
* @param factor 放大因子
|
|
221
|
+
* @param center 缩放中心
|
|
222
|
+
*/
|
|
223
|
+
scale(factor: number, center?: types.IXY): this;
|
|
224
|
+
getDiscreteHintSegmentCount(params?: DiscreteParam): number;
|
|
225
|
+
/**
|
|
226
|
+
* 离散成点集,使用角度步长
|
|
227
|
+
*/
|
|
228
|
+
discrete(params?: DiscreteParam): Vec2[];
|
|
229
|
+
getType(): EN_GEO_TYPE.ARC_2;
|
|
230
|
+
/**
|
|
231
|
+
* 拟合成nurbscurve2d
|
|
232
|
+
*/
|
|
233
|
+
toNurbs(degree?: number, lengthEps?: number): NurbsCurve2;
|
|
234
|
+
clone(): Arc2;
|
|
235
|
+
/**
|
|
236
|
+
* 抽取元数据,用于序列化
|
|
237
|
+
*/
|
|
238
|
+
dump(): types.IDBArc2d;
|
|
239
|
+
load(json: types.IDBArc2d): this;
|
|
240
|
+
/**
|
|
241
|
+
* 获取首尾端点中与点 p 较近的点,返回较近点的参数 param,以及平方距离 sq_dist
|
|
242
|
+
* @param p
|
|
243
|
+
*/
|
|
244
|
+
protected _getMinDistanceToStartEndPoints(p: types.IXY): {
|
|
245
|
+
param: number;
|
|
246
|
+
sqDist: number;
|
|
247
|
+
};
|
|
248
|
+
private _assertCircle;
|
|
249
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { Curve3 } from './curve3d';
|
|
2
|
+
import { types } from '../type_define/i_types';
|
|
3
|
+
import { EN_GEO_TYPE } from '../type_define/i_element_type';
|
|
4
|
+
import { Vec3 } from '../base/vec3';
|
|
5
|
+
import { Circle3d } from './circle3d';
|
|
6
|
+
import { Coord3 } from '../base/coord3';
|
|
7
|
+
import { PeriodInterval } from '../base/period_inverval';
|
|
8
|
+
import { Interval } from '../base/interval';
|
|
9
|
+
import { Tol } from '../base/tol';
|
|
10
|
+
import { DiscreteParam } from '../base/discrete_param';
|
|
11
|
+
import { IArc } from '../type_define/i_geometry';
|
|
12
|
+
import { TangentCone } from '../base/tangent_cone';
|
|
13
|
+
import { NurbsCurve3 } from './nurbs_curve3';
|
|
14
|
+
import { verb } from '../verb/export_verb';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* 三维圆弧
|
|
18
|
+
* Arc3 均为逆时针方向,若需逆转方向,需翻转坐标轴
|
|
19
|
+
* range.min in [0, 2PI), range.length in [0 ~ 2PI];
|
|
20
|
+
*/
|
|
21
|
+
export declare class Arc3 extends Curve3 implements IArc<Vec3> {
|
|
22
|
+
/**
|
|
23
|
+
* 创建圆弧:使用起点,圆弧上一点,终点
|
|
24
|
+
* @param startPoint
|
|
25
|
+
* @param refPoint
|
|
26
|
+
* @param endPoint
|
|
27
|
+
*/
|
|
28
|
+
static makeArcByThreePoints(startPoint: types.IXYZ, refPoint: types.IXYZ, endPoint: types.IXYZ): Arc3 | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* 创建圆弧:使用圆心,半径, 法向,起点,终点,顺逆时针标记
|
|
31
|
+
* @param center
|
|
32
|
+
* @param radius
|
|
33
|
+
* @param normal
|
|
34
|
+
* @param startPoint
|
|
35
|
+
* @param endPoint
|
|
36
|
+
* @param isCCW
|
|
37
|
+
*/
|
|
38
|
+
static makeArcByStartEndPoints(center: types.IXYZ, radius: number, normal: types.IXYZ, startPoint: types.IXYZ, endPoint: types.IXYZ, isCCW: boolean): Arc3;
|
|
39
|
+
/**
|
|
40
|
+
* 创建圆弧:使用整圆,起点,终点,顺逆时针标记
|
|
41
|
+
* @param circle
|
|
42
|
+
* @param startPoint
|
|
43
|
+
* @param endPoint
|
|
44
|
+
* @param isCCW
|
|
45
|
+
*/
|
|
46
|
+
static makeArcByCircleAndPts(circle: Circle3d, startPoint: types.IXYZ, endPoint: types.IXYZ, isCCW: boolean): Arc3;
|
|
47
|
+
/**
|
|
48
|
+
* 创建椭圆弧:圆心,长轴端点,短轴参考点,起始点,终止点
|
|
49
|
+
*/
|
|
50
|
+
static makeEllipseByFivePoints(center: types.IXYZ, aPoint: types.IXYZ, bPoint: types.IXYZ, startPoint: types.IXYZ, endPoint: types.IXYZ, tol?: Tol): Arc3 | undefined;
|
|
51
|
+
protected _range: PeriodInterval;
|
|
52
|
+
private _a;
|
|
53
|
+
private _b;
|
|
54
|
+
private _coord;
|
|
55
|
+
constructor();
|
|
56
|
+
/**
|
|
57
|
+
* 构造椭圆弧,参数周期会自动调整至参数域 [0, 4PI)
|
|
58
|
+
* @param coord 局部坐标系,圆心在坐标系原点,x、y轴为椭圆的a、b轴
|
|
59
|
+
* @param a x方向半轴长
|
|
60
|
+
* @param b y方向半轴长
|
|
61
|
+
* @param range 参数域
|
|
62
|
+
*/
|
|
63
|
+
constructor(coord: Coord3, a: number, b: number, range?: types.IInterval);
|
|
64
|
+
/**
|
|
65
|
+
* 获取 a 轴长度
|
|
66
|
+
*/
|
|
67
|
+
getA(): number;
|
|
68
|
+
/**
|
|
69
|
+
* 设置 a 轴长度
|
|
70
|
+
*/
|
|
71
|
+
setA(v: number): void;
|
|
72
|
+
/**
|
|
73
|
+
* 获取 b 轴长度
|
|
74
|
+
*/
|
|
75
|
+
getB(): number;
|
|
76
|
+
/**
|
|
77
|
+
* 设置 b 轴长度
|
|
78
|
+
*/
|
|
79
|
+
setB(v: number): void;
|
|
80
|
+
/**
|
|
81
|
+
* 获取当前坐标系
|
|
82
|
+
*/
|
|
83
|
+
getCoord(): Coord3;
|
|
84
|
+
/**
|
|
85
|
+
* 设置当前坐标系
|
|
86
|
+
*/
|
|
87
|
+
setCoord(v: Coord3): void;
|
|
88
|
+
/**
|
|
89
|
+
* 获取参数范围
|
|
90
|
+
*/
|
|
91
|
+
getRange(): PeriodInterval;
|
|
92
|
+
/**
|
|
93
|
+
* 获取圆心
|
|
94
|
+
*/
|
|
95
|
+
getCenter(): Vec3;
|
|
96
|
+
/**
|
|
97
|
+
* 右手坐标系中,圆弧的轴线方向
|
|
98
|
+
*/
|
|
99
|
+
getNormal(): Vec3;
|
|
100
|
+
getCircle(): Circle3d;
|
|
101
|
+
/**
|
|
102
|
+
* 获取平均半径长度
|
|
103
|
+
*/
|
|
104
|
+
getRadius(): number;
|
|
105
|
+
/**
|
|
106
|
+
* 获取某参数对应的点
|
|
107
|
+
*/
|
|
108
|
+
getPtAt(t: number): Vec3;
|
|
109
|
+
/**
|
|
110
|
+
* 获取某点对应的参数,返回值值域为 [range.Min, range.Min + PI2)
|
|
111
|
+
*/
|
|
112
|
+
getParamAt(point: types.IXYZ, lengthEps?: number): number;
|
|
113
|
+
/**
|
|
114
|
+
* 是否包含某个点, 即某点是否在该曲线段上
|
|
115
|
+
*/
|
|
116
|
+
containsPt(point: types.IXYZ, lengthEps?: number): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* 获取某点在曲线上的投影点参数集,返回值值域为 [range.Min, range.Min + PI2)
|
|
119
|
+
*/
|
|
120
|
+
getAllFootParams(point: types.IXYZ, lengthEps?: number): number[];
|
|
121
|
+
/**
|
|
122
|
+
* 获取圆弧上,两点之间的参数域范围,沿着参数增加的方向
|
|
123
|
+
* @param startPt
|
|
124
|
+
* @param endPt
|
|
125
|
+
*/
|
|
126
|
+
getParamRangeAt(startPt: types.IXYZ, endPt: types.IXYZ): PeriodInterval;
|
|
127
|
+
/**
|
|
128
|
+
* 获取某参数处的切线
|
|
129
|
+
*/
|
|
130
|
+
getTangentAt(t: number): Vec3;
|
|
131
|
+
/**
|
|
132
|
+
* 获取range参数域的切线锥
|
|
133
|
+
*/
|
|
134
|
+
getTangentCone(range?: Interval, bApprox?: boolean): TangentCone;
|
|
135
|
+
/**
|
|
136
|
+
* 椭圆长短轴是否相等
|
|
137
|
+
*/
|
|
138
|
+
isEqualAB(): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* 获取某参数t处的几阶导数
|
|
141
|
+
* t : 参数t
|
|
142
|
+
* n : 导数的阶数 // 譬如n = 2,会计算曲线在参数t处的0阶导(即曲线点)、1阶导、2阶导
|
|
143
|
+
*/
|
|
144
|
+
getDerivatives(t: number, nth: number): Vec3[];
|
|
145
|
+
/**
|
|
146
|
+
* 判断是否为封闭圆形
|
|
147
|
+
*/
|
|
148
|
+
isClosed(): boolean;
|
|
149
|
+
/**
|
|
150
|
+
* 获取曲线(给定参数域区间段的)长度
|
|
151
|
+
*/
|
|
152
|
+
getLength(range?: Interval): number;
|
|
153
|
+
/**
|
|
154
|
+
* 反向,改变自己
|
|
155
|
+
*/
|
|
156
|
+
reverse(): this;
|
|
157
|
+
split(params: number[], tolerance?: number): Arc3[];
|
|
158
|
+
transform(m: types.IMatrix4 | types.numberArrs4X4): this;
|
|
159
|
+
/**
|
|
160
|
+
* 平移,改变自己
|
|
161
|
+
*/
|
|
162
|
+
translate(offset: types.IXYZ): this;
|
|
163
|
+
/**
|
|
164
|
+
* 绕坐标轴/点的旋转,改变自己
|
|
165
|
+
* @param angle 旋转的角度
|
|
166
|
+
* @param pivot 旋转轴上一点
|
|
167
|
+
* @param axis 绕哪个轴旋转
|
|
168
|
+
*/
|
|
169
|
+
rotate(angle: number, pivot: types.IXYZ, axis?: types.IXYZ): this;
|
|
170
|
+
/**
|
|
171
|
+
* 缩放,改变自己
|
|
172
|
+
* 直线支持非等比,其他情况都是等比例缩放
|
|
173
|
+
* @param factor 放大因子
|
|
174
|
+
* @param center 缩放中心
|
|
175
|
+
*/
|
|
176
|
+
scale(factor: number, center: types.IXYZ): this;
|
|
177
|
+
/**
|
|
178
|
+
* 判断Curve3d是否是平面曲线
|
|
179
|
+
* 如果是平面曲线:并且能构造一个平面,则返回平面的法向;不能构造平面的,例如是一条直线的,只返回true;如果不是平面曲线(即空间曲线),返回false
|
|
180
|
+
*/
|
|
181
|
+
isPlaneCurve3d(angleTol?: number): boolean | Vec3;
|
|
182
|
+
/**
|
|
183
|
+
* 离散,使用默认的离散配置
|
|
184
|
+
*/
|
|
185
|
+
discrete(params?: DiscreteParam): Vec3[];
|
|
186
|
+
/**
|
|
187
|
+
* 离散,使用角度步长均匀离散
|
|
188
|
+
* @param angle 角度步长
|
|
189
|
+
*/
|
|
190
|
+
discreteBySpan(angle?: number): Vec3[];
|
|
191
|
+
getType(): EN_GEO_TYPE.ARC_3;
|
|
192
|
+
/**
|
|
193
|
+
* 拟合成nurbscurve3d,4段构成圆,比较具体对称性
|
|
194
|
+
*/
|
|
195
|
+
toNurbs(degree?: number, lengthEps?: number): NurbsCurve3;
|
|
196
|
+
toVerbNurbs(): verb.geom.NurbsCurve;
|
|
197
|
+
clone(): Arc3;
|
|
198
|
+
/**
|
|
199
|
+
* 抽取元数据,用于序列化
|
|
200
|
+
*/
|
|
201
|
+
dump(): types.IDBArc3d;
|
|
202
|
+
load(json: types.IDBArc3d): this;
|
|
203
|
+
private _assertCircle;
|
|
204
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Curve3 } from './curve3d';
|
|
2
|
+
import { types } from '../type_define/i_types';
|
|
3
|
+
import { Vec3 } from '../base/vec3';
|
|
4
|
+
import { EN_GEO_TYPE } from '../type_define/i_element_type';
|
|
5
|
+
import { Interval } from '../base/interval';
|
|
6
|
+
import { Coord3 } from '../base/coord3';
|
|
7
|
+
import { Box3 } from '../base/box3';
|
|
8
|
+
import { DiscreteParam } from '../base/discrete_param';
|
|
9
|
+
import { geom } from '../verb/verb';
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @deprecated 使用 Arc3 代替
|
|
13
|
+
* 三维整圆
|
|
14
|
+
*/
|
|
15
|
+
export declare class Circle3d extends Curve3 {
|
|
16
|
+
/**
|
|
17
|
+
* 创建整圆:使用圆心,局部坐标系x方向,局部坐标系y方向,半径
|
|
18
|
+
*/
|
|
19
|
+
static makeCircleByCCSRadius(origin: types.IXYZ, xDir: types.IXYZ, yDir: types.IXYZ, radius: number): Circle3d;
|
|
20
|
+
/**
|
|
21
|
+
* 创建整圆:使用起点,中点,终点
|
|
22
|
+
* @param point1
|
|
23
|
+
* @param point2
|
|
24
|
+
* @param point3
|
|
25
|
+
* @return 创建出来的圆或者为空(如果三点共线)
|
|
26
|
+
*/
|
|
27
|
+
static makeCircleByThreePoints(point1: types.IXYZ, point2: types.IXYZ, point3: types.IXYZ): Circle3d | undefined;
|
|
28
|
+
private static _makeCircleCCSByThreePoints;
|
|
29
|
+
private _ccs;
|
|
30
|
+
private _radius;
|
|
31
|
+
constructor();
|
|
32
|
+
constructor(ccs: Coord3, radius: number);
|
|
33
|
+
toVerbNurbs(range?: Interval | undefined): geom.NurbsCurve;
|
|
34
|
+
getCCS(): Coord3;
|
|
35
|
+
getCenter(): Vec3;
|
|
36
|
+
getNormal(): Vec3;
|
|
37
|
+
getRadius(): number;
|
|
38
|
+
/**
|
|
39
|
+
* 获取某参数对应的点
|
|
40
|
+
*/
|
|
41
|
+
getPtAt(t: number): Vec3;
|
|
42
|
+
/**
|
|
43
|
+
* 获取曲线(给定参数域区间段的)长度
|
|
44
|
+
*/
|
|
45
|
+
getLength(range?: Interval): number;
|
|
46
|
+
/**
|
|
47
|
+
* 获取某点对应的参数
|
|
48
|
+
*/
|
|
49
|
+
getParamAt(point: types.IXYZ): number;
|
|
50
|
+
/**
|
|
51
|
+
* 获取某参数处的切线
|
|
52
|
+
*/
|
|
53
|
+
getTangentAt(t: number): Vec3;
|
|
54
|
+
/**
|
|
55
|
+
* 判断Curve3d是否是平面曲线
|
|
56
|
+
* 如果是平面曲线:并且能构造一个平面,则返回平面的法向;不能构造平面的,例如是一条直线的,只返回true;如果不是平面曲线(即空间曲线),返回false
|
|
57
|
+
*/
|
|
58
|
+
isPlaneCurve3d(angleTol?: number): boolean | Vec3;
|
|
59
|
+
/**
|
|
60
|
+
* 获取某参数t处的几阶导数
|
|
61
|
+
* t : 参数t
|
|
62
|
+
* n : 导数的阶数 // 譬如n = 2,会计算曲线在参数t处的0阶导(即曲线点)、1阶导、2阶导
|
|
63
|
+
*/
|
|
64
|
+
getDerivatives(t: number, n: number): Vec3[];
|
|
65
|
+
/**
|
|
66
|
+
* 暂时不支持整圆反向
|
|
67
|
+
*/
|
|
68
|
+
reverse(): this;
|
|
69
|
+
/**
|
|
70
|
+
* 曲线按给定距离进行偏移
|
|
71
|
+
* @param dDist 等距量:>0 = 右侧;<0 = 左侧
|
|
72
|
+
* @returns 是否等距成功:true = 是;false = 否
|
|
73
|
+
*/
|
|
74
|
+
offset(dDist: number): boolean;
|
|
75
|
+
transform(m: types.IMatrix4 | types.numberArrs4X4): this;
|
|
76
|
+
/**
|
|
77
|
+
* 计算包围盒 // circle默认是全domain的,传入range不work
|
|
78
|
+
*/
|
|
79
|
+
getBBox(range?: Interval): Box3;
|
|
80
|
+
split(params: number[], tolerance?: number): Curve3[];
|
|
81
|
+
/**
|
|
82
|
+
* 离散
|
|
83
|
+
*/
|
|
84
|
+
discrete(params?: DiscreteParam): Vec3[];
|
|
85
|
+
getType(): EN_GEO_TYPE.CIRCLE_3;
|
|
86
|
+
clone(): Circle3d;
|
|
87
|
+
/**
|
|
88
|
+
* 抽取元数据,用于序列化
|
|
89
|
+
*/
|
|
90
|
+
dump(): types.IDBCircle3d;
|
|
91
|
+
load(json: types.IDBCircle3d): this;
|
|
92
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CoordBasedSurface } from './coord_based_surface';
|
|
2
|
+
import { Tol } from '../base/tol';
|
|
3
|
+
import { Ln3 } from './ln3';
|
|
4
|
+
import { Arc3 } from './arc3d';
|
|
5
|
+
import { Ln2 } from './ln2';
|
|
6
|
+
import { Curve2 } from './curve2';
|
|
7
|
+
import { Curve3 } from './curve3d';
|
|
8
|
+
/**
|
|
9
|
+
* 基于圆弧构造的曲面
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class CircularSurface extends CoordBasedSurface {
|
|
12
|
+
protected _a: number;
|
|
13
|
+
protected _b: number;
|
|
14
|
+
/**
|
|
15
|
+
* 获取x轴半长
|
|
16
|
+
*/
|
|
17
|
+
getA(): number;
|
|
18
|
+
/**
|
|
19
|
+
* 设置x轴半长
|
|
20
|
+
*/
|
|
21
|
+
setA(v: number): void;
|
|
22
|
+
/**
|
|
23
|
+
* 获取y轴半长
|
|
24
|
+
*/
|
|
25
|
+
getB(): number;
|
|
26
|
+
/**
|
|
27
|
+
* 设置y轴半长
|
|
28
|
+
*/
|
|
29
|
+
setB(v: number): void;
|
|
30
|
+
/**
|
|
31
|
+
* 获取半径长度
|
|
32
|
+
* @deprecated 目前已支持 ab 长短周,请以获取半轴长替代
|
|
33
|
+
*/
|
|
34
|
+
getRadius(): number;
|
|
35
|
+
/**
|
|
36
|
+
* 判断是否是圆柱或圆锥,区分椭圆柱和椭圆锥面
|
|
37
|
+
*/
|
|
38
|
+
isEqualAB(tol?: number): boolean;
|
|
39
|
+
wireToUV(loop3d: Curve3[], tol?: Tol): {
|
|
40
|
+
loop: Curve2[];
|
|
41
|
+
mapping: Map<Curve3, Curve2>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* 将三维曲线,转成参数域中的二维曲线
|
|
45
|
+
* 暂时只支持直线和圆弧
|
|
46
|
+
* @param curveOnSurface
|
|
47
|
+
*/
|
|
48
|
+
getCurve2d(curveOnSurface: Curve3): Curve2;
|
|
49
|
+
containsCurve(curve: Curve3, tol?: number): boolean;
|
|
50
|
+
protected _line3dToUV(curveOnSurface: Ln3): Ln2;
|
|
51
|
+
protected _arc3dToUV(arc: Arc3): Ln2;
|
|
52
|
+
}
|