@ccpc/math 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +226 -0
- package/package.json +19 -37
- package/types/algorithm/bool_operate/bool2d/bool2d.d.ts +22 -0
- package/types/algorithm/bool_operate/bool2d/difference.d.ts +9 -0
- package/types/algorithm/bool_operate/bool2d/intersect.d.ts +9 -0
- package/types/algorithm/bool_operate/bool2d/split.d.ts +3 -0
- package/types/algorithm/bool_operate/bool2d/union.d.ts +9 -0
- package/types/algorithm/bool_operate/bool2d/utils.d.ts +40 -0
- package/types/algorithm/bool_operate/bool_operate_clipper.d.ts +18 -0
- package/types/algorithm/bool_operate/polycurve_polygon_bool.d.ts +13 -0
- package/types/algorithm/bool_operate_2d.d.ts +67 -0
- package/types/algorithm/calc_d.d.ts +85 -0
- package/types/algorithm/calc_offset.d.ts +70 -0
- package/types/algorithm/calc_overlap.d.ts +56 -0
- package/types/algorithm/calc_project.d.ts +29 -0
- package/types/algorithm/calc_x.d.ts +215 -0
- package/types/algorithm/calculate_util/geometry_subdevide_infos.d.ts +73 -0
- package/types/algorithm/calculate_util/iterative_method.d.ts +30 -0
- package/types/algorithm/discrete/discrete_curve.d.ts +31 -0
- package/types/algorithm/discrete/discrete_refiner.d.ts +35 -0
- package/types/algorithm/discrete/discrete_surface.d.ts +74 -0
- package/types/algorithm/discrete/discrete_topology.d.ts +32 -0
- package/types/algorithm/discrete/discrete_util.d.ts +96 -0
- package/types/algorithm/discrete/grid_discrete_data.d.ts +58 -0
- package/types/algorithm/discrete/libtess.d.ts +12 -0
- package/types/algorithm/discrete/uniform_grid_discrete.d.ts +3 -0
- package/types/algorithm/distance/base_calc_distance/curves_distance_util.d.ts +20 -0
- package/types/algorithm/distance/base_calc_distance/define_of_calculate_distance.d.ts +12 -0
- package/types/algorithm/distance/curve2ds_distance/arc2s_distance.d.ts +17 -0
- package/types/algorithm/distance/curve2ds_distance/line2d_to_arc2d_distance.d.ts +17 -0
- package/types/algorithm/distance/curve2ds_distance/line2s_distance.d.ts +15 -0
- package/types/algorithm/distance/curve2s_distance.d.ts +15 -0
- package/types/algorithm/distance/curve3ds_distance/line3d_to_line3d_distance_paramed.d.ts +12 -0
- package/types/algorithm/distance/curve3s_distance.d.ts +31 -0
- package/types/algorithm/distance/pt_to_curve2_signed_distance.d.ts +17 -0
- package/types/algorithm/distance/pt_to_curve3_distance.d.ts +25 -0
- package/types/algorithm/distance/pt_to_curve_distance_info.d.ts +12 -0
- package/types/algorithm/distance/pt_to_surface_distance.d.ts +17 -0
- package/types/algorithm/distance/pts_to_curves_distance.d.ts +13 -0
- package/types/algorithm/distance/pts_to_pts_distance.d.ts +7 -0
- package/types/algorithm/geometry_merge.d.ts +22 -0
- package/types/algorithm/index.d.ts +32 -0
- package/types/algorithm/intersect/box_cut_line.d.ts +6 -0
- package/types/algorithm/intersect/curve_self_x.d.ts +13 -0
- package/types/algorithm/intersect/curve_surface_x.d.ts +34 -0
- package/types/algorithm/intersect/curve_surface_x_util.d.ts +32 -0
- package/types/algorithm/intersect/curves_x/circulars_x.d.ts +35 -0
- package/types/algorithm/intersect/curves_x/linear_circular_x.d.ts +40 -0
- package/types/algorithm/intersect/curves_x/lines_x.d.ts +17 -0
- package/types/algorithm/intersect/curves_x/lines_x_util.d.ts +4 -0
- package/types/algorithm/intersect/curves_x.d.ts +26 -0
- package/types/algorithm/intersect/curves_x_util.d.ts +35 -0
- package/types/algorithm/intersect/intersect_info_util.d.ts +9 -0
- package/types/algorithm/intersect/surface_self_x.d.ts +8 -0
- package/types/algorithm/intersect/surfaces_x.d.ts +53 -0
- package/types/algorithm/intersect/surfaces_x_complex.d.ts +29 -0
- package/types/algorithm/intersect/surfaces_x_special.d.ts +16 -0
- package/types/algorithm/intersect/surfaces_x_util.d.ts +41 -0
- package/types/algorithm/intersect/x_info.d.ts +65 -0
- package/types/algorithm/loop_property/loop-area.d.ts +49 -0
- package/types/algorithm/loop_property/loop-centroid.d.ts +40 -0
- package/types/algorithm/merge_geometry/halfplane.d.ts +24 -0
- package/types/algorithm/merge_geometry/merge_curve.d.ts +14 -0
- package/types/algorithm/merge_geometry/merge_point.d.ts +18 -0
- package/types/algorithm/mesh/clip_mesh.d.ts +27 -0
- package/types/algorithm/mesh/extrude_clip.d.ts +236 -0
- package/types/algorithm/mesh/mesh_assist.d.ts +21 -0
- package/types/algorithm/mesh/mesh_contour.d.ts +26 -0
- package/types/algorithm/mesh/mesh_util.d.ts +115 -0
- package/types/algorithm/offset/loop2d_offset.d.ts +22 -0
- package/types/algorithm/offset/polygon_offset.d.ts +27 -0
- package/types/algorithm/overlap/curve_surface_coincide.d.ts +6 -0
- package/types/algorithm/overlap/curves_colinear.d.ts +38 -0
- package/types/algorithm/overlap/curves_merge.d.ts +74 -0
- package/types/algorithm/overlap/curves_overlap.d.ts +34 -0
- package/types/algorithm/overlap/i_overlap.d.ts +9 -0
- package/types/algorithm/overlap/surfaces_coplaner.d.ts +5 -0
- package/types/algorithm/pattern/blocks2Geometry.d.ts +50 -0
- package/types/algorithm/pattern/math.d.ts +42 -0
- package/types/algorithm/pattern/pattern.d.ts +43 -0
- package/types/algorithm/pattern/pattern_util.d.ts +53 -0
- package/types/algorithm/pattern/pave.d.ts +33 -0
- package/types/algorithm/pj/curves_oj.d.ts +19 -0
- package/types/algorithm/pj/curves_pj.d.ts +19 -0
- package/types/algorithm/pj/loops_pj.d.ts +13 -0
- package/types/algorithm/pj/pj_type.d.ts +46 -0
- package/types/algorithm/pj/pt_loop_pj.d.ts +24 -0
- package/types/algorithm/pj/pt_polygon_pj.d.ts +18 -0
- package/types/algorithm/pj/pt_polygon_position_judger.d.ts +11 -0
- package/types/algorithm/position_judge.d.ts +72 -0
- package/types/algorithm/project/curve3d_to_plane_project.d.ts +11 -0
- package/types/algorithm/project/curve_curve_project.d.ts +9 -0
- package/types/algorithm/search_graph/iloops_polygonex.d.ts +28 -0
- package/types/algorithm/search_graph/loop_tree_node.d.ts +30 -0
- package/types/algorithm/search_graph/loops_to_loop_tree_search_graph.d.ts +25 -0
- package/types/algorithm/search_graph/polygon_polygonex.d.ts +13 -0
- package/types/algorithm/search_graph/search_loop2d.d.ts +20 -0
- package/types/algorithm/search_graph/search_polyline.d.ts +11 -0
- package/types/algorithm/search_graph.d.ts +45 -0
- package/types/algorithm/topology_edit.d.ts +10 -0
- package/types/base/box.d.ts +100 -0
- package/types/base/box2.d.ts +17 -0
- package/types/base/box3.d.ts +20 -0
- package/types/base/coord.d.ts +10 -0
- package/types/base/coord2.d.ts +92 -0
- package/types/base/coord3.d.ts +139 -0
- package/types/base/discrete_param.d.ts +28 -0
- package/types/base/euler.d.ts +102 -0
- package/types/base/geo_element.d.ts +54 -0
- package/types/base/interval.d.ts +122 -0
- package/types/base/ivector.d.ts +126 -0
- package/types/base/matrix.d.ts +108 -0
- package/types/base/matrix3.d.ts +118 -0
- package/types/base/matrix4.d.ts +166 -0
- package/types/base/matrix_util.d.ts +5 -0
- package/types/base/period_inverval.d.ts +127 -0
- package/types/base/quaternion.d.ts +39 -0
- package/types/base/tangent_cone.d.ts +11 -0
- package/types/base/tilt_box.d.ts +11 -0
- package/types/base/tol.d.ts +120 -0
- package/types/base/vec.d.ts +46 -0
- package/types/base/vec2.d.ts +146 -0
- package/types/base/vec3.d.ts +158 -0
- package/types/brep-src/algorithm/alg_const.d.ts +23 -0
- package/types/brep-src/algorithm/alg_types.d.ts +47 -0
- package/types/brep-src/algorithm/algorithm_util/base_define.d.ts +7 -0
- package/types/brep-src/algorithm/algorithm_util/body_base_util.d.ts +4 -0
- package/types/brep-src/algorithm/algorithm_util/curve_solid_analysis.d.ts +28 -0
- package/types/brep-src/algorithm/algorithm_util/face_face_analysis.d.ts +39 -0
- package/types/brep-src/algorithm/algorithm_util/search_wire.d.ts +8 -0
- package/types/brep-src/algorithm/body_builder/basic_body_builder.d.ts +15 -0
- package/types/brep-src/algorithm/body_builder/extrude_body.d.ts +23 -0
- package/types/brep-src/algorithm/body_builder/sweep_body.d.ts +37 -0
- package/types/brep-src/algorithm/body_builder.d.ts +36 -0
- package/types/brep-src/algorithm/body_util.d.ts +21 -0
- package/types/brep-src/algorithm/bool_sk/brep_converter.d.ts +11 -0
- package/types/brep-src/algorithm/brep_calc_project.d.ts +50 -0
- package/types/brep-src/algorithm/brep_calc_x.d.ts +34 -0
- package/types/brep-src/algorithm/brep_pj.d.ts +47 -0
- package/types/brep-src/algorithm/index.d.ts +5 -0
- package/types/brep-src/algorithm/intersect/curve_face_overlap.d.ts +10 -0
- package/types/brep-src/algorithm/intersect/face_face_intersect.d.ts +22 -0
- package/types/brep-src/algorithm/intersect/face_faces_intersect.d.ts +15 -0
- package/types/brep-src/algorithm/intersect/line_face_intersect.d.ts +16 -0
- package/types/brep-src/algorithm/podition_judge/body_pj.d.ts +25 -0
- package/types/brep-src/algorithm/podition_judge/extrude_pj.d.ts +28 -0
- package/types/brep-src/algorithm/podition_judge/pt_body_pj.d.ts +32 -0
- package/types/brep-src/algorithm/project/body_project.d.ts +8 -0
- package/types/brep-src/algorithm/project/face_project.d.ts +20 -0
- package/types/brep-src/algorithm/project/face_surface_project.d.ts +8 -0
- package/types/brep-src/algorithm/project/space_project.d.ts +26 -0
- package/types/brep-src/algorithm/project/space_project_simple.d.ts +10 -0
- package/types/brep-src/algorithm/project/view_project.d.ts +25 -0
- package/types/brep-src/algorithm/shell_builder/create_shell_from_curves.d.ts +38 -0
- package/types/brep-src/algorithm/shell_builder.d.ts +25 -0
- package/types/brep-src/algorithm/shell_edit/add_edges/add_edges.d.ts +14 -0
- package/types/brep-src/algorithm/shell_edit/add_edges/add_edges_core.d.ts +11 -0
- package/types/brep-src/algorithm/shell_edit/copy_faces.d.ts +20 -0
- package/types/brep-src/algorithm/shell_edit/delete_faces_edges/delete_edge.d.ts +9 -0
- package/types/brep-src/algorithm/shell_edit/delete_faces_edges/delete_faces_edges.d.ts +17 -0
- package/types/brep-src/algorithm/shell_edit/faces_boolean/faces_boolean.d.ts +19 -0
- package/types/brep-src/algorithm/shell_edit/faces_boolean/faces_shells_boolean.d.ts +13 -0
- package/types/brep-src/algorithm/shell_edit/faces_boolean/octree.d.ts +11 -0
- package/types/brep-src/algorithm/shell_edit/isolate_faces.d.ts +21 -0
- package/types/brep-src/algorithm/shell_edit/merge_connect_faces.d.ts +14 -0
- package/types/brep-src/algorithm/shell_edit/merge_edges.d.ts +8 -0
- package/types/brep-src/algorithm/shell_edit/move_operators/move_edges.d.ts +31 -0
- package/types/brep-src/algorithm/shell_edit/move_operators/move_faces.d.ts +14 -0
- package/types/brep-src/algorithm/shell_edit/operator/dispose_topo.d.ts +2 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_connect_edge.d.ts +3 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_connect_face.d.ts +2 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_overlap_edge.d.ts +3 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_shell.d.ts +11 -0
- package/types/brep-src/algorithm/shell_edit/operator/merge_vertex.d.ts +2 -0
- package/types/brep-src/algorithm/shell_edit/operator/split_edge.d.ts +4 -0
- package/types/brep-src/algorithm/shell_edit/operator/split_shell.d.ts +6 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face.d.ts +18 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_core.d.ts +6 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_preview.d.ts +16 -0
- package/types/brep-src/algorithm/shell_edit/pull_push_face/pull_push_face_preview_core.d.ts +24 -0
- package/types/brep-src/algorithm/shell_edit/roundinng/2d_rounding.d.ts +22 -0
- package/types/brep-src/algorithm/shell_edit/shell_modeling_base.d.ts +10 -0
- package/types/brep-src/algorithm/shell_edit/shell_modeling_result.d.ts +21 -0
- package/types/brep-src/algorithm/shell_edit/smooth/detect_loop_util.d.ts +27 -0
- package/types/brep-src/algorithm/shell_edit/smooth/shell_modeling_util.d.ts +24 -0
- package/types/brep-src/algorithm/shell_edit/smooth/smooth_util.d.ts +22 -0
- package/types/brep-src/algorithm/shell_edit/split_edge.d.ts +10 -0
- package/types/brep-src/algorithm/shell_edit.d.ts +119 -0
- package/types/brep-src/algorithm/shell_valid/base_brep_topo_error.d.ts +176 -0
- package/types/brep-src/algorithm/shell_valid/diagnose_shell.d.ts +14 -0
- package/types/brep-src/brep/brep_body.d.ts +19 -0
- package/types/brep-src/brep/coedge3d.d.ts +83 -0
- package/types/brep-src/brep/edge.d.ts +96 -0
- package/types/brep-src/brep/face.d.ts +150 -0
- package/types/brep-src/brep/shell.d.ts +166 -0
- package/types/brep-src/brep/topo_object.d.ts +40 -0
- package/types/brep-src/brep/vertex.d.ts +48 -0
- package/types/brep-src/brep/wire.d.ts +66 -0
- package/types/brep-src/continuous/continuous_edge.d.ts +17 -0
- package/types/brep-src/continuous/continuous_face.d.ts +10 -0
- package/types/brep-src/continuous/continuous_util.d.ts +60 -0
- package/types/brep-src/continuous/continuous_uv.d.ts +24 -0
- package/types/brep-src/continuous/index.d.ts +4 -0
- package/types/brep-src/index.d.ts +14 -0
- package/types/brep-src/type_define/i_types.d.ts +46 -0
- package/types/brep-src/util/util.d.ts +23 -0
- package/types/conversion/units_conversion.d.ts +14 -0
- package/types/geometry/arc2d.d.ts +249 -0
- package/types/geometry/arc3d.d.ts +204 -0
- package/types/geometry/circle3d.d.ts +92 -0
- package/types/geometry/circular_surface.d.ts +52 -0
- package/types/geometry/coord_based_surface.d.ts +25 -0
- package/types/geometry/curve.d.ts +228 -0
- package/types/geometry/curve2.d.ts +62 -0
- package/types/geometry/curve3d.d.ts +66 -0
- package/types/geometry/cylinder.d.ts +73 -0
- package/types/geometry/discrete_arrow.d.ts +3 -0
- package/types/geometry/extend_curve2.d.ts +75 -0
- package/types/geometry/geometry2d.d.ts +35 -0
- package/types/geometry/geometry3d.d.ts +36 -0
- package/types/geometry/intersect_curve3.d.ts +90 -0
- package/types/geometry/ln2.d.ts +168 -0
- package/types/geometry/ln3.d.ts +152 -0
- package/types/geometry/nurbs_curve2.d.ts +106 -0
- package/types/geometry/nurbs_curve3.d.ts +191 -0
- package/types/geometry/offset_curve2.d.ts +63 -0
- package/types/geometry/offset_curve3.d.ts +97 -0
- package/types/geometry/offset_parameter_mapper.d.ts +72 -0
- package/types/geometry/plane.d.ts +109 -0
- package/types/geometry/polyline.d.ts +12 -0
- package/types/geometry/smooth_poly2.d.ts +78 -0
- package/types/geometry/smooth_poly3.d.ts +85 -0
- package/types/geometry/surface.d.ts +173 -0
- package/types/index.d.ts +78 -0
- package/types/io/obj_parser.d.ts +4 -0
- package/types/io/svgparser.d.ts +22 -0
- package/types/loader/loader.d.ts +23 -0
- package/types/loader/register_geo.d.ts +7 -0
- package/types/math/gauss_integration.d.ts +13 -0
- package/types/math/inv_bilinear.d.ts +33 -0
- package/types/solve_equations/cubic_equation.d.ts +7 -0
- package/types/solve_equations/linear_system.d.ts +6 -0
- package/types/solve_equations/nonlinear_system.d.ts +11 -0
- package/types/solve_equations/plurality.d.ts +9 -0
- package/types/solve_equations/polynomial_equation.d.ts +6 -0
- package/types/solve_equations/quadratic_equation.d.ts +6 -0
- package/types/solve_equations/quartic_equation.d.ts +6 -0
- package/types/solve_equations/solve_equation_util.d.ts +50 -0
- package/types/test_util/loop_generator.d.ts +21 -0
- package/types/topology/evolution_map.d.ts +90 -0
- package/types/topology/loop.d.ts +50 -0
- package/types/topology/polycurve.d.ts +109 -0
- package/types/topology/polygon.d.ts +118 -0
- package/types/topology/trimmed_surface.d.ts +136 -0
- package/types/type_define/const.d.ts +18 -0
- package/types/type_define/i_element.d.ts +9 -0
- package/types/type_define/i_element_type.d.ts +34 -0
- package/types/type_define/i_geometry.d.ts +191 -0
- package/types/type_define/i_types.d.ts +280 -0
- package/types/util/array_util.d.ts +8 -0
- package/types/util/assert.d.ts +21 -0
- package/types/util/clipper2_util.d.ts +5 -0
- package/types/util/clipper_format_converter.d.ts +21 -0
- package/types/util/clipper_util.d.ts +10 -0
- package/types/util/curve_util.d.ts +72 -0
- package/types/util/geom_util.d.ts +23 -0
- package/types/util/log.d.ts +19 -0
- package/types/util/math_error.d.ts +37 -0
- package/types/util/surface_util.d.ts +13 -0
- package/types/util/util.d.ts +18 -0
- package/types/util/uv_util.d.ts +68 -0
- package/types/verb/export_verb.d.ts +2 -0
- package/types/wasm/a2d.d.ts +19 -0
- package/types/wasm/bx2.d.ts +16 -0
- package/types/wasm/c2d.d.ts +29 -0
- package/types/wasm/elli.d.ts +19 -0
- package/types/wasm/grapher2d.d.ts +39 -0
- package/types/wasm/grapherutil.d.ts +9 -0
- package/types/wasm/l2d.d.ts +14 -0
- package/types/wasm/loader.d.ts +8 -0
- package/types/wasm/pt.d.ts +19 -0
- package/types/wasm/wasm-geom.d.ts +296 -0
- package/types/wasm/wasminstance.d.ts +19 -0
- package/types/wasm/wrapper.d.ts +82 -0
- package/README.md +0 -21
- package/dist/constants/geom_type.d.ts +0 -13
- package/dist/constants/geom_type.d.ts.map +0 -1
- package/dist/constants/geom_type.js +0 -17
- package/dist/constants/math_const.d.ts +0 -9
- package/dist/constants/math_const.d.ts.map +0 -1
- package/dist/constants/math_const.js +0 -12
- package/dist/core/box2.d.ts +0 -71
- package/dist/core/box2.d.ts.map +0 -1
- package/dist/core/box2.js +0 -243
- package/dist/core/coord2d.d.ts +0 -62
- package/dist/core/coord2d.d.ts.map +0 -1
- package/dist/core/coord2d.js +0 -155
- package/dist/core/geom_base.d.ts +0 -19
- package/dist/core/geom_base.d.ts.map +0 -1
- package/dist/core/geom_base.js +0 -18
- package/dist/core/mat3.d.ts +0 -101
- package/dist/core/mat3.d.ts.map +0 -1
- package/dist/core/mat3.js +0 -290
- package/dist/core/vec2.d.ts +0 -138
- package/dist/core/vec2.d.ts.map +0 -1
- package/dist/core/vec2.js +0 -297
- package/dist/curves/arc2.d.ts +0 -49
- package/dist/curves/arc2.d.ts.map +0 -1
- package/dist/curves/arc2.js +0 -265
- package/dist/curves/bspline2.d.ts +0 -150
- package/dist/curves/bspline2.d.ts.map +0 -1
- package/dist/curves/bspline2.js +0 -793
- package/dist/curves/circle2.d.ts +0 -42
- package/dist/curves/circle2.d.ts.map +0 -1
- package/dist/curves/circle2.js +0 -135
- package/dist/curves/circle_curve2.d.ts +0 -38
- package/dist/curves/circle_curve2.d.ts.map +0 -1
- package/dist/curves/circle_curve2.js +0 -112
- package/dist/curves/curve2.d.ts +0 -214
- package/dist/curves/curve2.d.ts.map +0 -1
- package/dist/curves/curve2.js +0 -238
- package/dist/curves/ellipse2.d.ts +0 -42
- package/dist/curves/ellipse2.d.ts.map +0 -1
- package/dist/curves/ellipse2.js +0 -125
- package/dist/curves/ellipse_arc2.d.ts +0 -49
- package/dist/curves/ellipse_arc2.d.ts.map +0 -1
- package/dist/curves/ellipse_arc2.js +0 -184
- package/dist/curves/ellipse_curve2.d.ts +0 -56
- package/dist/curves/ellipse_curve2.d.ts.map +0 -1
- package/dist/curves/ellipse_curve2.js +0 -262
- package/dist/curves/interval.d.ts +0 -112
- package/dist/curves/interval.d.ts.map +0 -1
- package/dist/curves/interval.js +0 -200
- package/dist/curves/line2.d.ts +0 -64
- package/dist/curves/line2.d.ts.map +0 -1
- package/dist/curves/line2.js +0 -193
- package/dist/curves/period_interval.d.ts +0 -129
- package/dist/curves/period_interval.d.ts.map +0 -1
- package/dist/curves/period_interval.js +0 -240
- package/dist/discretize/discretize_defaults.d.ts +0 -12
- package/dist/discretize/discretize_defaults.d.ts.map +0 -1
- package/dist/discretize/discretize_defaults.js +0 -12
- package/dist/discretize/discretize_engine.d.ts +0 -33
- package/dist/discretize/discretize_engine.d.ts.map +0 -1
- package/dist/discretize/discretize_engine.js +0 -347
- package/dist/discretize/discretize_errors.d.ts +0 -15
- package/dist/discretize/discretize_errors.d.ts.map +0 -1
- package/dist/discretize/discretize_errors.js +0 -30
- package/dist/discretize/discretize_options.d.ts +0 -18
- package/dist/discretize/discretize_options.d.ts.map +0 -1
- package/dist/discretize/discretize_options.js +0 -19
- package/dist/discretize/discretize_types.d.ts +0 -36
- package/dist/discretize/discretize_types.d.ts.map +0 -1
- package/dist/discretize/discretize_types.js +0 -1
- package/dist/discretize/internal/curve_guards.d.ts +0 -35
- package/dist/discretize/internal/curve_guards.d.ts.map +0 -1
- package/dist/discretize/internal/curve_guards.js +0 -62
- package/dist/discretize/internal/postprocess.d.ts +0 -5
- package/dist/discretize/internal/postprocess.d.ts.map +0 -1
- package/dist/discretize/internal/postprocess.js +0 -109
- package/dist/discretize/internal/sampling_utils.d.ts +0 -8
- package/dist/discretize/internal/sampling_utils.d.ts.map +0 -1
- package/dist/discretize/internal/sampling_utils.js +0 -36
- package/dist/discretize/register_builtin_strategies.d.ts +0 -3
- package/dist/discretize/register_builtin_strategies.d.ts.map +0 -1
- package/dist/discretize/register_builtin_strategies.js +0 -10
- package/dist/discretize/strategies/bspline_strategy.d.ts +0 -4
- package/dist/discretize/strategies/bspline_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/bspline_strategy.js +0 -115
- package/dist/discretize/strategies/circle_strategy.d.ts +0 -7
- package/dist/discretize/strategies/circle_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/circle_strategy.js +0 -55
- package/dist/discretize/strategies/ellipse_strategy.d.ts +0 -7
- package/dist/discretize/strategies/ellipse_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/ellipse_strategy.js +0 -86
- package/dist/discretize/strategies/line_strategy.d.ts +0 -4
- package/dist/discretize/strategies/line_strategy.d.ts.map +0 -1
- package/dist/discretize/strategies/line_strategy.js +0 -40
- package/dist/discretize/strategy_registry.d.ts +0 -9
- package/dist/discretize/strategy_registry.d.ts.map +0 -1
- package/dist/discretize/strategy_registry.js +0 -34
- package/dist/index.d.ts +0 -30
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -24
- package/dist/intersections/analytic_x_algorithm.d.ts +0 -10
- package/dist/intersections/analytic_x_algorithm.d.ts.map +0 -1
- package/dist/intersections/analytic_x_algorithm.js +0 -83
- package/dist/intersections/curve_x_engine.d.ts +0 -9
- package/dist/intersections/curve_x_engine.d.ts.map +0 -1
- package/dist/intersections/curve_x_engine.js +0 -27
- package/dist/intersections/index.d.ts +0 -5
- package/dist/intersections/index.d.ts.map +0 -1
- package/dist/intersections/index.js +0 -11
- package/dist/intersections/internal/certification.d.ts +0 -34
- package/dist/intersections/internal/certification.d.ts.map +0 -1
- package/dist/intersections/internal/certification.js +0 -238
- package/dist/intersections/internal/interval_clipping.d.ts +0 -29
- package/dist/intersections/internal/interval_clipping.d.ts.map +0 -1
- package/dist/intersections/internal/interval_clipping.js +0 -123
- package/dist/intersections/internal/kind.d.ts +0 -4
- package/dist/intersections/internal/kind.d.ts.map +0 -1
- package/dist/intersections/internal/kind.js +0 -16
- package/dist/intersections/internal/pair.d.ts +0 -9
- package/dist/intersections/internal/pair.d.ts.map +0 -1
- package/dist/intersections/internal/pair.js +0 -14
- package/dist/intersections/internal/result.d.ts +0 -20
- package/dist/intersections/internal/result.d.ts.map +0 -1
- package/dist/intersections/internal/result.js +0 -125
- package/dist/intersections/internal/sampling.d.ts +0 -15
- package/dist/intersections/internal/sampling.d.ts.map +0 -1
- package/dist/intersections/internal/sampling.js +0 -131
- package/dist/intersections/internal/segment.d.ts +0 -32
- package/dist/intersections/internal/segment.d.ts.map +0 -1
- package/dist/intersections/internal/segment.js +0 -137
- package/dist/intersections/internal/tolerance.d.ts +0 -10
- package/dist/intersections/internal/tolerance.d.ts.map +0 -1
- package/dist/intersections/internal/tolerance.js +0 -20
- package/dist/intersections/intersector.d.ts +0 -6
- package/dist/intersections/intersector.d.ts.map +0 -1
- package/dist/intersections/intersector.js +0 -1
- package/dist/intersections/numeric_x_algorithm.d.ts +0 -10
- package/dist/intersections/numeric_x_algorithm.d.ts.map +0 -1
- package/dist/intersections/numeric_x_algorithm.js +0 -73
- package/dist/intersections/solvers/bspline_self_solver.d.ts +0 -7
- package/dist/intersections/solvers/bspline_self_solver.d.ts.map +0 -1
- package/dist/intersections/solvers/bspline_self_solver.js +0 -308
- package/dist/intersections/solvers/line_line_pair_solver.d.ts +0 -7
- package/dist/intersections/solvers/line_line_pair_solver.d.ts.map +0 -1
- package/dist/intersections/solvers/line_line_pair_solver.js +0 -35
- package/dist/intersections/solvers/pair_solvers.d.ts +0 -94
- package/dist/intersections/solvers/pair_solvers.d.ts.map +0 -1
- package/dist/intersections/solvers/pair_solvers.js +0 -1078
- package/dist/intersections/solvers/polyline_pair_intersector.d.ts +0 -51
- package/dist/intersections/solvers/polyline_pair_intersector.d.ts.map +0 -1
- package/dist/intersections/solvers/polyline_pair_intersector.js +0 -731
- package/dist/intersections/types.d.ts +0 -11
- package/dist/intersections/types.d.ts.map +0 -1
- package/dist/intersections/types.js +0 -1
- package/dist/serialize/dump_types.d.ts +0 -101
- package/dist/serialize/dump_types.d.ts.map +0 -1
- package/dist/serialize/dump_types.js +0 -5
- package/dist/serialize/geom_mgr.d.ts +0 -24
- package/dist/serialize/geom_mgr.d.ts.map +0 -1
- package/dist/serialize/geom_mgr.js +0 -30
- package/dist/types/type_define.d.ts +0 -29
- package/dist/types/type_define.d.ts.map +0 -1
- package/dist/types/type_define.js +0 -10
- package/dist/types/type_guard.d.ts +0 -46
- package/dist/types/type_guard.d.ts.map +0 -1
- package/dist/types/type_guard.js +0 -5
- package/dist/utils/math_error.d.ts +0 -16
- package/dist/utils/math_error.d.ts.map +0 -1
- package/dist/utils/math_error.js +0 -35
- package/dist/utils/math_utils.d.ts +0 -9
- package/dist/utils/math_utils.d.ts.map +0 -1
- package/dist/utils/math_utils.js +0 -25
- package/dist/utils/precision.d.ts +0 -29
- package/dist/utils/precision.d.ts.map +0 -1
- package/dist/utils/precision.js +0 -44
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Vec3 } from './vec3';
|
|
2
|
+
import { Matrix4 } from './matrix4';
|
|
3
|
+
import { types } from '../type_define/i_types';
|
|
4
|
+
import { EN_GEO_TYPE } from '../type_define/i_element_type';
|
|
5
|
+
import { Coord } from './coord';
|
|
6
|
+
/**
|
|
7
|
+
* 坐标系
|
|
8
|
+
*/
|
|
9
|
+
declare class Coord3 extends Coord<Vec3> {
|
|
10
|
+
/**
|
|
11
|
+
* 构造XOY坐标系
|
|
12
|
+
* @param z 原点的Z坐标,默认为零
|
|
13
|
+
*/
|
|
14
|
+
static XOY(z?: number): Coord3;
|
|
15
|
+
/**
|
|
16
|
+
* 构造YOZ坐标系
|
|
17
|
+
* @param x 原点的X坐标,默认为零
|
|
18
|
+
*/
|
|
19
|
+
static YOZ(x?: number): Coord3;
|
|
20
|
+
/**
|
|
21
|
+
* 构造ZOX坐标系
|
|
22
|
+
* @param y 原点的Y坐标,默认为零
|
|
23
|
+
*/
|
|
24
|
+
static ZOX(y?: number): Coord3;
|
|
25
|
+
/**
|
|
26
|
+
* 构造XOZ坐标系
|
|
27
|
+
* @param y 原点的Y坐标,默认为零
|
|
28
|
+
*/
|
|
29
|
+
static XOZ(y?: number): Coord3;
|
|
30
|
+
/**
|
|
31
|
+
* 从局部坐标系1到局部坐标系2的变换矩阵
|
|
32
|
+
* Lp1 = Wp.M1
|
|
33
|
+
* @param coor1
|
|
34
|
+
* @param coor2
|
|
35
|
+
*/
|
|
36
|
+
static getTransformFrom1To2(coor1: Coord3, coor2: Coord3): Matrix4 | undefined;
|
|
37
|
+
private _origin;
|
|
38
|
+
private _xDir;
|
|
39
|
+
private _yDir;
|
|
40
|
+
private _zDir;
|
|
41
|
+
constructor();
|
|
42
|
+
constructor(origin: types.IXYZ, zDir?: types.IXYZ);
|
|
43
|
+
constructor(origin: types.IXYZ, xDir: types.IXYZ, yDir: types.IXYZ);
|
|
44
|
+
/**
|
|
45
|
+
* 获取X方向
|
|
46
|
+
*/
|
|
47
|
+
getDx(): Vec3;
|
|
48
|
+
/**
|
|
49
|
+
* 设置X方向
|
|
50
|
+
* @param v
|
|
51
|
+
*/
|
|
52
|
+
setDx(v: types.IXYZ): void;
|
|
53
|
+
/**
|
|
54
|
+
* 获取Y方向
|
|
55
|
+
*/
|
|
56
|
+
getDy(): Vec3;
|
|
57
|
+
/**
|
|
58
|
+
* 设置Y方向
|
|
59
|
+
* @param v
|
|
60
|
+
*/
|
|
61
|
+
setDy(v: types.IXYZ): void;
|
|
62
|
+
/**
|
|
63
|
+
* 获取Z方向
|
|
64
|
+
*/
|
|
65
|
+
getDz(): Vec3;
|
|
66
|
+
/**
|
|
67
|
+
* 获取原点
|
|
68
|
+
*/
|
|
69
|
+
getOrigin(): Vec3;
|
|
70
|
+
/**
|
|
71
|
+
* 设置原点
|
|
72
|
+
* @param o 原点
|
|
73
|
+
*/
|
|
74
|
+
setOrigin(o: types.IXYZ): void;
|
|
75
|
+
/**
|
|
76
|
+
* 设置XY方向
|
|
77
|
+
* @param xDir X方向
|
|
78
|
+
* @param yDir Y方向
|
|
79
|
+
*/
|
|
80
|
+
setXYDirs(xDir: types.IXYZ, yDir: types.IXYZ): this;
|
|
81
|
+
/**
|
|
82
|
+
* z轴反向 (Y轴也会反向)
|
|
83
|
+
*/
|
|
84
|
+
reverseZDir(): this;
|
|
85
|
+
/**
|
|
86
|
+
* 平移,改变自己
|
|
87
|
+
* @param delta
|
|
88
|
+
*/
|
|
89
|
+
translate(delta: types.IXYZ): this;
|
|
90
|
+
/**
|
|
91
|
+
* 平移,得到一个新的对象
|
|
92
|
+
* @param delta
|
|
93
|
+
*/
|
|
94
|
+
translated(delta: types.IXYZ): Coord3;
|
|
95
|
+
/**
|
|
96
|
+
* 矩阵变换,改变自己。非等比缩放时,保证 dx 方向变换
|
|
97
|
+
* @param m
|
|
98
|
+
*/
|
|
99
|
+
transform(m: types.IMatrix4 | types.numberArrs4X4): this;
|
|
100
|
+
/**
|
|
101
|
+
* 矩阵变换,得到一个新的对象。非等比缩放时,保证 dx 方向变换
|
|
102
|
+
* @param m
|
|
103
|
+
*/
|
|
104
|
+
transformed(m: types.IMatrix4 | types.numberArrs4X4): Coord3;
|
|
105
|
+
/**
|
|
106
|
+
* 根据当前局部坐标系的点获取世界坐标系的点
|
|
107
|
+
* @param uvw
|
|
108
|
+
*/
|
|
109
|
+
getWorldPtAt(uvw: types.IXY | types.IXYZ): Vec3;
|
|
110
|
+
/**
|
|
111
|
+
* 根据世界坐标系的点获取当前局部坐标系的点
|
|
112
|
+
* @param worldPt
|
|
113
|
+
*/
|
|
114
|
+
getLocalPtAt(worldPt: types.IXYZ): Vec3;
|
|
115
|
+
/**
|
|
116
|
+
* 根据当前局部坐标系的向量获取世界坐标系的向量
|
|
117
|
+
* @param localVec
|
|
118
|
+
*/
|
|
119
|
+
getWorldVectorAt(localVec: types.IXY | types.IXYZ): Vec3;
|
|
120
|
+
/**
|
|
121
|
+
* 根据世界坐标系的向量获取当前局部坐标系的向量
|
|
122
|
+
* @param worldVec
|
|
123
|
+
*/
|
|
124
|
+
getLocalVectorAt(worldVec: types.IXYZ): Vec3;
|
|
125
|
+
/**
|
|
126
|
+
* 构造一个矩阵,将当前局部坐标系的位置变换到世界坐标系
|
|
127
|
+
*/
|
|
128
|
+
getLocalToWorldMatrix(): Matrix4;
|
|
129
|
+
/**
|
|
130
|
+
* 构造一个矩阵,将世界坐标系位置变换到当前局部坐标系
|
|
131
|
+
*/
|
|
132
|
+
getWorldToLocalMatrix(): Matrix4;
|
|
133
|
+
clone(): Coord3;
|
|
134
|
+
dump(): types.IDBCoordinate3;
|
|
135
|
+
load({ data: [o, x, y] }: types.IDBCoordinate3): this;
|
|
136
|
+
getType(): EN_GEO_TYPE.COORD_3;
|
|
137
|
+
private _update;
|
|
138
|
+
}
|
|
139
|
+
export { Coord3 };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Tol } from './tol';
|
|
2
|
+
export declare class DiscreteParam {
|
|
3
|
+
tolerance: Tol;
|
|
4
|
+
crossEps: number;
|
|
5
|
+
hintSegmentCount: number;
|
|
6
|
+
maxSegmentCount: number;
|
|
7
|
+
maxFaceletCount: number;
|
|
8
|
+
enableSurfaceRefiner: boolean;
|
|
9
|
+
static readonly LOW: DiscreteParam;
|
|
10
|
+
static readonly NORMAL: DiscreteParam;
|
|
11
|
+
static readonly HIGH: DiscreteParam;
|
|
12
|
+
static readonly BorderScale = 0.1;
|
|
13
|
+
static readonly UvDisEps = 0.1;
|
|
14
|
+
static readonly CALCULATE: DiscreteParam;
|
|
15
|
+
private static readonly _MIN_HINT_SEGMENT_COUNT;
|
|
16
|
+
private static readonly _MIN_TOLER_ANGLE_EPS;
|
|
17
|
+
constructor(tolerance: Tol, crossEps: number, // 差乘容差,用于面离散时判断是否需要拆分边
|
|
18
|
+
hintSegmentCount: number, maxSegmentCount: number, maxFaceletCount: number, enableSurfaceRefiner: boolean);
|
|
19
|
+
clone({ tolerance, crossEps, hintSegmentCount, maxSegmentCount, maxFaceletCount, enableSurfaceRefiner, }: {
|
|
20
|
+
tolerance?: Tol | undefined;
|
|
21
|
+
crossEps?: number | undefined;
|
|
22
|
+
hintSegmentCount?: number | undefined;
|
|
23
|
+
maxSegmentCount?: number | undefined;
|
|
24
|
+
maxFaceletCount?: number | undefined;
|
|
25
|
+
enableSurfaceRefiner?: boolean | undefined;
|
|
26
|
+
}): DiscreteParam;
|
|
27
|
+
ratioed(ratio?: number, enableSurfaceRefiner?: boolean): DiscreteParam;
|
|
28
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Vec3 } from './vec3';
|
|
2
|
+
import { Matrix4 } from './matrix4';
|
|
3
|
+
export declare enum EulerOrder {
|
|
4
|
+
XYZ = 0,
|
|
5
|
+
YZX = 1,
|
|
6
|
+
ZXY = 2,
|
|
7
|
+
XZY = 3,
|
|
8
|
+
YXZ = 4,
|
|
9
|
+
ZYX = 5
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 欧拉角
|
|
13
|
+
*/
|
|
14
|
+
export declare class Euler {
|
|
15
|
+
isEuler: boolean;
|
|
16
|
+
private _x;
|
|
17
|
+
private _y;
|
|
18
|
+
private _z;
|
|
19
|
+
private _order;
|
|
20
|
+
/**
|
|
21
|
+
* 构造函数
|
|
22
|
+
* @param x 绕X轴的旋转角度
|
|
23
|
+
* @param y 绕Y轴的旋转角度
|
|
24
|
+
* @param z 绕Z轴的旋转角度
|
|
25
|
+
* @param order 旋转顺序
|
|
26
|
+
*/
|
|
27
|
+
constructor(x?: number, y?: number, z?: number, order?: EulerOrder);
|
|
28
|
+
/**
|
|
29
|
+
* 获取X轴的旋转角度
|
|
30
|
+
*/
|
|
31
|
+
get x(): number;
|
|
32
|
+
/**
|
|
33
|
+
* 设置X轴的旋转角度
|
|
34
|
+
*/
|
|
35
|
+
set x(value: number);
|
|
36
|
+
/**
|
|
37
|
+
* 获取Y轴的旋转角度
|
|
38
|
+
*/
|
|
39
|
+
get y(): number;
|
|
40
|
+
/**
|
|
41
|
+
* 设置Y轴的旋转角度
|
|
42
|
+
*/
|
|
43
|
+
set y(value: number);
|
|
44
|
+
/**
|
|
45
|
+
* 获取Z轴的旋转角度
|
|
46
|
+
*/
|
|
47
|
+
get z(): number;
|
|
48
|
+
/**
|
|
49
|
+
* 设置Z轴的旋转角度
|
|
50
|
+
*/
|
|
51
|
+
set z(value: number);
|
|
52
|
+
/**
|
|
53
|
+
* 获取旋转顺序
|
|
54
|
+
*/
|
|
55
|
+
get order(): EulerOrder;
|
|
56
|
+
/**
|
|
57
|
+
* 设置旋转顺序
|
|
58
|
+
*/
|
|
59
|
+
set order(value: EulerOrder);
|
|
60
|
+
/**
|
|
61
|
+
* 设置角度及旋转顺序
|
|
62
|
+
* @param x
|
|
63
|
+
* @param y
|
|
64
|
+
* @param z
|
|
65
|
+
* @param order
|
|
66
|
+
*/
|
|
67
|
+
set(x: number, y: number, z: number, order: EulerOrder): void;
|
|
68
|
+
clone(): Euler;
|
|
69
|
+
/**
|
|
70
|
+
* 从另一个欧拉角复制,改变自己
|
|
71
|
+
* @param euler
|
|
72
|
+
*/
|
|
73
|
+
copyFrom(euler: Euler): void;
|
|
74
|
+
/**
|
|
75
|
+
* 从旋转矩阵,旋转顺序,计算出旋转角度
|
|
76
|
+
* @param m
|
|
77
|
+
* @param order
|
|
78
|
+
*/
|
|
79
|
+
setFromRotationMatrix(m: Matrix4, order: EulerOrder): void;
|
|
80
|
+
/**
|
|
81
|
+
* 设置旋转角度和顺序(角度分别为向量的三个分量)
|
|
82
|
+
* @param v
|
|
83
|
+
* @param order
|
|
84
|
+
*/
|
|
85
|
+
setFromVector3(v: Vec3, order?: EulerOrder): void;
|
|
86
|
+
isEqual(euler: Euler): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* 设置旋转角度和顺序(依次为数组0~3个元素)
|
|
89
|
+
* @param array
|
|
90
|
+
*/
|
|
91
|
+
fromArray(array: any[]): this;
|
|
92
|
+
/**
|
|
93
|
+
* 将旋转角度及顺序转成数组
|
|
94
|
+
* @param array
|
|
95
|
+
* @param offset
|
|
96
|
+
*/
|
|
97
|
+
toArray(): any[];
|
|
98
|
+
/**
|
|
99
|
+
* 将旋转角度转成向量
|
|
100
|
+
*/
|
|
101
|
+
toVector(): Vec3;
|
|
102
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { types } from '../type_define/i_types';
|
|
2
|
+
import { IGeo } from '../type_define/i_element';
|
|
3
|
+
import { EN_GEO_TYPE } from '../type_define/i_element_type';
|
|
4
|
+
import { Vec2 } from './vec2';
|
|
5
|
+
import { Vec3 } from './vec3';
|
|
6
|
+
import { Ln2 } from '../geometry/ln2';
|
|
7
|
+
import { Arc2 } from '../geometry/arc2d';
|
|
8
|
+
import { NurbsCurve2 } from '../geometry/nurbs_curve2';
|
|
9
|
+
import { OffsetCurve2 } from '../geometry/offset_curve2';
|
|
10
|
+
import { SmoothPoly2 } from '../geometry/smooth_poly2';
|
|
11
|
+
import { SmoothPoly3 } from '../geometry/smooth_poly3';
|
|
12
|
+
import { Loop } from '../topology/loop';
|
|
13
|
+
import { Ln3 } from '../geometry/ln3';
|
|
14
|
+
import { Arc3 } from '../geometry/arc3d';
|
|
15
|
+
import { Circle3d } from '../geometry/circle3d';
|
|
16
|
+
import { OffsetCurve3 } from '../geometry/offset_curve3';
|
|
17
|
+
import { NurbsCurve3 } from '../geometry/nurbs_curve3';
|
|
18
|
+
import { Plane } from '../geometry/plane';
|
|
19
|
+
import { Cylinder } from '../geometry/cylinder';
|
|
20
|
+
import { IArc, ILine, INurbsCurve, IOffsetCurve } from '../type_define/i_geometry';
|
|
21
|
+
import { Vec } from './vec';
|
|
22
|
+
export declare abstract class GeoElement implements IGeo {
|
|
23
|
+
userData: {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
dUserData: {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
abstract getType(): EN_GEO_TYPE;
|
|
30
|
+
dump(): types.IDBLibGeo;
|
|
31
|
+
load(json: types.IDBLibGeo): this;
|
|
32
|
+
clone(): IGeo;
|
|
33
|
+
toString(): string;
|
|
34
|
+
isVector2(): this is Vec2;
|
|
35
|
+
isVector3(): this is Vec3;
|
|
36
|
+
isLine2d(): this is Ln2;
|
|
37
|
+
isArc2d(): this is Arc2;
|
|
38
|
+
isNurbsCurve2d(): this is NurbsCurve2;
|
|
39
|
+
isOffsetCurve2d(): this is OffsetCurve2;
|
|
40
|
+
isSmoothPoly2d(): this is SmoothPoly2;
|
|
41
|
+
isSmoothPoly3d(): this is SmoothPoly3;
|
|
42
|
+
isLoop(): this is Loop;
|
|
43
|
+
isLine3d(): this is Ln3;
|
|
44
|
+
isArc3d(): this is Arc3;
|
|
45
|
+
isCircle3d(): this is Circle3d;
|
|
46
|
+
isOffsetCurve3d(): this is OffsetCurve3;
|
|
47
|
+
isNurbsCurve3d(): this is NurbsCurve3;
|
|
48
|
+
isLine(): this is ILine<Vec>;
|
|
49
|
+
isArc(): this is IArc<Vec>;
|
|
50
|
+
isNurbsCurve(): this is INurbsCurve<Vec>;
|
|
51
|
+
isOffsetCurve(): this is IOffsetCurve<Vec>;
|
|
52
|
+
isPlane(): this is Plane;
|
|
53
|
+
isCylinder(): this is Cylinder;
|
|
54
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { types } from '../type_define/i_types';
|
|
2
|
+
/**
|
|
3
|
+
* 区间
|
|
4
|
+
*/
|
|
5
|
+
declare class Interval {
|
|
6
|
+
/**
|
|
7
|
+
* 返回默认的无限大参数域
|
|
8
|
+
*/
|
|
9
|
+
static infinit(): Interval;
|
|
10
|
+
/**
|
|
11
|
+
* 返回默认的无限大参数域
|
|
12
|
+
*/
|
|
13
|
+
static infinitArray(): types.IInterval;
|
|
14
|
+
/**
|
|
15
|
+
* 一组区间的合并
|
|
16
|
+
* @param ranges
|
|
17
|
+
*/
|
|
18
|
+
static merge(ranges: Interval[]): Interval[];
|
|
19
|
+
protected _min: number;
|
|
20
|
+
protected _max: number;
|
|
21
|
+
constructor();
|
|
22
|
+
/**
|
|
23
|
+
* 构造方法,最小点和最大点
|
|
24
|
+
* @param min
|
|
25
|
+
* @param max
|
|
26
|
+
* @param autoReset 若min>max 是否自动交换min与max
|
|
27
|
+
*/
|
|
28
|
+
constructor(min: number, max: number, autoRest?: boolean);
|
|
29
|
+
get min(): number;
|
|
30
|
+
set min(v: number);
|
|
31
|
+
get max(): number;
|
|
32
|
+
set max(v: number);
|
|
33
|
+
set(min: number, max: number): this;
|
|
34
|
+
setInfinit(min?: number): this;
|
|
35
|
+
toArray(): types.IInterval;
|
|
36
|
+
/**
|
|
37
|
+
* 包含坐标轴上的一个点
|
|
38
|
+
* @param param
|
|
39
|
+
* @param tolerance
|
|
40
|
+
*/
|
|
41
|
+
containsPt(param: number, tolerance?: number): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 判断如果param出了参数域,将param拉回到参数域边界
|
|
44
|
+
* @param param
|
|
45
|
+
*/
|
|
46
|
+
clamp(param: number): number;
|
|
47
|
+
/**
|
|
48
|
+
* 点在区间端点上
|
|
49
|
+
* @param param
|
|
50
|
+
* @param tolerance
|
|
51
|
+
*/
|
|
52
|
+
containsPtAtStartOrEnd(param: number, tolerance?: number): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* 完全包含另一个区间
|
|
55
|
+
* @param param
|
|
56
|
+
* @param tolerance
|
|
57
|
+
*/
|
|
58
|
+
containsInterval(another: Interval, tolerance?: number): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* 返回范围内的参数
|
|
61
|
+
* @param params
|
|
62
|
+
* @param eps
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
filterParams(params: number[]): number[];
|
|
66
|
+
/**
|
|
67
|
+
* 与另一个区间相等
|
|
68
|
+
* @param param
|
|
69
|
+
* @param tolerance
|
|
70
|
+
*/
|
|
71
|
+
equals(another: Interval, tolerance?: number): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 返回区间长度
|
|
74
|
+
*/
|
|
75
|
+
getLength(): number;
|
|
76
|
+
/**
|
|
77
|
+
* 返回区间中点
|
|
78
|
+
*/
|
|
79
|
+
getMid(): number;
|
|
80
|
+
/**
|
|
81
|
+
* 与区间/点的距离,可使用该距离判断位置关系
|
|
82
|
+
* @param another
|
|
83
|
+
*/
|
|
84
|
+
distanceTo(another: Interval | number): number;
|
|
85
|
+
/**
|
|
86
|
+
* 两个区间求交集,若区间没有交,则返回 []
|
|
87
|
+
* @param another
|
|
88
|
+
*/
|
|
89
|
+
intersected(another: Interval, eps?: number): Interval[];
|
|
90
|
+
/**
|
|
91
|
+
* 减掉一组区间,若区间长度小于1e-6则自动舍掉
|
|
92
|
+
* @param ranges
|
|
93
|
+
*/
|
|
94
|
+
subtracted(...ranges: Interval[]): Interval[];
|
|
95
|
+
/**
|
|
96
|
+
* 扩展
|
|
97
|
+
* @param pt
|
|
98
|
+
*/
|
|
99
|
+
expandByPt(pt: number): this;
|
|
100
|
+
/**
|
|
101
|
+
* 区间的缩放,改变自己
|
|
102
|
+
* @param scale
|
|
103
|
+
*/
|
|
104
|
+
multiply(scale: number): this;
|
|
105
|
+
/**
|
|
106
|
+
* 区间的打断算法
|
|
107
|
+
* @param ranges
|
|
108
|
+
*/
|
|
109
|
+
splited(...ranges: (Interval | number)[]): Interval[];
|
|
110
|
+
clone(): Interval;
|
|
111
|
+
/**
|
|
112
|
+
* 减掉另一个区间
|
|
113
|
+
* @param another
|
|
114
|
+
*/
|
|
115
|
+
protected _sub(another: Interval): Interval[];
|
|
116
|
+
/**
|
|
117
|
+
* 加上另一个区间
|
|
118
|
+
* @param another
|
|
119
|
+
*/
|
|
120
|
+
protected _add(another: Interval): this;
|
|
121
|
+
}
|
|
122
|
+
export { Interval };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { types } from '../type_define/i_types';
|
|
2
|
+
import { GeoElement } from './geo_element';
|
|
3
|
+
/**
|
|
4
|
+
* 向量和点
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class IVector extends GeoElement {
|
|
7
|
+
protected abstract readonly _data: number[];
|
|
8
|
+
constructor();
|
|
9
|
+
abstract clone(): IVector;
|
|
10
|
+
/**
|
|
11
|
+
* 向量相加,返回一个新对象
|
|
12
|
+
* @param another
|
|
13
|
+
*/
|
|
14
|
+
abstract added(another: types.IXY | IVector): IVector;
|
|
15
|
+
/**
|
|
16
|
+
* 向量相减,返回一个新对象
|
|
17
|
+
* @param another
|
|
18
|
+
*/
|
|
19
|
+
abstract subtracted(another: types.IXY | IVector): IVector;
|
|
20
|
+
/**
|
|
21
|
+
* 向量相乘,返回一个新对象
|
|
22
|
+
* @param scale
|
|
23
|
+
*/
|
|
24
|
+
abstract multiplied(scale: number): IVector;
|
|
25
|
+
/**
|
|
26
|
+
* 向量反向,返回一个新对象
|
|
27
|
+
*/
|
|
28
|
+
abstract reversed(): IVector;
|
|
29
|
+
/**
|
|
30
|
+
* 向量插值,返回一个新对象
|
|
31
|
+
* @param another
|
|
32
|
+
*/
|
|
33
|
+
abstract interpolated(another: types.IXY | IVector, alpha: number): IVector;
|
|
34
|
+
/**
|
|
35
|
+
* 向量插值,返回两者中点
|
|
36
|
+
* @param another
|
|
37
|
+
*/
|
|
38
|
+
abstract midTo(another: types.IXY | IVector): IVector;
|
|
39
|
+
/**
|
|
40
|
+
* 单位化向量,返回一个新对象
|
|
41
|
+
*/
|
|
42
|
+
abstract normalized(): IVector;
|
|
43
|
+
/**
|
|
44
|
+
* 点的平移,返回一个新对象
|
|
45
|
+
* @param vector
|
|
46
|
+
*/
|
|
47
|
+
abstract translated(vector: types.IXY | IVector): IVector;
|
|
48
|
+
/**
|
|
49
|
+
* 两向量之间的夹角,区间[0,PI]
|
|
50
|
+
* @param another
|
|
51
|
+
*/
|
|
52
|
+
abstract angle(another: types.IXY | IVector): number;
|
|
53
|
+
/**
|
|
54
|
+
* 两向量是否垂直
|
|
55
|
+
* @param another
|
|
56
|
+
* @param eps 容差
|
|
57
|
+
*/
|
|
58
|
+
abstract isPerpendicular(another: types.IXY | IVector, eps: number): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* 两向量是否平行(同向或反向)
|
|
61
|
+
* @param another
|
|
62
|
+
* @param eps 容差
|
|
63
|
+
*/
|
|
64
|
+
abstract isParallel(another: types.IXY | IVector, eps: number): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* 向量点乘
|
|
67
|
+
* @param another
|
|
68
|
+
*/
|
|
69
|
+
abstract dot(another: types.IXY | IVector): number;
|
|
70
|
+
/**
|
|
71
|
+
* 与另外一个向量的距离
|
|
72
|
+
*/
|
|
73
|
+
abstract distanceTo(another: types.IXY | IVector): number;
|
|
74
|
+
/**
|
|
75
|
+
* 与另外一个向量的平方距离
|
|
76
|
+
*/
|
|
77
|
+
abstract sqDistanceTo(another: types.IXY | IVector): number;
|
|
78
|
+
/**
|
|
79
|
+
* 向量是否相等
|
|
80
|
+
* @param param
|
|
81
|
+
* @param eps 容差
|
|
82
|
+
*/
|
|
83
|
+
abstract equals(another: types.IXY | IVector, eps?: number): boolean;
|
|
84
|
+
get data(): number[];
|
|
85
|
+
/**
|
|
86
|
+
* 两向量是否同向(平行且方向相同)
|
|
87
|
+
* @param another
|
|
88
|
+
* @param eps 容差
|
|
89
|
+
*/
|
|
90
|
+
isSameDirection(another: types.IXY | IVector, eps?: number): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* 两向量是否反向(平行且方向相反)
|
|
93
|
+
* @param another
|
|
94
|
+
* @param eps 容差
|
|
95
|
+
*/
|
|
96
|
+
isOpposite(another: types.IXY | IVector, eps?: number): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* 向量的长度是否为0
|
|
99
|
+
* @param eps 容差
|
|
100
|
+
*/
|
|
101
|
+
isZero(eps?: number): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* 转成数组
|
|
104
|
+
*/
|
|
105
|
+
toArray2(): types.IXYArr;
|
|
106
|
+
toArray3(): types.IXYZArr;
|
|
107
|
+
/**
|
|
108
|
+
* 转成types.types.IXY
|
|
109
|
+
*/
|
|
110
|
+
toXY(): types.IXY;
|
|
111
|
+
/**
|
|
112
|
+
* 转成types.IXYZ
|
|
113
|
+
*/
|
|
114
|
+
toXYZ(): types.IXYZ;
|
|
115
|
+
/**
|
|
116
|
+
* 计算向量的模长
|
|
117
|
+
*/
|
|
118
|
+
getLength(): number;
|
|
119
|
+
/**
|
|
120
|
+
* 计算平方距离
|
|
121
|
+
*/
|
|
122
|
+
getSqLength(): number;
|
|
123
|
+
dump(): types.IDBVector;
|
|
124
|
+
load({ data }: types.IDBVector): this;
|
|
125
|
+
private _resetData;
|
|
126
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { GeoElement } from './geo_element';
|
|
2
|
+
import { types } from '../type_define/i_types';
|
|
3
|
+
import { EN_GEO_TYPE } from '../type_define/i_element_type';
|
|
4
|
+
/**
|
|
5
|
+
* 矩阵的基类,目前的矩阵只能是方阵,按列优先存储
|
|
6
|
+
*/
|
|
7
|
+
declare abstract class Matrix<IMatrixArray extends number[][]> extends GeoElement {
|
|
8
|
+
protected _dim: number;
|
|
9
|
+
protected readonly _data: number[][];
|
|
10
|
+
constructor(_dim: number, data?: IMatrixArray, copy?: boolean);
|
|
11
|
+
/**
|
|
12
|
+
* 将矩阵元素按列输出到一维数组中
|
|
13
|
+
* @param array (可选参数) 存储结果的一维数组
|
|
14
|
+
* @param offset (可选参数) 一维数组中的偏移量
|
|
15
|
+
*/
|
|
16
|
+
abstract toArray(array?: number[], offset?: number): number[];
|
|
17
|
+
/**
|
|
18
|
+
* 设置矩阵元素(依次设置每列)
|
|
19
|
+
* @param array
|
|
20
|
+
* @param offset ( 可选参数 ) 一维数组中的偏移量
|
|
21
|
+
*/
|
|
22
|
+
abstract fromArray(array: number[], offset?: number): this;
|
|
23
|
+
/**
|
|
24
|
+
* 右乘一个矩阵,得到新的矩阵对象
|
|
25
|
+
* @param matrix
|
|
26
|
+
*/
|
|
27
|
+
abstract multiplied(matrix: types.IMatrix<IMatrixArray> | IMatrixArray): Matrix<IMatrixArray>;
|
|
28
|
+
/**
|
|
29
|
+
* 左乘一个矩阵,得到新的矩阵对象
|
|
30
|
+
* @param matrix
|
|
31
|
+
*/
|
|
32
|
+
abstract preMultiplied(matrix: types.IMatrix<IMatrixArray> | IMatrixArray): Matrix<IMatrixArray>;
|
|
33
|
+
/**
|
|
34
|
+
* 右乘以缩放系数,得到新的矩阵对象
|
|
35
|
+
* @param s
|
|
36
|
+
*/
|
|
37
|
+
abstract multipliedScalar(s: number): Matrix<IMatrixArray>;
|
|
38
|
+
/**
|
|
39
|
+
* 矩阵求逆,得到新的逆矩阵对象
|
|
40
|
+
*/
|
|
41
|
+
abstract inversed(): Matrix<IMatrixArray> | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* 矩阵转置,得到新的转置矩阵对象
|
|
44
|
+
*/
|
|
45
|
+
abstract transposed(): Matrix<IMatrixArray>;
|
|
46
|
+
/**
|
|
47
|
+
* 行列式
|
|
48
|
+
*/
|
|
49
|
+
determinant(): number;
|
|
50
|
+
/**
|
|
51
|
+
* 将当前矩阵重置为逆矩阵,若矩阵行列式为0,没有逆矩阵,则返回undefined,否则返回this
|
|
52
|
+
*/
|
|
53
|
+
inverse(): this | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* 返回矩阵的维度
|
|
56
|
+
* @property dim
|
|
57
|
+
*/
|
|
58
|
+
get dim(): number;
|
|
59
|
+
/**
|
|
60
|
+
* 返回矩阵内部的数据
|
|
61
|
+
*/
|
|
62
|
+
get data(): number[][];
|
|
63
|
+
/**
|
|
64
|
+
* 设置某个特定值
|
|
65
|
+
* @param row 行
|
|
66
|
+
* @param col 列
|
|
67
|
+
* @param value 值
|
|
68
|
+
*/
|
|
69
|
+
set(row: number, col: number, value: number): void;
|
|
70
|
+
/**
|
|
71
|
+
* 使当前矩阵变为单位阵
|
|
72
|
+
*/
|
|
73
|
+
resetIdentity(): this;
|
|
74
|
+
/**
|
|
75
|
+
* 是否是单位阵
|
|
76
|
+
*/
|
|
77
|
+
isIdentity(): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* 右乘以另外一个矩阵,this * m,改变this
|
|
80
|
+
* @param m
|
|
81
|
+
*/
|
|
82
|
+
multiply(matrix: types.IMatrix<IMatrixArray> | IMatrixArray): this;
|
|
83
|
+
/**
|
|
84
|
+
* 左乘以另外一个矩阵,m * this,改变this
|
|
85
|
+
* @param m
|
|
86
|
+
*/
|
|
87
|
+
preMultiply(matrix: types.IMatrix<IMatrixArray> | IMatrixArray): this;
|
|
88
|
+
/**
|
|
89
|
+
* 右乘等于一个标量,改变自己
|
|
90
|
+
* @param s
|
|
91
|
+
*/
|
|
92
|
+
multiplyScalar(s: number): this;
|
|
93
|
+
/**
|
|
94
|
+
* 矩阵转置,改变自己
|
|
95
|
+
*/
|
|
96
|
+
transpose(): this;
|
|
97
|
+
/**
|
|
98
|
+
* 将二维数组拷贝到矩阵内部,改变自己
|
|
99
|
+
* @param another
|
|
100
|
+
*/
|
|
101
|
+
copy(another: types.IMatrix<IMatrixArray> | IMatrixArray): this;
|
|
102
|
+
dump(): types.IDBMatrix;
|
|
103
|
+
load({ data }: {
|
|
104
|
+
type: EN_GEO_TYPE;
|
|
105
|
+
data: IMatrixArray;
|
|
106
|
+
}): this;
|
|
107
|
+
}
|
|
108
|
+
export { Matrix };
|