@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,96 @@
|
|
|
1
|
+
import { Vertex } from './vertex';
|
|
2
|
+
import { Coedge3d } from './coedge3d';
|
|
3
|
+
import { Face } from './face';
|
|
4
|
+
import { TopoObject } from './topo_object';
|
|
5
|
+
import { IDBEdge } from '../type_define/i_types';
|
|
6
|
+
import { Shell } from './shell';
|
|
7
|
+
import { Box3 } from '../../base/box3';
|
|
8
|
+
import { DiscreteParam } from '../../base/discrete_param';
|
|
9
|
+
import { Vec3 } from '../../base/vec3';
|
|
10
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
11
|
+
import { EN_GEO_TYPE } from '../../type_define/i_element_type';
|
|
12
|
+
import { types } from '../../type_define/i_types';
|
|
13
|
+
/**
|
|
14
|
+
* @author tiansk
|
|
15
|
+
* Brep体中的三维边,一条边对应2条CoEdge
|
|
16
|
+
*/
|
|
17
|
+
declare class Edge extends TopoObject {
|
|
18
|
+
private _curve;
|
|
19
|
+
private _startVertex;
|
|
20
|
+
private _endVertex;
|
|
21
|
+
private _coedges;
|
|
22
|
+
private _tol?;
|
|
23
|
+
constructor(curve?: Curve3, startVertex?: Vertex, endVertex?: Vertex);
|
|
24
|
+
/**
|
|
25
|
+
* 获取所属的Shells
|
|
26
|
+
*/
|
|
27
|
+
getShell(): Shell | undefined;
|
|
28
|
+
getCurve(): Curve3;
|
|
29
|
+
get tolerance(): number | undefined;
|
|
30
|
+
setCurve(curve: Curve3): void;
|
|
31
|
+
getSmooth(): boolean;
|
|
32
|
+
setSmooth(isSmooth: boolean): void;
|
|
33
|
+
isDegenerate(): boolean;
|
|
34
|
+
setDegenerateFlag(b?: boolean): void;
|
|
35
|
+
/**
|
|
36
|
+
* 向Edge中添加一条半边,只能在半边的构造函数中调用!
|
|
37
|
+
* @param coedge
|
|
38
|
+
*/
|
|
39
|
+
addCoedge3d(coedge: Coedge3d): void;
|
|
40
|
+
/**
|
|
41
|
+
* 向Edge中删除一条半边,只能在删除半边、环、面的时候调用!
|
|
42
|
+
* @param hEdge
|
|
43
|
+
*/
|
|
44
|
+
deleteCoedge3d(hEdge: Coedge3d): void;
|
|
45
|
+
/**
|
|
46
|
+
* 将Edge中所有的半边都删除
|
|
47
|
+
*/
|
|
48
|
+
deleteAllCoedge3ds(): void;
|
|
49
|
+
/**
|
|
50
|
+
* 获取通过首尾Vertex裁剪curve的结果
|
|
51
|
+
* @deprecated edge中curve的参数域应已根据vertex进行了裁剪,而不必再调用此函数,直接调用getCurve()就行
|
|
52
|
+
*/
|
|
53
|
+
getBoundedCurve(): Curve3;
|
|
54
|
+
getStartVertexTag(): string;
|
|
55
|
+
getEndVertexTag(): string;
|
|
56
|
+
setStartVertex(startVertex: Vertex): void;
|
|
57
|
+
setEndVertex(endVertex: Vertex): void;
|
|
58
|
+
getAnotherVertex(vertex: Vertex): Vertex;
|
|
59
|
+
/**
|
|
60
|
+
* 获取其他半边
|
|
61
|
+
* @param tag
|
|
62
|
+
*/
|
|
63
|
+
getOtherCoedge3ds(coedge: Coedge3d): Coedge3d[];
|
|
64
|
+
/**
|
|
65
|
+
* 获取edge关联的全部Coedge3d
|
|
66
|
+
*/
|
|
67
|
+
getCoedge3ds(): ReadonlyArray<Coedge3d>;
|
|
68
|
+
/**
|
|
69
|
+
* 获取edge对应的face
|
|
70
|
+
*/
|
|
71
|
+
getFaces(): Face[];
|
|
72
|
+
/**
|
|
73
|
+
* 获取edge对应的起始Vertex
|
|
74
|
+
*/
|
|
75
|
+
getStartVertex(): Vertex;
|
|
76
|
+
/**
|
|
77
|
+
* 获取edge对应的终止Vertex
|
|
78
|
+
*/
|
|
79
|
+
getEndVertex(): Vertex;
|
|
80
|
+
/**
|
|
81
|
+
* 清除Edge中的拓扑关系
|
|
82
|
+
*/
|
|
83
|
+
dispose(): void;
|
|
84
|
+
getBBox(): Box3;
|
|
85
|
+
updateTolerance(): void;
|
|
86
|
+
/**
|
|
87
|
+
* 离散。因为曲线不精确,所以首尾顶点用 vertex 替代
|
|
88
|
+
* @param params
|
|
89
|
+
*/
|
|
90
|
+
discrete(params?: DiscreteParam): Vec3[];
|
|
91
|
+
tessellate(params?: DiscreteParam): types.IRenderNode;
|
|
92
|
+
dump(): IDBEdge;
|
|
93
|
+
load({ tag, flag, data, c, _d }: IDBEdge): this;
|
|
94
|
+
getType(): EN_GEO_TYPE.BREP_EDGE;
|
|
95
|
+
}
|
|
96
|
+
export { Edge };
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Shell } from './shell';
|
|
2
|
+
import { Vertex } from './vertex';
|
|
3
|
+
import { Edge } from './edge';
|
|
4
|
+
import { Wire } from './wire';
|
|
5
|
+
import { Coedge3d } from './coedge3d';
|
|
6
|
+
import { TopoObject } from './topo_object';
|
|
7
|
+
import { IDBFace } from '../type_define/i_types';
|
|
8
|
+
import { Coord3 } from '../../base/coord3';
|
|
9
|
+
import { Surface } from '../../geometry/surface';
|
|
10
|
+
import { Curve2 } from '../../geometry/curve2';
|
|
11
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
12
|
+
import { types } from '../../type_define/i_types';
|
|
13
|
+
import { Vec3 } from '../../base/vec3';
|
|
14
|
+
import { TrimmedSurface } from '../../topology/trimmed_surface';
|
|
15
|
+
import { EN_GEO_TYPE } from '../../type_define/i_element_type';
|
|
16
|
+
import { DiscreteParam } from '../../base/discrete_param';
|
|
17
|
+
import { Tol } from '../../base/tol';
|
|
18
|
+
import { Box3 } from '../../base/box3';
|
|
19
|
+
import { Polygon } from '../../topology/polygon';
|
|
20
|
+
/**
|
|
21
|
+
* @author tiansk
|
|
22
|
+
* 拓扑面(有边界的面)
|
|
23
|
+
*/
|
|
24
|
+
declare class Face extends TopoObject {
|
|
25
|
+
/**
|
|
26
|
+
* 根据给定坐标系与边界半长,生成表示平面
|
|
27
|
+
* @param coord
|
|
28
|
+
* @param halfLength
|
|
29
|
+
*/
|
|
30
|
+
static createPlane(coord: Coord3, halfLength: number, shell?: Shell): Face;
|
|
31
|
+
/**
|
|
32
|
+
* 从二维边界创建
|
|
33
|
+
* @param surface 底层的无限大曲面
|
|
34
|
+
* @param uvPolygon 无限大曲面上,二维区域的边界
|
|
35
|
+
* @param isPositive 是否同向的标记
|
|
36
|
+
*/
|
|
37
|
+
static createByBoundary2d(surface: Surface, loop2ds: Curve2[][], direction: boolean, shell?: Shell): Face;
|
|
38
|
+
/**
|
|
39
|
+
* 从三维边界创建
|
|
40
|
+
* @param surface 底层的无限大曲面
|
|
41
|
+
* @param loop3ds 无限大曲面上,三维区域的边界
|
|
42
|
+
* @param isPositive 是否同向的标记
|
|
43
|
+
*/
|
|
44
|
+
static createByBoundary3d(surface: Surface, loop3ds: Curve3[][], direction: boolean, shell?: Shell): Face;
|
|
45
|
+
static createByBoundary(surface: Surface, loop2ds: (Curve2 | undefined)[][], loop3ds: Curve3[][], direction: boolean, shell?: Shell): Face;
|
|
46
|
+
private _surface;
|
|
47
|
+
private _sameDirWithSurface;
|
|
48
|
+
private _wireList;
|
|
49
|
+
constructor(surface: Surface, sameDirWithSurface: boolean, wireList?: Wire[]);
|
|
50
|
+
setSurface(surface: Surface): void;
|
|
51
|
+
getSurface(): Surface;
|
|
52
|
+
setSameDirWithSurface(sameDirWithSurface: boolean): void;
|
|
53
|
+
getSameDirWithSurface(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 将当前面反向
|
|
56
|
+
*/
|
|
57
|
+
reverse(): void;
|
|
58
|
+
getWires(): ReadonlyArray<Wire>;
|
|
59
|
+
setWires(wires: Wire[]): void;
|
|
60
|
+
/**
|
|
61
|
+
* 获取任意点的法矢
|
|
62
|
+
* @param uv
|
|
63
|
+
*/
|
|
64
|
+
getNormAt(uv: types.IXY): Vec3;
|
|
65
|
+
/**
|
|
66
|
+
* 获取中心点的法矢
|
|
67
|
+
* @param uv
|
|
68
|
+
*/
|
|
69
|
+
getCenterNorm(): Vec3;
|
|
70
|
+
/**
|
|
71
|
+
* 获取中心点
|
|
72
|
+
*/
|
|
73
|
+
getCentroidPoint(): Vec3;
|
|
74
|
+
/**
|
|
75
|
+
* 添加一个环
|
|
76
|
+
* @param wire
|
|
77
|
+
*/
|
|
78
|
+
addWire(wire: Wire): void;
|
|
79
|
+
/**
|
|
80
|
+
* 在face的指定位置添加wire,若wire没有合法的索引,则会分配一个
|
|
81
|
+
* @param wire
|
|
82
|
+
*/
|
|
83
|
+
insertWire(index: number, ...wires: Wire[]): void;
|
|
84
|
+
deleteWire(wire: Wire): void;
|
|
85
|
+
deleteAllWires(): void;
|
|
86
|
+
/**
|
|
87
|
+
* 根据tag获取Wire
|
|
88
|
+
* @param tag
|
|
89
|
+
*/
|
|
90
|
+
getWireByTag(tag: string): Wire | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* 根据tag获取Wire
|
|
93
|
+
* @param tag
|
|
94
|
+
*/
|
|
95
|
+
deleteWireByTag(tag: string): void;
|
|
96
|
+
/**
|
|
97
|
+
* 获取所有的coedges
|
|
98
|
+
* @param index
|
|
99
|
+
*/
|
|
100
|
+
getCoedge3ds(): Coedge3d[];
|
|
101
|
+
/**
|
|
102
|
+
* 获取所有的edge
|
|
103
|
+
*/
|
|
104
|
+
getEdges(): Edge[];
|
|
105
|
+
/**
|
|
106
|
+
* 获取所有的vertex
|
|
107
|
+
*/
|
|
108
|
+
getVertexes(): Vertex[];
|
|
109
|
+
/**
|
|
110
|
+
* 获取有共边的Face
|
|
111
|
+
*/
|
|
112
|
+
getTwinFaces(onlyOuter?: boolean): Face[];
|
|
113
|
+
/**
|
|
114
|
+
* 获取所有的edge
|
|
115
|
+
*/
|
|
116
|
+
getShell(): Shell | undefined;
|
|
117
|
+
getTrimmedSurface(): TrimmedSurface | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* 清除面及子拓扑的关系
|
|
120
|
+
*/
|
|
121
|
+
dispose(): void;
|
|
122
|
+
getType(): EN_GEO_TYPE.BREP_FACE;
|
|
123
|
+
/**
|
|
124
|
+
* 面上是否每一条Coedge3d都已关联Edge
|
|
125
|
+
*/
|
|
126
|
+
isEdgeInfoValid(): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* 计算包围盒
|
|
129
|
+
*/
|
|
130
|
+
getBBox(params?: DiscreteParam, tol?: Tol): Box3;
|
|
131
|
+
discrete(params?: DiscreteParam, tol?: Tol): types.IMesh;
|
|
132
|
+
tessellate(params?: DiscreteParam, tol?: Tol): types.IRenderNode;
|
|
133
|
+
calcPolygon(): Polygon;
|
|
134
|
+
/**
|
|
135
|
+
* 计算face的面积
|
|
136
|
+
*/
|
|
137
|
+
calcArea(): number;
|
|
138
|
+
/**
|
|
139
|
+
* 计算face外环围的面积,即face不带洞的面积
|
|
140
|
+
*/
|
|
141
|
+
calcAreaForOutWire(): number;
|
|
142
|
+
/**
|
|
143
|
+
* 抽取元数据,用于序列化
|
|
144
|
+
* @returns 返回js对象
|
|
145
|
+
*/
|
|
146
|
+
dump(): IDBFace;
|
|
147
|
+
load({ tag, flag, data, dir, s, ws, _d }: IDBFace): this;
|
|
148
|
+
private _getDirectedLoops;
|
|
149
|
+
}
|
|
150
|
+
export { Face };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { TopoObject } from './topo_object';
|
|
2
|
+
import { Vertex } from './vertex';
|
|
3
|
+
import { Edge } from './edge';
|
|
4
|
+
import { Face } from './face';
|
|
5
|
+
import { IDBShell } from '../type_define/i_types';
|
|
6
|
+
import { Wire } from './wire';
|
|
7
|
+
import { IGeometry3d } from '../../type_define/i_geometry';
|
|
8
|
+
import { Surface } from '../../geometry/surface';
|
|
9
|
+
import { Vec3 } from '../../base/vec3';
|
|
10
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
11
|
+
import { types } from '../../type_define/i_types';
|
|
12
|
+
import { Box3 } from '../../base/box3';
|
|
13
|
+
import { EN_GEO_TYPE } from '../../type_define/i_element_type';
|
|
14
|
+
declare type VertexTag = string;
|
|
15
|
+
declare type EdgeTag = string;
|
|
16
|
+
/**
|
|
17
|
+
* 壳,标识不封闭的body
|
|
18
|
+
*/
|
|
19
|
+
declare class Shell extends TopoObject implements IGeometry3d {
|
|
20
|
+
protected readonly _vTagToVertexMap: Map<VertexTag, Vertex>;
|
|
21
|
+
protected readonly _eTagToEdgeMap: Map<EdgeTag, Edge>;
|
|
22
|
+
protected readonly _faceList: Face[];
|
|
23
|
+
private _tol?;
|
|
24
|
+
/**
|
|
25
|
+
* shell是否是空的(没有任何的Edge和Face)
|
|
26
|
+
*/
|
|
27
|
+
isEmpty(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 是否只包含平面
|
|
30
|
+
*/
|
|
31
|
+
isOnlyPlane(): boolean;
|
|
32
|
+
clear(): void;
|
|
33
|
+
/**
|
|
34
|
+
* 获取所有的面
|
|
35
|
+
*/
|
|
36
|
+
getFaces(): ReadonlyArray<Face>;
|
|
37
|
+
/**
|
|
38
|
+
* 获取所有的边
|
|
39
|
+
*/
|
|
40
|
+
getEdges(): Edge[];
|
|
41
|
+
/**
|
|
42
|
+
* 获取所有的顶点
|
|
43
|
+
*/
|
|
44
|
+
getVertexs(): Vertex[];
|
|
45
|
+
get tolerance(): number | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* 向body中添加一个面
|
|
48
|
+
*/
|
|
49
|
+
createFace(surface: Surface, faceDir: boolean, wires?: Wire[], tag?: string): Face;
|
|
50
|
+
/**
|
|
51
|
+
* 向body中添加face,若face没有合法的索引,则会分配一个
|
|
52
|
+
* @param face
|
|
53
|
+
*/
|
|
54
|
+
addFace(face: Face): void;
|
|
55
|
+
/**
|
|
56
|
+
* 删除face
|
|
57
|
+
* @param face
|
|
58
|
+
*/
|
|
59
|
+
deleteFace(face: Face): void;
|
|
60
|
+
/**
|
|
61
|
+
* 删除face
|
|
62
|
+
* @param face
|
|
63
|
+
*/
|
|
64
|
+
deleteFaceByTag(tag: string): void;
|
|
65
|
+
/**
|
|
66
|
+
* 根据tag获取face
|
|
67
|
+
* @param index
|
|
68
|
+
*/
|
|
69
|
+
getFaceByTag(uuid: string): Face | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* 向body中添加一条新的边,并赋予该edge一个索引,
|
|
72
|
+
* @returns 返回新的边
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
createLineEdge(startVertex: Vertex, endVertex: Vertex): Edge;
|
|
76
|
+
/**
|
|
77
|
+
* 向body中添加一条边,并赋予该edge一个索引,
|
|
78
|
+
*/
|
|
79
|
+
createEdge(curve: Curve3, startVertex?: Vertex, endVertex?: Vertex, tag?: string): Edge;
|
|
80
|
+
/**
|
|
81
|
+
* 向body中添加一条边,并赋予该edge一个索引,
|
|
82
|
+
*/
|
|
83
|
+
addEdge(edge: Edge): void;
|
|
84
|
+
deleteEdge(edge: Edge): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* 根据tag获取edge
|
|
87
|
+
* @param index
|
|
88
|
+
*/
|
|
89
|
+
getEdgeByTag(tag: string): Edge | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* 删除edge
|
|
92
|
+
* @param edgeTag
|
|
93
|
+
*/
|
|
94
|
+
deleteEdgeByTag(edgeTag: string): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* 向body中添加一条新的边,并赋予该edge一个索引,
|
|
97
|
+
* @returns 返回新的边
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
100
|
+
createVertex(point: Vec3, tag?: string): Vertex;
|
|
101
|
+
/**
|
|
102
|
+
* 向body中添加一个顶点,并赋予该vertex一个索引,
|
|
103
|
+
*/
|
|
104
|
+
addVertex(vertex: Vertex): void;
|
|
105
|
+
/**
|
|
106
|
+
* 从Shell中删除一个点
|
|
107
|
+
* @param vertex
|
|
108
|
+
*/
|
|
109
|
+
deleteVertex(vertex: Vertex): void;
|
|
110
|
+
/**
|
|
111
|
+
* 根据tag获取Vertex
|
|
112
|
+
* @param index
|
|
113
|
+
*/
|
|
114
|
+
getVertexByTag(tag: string): Vertex | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* 删除顶点
|
|
117
|
+
* @param vertexTag
|
|
118
|
+
*/
|
|
119
|
+
deleteVertexByTag(vertexTag: string): boolean;
|
|
120
|
+
updateTolerance(): void;
|
|
121
|
+
/**
|
|
122
|
+
* 拓扑是否合法
|
|
123
|
+
*/
|
|
124
|
+
isTopoValid(): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* 拓扑是否是合法的brepbody,一个edge关联2个coedge
|
|
127
|
+
*/
|
|
128
|
+
isTopoValidBrepBody(): boolean;
|
|
129
|
+
transform(m: types.IMatrix4 | types.numberArrs4X4, extra?: {
|
|
130
|
+
svd: types.IMatrix4Svd;
|
|
131
|
+
}): this;
|
|
132
|
+
/**
|
|
133
|
+
* 平移
|
|
134
|
+
*/
|
|
135
|
+
translate(offset: types.IXYZ): this;
|
|
136
|
+
/**
|
|
137
|
+
* 绕坐标轴/点的旋转
|
|
138
|
+
* @param angle 旋转的角度
|
|
139
|
+
* @param pivot 旋转轴上一点
|
|
140
|
+
* @param axis 绕哪个轴旋转
|
|
141
|
+
*/
|
|
142
|
+
rotate(angle: number, pivot: types.IXYZ | types.IXY, axis?: types.IXYZ): this;
|
|
143
|
+
/**
|
|
144
|
+
* 等比缩放
|
|
145
|
+
* @param factor 放大因子
|
|
146
|
+
* @param center 缩放中心
|
|
147
|
+
*/
|
|
148
|
+
scale(factor: number, center?: types.IXY | types.IXYZ): this;
|
|
149
|
+
getBBox(): Box3;
|
|
150
|
+
/**
|
|
151
|
+
* 深拷贝
|
|
152
|
+
*/
|
|
153
|
+
clone(): Shell;
|
|
154
|
+
getType(): EN_GEO_TYPE;
|
|
155
|
+
replaceFaceTag(tag: string, newTag: string): void;
|
|
156
|
+
replaceEdgeTag(tag: string, newTag: string): void;
|
|
157
|
+
replaceVertexTag(tag: string, newTag: string): void;
|
|
158
|
+
/**
|
|
159
|
+
* 抽取元数据,用于序列化
|
|
160
|
+
* @returns 返回js对象
|
|
161
|
+
*/
|
|
162
|
+
dump(): IDBShell;
|
|
163
|
+
load({ tag, flag, data, fs, es, vs, _d }: IDBShell): this;
|
|
164
|
+
private _buildTopoRelation;
|
|
165
|
+
}
|
|
166
|
+
export { Shell };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Box3 } from '../../base/box3';
|
|
2
|
+
import { GeoElement } from '../../base/geo_element';
|
|
3
|
+
import { IDBTopoObject } from '../type_define/i_types';
|
|
4
|
+
/**
|
|
5
|
+
* 拓扑对象的基类
|
|
6
|
+
*/
|
|
7
|
+
declare abstract class TopoObject extends GeoElement {
|
|
8
|
+
protected static _idGenerator: number;
|
|
9
|
+
tag: string;
|
|
10
|
+
readonly refId: number;
|
|
11
|
+
protected _flags?: number;
|
|
12
|
+
protected _data?: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @property 父对象
|
|
17
|
+
*/
|
|
18
|
+
private _parent?;
|
|
19
|
+
constructor();
|
|
20
|
+
/**
|
|
21
|
+
* 计算包围盒
|
|
22
|
+
*/
|
|
23
|
+
abstract getBBox(): Box3;
|
|
24
|
+
setParent(parent: TopoObject | undefined): void;
|
|
25
|
+
getParent(): TopoObject | undefined;
|
|
26
|
+
getFlags(): number | undefined;
|
|
27
|
+
setFlags(flag?: number): void;
|
|
28
|
+
getData(): {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
} | undefined;
|
|
31
|
+
setData(data?: {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
}): void;
|
|
34
|
+
getDebugTag(): string;
|
|
35
|
+
clone(): TopoObject;
|
|
36
|
+
dump(): IDBTopoObject;
|
|
37
|
+
load(json: IDBTopoObject): this;
|
|
38
|
+
protected _simpleUUID(uuid?: string): string;
|
|
39
|
+
}
|
|
40
|
+
export { TopoObject };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Vec3 } from '../../base/vec3';
|
|
2
|
+
import { types } from '../../type_define/i_types';
|
|
3
|
+
import { EN_GEO_TYPE } from '../../type_define/i_element_type';
|
|
4
|
+
import { Box3 } from '../../base/box3';
|
|
5
|
+
import { TopoObject } from './topo_object';
|
|
6
|
+
import { Shell } from './shell';
|
|
7
|
+
import { Edge } from './edge';
|
|
8
|
+
import { Face } from './face';
|
|
9
|
+
import { IDBVertex } from '../type_define/i_types';
|
|
10
|
+
/**
|
|
11
|
+
* 点,体上的顶点
|
|
12
|
+
*/
|
|
13
|
+
declare class Vertex extends TopoObject {
|
|
14
|
+
private _point;
|
|
15
|
+
private _edges;
|
|
16
|
+
constructor(point?: types.IXYZ);
|
|
17
|
+
getPoint(): Vec3;
|
|
18
|
+
setPoint(point: Vec3): void;
|
|
19
|
+
getSmooth(): boolean;
|
|
20
|
+
setSmooth(isSmooth: boolean): void;
|
|
21
|
+
/**
|
|
22
|
+
* 添加关联的边,只有Edge能使用此函数!
|
|
23
|
+
* @param edge
|
|
24
|
+
*/
|
|
25
|
+
addEdge(edge: Edge): void;
|
|
26
|
+
/**
|
|
27
|
+
* 删除关联的边,只有Edge能使用此函数!
|
|
28
|
+
* @param edge
|
|
29
|
+
*/
|
|
30
|
+
deleteEdge(edge: Edge): void;
|
|
31
|
+
/**
|
|
32
|
+
* 获取所属的Body
|
|
33
|
+
*/
|
|
34
|
+
getShell(): Shell | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* 获取共点的全部edge
|
|
37
|
+
*/
|
|
38
|
+
getEdges(): Edge[];
|
|
39
|
+
/**
|
|
40
|
+
* 获取共点的全部Face
|
|
41
|
+
*/
|
|
42
|
+
getFaces(): Face[];
|
|
43
|
+
getBBox(): Box3;
|
|
44
|
+
dump(): IDBVertex;
|
|
45
|
+
load({ p, tag, flag, data, _d }: IDBVertex): this;
|
|
46
|
+
getType(): EN_GEO_TYPE.BREP_VERTEX;
|
|
47
|
+
}
|
|
48
|
+
export { Vertex };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Face } from './face';
|
|
2
|
+
import { Coedge3d } from './coedge3d';
|
|
3
|
+
import { TopoObject } from './topo_object';
|
|
4
|
+
import { IDBWire } from '../type_define/i_types';
|
|
5
|
+
import { Box3 } from '../../base/box3';
|
|
6
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
7
|
+
import { Loop } from '../../topology/loop';
|
|
8
|
+
import { EN_GEO_TYPE } from '../../type_define/i_element_type';
|
|
9
|
+
/**
|
|
10
|
+
* 三维线框
|
|
11
|
+
* wire 中的方向与 surface 保持一致
|
|
12
|
+
*/
|
|
13
|
+
declare class Wire extends TopoObject {
|
|
14
|
+
private _coedge3dList;
|
|
15
|
+
constructor(coedge3dList?: Coedge3d[]);
|
|
16
|
+
getFace(): Face | undefined;
|
|
17
|
+
deleteCoedge3dAt(index: number, count?: number): void;
|
|
18
|
+
deleteCoedge3d(coedge3d: Coedge3d): void;
|
|
19
|
+
deleteCoedge3dByTag(tag: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* 向wire中添加Coedge3d,若Coedge3d没有合法的索引,则会分配一个
|
|
22
|
+
* @param coedge
|
|
23
|
+
*/
|
|
24
|
+
addCoedge3d(coedge3d: Coedge3d): void;
|
|
25
|
+
/**
|
|
26
|
+
* 在wire的指定位置添加Coedge3d,若Coedge3d没有合法的索引,则会分配一个
|
|
27
|
+
* @param coedge
|
|
28
|
+
*/
|
|
29
|
+
insertCoedge3d(index: number, ...coedge3ds: Coedge3d[]): void;
|
|
30
|
+
/**
|
|
31
|
+
* 在wire指定位置,替换Coedge3d. 使用多个替换一个
|
|
32
|
+
* @param index
|
|
33
|
+
* @param coedge3ds
|
|
34
|
+
*/
|
|
35
|
+
replaceCoedge3d(index: number, coedge3ds: Coedge3d[]): void;
|
|
36
|
+
getCoedge3ds(): ReadonlyArray<Coedge3d>;
|
|
37
|
+
/**
|
|
38
|
+
* 根据tag获取Coedge3d
|
|
39
|
+
* @param tag
|
|
40
|
+
*/
|
|
41
|
+
getCoedge3dByTag(tag: string): Coedge3d | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* 根据Index获取Coedge3d
|
|
44
|
+
* @param tag
|
|
45
|
+
*/
|
|
46
|
+
getCoedge3dByIndex(index: number): Coedge3d | undefined;
|
|
47
|
+
dispose(): void;
|
|
48
|
+
isEdgeInfoValid(): boolean;
|
|
49
|
+
isValid(): boolean;
|
|
50
|
+
reverse(): void;
|
|
51
|
+
/**
|
|
52
|
+
* 提取环所对应的有界曲线
|
|
53
|
+
*/
|
|
54
|
+
toPath(): Curve3[];
|
|
55
|
+
getBBox(): Box3;
|
|
56
|
+
isFaceOutWire(): boolean | undefined;
|
|
57
|
+
calcLoop(): Loop;
|
|
58
|
+
getType(): EN_GEO_TYPE.BREP_WIRE;
|
|
59
|
+
/**
|
|
60
|
+
* 抽取元数据,用于序列化
|
|
61
|
+
* @returns 返回js对象
|
|
62
|
+
*/
|
|
63
|
+
dump(): IDBWire;
|
|
64
|
+
load({ tag, flag, data, ces, _d }: IDBWire): this;
|
|
65
|
+
}
|
|
66
|
+
export { Wire };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Box3, Curve3, SmoothPoly3 } from '../..';
|
|
2
|
+
import { Edge } from '../brep/edge';
|
|
3
|
+
/**
|
|
4
|
+
* 多个边组成的连续边
|
|
5
|
+
*/
|
|
6
|
+
export declare class ContinuousEdge {
|
|
7
|
+
private _edges;
|
|
8
|
+
private _flags;
|
|
9
|
+
private _refCurve?;
|
|
10
|
+
constructor(edges: Edge[], flags: boolean[], refCurve?: Curve3);
|
|
11
|
+
getEdges(): ReadonlyArray<Edge>;
|
|
12
|
+
getFlags(): ReadonlyArray<boolean>;
|
|
13
|
+
getRefCurve(): Curve3 | undefined;
|
|
14
|
+
isClose(): boolean;
|
|
15
|
+
getBBox(): Box3;
|
|
16
|
+
getSmoothPoly(): SmoothPoly3 | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Edge } from '../brep/edge';
|
|
2
|
+
import { Shell } from '../brep/shell';
|
|
3
|
+
import { ContinuousEdge } from './continuous_edge';
|
|
4
|
+
import { Face } from '../brep/face';
|
|
5
|
+
import { ContinuousFace } from './continuous_face';
|
|
6
|
+
import { Wire } from '../brep/wire';
|
|
7
|
+
import { Curve3 } from '../../geometry/curve3d';
|
|
8
|
+
import { Matrix4 } from '../../base/matrix4';
|
|
9
|
+
export declare class ContinuousUtil {
|
|
10
|
+
/**
|
|
11
|
+
* 获取可交互的边(一个边、多个边组成的连续边)
|
|
12
|
+
*/
|
|
13
|
+
static getAllInteractiveEdges(shell: {
|
|
14
|
+
getEdges(): Edge[];
|
|
15
|
+
}): {
|
|
16
|
+
edges: Set<Edge>;
|
|
17
|
+
contEdges: Set<ContinuousEdge>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 从环中获取三维曲线(包含smoothpoly)
|
|
21
|
+
* @param wire
|
|
22
|
+
*/
|
|
23
|
+
static getSmoothCurvesFromWire(wire: Wire): Curve3[];
|
|
24
|
+
/**
|
|
25
|
+
* 是有效的平滑边
|
|
26
|
+
* @param edge
|
|
27
|
+
*/
|
|
28
|
+
static isValidSmoothEdge(edge: Edge): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 获取可交互的面(一个面、多个面组成的连续面)
|
|
31
|
+
*/
|
|
32
|
+
static getAllInteractiveFaces(shell: {
|
|
33
|
+
getEdges(): ReadonlyArray<Edge>;
|
|
34
|
+
getFaces(): ReadonlyArray<Face>;
|
|
35
|
+
}): {
|
|
36
|
+
faces: Set<Face>;
|
|
37
|
+
contFaces: Set<ContinuousFace>;
|
|
38
|
+
};
|
|
39
|
+
static addContinuousEdgeInfo(edges: Edge[], getSmoothCurve: (e: Edge) => Curve3 | undefined): void;
|
|
40
|
+
static cloneContinuousEdgeInfo(sourceEdges: IterableIterator<Edge> | Edge[], getCloned: (e: Edge) => Edge | undefined, matrix?: Matrix4): void;
|
|
41
|
+
static transformContinuousEdgeInfo(edges: Edge[], matrix: Matrix4): void;
|
|
42
|
+
static transferContinuousEdgeInfo(edges: Edge[], oldShell: Shell, newShell: Shell, removeOldInfo?: boolean): void;
|
|
43
|
+
static removeContinuousEdgeInfo(edges: IterableIterator<Edge> | Edge[]): void;
|
|
44
|
+
static removeUnusedContinuousEdgeInfo(shell: Shell): void;
|
|
45
|
+
static getContinuousEdgeInfo(edge: Edge): Curve3 | undefined;
|
|
46
|
+
private static _addContinuousEdge;
|
|
47
|
+
private static _createContinuousEdgeInfoId;
|
|
48
|
+
private static _removeContinuousEdgeInfo;
|
|
49
|
+
private static _setContinuousEdgeId;
|
|
50
|
+
private static _getContinuousEdgeId;
|
|
51
|
+
private static _removeContinuousEdgeId;
|
|
52
|
+
private static _groupEdgesByContinuousEdgeId;
|
|
53
|
+
private static _getNextContinuousEdge;
|
|
54
|
+
private static _getConnectedContinuousEdges;
|
|
55
|
+
private static _getContinuousEdges;
|
|
56
|
+
private static _getContinuousFaces;
|
|
57
|
+
private static _hasSmoothEdgeInFace;
|
|
58
|
+
private static _getNextContinuousFaces;
|
|
59
|
+
private static _getNextContinuousFace;
|
|
60
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { types } from '../..';
|
|
2
|
+
import { Face } from '../brep/face';
|
|
3
|
+
/**
|
|
4
|
+
* 多个面一起离散, 得到UV连续的效果
|
|
5
|
+
*/
|
|
6
|
+
export declare class ContinuousUVComputor {
|
|
7
|
+
/**
|
|
8
|
+
* 计算连续面所产生的mesh, 得到整体uv连续的mesh(某些不适用的情况, 则会得到uv不连续的mesh)
|
|
9
|
+
* @param faces
|
|
10
|
+
*/
|
|
11
|
+
static tessellateFaces(faces: Face[], uvContinuous?: boolean): types.IMesh | undefined;
|
|
12
|
+
private static _ptToKey;
|
|
13
|
+
private static _tesslateFace;
|
|
14
|
+
private static _computeFacesUVMapping;
|
|
15
|
+
private static _calCompressUVRange;
|
|
16
|
+
private static _calTorusUVRange;
|
|
17
|
+
private static _calConeUVRange;
|
|
18
|
+
private static _calCylinderUVRange;
|
|
19
|
+
private static _recalculateMeshUV;
|
|
20
|
+
private static _recalculateMeshUVByInvBilinear;
|
|
21
|
+
private static _mergeMesh;
|
|
22
|
+
private static _getTriangleVertexFromFace;
|
|
23
|
+
private static _onRefSide;
|
|
24
|
+
}
|