@faicad/faijs 0.16.1 → 0.18.0
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/LICENSE +4 -5
- package/NOTICE +5 -6
- package/dist/api/api-namespace.d.ts.map +1 -1
- package/dist/api/api-namespace.js +20 -2
- package/dist/api/api-namespace.js.map +1 -1
- package/dist/api/assembly/entities.d.ts +1 -1
- package/dist/api/assembly/entities.d.ts.map +1 -1
- package/dist/api/assembly/entities.js.map +1 -1
- package/dist/api/assembly/joints.d.ts +2 -2
- package/dist/api/assembly/joints.d.ts.map +1 -1
- package/dist/api/assembly/joints.js +2 -2
- package/dist/api/assembly/joints.js.map +1 -1
- package/dist/api/assembly/lower.d.ts +1 -1
- package/dist/api/assembly/lower.d.ts.map +1 -1
- package/dist/api/assembly/lower.js.map +1 -1
- package/dist/api/assembly/pose.d.ts +3 -3
- package/dist/api/assembly/pose.d.ts.map +1 -1
- package/dist/api/assembly/pose.js +1 -1
- package/dist/api/assembly/pose.js.map +1 -1
- package/dist/api/assembly/preview.d.ts +1 -1
- package/dist/api/assembly/preview.d.ts.map +1 -1
- package/dist/api/assembly/preview.js +1 -1
- package/dist/api/assembly/preview.js.map +1 -1
- package/dist/api/assembly/solve.d.ts.map +1 -1
- package/dist/api/assembly/solve.js +3 -3
- package/dist/api/assembly/solve.js.map +1 -1
- package/dist/api/assembly/solvers/assembly-tree.d.ts +98 -0
- package/dist/api/assembly/solvers/assembly-tree.d.ts.map +1 -0
- package/dist/api/assembly/solvers/assembly-tree.js +130 -0
- package/dist/api/assembly/solvers/assembly-tree.js.map +1 -0
- package/dist/api/assembly/solvers/chain-solver.d.ts +27 -0
- package/dist/api/assembly/solvers/chain-solver.d.ts.map +1 -0
- package/dist/api/assembly/solvers/chain-solver.js +330 -0
- package/dist/api/assembly/solvers/chain-solver.js.map +1 -0
- package/dist/api/assembly/solvers/global-solver.js +2 -2
- package/dist/api/assembly/solvers/global-solver.js.map +1 -1
- package/dist/api/assembly/solvers/joints-kinematics.d.ts +308 -0
- package/dist/api/assembly/solvers/joints-kinematics.d.ts.map +1 -0
- package/dist/api/assembly/solvers/joints-kinematics.js +643 -0
- package/dist/api/assembly/solvers/joints-kinematics.js.map +1 -0
- package/dist/api/assembly/solvers/quat.d.ts +35 -0
- package/dist/api/assembly/solvers/quat.d.ts.map +1 -0
- package/dist/api/assembly/solvers/quat.js +84 -0
- package/dist/api/assembly/solvers/quat.js.map +1 -0
- package/dist/api/assembly/solvers/types.d.ts +33 -0
- package/dist/api/assembly/solvers/types.d.ts.map +1 -1
- package/dist/api/assembly/solvers/types.js.map +1 -1
- package/dist/api/boolean.d.ts.map +1 -1
- package/dist/api/boolean.js +66 -29
- package/dist/api/boolean.js.map +1 -1
- package/dist/api/brep-mirror/booleanFns.d.ts +40 -0
- package/dist/api/brep-mirror/booleanFns.d.ts.map +1 -0
- package/dist/api/brep-mirror/booleanFns.js +104 -0
- package/dist/api/brep-mirror/booleanFns.js.map +1 -0
- package/dist/api/brep-mirror/brepHelpers.d.ts +55 -0
- package/dist/api/brep-mirror/brepHelpers.d.ts.map +1 -0
- package/dist/api/brep-mirror/brepHelpers.js +131 -0
- package/dist/api/brep-mirror/brepHelpers.js.map +1 -0
- package/dist/api/brep-mirror/compoundFns.d.ts +47 -0
- package/dist/api/brep-mirror/compoundFns.d.ts.map +1 -0
- package/dist/api/brep-mirror/compoundFns.js +300 -0
- package/dist/api/brep-mirror/compoundFns.js.map +1 -0
- package/dist/api/brep-mirror/healingFns.d.ts +78 -0
- package/dist/api/brep-mirror/healingFns.d.ts.map +1 -0
- package/dist/api/brep-mirror/healingFns.js +294 -0
- package/dist/api/brep-mirror/healingFns.js.map +1 -0
- package/dist/api/brep-mirror/hullFns.d.ts +20 -0
- package/dist/api/brep-mirror/hullFns.d.ts.map +1 -0
- package/dist/api/brep-mirror/hullFns.js +46 -0
- package/dist/api/brep-mirror/hullFns.js.map +1 -0
- package/dist/api/brep-mirror/patternFns.d.ts +43 -0
- package/dist/api/brep-mirror/patternFns.d.ts.map +1 -0
- package/dist/api/brep-mirror/patternFns.js +178 -0
- package/dist/api/brep-mirror/patternFns.js.map +1 -0
- package/dist/api/brep-mirror/primitiveFns.d.ts +42 -0
- package/dist/api/brep-mirror/primitiveFns.d.ts.map +1 -0
- package/dist/api/brep-mirror/primitiveFns.js +104 -0
- package/dist/api/brep-mirror/primitiveFns.js.map +1 -0
- package/dist/api/brep-mirror/roofFns.d.ts +24 -0
- package/dist/api/brep-mirror/roofFns.d.ts.map +1 -0
- package/dist/api/brep-mirror/roofFns.js +229 -0
- package/dist/api/brep-mirror/roofFns.js.map +1 -0
- package/dist/api/brep-mirror/straightSkeleton.d.ts +36 -0
- package/dist/api/brep-mirror/straightSkeleton.d.ts.map +1 -0
- package/dist/api/brep-mirror/straightSkeleton.js +443 -0
- package/dist/api/brep-mirror/straightSkeleton.js.map +1 -0
- package/dist/api/brep-mirror/sweepFns.d.ts +55 -0
- package/dist/api/brep-mirror/sweepFns.d.ts.map +1 -0
- package/dist/api/brep-mirror/sweepFns.js +200 -0
- package/dist/api/brep-mirror/sweepFns.js.map +1 -0
- package/dist/api/brep-mirror/threadFns.d.ts +15 -0
- package/dist/api/brep-mirror/threadFns.d.ts.map +1 -1
- package/dist/api/brep-mirror/threadFns.js +37 -2
- package/dist/api/brep-mirror/threadFns.js.map +1 -1
- package/dist/api/brep-mirror/topologyFns.d.ts +74 -0
- package/dist/api/brep-mirror/topologyFns.d.ts.map +1 -0
- package/dist/api/brep-mirror/topologyFns.js +276 -0
- package/dist/api/brep-mirror/topologyFns.js.map +1 -0
- package/dist/api/brep-topology.d.ts +190 -0
- package/dist/api/brep-topology.d.ts.map +1 -0
- package/dist/api/brep-topology.js +337 -0
- package/dist/api/brep-topology.js.map +1 -0
- package/dist/api/brepjs-compat/constants.d.ts +11 -0
- package/dist/api/brepjs-compat/constants.d.ts.map +1 -0
- package/dist/api/brepjs-compat/constants.js +11 -0
- package/dist/api/brepjs-compat/constants.js.map +1 -0
- package/dist/api/brepjs-compat/index.d.ts +19 -232
- package/dist/api/brepjs-compat/index.d.ts.map +1 -1
- package/dist/api/brepjs-compat/index.js +19 -286
- package/dist/api/brepjs-compat/index.js.map +1 -1
- package/dist/api/brepjs-compat/planeOps.d.ts +98 -0
- package/dist/api/brepjs-compat/planeOps.d.ts.map +1 -0
- package/dist/api/brepjs-compat/planeOps.js +170 -0
- package/dist/api/brepjs-compat/planeOps.js.map +1 -0
- package/dist/api/brepjs-compat/planeTypes.d.ts +24 -0
- package/dist/api/brepjs-compat/planeTypes.d.ts.map +1 -0
- package/dist/api/brepjs-compat/planeTypes.js +8 -0
- package/dist/api/brepjs-compat/planeTypes.js.map +1 -0
- package/dist/api/brepjs-compat/types.d.ts +64 -0
- package/dist/api/brepjs-compat/types.d.ts.map +1 -0
- package/dist/api/brepjs-compat/types.js +48 -0
- package/dist/api/brepjs-compat/types.js.map +1 -0
- package/dist/api/brepjs-compat/vecOps.d.ts +124 -0
- package/dist/api/brepjs-compat/vecOps.d.ts.map +1 -0
- package/dist/api/brepjs-compat/vecOps.js +202 -0
- package/dist/api/brepjs-compat/vecOps.js.map +1 -0
- package/dist/api/chamfer.d.ts +12 -3
- package/dist/api/chamfer.d.ts.map +1 -1
- package/dist/api/chamfer.js +54 -20
- package/dist/api/chamfer.js.map +1 -1
- package/dist/api/compound-geom.d.ts.map +1 -1
- package/dist/api/compound-geom.js +8 -2
- package/dist/api/compound-geom.js.map +1 -1
- package/dist/api/draft.d.ts +69 -0
- package/dist/api/draft.d.ts.map +1 -0
- package/dist/api/draft.js +109 -0
- package/dist/api/draft.js.map +1 -0
- package/dist/api/edge-ref.d.ts.map +1 -1
- package/dist/api/edge-ref.js +2 -2
- package/dist/api/edge-ref.js.map +1 -1
- package/dist/api/engrave.d.ts.map +1 -1
- package/dist/api/engrave.js +2 -3
- package/dist/api/engrave.js.map +1 -1
- package/dist/api/extrude.d.ts.map +1 -1
- package/dist/api/extrude.js +44 -14
- package/dist/api/extrude.js.map +1 -1
- package/dist/api/face-ref.d.ts.map +1 -1
- package/dist/api/face-ref.js +2 -2
- package/dist/api/face-ref.js.map +1 -1
- package/dist/api/feature-repair.d.ts +137 -0
- package/dist/api/feature-repair.d.ts.map +1 -0
- package/dist/api/feature-repair.js +221 -0
- package/dist/api/feature-repair.js.map +1 -0
- package/dist/api/fillet-variable.d.ts +35 -0
- package/dist/api/fillet-variable.d.ts.map +1 -0
- package/dist/api/fillet-variable.js +71 -0
- package/dist/api/fillet-variable.js.map +1 -0
- package/dist/api/fillet.d.ts +3 -0
- package/dist/api/fillet.d.ts.map +1 -1
- package/dist/api/fillet.js +7 -4
- package/dist/api/fillet.js.map +1 -1
- package/dist/api/generated/2d.d.ts +1 -13
- package/dist/api/generated/2d.d.ts.map +1 -1
- package/dist/api/generated/2d.js +6 -1
- package/dist/api/generated/2d.js.map +1 -1
- package/dist/api/generated/brepjs/index.d.ts +298 -298
- package/dist/api/generated/brepjs/index.d.ts.map +1 -1
- package/dist/api/generated/brepjs/index.js +183 -183
- package/dist/api/generated/brepjs/index.js.map +1 -1
- package/dist/api/generated/core.d.ts +3 -123
- package/dist/api/generated/core.d.ts.map +1 -1
- package/dist/api/generated/core.js +2 -81
- package/dist/api/generated/core.js.map +1 -1
- package/dist/api/generated/gear.d.ts +1 -15
- package/dist/api/generated/gear.d.ts.map +1 -1
- package/dist/api/generated/gear.js +6 -3
- package/dist/api/generated/gear.js.map +1 -1
- package/dist/api/generated/io.d.ts +1 -13
- package/dist/api/generated/io.d.ts.map +1 -1
- package/dist/api/generated/io.js +6 -1
- package/dist/api/generated/io.js.map +1 -1
- package/dist/api/generated/kernel.d.ts +1 -39
- package/dist/api/generated/kernel.d.ts.map +1 -1
- package/dist/api/generated/kernel.js +6 -4
- package/dist/api/generated/kernel.js.map +1 -1
- package/dist/api/generated/measurement.d.ts +53 -97
- package/dist/api/generated/measurement.d.ts.map +1 -1
- package/dist/api/generated/measurement.js +48 -143
- package/dist/api/generated/measurement.js.map +1 -1
- package/dist/api/generated/ns.d.ts +1 -10
- package/dist/api/generated/ns.d.ts.map +1 -1
- package/dist/api/generated/ns.js +2 -10
- package/dist/api/generated/ns.js.map +1 -1
- package/dist/api/generated/operations.d.ts +65 -110
- package/dist/api/generated/operations.d.ts.map +1 -1
- package/dist/api/generated/operations.js +132 -80
- package/dist/api/generated/operations.js.map +1 -1
- package/dist/api/generated/projection.d.ts +1 -8
- package/dist/api/generated/projection.d.ts.map +1 -1
- package/dist/api/generated/projection.js +6 -4
- package/dist/api/generated/projection.js.map +1 -1
- package/dist/api/generated/query.d.ts +1 -9
- package/dist/api/generated/query.d.ts.map +1 -1
- package/dist/api/generated/query.js +6 -1
- package/dist/api/generated/query.js.map +1 -1
- package/dist/api/generated/script-face-manifest.d.ts +2 -0
- package/dist/api/generated/script-face-manifest.d.ts.map +1 -1
- package/dist/api/generated/script-face-manifest.js +22 -10
- package/dist/api/generated/script-face-manifest.js.map +1 -1
- package/dist/api/generated/script-face.d.ts +52 -27
- package/dist/api/generated/script-face.d.ts.map +1 -1
- package/dist/api/generated/script-face.js +18 -4
- package/dist/api/generated/script-face.js.map +1 -1
- package/dist/api/generated/sketching.d.ts +4 -7
- package/dist/api/generated/sketching.d.ts.map +1 -1
- package/dist/api/generated/sketching.js +10 -8
- package/dist/api/generated/sketching.js.map +1 -1
- package/dist/api/generated/text.d.ts +1 -6
- package/dist/api/generated/text.d.ts.map +1 -1
- package/dist/api/generated/text.js +6 -3
- package/dist/api/generated/text.js.map +1 -1
- package/dist/api/generated/topology.d.ts +77 -175
- package/dist/api/generated/topology.d.ts.map +1 -1
- package/dist/api/generated/topology.js +172 -131
- package/dist/api/generated/topology.js.map +1 -1
- package/dist/api/geom.d.ts.map +1 -1
- package/dist/api/geom.js +2 -2
- package/dist/api/geom.js.map +1 -1
- package/dist/api/helix.d.ts +51 -0
- package/dist/api/helix.d.ts.map +1 -0
- package/dist/api/helix.js +63 -0
- package/dist/api/helix.js.map +1 -0
- package/dist/api/import-step.d.ts.map +1 -1
- package/dist/api/import-step.js +6 -2
- package/dist/api/import-step.js.map +1 -1
- package/dist/api/index.d.ts +20 -6
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +30 -13
- package/dist/api/index.js.map +1 -1
- package/dist/api/internal/compat-op.d.ts +10 -0
- package/dist/api/internal/compat-op.d.ts.map +1 -1
- package/dist/api/internal/compat-op.js +9 -3
- package/dist/api/internal/compat-op.js.map +1 -1
- package/dist/api/internal/compat-projection.d.ts +4 -4
- package/dist/api/internal/compat-projection.js +7 -7
- package/dist/api/internal/compat-projection.js.map +1 -1
- package/dist/api/internal/l3-bridge.d.ts +75 -42
- package/dist/api/internal/l3-bridge.d.ts.map +1 -1
- package/dist/api/internal/l3-bridge.js +105 -50
- package/dist/api/internal/l3-bridge.js.map +1 -1
- package/dist/api/internal/profile-wire.d.ts +31 -0
- package/dist/api/internal/profile-wire.d.ts.map +1 -0
- package/dist/api/internal/profile-wire.js +37 -0
- package/dist/api/internal/profile-wire.js.map +1 -0
- package/dist/api/internal/replica-role-table.js +2 -2
- package/dist/api/internal/replica-role-table.js.map +1 -1
- package/dist/api/loft.d.ts +66 -0
- package/dist/api/loft.d.ts.map +1 -0
- package/dist/api/loft.js +111 -0
- package/dist/api/loft.js.map +1 -0
- package/dist/api/measurement/index.d.ts +51 -0
- package/dist/api/measurement/index.d.ts.map +1 -0
- package/dist/api/measurement/index.js +71 -0
- package/dist/api/measurement/index.js.map +1 -0
- package/dist/api/occt-kernel-bridge.d.ts +5 -8
- package/dist/api/occt-kernel-bridge.d.ts.map +1 -1
- package/dist/api/occt-kernel-bridge.js +18 -14
- package/dist/api/occt-kernel-bridge.js.map +1 -1
- package/dist/api/pattern.d.ts.map +1 -1
- package/dist/api/pattern.js +3 -4
- package/dist/api/pattern.js.map +1 -1
- package/dist/api/place.d.ts.map +1 -1
- package/dist/api/place.js +2 -4
- package/dist/api/place.js.map +1 -1
- package/dist/api/primitives.d.ts.map +1 -1
- package/dist/api/primitives.js +3 -4
- package/dist/api/primitives.js.map +1 -1
- package/dist/api/profile.d.ts +89 -0
- package/dist/api/profile.d.ts.map +1 -0
- package/dist/api/profile.js +194 -0
- package/dist/api/profile.js.map +1 -0
- package/dist/api/replicate.d.ts +28 -1
- package/dist/api/replicate.d.ts.map +1 -1
- package/dist/api/replicate.js +34 -23
- package/dist/api/replicate.js.map +1 -1
- package/dist/api/result.d.ts +6 -11
- package/dist/api/result.d.ts.map +1 -1
- package/dist/api/result.js +6 -11
- package/dist/api/result.js.map +1 -1
- package/dist/api/revolve.d.ts.map +1 -1
- package/dist/api/revolve.js +15 -14
- package/dist/api/revolve.js.map +1 -1
- package/dist/api/screw.d.ts +3 -0
- package/dist/api/screw.d.ts.map +1 -1
- package/dist/api/screw.js +9 -4
- package/dist/api/screw.js.map +1 -1
- package/dist/api/sdf.d.ts +1 -1
- package/dist/api/section-by-plane.d.ts +42 -0
- package/dist/api/section-by-plane.d.ts.map +1 -0
- package/dist/api/section-by-plane.js +61 -0
- package/dist/api/section-by-plane.js.map +1 -0
- package/dist/api/shell.d.ts +45 -0
- package/dist/api/shell.d.ts.map +1 -0
- package/dist/api/shell.js +73 -0
- package/dist/api/shell.js.map +1 -0
- package/dist/api/sketch.d.ts +8 -1
- package/dist/api/sketch.d.ts.map +1 -1
- package/dist/api/sketch.js +12 -7
- package/dist/api/sketch.js.map +1 -1
- package/dist/api/split-by-plane.d.ts +41 -0
- package/dist/api/split-by-plane.d.ts.map +1 -0
- package/dist/api/split-by-plane.js +60 -0
- package/dist/api/split-by-plane.js.map +1 -0
- package/dist/api/split.d.ts +6 -1
- package/dist/api/split.d.ts.map +1 -1
- package/dist/api/split.js +23 -9
- package/dist/api/split.js.map +1 -1
- package/dist/api/surface/arg-spec.d.ts +22 -0
- package/dist/api/surface/arg-spec.d.ts.map +1 -1
- package/dist/api/surface/arg-spec.js +729 -477
- package/dist/api/surface/arg-spec.js.map +1 -1
- package/dist/api/sweep.d.ts +55 -0
- package/dist/api/sweep.d.ts.map +1 -0
- package/dist/api/sweep.js +86 -0
- package/dist/api/sweep.js.map +1 -0
- package/dist/api/thicken.d.ts +36 -0
- package/dist/api/thicken.d.ts.map +1 -0
- package/dist/api/thicken.js +55 -0
- package/dist/api/thicken.js.map +1 -0
- package/dist/api/transform.d.ts +8 -0
- package/dist/api/transform.d.ts.map +1 -1
- package/dist/api/transform.js +15 -4
- package/dist/api/transform.js.map +1 -1
- package/dist/api/view/cameraFns.d.ts +48 -0
- package/dist/api/view/cameraFns.d.ts.map +1 -0
- package/dist/api/view/cameraFns.js +75 -0
- package/dist/api/view/cameraFns.js.map +1 -0
- package/dist/api/view/projectionPlanes.d.ts +25 -0
- package/dist/api/view/projectionPlanes.d.ts.map +1 -0
- package/dist/api/view/projectionPlanes.js +30 -0
- package/dist/api/view/projectionPlanes.js.map +1 -0
- package/dist/api/view/view-camera.d.ts +2 -2
- package/dist/api/view/view-camera.d.ts.map +1 -1
- package/dist/api/view/view-camera.js +3 -3
- package/dist/api/view/view-camera.js.map +1 -1
- package/dist/api/view/view-projection.d.ts +9 -6
- package/dist/api/view/view-projection.d.ts.map +1 -1
- package/dist/api/view/view-projection.js +132 -65
- package/dist/api/view/view-projection.js.map +1 -1
- package/dist/api/wire.d.ts +45 -0
- package/dist/api/wire.d.ts.map +1 -0
- package/dist/api/wire.js +96 -0
- package/dist/api/wire.js.map +1 -0
- package/dist/boolean/creased-normals.d.ts +50 -0
- package/dist/boolean/creased-normals.d.ts.map +1 -0
- package/dist/boolean/creased-normals.js +114 -0
- package/dist/boolean/creased-normals.js.map +1 -0
- package/dist/boolean/deriveNormals.d.ts +4 -1
- package/dist/boolean/deriveNormals.d.ts.map +1 -1
- package/dist/boolean/deriveNormals.js +5 -2
- package/dist/boolean/deriveNormals.js.map +1 -1
- package/dist/brep/brep-ops.d.ts +6 -0
- package/dist/brep/brep-ops.d.ts.map +1 -1
- package/dist/brep/brep-ops.js +11 -2
- package/dist/brep/brep-ops.js.map +1 -1
- package/dist/brep/brep-topology.d.ts +4 -0
- package/dist/brep/brep-topology.d.ts.map +1 -1
- package/dist/brep/brep-topology.js +4 -0
- package/dist/brep/brep-topology.js.map +1 -1
- package/dist/brep/engine/adapters/brep-mock.d.ts.map +1 -1
- package/dist/brep/engine/adapters/brep-mock.js +79 -59
- package/dist/brep/engine/adapters/brep-mock.js.map +1 -1
- package/dist/brep/engine/adapters/brepkit.d.ts.map +1 -1
- package/dist/brep/engine/adapters/brepkit.js +35 -2
- package/dist/brep/engine/adapters/brepkit.js.map +1 -1
- package/dist/brep/engine/adapters/occt.d.ts +15 -7
- package/dist/brep/engine/adapters/occt.d.ts.map +1 -1
- package/dist/brep/engine/adapters/occt.js +64 -167
- package/dist/brep/engine/adapters/occt.js.map +1 -1
- package/dist/brep/engine/primitives.d.ts +93 -130
- package/dist/brep/engine/primitives.d.ts.map +1 -1
- package/dist/brep/engine/primitives.js +9 -7
- package/dist/brep/engine/primitives.js.map +1 -1
- package/dist/brep/engine/types.d.ts +14 -1
- package/dist/brep/engine/types.d.ts.map +1 -1
- package/dist/brep/engine/types.js +11 -1
- package/dist/brep/engine/types.js.map +1 -1
- package/dist/brep/export/step.d.ts +3 -0
- package/dist/brep/export/step.d.ts.map +1 -1
- package/dist/brep/export/step.js +7 -1
- package/dist/brep/export/step.js.map +1 -1
- package/dist/brep/face-evolution.d.ts +8 -0
- package/dist/brep/face-evolution.d.ts.map +1 -1
- package/dist/brep/face-evolution.js +15 -3
- package/dist/brep/face-evolution.js.map +1 -1
- package/dist/brep/handle-bridge.d.ts +20 -2
- package/dist/brep/handle-bridge.d.ts.map +1 -1
- package/dist/brep/handle-bridge.js +25 -2
- package/dist/brep/handle-bridge.js.map +1 -1
- package/dist/brepkit-kernel/brepkitKernel.d.ts +25 -5
- package/dist/brepkit-kernel/brepkitKernel.d.ts.map +1 -1
- package/dist/brepkit-kernel/brepkitKernel.js +782 -218
- package/dist/brepkit-kernel/brepkitKernel.js.map +1 -1
- package/dist/brepkit-kernel/multi-version-test.d.ts +40 -0
- package/dist/brepkit-kernel/multi-version-test.d.ts.map +1 -0
- package/dist/brepkit-kernel/multi-version-test.js +89 -0
- package/dist/brepkit-kernel/multi-version-test.js.map +1 -0
- package/dist/cad-runtime/admit-compat-lib.d.ts +6 -1
- package/dist/cad-runtime/admit-compat-lib.d.ts.map +1 -1
- package/dist/cad-runtime/admit-compat-lib.js +5 -1
- package/dist/cad-runtime/admit-compat-lib.js.map +1 -1
- package/dist/cad-runtime/backend-dispatch.d.ts +9 -3
- package/dist/cad-runtime/backend-dispatch.d.ts.map +1 -1
- package/dist/cad-runtime/backend-dispatch.js +32 -2
- package/dist/cad-runtime/backend-dispatch.js.map +1 -1
- package/dist/cad-runtime/direct-executor.d.ts.map +1 -1
- package/dist/cad-runtime/direct-executor.js +8 -2
- package/dist/cad-runtime/direct-executor.js.map +1 -1
- package/dist/cad-runtime/runtime.d.ts +3 -0
- package/dist/cad-runtime/runtime.d.ts.map +1 -1
- package/dist/cad-runtime/runtime.js +3 -1
- package/dist/cad-runtime/runtime.js.map +1 -1
- package/dist/define-op.d.ts +18 -2
- package/dist/define-op.d.ts.map +1 -1
- package/dist/define-op.js +29 -1
- package/dist/define-op.js.map +1 -1
- package/dist/env-agnostic.d.ts +3 -0
- package/dist/env-agnostic.d.ts.map +1 -1
- package/dist/env-agnostic.js +7 -0
- package/dist/env-agnostic.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/lang/symbol-table.generated.d.ts +29 -1
- package/dist/lang/symbol-table.generated.d.ts.map +1 -1
- package/dist/lang/symbol-table.generated.js +30 -2
- package/dist/lang/symbol-table.generated.js.map +1 -1
- package/dist/occt-kernel/highLevelApi.d.ts.map +1 -1
- package/dist/occt-kernel/highLevelApi.js +6 -3
- package/dist/occt-kernel/highLevelApi.js.map +1 -1
- package/dist/occt-kernel/hullGeometry.d.ts +31 -0
- package/dist/occt-kernel/hullGeometry.d.ts.map +1 -0
- package/dist/occt-kernel/hullGeometry.js +319 -0
- package/dist/occt-kernel/hullGeometry.js.map +1 -0
- package/dist/occt-kernel/hullOps.d.ts +24 -0
- package/dist/occt-kernel/hullOps.d.ts.map +1 -0
- package/dist/occt-kernel/hullOps.js +52 -0
- package/dist/occt-kernel/hullOps.js.map +1 -0
- package/dist/occt-kernel/occt-primitives.d.ts +14 -0
- package/dist/occt-kernel/occt-primitives.d.ts.map +1 -0
- package/dist/occt-kernel/occt-primitives.js +351 -0
- package/dist/occt-kernel/occt-primitives.js.map +1 -0
- package/dist/occt-kernel/occtKernel.d.ts +14 -6
- package/dist/occt-kernel/occtKernel.d.ts.map +1 -1
- package/dist/occt-kernel/occtKernel.js +11 -3
- package/dist/occt-kernel/occtKernel.js.map +1 -1
- package/dist/occt-kernel/topologyExt.js +2 -2
- package/dist/occt-kernel/topologyExt.js.map +1 -1
- package/dist/primitives/brep-primitives.d.ts +4 -0
- package/dist/primitives/brep-primitives.d.ts.map +1 -1
- package/dist/primitives/brep-primitives.js +4 -0
- package/dist/primitives/brep-primitives.js.map +1 -1
- package/dist/result/bug.d.ts +22 -0
- package/dist/result/bug.d.ts.map +1 -0
- package/dist/result/bug.js +28 -0
- package/dist/result/bug.js.map +1 -0
- package/dist/result/errors.d.ts +270 -0
- package/dist/result/errors.d.ts.map +1 -0
- package/dist/result/errors.js +317 -0
- package/dist/result/errors.js.map +1 -0
- package/dist/result/kernelErrorTranslation.d.ts +21 -0
- package/dist/result/kernelErrorTranslation.d.ts.map +1 -0
- package/dist/result/kernelErrorTranslation.js +102 -0
- package/dist/result/kernelErrorTranslation.js.map +1 -0
- package/dist/result/result.d.ts +213 -0
- package/dist/result/result.d.ts.map +1 -0
- package/dist/result/result.js +336 -0
- package/dist/result/result.js.map +1 -0
- package/dist/result/vec3.d.ts +12 -0
- package/dist/result/vec3.d.ts.map +1 -0
- package/dist/result/vec3.js +14 -0
- package/dist/result/vec3.js.map +1 -0
- package/dist/runtime-state.d.ts +9 -0
- package/dist/runtime-state.d.ts.map +1 -1
- package/dist/runtime-state.js.map +1 -1
- package/dist/sdk.d.ts +3 -1
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +2 -1
- package/dist/sdk.js.map +1 -1
- package/dist/shape.d.ts +43 -1
- package/dist/shape.d.ts.map +1 -1
- package/dist/shape.js +57 -1
- package/dist/shape.js.map +1 -1
- package/dist/topology/naming/geom-hint.js +1 -1
- package/dist/topology/naming/geom-hint.js.map +1 -1
- package/dist/topology/naming/score.js +1 -1
- package/dist/topology/naming/score.js.map +1 -1
- package/package.json +6 -16
|
@@ -1,234 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* BREP-TS compatibility surface (P21).
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* so it is guarded and falls back to the occt-kernel binding flag.
|
|
22
|
-
* - dual argument forms: object form normalizes to positional form via the
|
|
23
|
-
* shared `resolveArgs` discriminant; object keys outside the declared
|
|
24
|
-
* parameter table throw the shared `E_ARGS_FORM` token.
|
|
25
|
-
* - `box` is the hand-written dual-form sample: positional
|
|
26
|
-
* `box(width, depth, height)` and `box({ size })` / `box({ width, depth,
|
|
27
|
-
* height })` both forward to the vendored primitive in its native dimension
|
|
28
|
-
* order (width = X, depth = Y, height = Z — confirm against
|
|
29
|
-
* `primitiveFns#box`), so every accepted form yields identical geometry.
|
|
30
|
-
*/
|
|
31
|
-
import type { ValidSolid } from '../../vendored/brepjs/core/shapeTypes.js';
|
|
32
|
-
/** Signature of a compat op projection (inputs normalized before the call). */
|
|
33
|
-
type CompatOp = (...args: unknown[]) => unknown;
|
|
34
|
-
import { sphere as primitiveSphere, cylinder as primitiveCylinder } from '../../vendored/brepjs/topology/primitiveFns.js';
|
|
35
|
-
/**
|
|
36
|
-
* Create a solid box.
|
|
37
|
-
*
|
|
38
|
-
* Positional form `box(width, depth, height)` uses the vendor's native
|
|
39
|
-
* dimension order — X = width, Y = depth,
|
|
40
|
-
* Z = height (the vendored `primitiveFns#box` dimension order; width/height are
|
|
41
|
-
* NOT swapped). See the overload below for the object form.
|
|
42
|
-
*
|
|
43
|
-
* @param width - side length along X.
|
|
44
|
-
* @param depth - side length along Y.
|
|
45
|
-
* @param height - side length along Z.
|
|
46
|
-
* @returns a new valid solid box.
|
|
47
|
-
*/
|
|
48
|
-
export declare function box(width: number, depth: number, height: number): ValidSolid;
|
|
49
|
-
/**
|
|
50
|
-
* Create a solid box from an object form.
|
|
51
|
-
*
|
|
52
|
-
* Accepts `box({ size })` where `size` is a number (cube) or a
|
|
53
|
-
* `[width, depth, height]` triple, or `box({ width, depth, height })`. Every
|
|
54
|
-
* accepted form forwards to `primitiveBox(width, depth, height)`, so equal
|
|
55
|
-
* dimension values always produce identical geometry.
|
|
56
|
-
*
|
|
57
|
-
* @param options - the dimension set: `size` (a cube edge or a triple) or
|
|
58
|
-
* `width`/`depth`/`height` sides.
|
|
59
|
-
* @returns a new valid solid box.
|
|
60
|
-
* @throws An `Error` whose message contains the shared `E_ARGS_FORM` token when
|
|
61
|
-
* no form matches (e.g. `box('x')`, `box()`, or unknown object keys).
|
|
62
|
-
*/
|
|
63
|
-
export declare function box(options: BoxDimensions): ValidSolid;
|
|
64
|
-
/** Object-form input accepted by {@link box}. */
|
|
65
|
-
export interface BoxDimensions {
|
|
66
|
-
/** All three sides as one number (cube) or a `[width, depth, height]` triple. */
|
|
67
|
-
size?: number | [number, number, number];
|
|
68
|
-
/** Side length along X. */
|
|
69
|
-
width?: number;
|
|
70
|
-
/** Side length along Y. */
|
|
71
|
-
depth?: number;
|
|
72
|
-
/** Side length along Z. */
|
|
73
|
-
height?: number;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Project the vendored `sphere(radius, options?)` verbatim (P25: the raw
|
|
77
|
-
* morph form is what portable libraries call — upstream brepjs signatures,
|
|
78
|
-
* no op projection).
|
|
79
|
-
*/
|
|
80
|
-
export { primitiveSphere as sphere };
|
|
81
|
-
/** Project the vendored `cylinder(radius, height, options?)` verbatim. */
|
|
82
|
-
export { primitiveCylinder as cylinder };
|
|
83
|
-
/** Project the vendored `cone(bottomRadius, topRadius, height, options?)`. */
|
|
84
|
-
export declare const cone: CompatOp;
|
|
85
|
-
/** Project the vendored `torus(majorRadius, minorRadius, options?)`. */
|
|
86
|
-
export declare const torus: CompatOp;
|
|
87
|
-
/** Project the vendored `ellipsoid(rx, ry, rz, options?)`. */
|
|
88
|
-
export declare const ellipsoid: CompatOp;
|
|
89
|
-
import { fuse as vendoredFuse, cut as vendoredCut, intersect as vendoredIntersect, fillet as vendoredFillet, chamfer as vendoredChamfer, simplify as vendoredSimplify } from '../../vendored/brepjs/topology/api.js';
|
|
90
|
-
import { makeCompound as vendoredMakeCompound, makeVertex as vendoredMakeVertex } from '../../vendored/brepjs/topology/solidBuilders.js';
|
|
91
|
-
import { applyMatrix as vendoredApplyMatrix } from '../../vendored/brepjs/topology/transformFns.js';
|
|
92
|
-
import { makeCircle as vendoredMakeCircle, makeEllipse as vendoredMakeEllipse, makeLine as vendoredMakeLine, makeThreePointArc as vendoredMakeThreePointArc, makeTangentArc as vendoredMakeTangentArc, makeBSplineInterpolation as vendoredMakeBSplineInterpolation, assembleWire as vendoredAssembleWire } from '../../vendored/brepjs/topology/curveBuilders.js';
|
|
93
|
-
import { curveTangentAt as vendoredCurveTangentAt, curvePointAt as vendoredCurvePointAt } from '../../vendored/brepjs/topology/curveFns.js';
|
|
94
|
-
import { makeFace as vendoredMakeFace, addHolesInFace as vendoredAddHolesInFace } from '../../vendored/brepjs/topology/surfaceBuilders.js';
|
|
95
|
-
import { extrude as vendoredExtrude, revolve as vendoredRevolve, loft as vendoredLoft } from '../../vendored/brepjs/operations/api.js';
|
|
96
|
-
/** Fuse two shapeables into one 3D result. */
|
|
97
|
-
export declare const fuse: typeof vendoredFuse;
|
|
98
|
-
/** Cut the second shapeable out of the first. */
|
|
99
|
-
export declare const cut: typeof vendoredCut;
|
|
100
|
-
/** Extrude a planar profile along a height or direction vector. */
|
|
101
|
-
export declare const extrude: typeof vendoredExtrude;
|
|
102
|
-
/** Revolve a planar profile around an axis with optional angle. */
|
|
103
|
-
export declare const revolve: typeof vendoredRevolve;
|
|
104
|
-
/** Loft through a set of wire profiles. */
|
|
105
|
-
export declare const loft: typeof vendoredLoft;
|
|
106
|
-
/** Intersect two shapeables (common 3D volume). */
|
|
107
|
-
export declare const intersect: typeof vendoredIntersect;
|
|
108
|
-
/**
|
|
109
|
-
* Fillet all edges (2-arg form) or selected edges (3-arg form: edge array /
|
|
110
|
-
* finder) of a valid solid. Selection form:
|
|
111
|
-
* `fillet(shape, edgeHandles, radius)`.
|
|
112
|
-
*/
|
|
113
|
-
export declare const fillet: typeof vendoredFillet;
|
|
114
|
-
/**
|
|
115
|
-
* Chamfer all edges (2-arg form) or selected edges (3-arg form) of a valid
|
|
116
|
-
* solid. Selection form: `chamfer(shape, edgeHandles, distance)` where
|
|
117
|
-
* distance is a symmetric length or an asymmetric `[d1, d2]` pair.
|
|
118
|
-
*/
|
|
119
|
-
export declare const chamfer: typeof vendoredChamfer;
|
|
120
|
-
/**
|
|
121
|
-
* Group shapes into a single Compound: `makeCompound(shapeArray)` (the
|
|
122
|
-
* analogue of CadQuery's multi-solid compounds).
|
|
123
|
-
*/
|
|
124
|
-
export declare const makeCompound: typeof vendoredMakeCompound;
|
|
125
|
-
/** Single vertex at a point: `makeVertex([x, y, z])` (upstream `vertex(x, y, z)`). */
|
|
126
|
-
export declare const makeVertex: typeof vendoredMakeVertex;
|
|
127
|
-
/**
|
|
128
|
-
* Apply a rigid affine transform to ANY shape — including compounds, which the
|
|
129
|
-
* faijs `cad.translate` / `cad.rotate_euler` ops reject ("input is not BREP",
|
|
130
|
-
* they require a solid). Needed by CadQuery's `Shape.moved(*locs)`, which can
|
|
131
|
-
* move a multi-solid compound as a whole.
|
|
132
|
-
*
|
|
133
|
-
* Accepts the `{ linear, translation }` form of `MatrixInput`: `linear` is the
|
|
134
|
-
* row-major 3x3 rotation, `translation` is applied after it (p -> R·p + t).
|
|
135
|
-
*/
|
|
136
|
-
export declare const applyMatrix: typeof vendoredApplyMatrix;
|
|
137
|
-
/**
|
|
138
|
-
* Merge same-domain faces/edges (unifySameDomain) — the analogue of
|
|
139
|
-
* CadQuery's `clean=True` boolean post-processing.
|
|
140
|
-
*/
|
|
141
|
-
export declare const simplify: typeof vendoredSimplify;
|
|
142
|
-
/** Circular edge: `makeCircle(radius, center?, normal?)` — closed, planar. */
|
|
143
|
-
export declare const makeCircle: typeof vendoredMakeCircle;
|
|
144
|
-
/** Elliptical edge: `makeEllipseEdge(majorRadius, minorRadius, center?, normal?, xDir?)`. Returns a `Result`. */
|
|
145
|
-
export declare const makeEllipseEdge: typeof vendoredMakeEllipse;
|
|
146
|
-
/** Straight edge from `v1` to `v2`. */
|
|
147
|
-
export declare const makeLine: typeof vendoredMakeLine;
|
|
148
|
-
/** Assemble edges/wires into a single connected wire. Returns a `Result`. */
|
|
149
|
-
export declare const assembleWire: typeof vendoredAssembleWire;
|
|
150
|
-
/** Planar face from a closed wire, optionally with hole wires. Returns a `Result`. */
|
|
151
|
-
export declare const makeFace: typeof vendoredMakeFace;
|
|
152
|
-
/** Punch hole wires into an existing face. */
|
|
153
|
-
export declare const addHolesInFace: typeof vendoredAddHolesInFace;
|
|
154
|
-
/** Circular arc edge through three points (start, mid, end). */
|
|
155
|
-
export declare const makeThreePointArc: typeof vendoredMakeThreePointArc;
|
|
156
|
-
/** Circular arc edge from a start point + start tangent to an end point. */
|
|
157
|
-
export declare const makeTangentArc: typeof vendoredMakeTangentArc;
|
|
158
|
-
/** Interpolated cubic B-spline edge through every input point. Returns a `Result`. */
|
|
159
|
-
export declare const makeBSplineInterpolation: typeof vendoredMakeBSplineInterpolation;
|
|
160
|
-
/** Tangent vector of an edge/wire curve at a normalized position (1 = end). */
|
|
161
|
-
export declare const curveTangentAt: typeof vendoredCurveTangentAt;
|
|
162
|
-
/** Point on an edge/wire curve at a normalized position. */
|
|
163
|
-
export declare const curvePointAt: typeof vendoredCurvePointAt;
|
|
164
|
-
import { makeExternalGear as vendoredMakeExternalGear, makeInternalGear as vendoredMakeInternalGear, makePlanetaryGear as vendoredMakePlanetaryGear } from '../../vendored/brepjs/gear/gearFns.js';
|
|
165
|
-
import { thread as vendoredThread } from '../../vendored/brepjs/operations/threadFns.js';
|
|
166
|
-
/**
|
|
167
|
-
* Build an external spur gear.
|
|
168
|
-
* @param params - the external-gear parameters (`teeth`, `moduleSize`, `thickness`, …).
|
|
169
|
-
* @returns `Ok` with the gear solid + geometry, or `Err` for invalid parameters.
|
|
170
|
-
*/
|
|
171
|
-
export declare const makeExternalGear: typeof vendoredMakeExternalGear;
|
|
172
|
-
/**
|
|
173
|
-
* Build an internal (ring) spur gear.
|
|
174
|
-
* @param params - the internal-gear parameters, including the optional ring wall thickness.
|
|
175
|
-
* @returns `Ok` with the gear solid + geometry, or `Err` for invalid parameters.
|
|
176
|
-
*/
|
|
177
|
-
export declare const makeInternalGear: typeof vendoredMakeInternalGear;
|
|
178
|
-
/**
|
|
179
|
-
* Build a planetary gear train (sun + planets + ring).
|
|
180
|
-
* @param params - the planetary-gear parameters.
|
|
181
|
-
* @returns `Ok` with the sun/planet/ring solids and mesh diagnostics, or `Err`.
|
|
182
|
-
*/
|
|
183
|
-
export declare const makePlanetaryGear: typeof vendoredMakePlanetaryGear;
|
|
184
|
-
/**
|
|
185
|
-
* Build a helical screw-thread ridge.
|
|
186
|
-
* @param options - the thread profile (`radius`, `pitch`, `height`, …).
|
|
187
|
-
* @returns `Ok` with the thread-ridge solid, or `Err` for invalid parameters.
|
|
188
|
-
*/
|
|
189
|
-
export declare const thread: typeof vendoredThread;
|
|
190
|
-
export type { ExternalGearParams, InternalGearParams, PlanetaryGearParams, GearResult, PlanetaryGearAssembly, } from '../../vendored/brepjs/gear/gearFns.js';
|
|
191
|
-
export type { ThreadOptions } from '../../vendored/brepjs/operations/threadFns.js';
|
|
192
|
-
export { getEdges, getFaces, getWires, getVertices, getShells, getSolids, getCompSolids, getBounds, vertexPosition, } from '../../vendored/brepjs/topology/topologyQueryFns.js';
|
|
193
|
-
export type { Bounds3D } from '../../vendored/brepjs/topology/topologyQueryFns.js';
|
|
194
|
-
export { measureVolume, measureArea, measureLength, } from '../../vendored/brepjs/measurement/measureFns.js';
|
|
195
|
-
export { default as Sketcher } from '../../vendored/brepjs/sketching/sketcher.js';
|
|
196
|
-
export { default as FaceSketcher } from '../../vendored/brepjs/sketching/faceSketcher.js';
|
|
197
|
-
export { drawCircle, drawEllipse, drawRoundedRectangle, drawRectangle, drawSingleCircle, drawSingleEllipse, drawPolysides, drawText, } from '../../vendored/brepjs/sketching/drawingFactories.js';
|
|
198
|
-
export { draw } from '../../vendored/brepjs/sketching/drawingPen.js';
|
|
199
|
-
export { makeBaseBox } from '../../vendored/brepjs/sketching/shortcuts.js';
|
|
200
|
-
export { ok, err, isOk, isErr, unwrap, unwrapOr, map, andThen, } from '../../vendored/brepjs/core/result.js';
|
|
201
|
-
export type { Result, Ok, Err } from '../../vendored/brepjs/core/result.js';
|
|
202
|
-
export { vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize, } from '../../vendored/brepjs/core/vecOps.js';
|
|
203
|
-
export { createPlane, createNamedPlane, resolvePlane, } from '../../vendored/brepjs/core/planeOps.js';
|
|
204
|
-
export { kernelError, validationError } from '../../vendored/brepjs/core/errors.js';
|
|
205
|
-
export type { BrepError } from '../../vendored/brepjs/core/errors.js';
|
|
206
|
-
export { DEG2RAD, RAD2DEG } from '../../vendored/brepjs/core/constants.js';
|
|
207
|
-
export type { Vertex, Edge, Wire, Face, Shell, Solid, CompSolid, Shape3D, ValidSolid, ClosedWire, AnyShape, } from '../../vendored/brepjs/core/shapeTypes.js';
|
|
208
|
-
export type { GearGeometry } from '../../vendored/brepjs/gear/gearMath.js';
|
|
209
|
-
export type { Plane, PlaneName, PlaneInput } from '../../vendored/brepjs/core/planeTypes.js';
|
|
210
|
-
export type { Vec3, PointInput } from '../../vendored/brepjs/core/types.js';
|
|
211
|
-
import { line as rawLine, wire as rawWire, wireLoop as rawWireLoop, face as rawFace, polygon as rawPolygon } from '../../vendored/brepjs/topology/primitiveFns.js';
|
|
212
|
-
import { outerWire as rawOuterWire, getSurfaceType as rawSurfaceType, pointOnSurface as rawPointOnSurface, normalAt as rawNormalAt, faceCenter as rawFaceCenter } from '../../vendored/brepjs/topology/faceFns.js';
|
|
213
|
-
import { sharedEdges as rawSharedEdges } from '../../vendored/brepjs/topology/adjacencyFns.js';
|
|
214
|
-
import { curveStartPoint as rawCurveStartPoint, curveEndPoint as rawCurveEndPoint } from '../../vendored/brepjs/topology/curveFns.js';
|
|
215
|
-
import { translate as rawTranslate } from '../../vendored/brepjs/topology/transformFns.js';
|
|
216
|
-
import { isSolid as rawIsSolid } from '../../vendored/brepjs/core/shapeTypes.js';
|
|
217
|
-
import { isPlanarWire as rawIsPlanarWire } from '../../vendored/brepjs/core/validityTypes.js';
|
|
218
|
-
import { isValid as rawIsValid } from '../../vendored/brepjs/topology/healingFns.js';
|
|
219
|
-
import type { AnyShape } from '../../vendored/brepjs/core/shapeTypes.js';
|
|
220
|
-
import type { Vec3 } from '../../vendored/brepjs/core/types.js';
|
|
221
|
-
export { rawLine as line, rawWire as wire, rawWireLoop as wireLoop, rawFace as face, rawPolygon as polygon, rawOuterWire as outerWire, rawSurfaceType as getSurfaceType, rawPointOnSurface as pointOnSurface, rawNormalAt as normalAt, rawFaceCenter as faceCenter, rawSharedEdges as sharedEdges, rawCurveStartPoint as curveStartPoint, rawCurveEndPoint as curveEndPoint, rawTranslate as translate, rawIsSolid as isSolid, rawIsPlanarWire as isPlanarWire, rawIsValid as isValid, };
|
|
222
|
-
/**
|
|
223
|
-
* Rotate a shape by an angle in degrees around an axis.
|
|
224
|
-
* @param shape - The shape to rotate.
|
|
225
|
-
* @param angle - Rotation angle in degrees.
|
|
226
|
-
* @param options - Axis and pivot (`at`) for the rotation; defaults to the Z
|
|
227
|
-
* axis through the origin, matching upstream brepjs.
|
|
228
|
-
* @returns A new rotated shape.
|
|
229
|
-
*/
|
|
230
|
-
export declare function rotate<T extends AnyShape>(shape: T, angle: number, options?: {
|
|
231
|
-
at?: Vec3;
|
|
232
|
-
axis?: Vec3;
|
|
233
|
-
}): T;
|
|
2
|
+
* BREP-TS compatibility surface (P21) — 2026-09-25 core-decouple rewrite.
|
|
3
|
+
*
|
|
4
|
+
* The vendored BREP TS tree (packages/brepjs) is deleted (裁决 9). Every
|
|
5
|
+
* op projection (primitives / booleans / evolutions / topology queries /
|
|
6
|
+
* sketching DSL / raw 2D-morph ports) is gone with it — those symbols have no
|
|
7
|
+
* receiver (裁决 1). What remains in this module is the ④ group only: the pure
|
|
8
|
+
* combinators / types inlined into core (§5.2) — Result, vectors, planes,
|
|
9
|
+
* errors, constants — which stay flat-exported from the core facade for
|
|
10
|
+
* library authors (import { ok, vecAdd } from '@faicad/faijs').
|
|
11
|
+
*/
|
|
12
|
+
export { ok, err, isOk, isErr, unwrap, unwrapOr, map, andThen, } from '../../result/result.js';
|
|
13
|
+
export type { Result, Ok, Err } from '../../result/result.js';
|
|
14
|
+
export { vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize, } from './vecOps.js';
|
|
15
|
+
export { createPlane, createNamedPlane, resolvePlane, } from './planeOps.js';
|
|
16
|
+
export { kernelError, validationError } from '../../result/errors.js';
|
|
17
|
+
export type { BrepError } from '../../result/errors.js';
|
|
18
|
+
export { DEG2RAD, RAD2DEG } from './constants.js';
|
|
19
|
+
export type { Plane, PlaneName, PlaneInput } from './planeTypes.js';
|
|
20
|
+
export type { Vec3, PointInput } from './types.js';
|
|
234
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/brepjs-compat/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/brepjs-compat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,EACL,EAAE,EACF,GAAG,EACH,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,GAAG,EACH,OAAO,GACR,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,GACb,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,YAAY,GACb,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAClE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE9C,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEhE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1,289 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* BREP-TS compatibility surface (P21).
|
|
2
|
+
* BREP-TS compatibility surface (P21) — 2026-09-25 core-decouple rewrite.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* - dual argument forms: object form normalizes to positional form via the
|
|
23
|
-
* shared `resolveArgs` discriminant; object keys outside the declared
|
|
24
|
-
* parameter table throw the shared `E_ARGS_FORM` token.
|
|
25
|
-
* - `box` is the hand-written dual-form sample: positional
|
|
26
|
-
* `box(width, depth, height)` and `box({ size })` / `box({ width, depth,
|
|
27
|
-
* height })` both forward to the vendored primitive in its native dimension
|
|
28
|
-
* order (width = X, depth = Y, height = Z — confirm against
|
|
29
|
-
* `primitiveFns#box`), so every accepted form yields identical geometry.
|
|
30
|
-
*/
|
|
31
|
-
import { assertKernelBound, projectBrepOp } from '../internal/compat-projection.js';
|
|
32
|
-
import { isObjectForm } from '../internal/dual-form-args.js';
|
|
33
|
-
/**
|
|
34
|
-
* Dual-form op wrapper (A-class): asserts the kernel, normalizes object form to
|
|
35
|
-
* positional form via `resolveArgs`, then delegates to the vendored
|
|
36
|
-
* implementation.
|
|
37
|
-
*
|
|
38
|
-
* P23: delegates to the shared {@link projectBrepOp} so the hand-curated face
|
|
39
|
-
* and the generated face share one projection mechanism (§4.3.2).
|
|
40
|
-
*/
|
|
41
|
-
function wrapDual(name, params, impl) {
|
|
42
|
-
return projectBrepOp(name, params, 'A', impl);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Guard-only wrapper: forwards the arguments unchanged after the kernel assert.
|
|
46
|
-
* Used for positional-first ops (booleans, evolutions) whose first argument is
|
|
47
|
-
* a shape, so the object-form discriminant never applies. The exact function
|
|
48
|
-
* type `F` (including its parameter and Result types) is preserved.
|
|
49
|
-
*/
|
|
50
|
-
function wrapGuarded(name, impl) {
|
|
51
|
-
const fn = (...args) => {
|
|
52
|
-
assertKernelBound(name);
|
|
53
|
-
return impl(...args);
|
|
54
|
-
};
|
|
55
|
-
return fn;
|
|
56
|
-
}
|
|
57
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
58
|
-
// ① primitives + booleans + evolutions
|
|
59
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
60
|
-
import { box as primitiveBox, sphere as primitiveSphere, cylinder as primitiveCylinder, cone as primitiveCone, torus as primitiveTorus, ellipsoid as primitiveEllipsoid, } from '../../vendored/brepjs/topology/primitiveFns.js';
|
|
61
|
-
export function box(...args) {
|
|
62
|
-
assertKernelBound('box');
|
|
63
|
-
if (isObjectForm(args)) {
|
|
64
|
-
const obj = args[0];
|
|
65
|
-
const keys = Object.keys(obj);
|
|
66
|
-
const unknownKeys = keys.filter((k) => !['size', 'width', 'depth', 'height'].includes(k));
|
|
67
|
-
if (unknownKeys.length > 0)
|
|
68
|
-
throw boxArgError(args);
|
|
69
|
-
const size = obj.size;
|
|
70
|
-
if (size !== undefined) {
|
|
71
|
-
if (typeof size === 'number')
|
|
72
|
-
return primitiveBox(size, size, size);
|
|
73
|
-
if (Array.isArray(size) && size.length === 3) {
|
|
74
|
-
const [w, d, h] = size;
|
|
75
|
-
return primitiveBox(w, d, h);
|
|
76
|
-
}
|
|
77
|
-
throw boxArgError(args);
|
|
78
|
-
}
|
|
79
|
-
const width = obj.width;
|
|
80
|
-
const depth = obj.depth;
|
|
81
|
-
const height = obj.height;
|
|
82
|
-
if (typeof width === 'number' && typeof depth === 'number' && typeof height === 'number') {
|
|
83
|
-
return primitiveBox(width, depth, height);
|
|
84
|
-
}
|
|
85
|
-
throw boxArgError(args);
|
|
86
|
-
}
|
|
87
|
-
if (args.length === 3 && args.every((a) => typeof a === 'number')) {
|
|
88
|
-
const [w, d, h] = args;
|
|
89
|
-
return primitiveBox(w, d, h);
|
|
90
|
-
}
|
|
91
|
-
throw boxArgError(args);
|
|
92
|
-
}
|
|
93
|
-
/** Shared E_ARGS_FORM error for {@link box} argument mismatches. */
|
|
94
|
-
function boxArgError(args) {
|
|
95
|
-
return new Error('[compat:box] E_ARGS_FORM: expected box(width, depth, height), ' +
|
|
96
|
-
"box({ size: number | [w, d, h] }) or box({ width, depth, height }); got " +
|
|
97
|
-
args.map((a) => safeJson(a)).join(', '));
|
|
98
|
-
}
|
|
99
|
-
/** JSON stringification that never throws on cyclic or exotic values. */
|
|
100
|
-
function safeJson(v) {
|
|
101
|
-
try {
|
|
102
|
-
return JSON.stringify(v) ?? String(v);
|
|
103
|
-
}
|
|
104
|
-
catch {
|
|
105
|
-
return '[unserializable]';
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Project the vendored `sphere(radius, options?)` verbatim (P25: the raw
|
|
110
|
-
* morph form is what portable libraries call — upstream brepjs signatures,
|
|
111
|
-
* no op projection).
|
|
112
|
-
*/
|
|
113
|
-
export { primitiveSphere as sphere };
|
|
114
|
-
/** Project the vendored `cylinder(radius, height, options?)` verbatim. */
|
|
115
|
-
export { primitiveCylinder as cylinder };
|
|
116
|
-
/** Project the vendored `cone(bottomRadius, topRadius, height, options?)`. */
|
|
117
|
-
export const cone = wrapDual('cone', ['bottomRadius', 'topRadius', 'height'], primitiveCone);
|
|
118
|
-
/** Project the vendored `torus(majorRadius, minorRadius, options?)`. */
|
|
119
|
-
export const torus = wrapDual('torus', ['majorRadius', 'minorRadius'], primitiveTorus);
|
|
120
|
-
/** Project the vendored `ellipsoid(rx, ry, rz, options?)`. */
|
|
121
|
-
export const ellipsoid = wrapDual('ellipsoid', ['rx', 'ry', 'rz'], primitiveEllipsoid);
|
|
122
|
-
import { fuse as vendoredFuse, cut as vendoredCut, intersect as vendoredIntersect, fillet as vendoredFillet, chamfer as vendoredChamfer, simplify as vendoredSimplify, } from '../../vendored/brepjs/topology/api.js';
|
|
123
|
-
import { makeCompound as vendoredMakeCompound, makeVertex as vendoredMakeVertex, } from '../../vendored/brepjs/topology/solidBuilders.js';
|
|
124
|
-
import { applyMatrix as vendoredApplyMatrix } from '../../vendored/brepjs/topology/transformFns.js';
|
|
125
|
-
import { makeCircle as vendoredMakeCircle, makeEllipse as vendoredMakeEllipse, makeLine as vendoredMakeLine, makeThreePointArc as vendoredMakeThreePointArc, makeTangentArc as vendoredMakeTangentArc, makeBSplineInterpolation as vendoredMakeBSplineInterpolation, assembleWire as vendoredAssembleWire, } from '../../vendored/brepjs/topology/curveBuilders.js';
|
|
126
|
-
import { curveTangentAt as vendoredCurveTangentAt, curvePointAt as vendoredCurvePointAt, } from '../../vendored/brepjs/topology/curveFns.js';
|
|
127
|
-
import { makeFace as vendoredMakeFace, addHolesInFace as vendoredAddHolesInFace, } from '../../vendored/brepjs/topology/surfaceBuilders.js';
|
|
128
|
-
import { extrude as vendoredExtrude, revolve as vendoredRevolve, loft as vendoredLoft, } from '../../vendored/brepjs/operations/api.js';
|
|
129
|
-
/** Fuse two shapeables into one 3D result. */
|
|
130
|
-
export const fuse = wrapGuarded('fuse', vendoredFuse);
|
|
131
|
-
/** Cut the second shapeable out of the first. */
|
|
132
|
-
export const cut = wrapGuarded('cut', vendoredCut);
|
|
133
|
-
/** Extrude a planar profile along a height or direction vector. */
|
|
134
|
-
export const extrude = wrapGuarded('extrude', vendoredExtrude);
|
|
135
|
-
/** Revolve a planar profile around an axis with optional angle. */
|
|
136
|
-
export const revolve = wrapGuarded('revolve', vendoredRevolve);
|
|
137
|
-
/** Loft through a set of wire profiles. */
|
|
138
|
-
export const loft = wrapGuarded('loft', vendoredLoft);
|
|
139
|
-
/** Intersect two shapeables (common 3D volume). */
|
|
140
|
-
export const intersect = wrapGuarded('intersect', vendoredIntersect);
|
|
141
|
-
/**
|
|
142
|
-
* Fillet all edges (2-arg form) or selected edges (3-arg form: edge array /
|
|
143
|
-
* finder) of a valid solid. Selection form:
|
|
144
|
-
* `fillet(shape, edgeHandles, radius)`.
|
|
145
|
-
*/
|
|
146
|
-
export const fillet = wrapGuarded('fillet', vendoredFillet);
|
|
147
|
-
/**
|
|
148
|
-
* Chamfer all edges (2-arg form) or selected edges (3-arg form) of a valid
|
|
149
|
-
* solid. Selection form: `chamfer(shape, edgeHandles, distance)` where
|
|
150
|
-
* distance is a symmetric length or an asymmetric `[d1, d2]` pair.
|
|
151
|
-
*/
|
|
152
|
-
export const chamfer = wrapGuarded('chamfer', vendoredChamfer);
|
|
153
|
-
/**
|
|
154
|
-
* Group shapes into a single Compound: `makeCompound(shapeArray)` (the
|
|
155
|
-
* analogue of CadQuery's multi-solid compounds).
|
|
156
|
-
*/
|
|
157
|
-
export const makeCompound = wrapGuarded('makeCompound', vendoredMakeCompound);
|
|
158
|
-
/** Single vertex at a point: `makeVertex([x, y, z])` (upstream `vertex(x, y, z)`). */
|
|
159
|
-
export const makeVertex = wrapGuarded('makeVertex', vendoredMakeVertex);
|
|
160
|
-
/**
|
|
161
|
-
* Apply a rigid affine transform to ANY shape — including compounds, which the
|
|
162
|
-
* faijs `cad.translate` / `cad.rotate_euler` ops reject ("input is not BREP",
|
|
163
|
-
* they require a solid). Needed by CadQuery's `Shape.moved(*locs)`, which can
|
|
164
|
-
* move a multi-solid compound as a whole.
|
|
165
|
-
*
|
|
166
|
-
* Accepts the `{ linear, translation }` form of `MatrixInput`: `linear` is the
|
|
167
|
-
* row-major 3x3 rotation, `translation` is applied after it (p -> R·p + t).
|
|
168
|
-
*/
|
|
169
|
-
export const applyMatrix = wrapGuarded('applyMatrix', vendoredApplyMatrix);
|
|
170
|
-
/**
|
|
171
|
-
* Merge same-domain faces/edges (unifySameDomain) — the analogue of
|
|
172
|
-
* CadQuery's `clean=True` boolean post-processing.
|
|
173
|
-
*/
|
|
174
|
-
export const simplify = wrapGuarded('simplify', vendoredSimplify);
|
|
175
|
-
// ── 2D profile construction (CadQuery pending-wire parity) ────────────────
|
|
176
|
-
// Circles/lines → edges → wires → (holed) faces. These are the building blocks
|
|
177
|
-
// CadQuery uses for its `pendingWires` stack: an outer wire plus zero or more
|
|
178
|
-
// inner wires becomes ONE face with holes, which is then extruded. Without
|
|
179
|
-
// `makeFace(wire, holes)` a nested `circle(4).circle(2)` would have to be
|
|
180
|
-
// approximated by a boolean difference and would not match upstream topology.
|
|
181
|
-
/** Circular edge: `makeCircle(radius, center?, normal?)` — closed, planar. */
|
|
182
|
-
export const makeCircle = wrapGuarded('makeCircle', vendoredMakeCircle);
|
|
183
|
-
/** Elliptical edge: `makeEllipseEdge(majorRadius, minorRadius, center?, normal?, xDir?)`. Returns a `Result`. */
|
|
184
|
-
export const makeEllipseEdge = wrapGuarded('makeEllipseEdge', vendoredMakeEllipse);
|
|
185
|
-
/** Straight edge from `v1` to `v2`. */
|
|
186
|
-
export const makeLine = wrapGuarded('makeLine', vendoredMakeLine);
|
|
187
|
-
/** Assemble edges/wires into a single connected wire. Returns a `Result`. */
|
|
188
|
-
export const assembleWire = wrapGuarded('assembleWire', vendoredAssembleWire);
|
|
189
|
-
/** Planar face from a closed wire, optionally with hole wires. Returns a `Result`. */
|
|
190
|
-
export const makeFace = wrapGuarded('makeFace', vendoredMakeFace);
|
|
191
|
-
/** Punch hole wires into an existing face. */
|
|
192
|
-
export const addHolesInFace = wrapGuarded('addHolesInFace', vendoredAddHolesInFace);
|
|
193
|
-
/** Circular arc edge through three points (start, mid, end). */
|
|
194
|
-
export const makeThreePointArc = wrapGuarded('makeThreePointArc', vendoredMakeThreePointArc);
|
|
195
|
-
/** Circular arc edge from a start point + start tangent to an end point. */
|
|
196
|
-
export const makeTangentArc = wrapGuarded('makeTangentArc', vendoredMakeTangentArc);
|
|
197
|
-
/** Interpolated cubic B-spline edge through every input point. Returns a `Result`. */
|
|
198
|
-
export const makeBSplineInterpolation = wrapGuarded('makeBSplineInterpolation', vendoredMakeBSplineInterpolation);
|
|
199
|
-
/** Tangent vector of an edge/wire curve at a normalized position (1 = end). */
|
|
200
|
-
export const curveTangentAt = wrapGuarded('curveTangentAt', vendoredCurveTangentAt);
|
|
201
|
-
/** Point on an edge/wire curve at a normalized position. */
|
|
202
|
-
export const curvePointAt = wrapGuarded('curvePointAt', vendoredCurvePointAt);
|
|
203
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
204
|
-
// ①b library-building factories (P24, §8.1): spur gears, planetary trains, threads.
|
|
205
|
-
// Both morphs of these factories are brep-only builders gated by the single-kernel
|
|
206
|
-
// assert (wrapGuarded); the kernel is bound at the host boundary (D10).
|
|
207
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
208
|
-
import { makeExternalGear as vendoredMakeExternalGear, makeInternalGear as vendoredMakeInternalGear, makePlanetaryGear as vendoredMakePlanetaryGear, } from '../../vendored/brepjs/gear/gearFns.js';
|
|
209
|
-
import { thread as vendoredThread } from '../../vendored/brepjs/operations/threadFns.js';
|
|
210
|
-
/**
|
|
211
|
-
* Build an external spur gear.
|
|
212
|
-
* @param params - the external-gear parameters (`teeth`, `moduleSize`, `thickness`, …).
|
|
213
|
-
* @returns `Ok` with the gear solid + geometry, or `Err` for invalid parameters.
|
|
214
|
-
*/
|
|
215
|
-
export const makeExternalGear = wrapGuarded('makeExternalGear', vendoredMakeExternalGear);
|
|
216
|
-
/**
|
|
217
|
-
* Build an internal (ring) spur gear.
|
|
218
|
-
* @param params - the internal-gear parameters, including the optional ring wall thickness.
|
|
219
|
-
* @returns `Ok` with the gear solid + geometry, or `Err` for invalid parameters.
|
|
220
|
-
*/
|
|
221
|
-
export const makeInternalGear = wrapGuarded('makeInternalGear', vendoredMakeInternalGear);
|
|
222
|
-
/**
|
|
223
|
-
* Build a planetary gear train (sun + planets + ring).
|
|
224
|
-
* @param params - the planetary-gear parameters.
|
|
225
|
-
* @returns `Ok` with the sun/planet/ring solids and mesh diagnostics, or `Err`.
|
|
226
|
-
*/
|
|
227
|
-
export const makePlanetaryGear = wrapGuarded('makePlanetaryGear', vendoredMakePlanetaryGear);
|
|
228
|
-
/**
|
|
229
|
-
* Build a helical screw-thread ridge.
|
|
230
|
-
* @param options - the thread profile (`radius`, `pitch`, `height`, …).
|
|
231
|
-
* @returns `Ok` with the thread-ridge solid, or `Err` for invalid parameters.
|
|
232
|
-
*/
|
|
233
|
-
export const thread = wrapGuarded('thread', vendoredThread);
|
|
234
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
235
|
-
// ② sub-shape queries + measurements
|
|
236
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
237
|
-
export { getEdges, getFaces, getWires, getVertices, getShells, getSolids, getCompSolids, getBounds, vertexPosition, } from '../../vendored/brepjs/topology/topologyQueryFns.js';
|
|
238
|
-
export { measureVolume, measureArea, measureLength, } from '../../vendored/brepjs/measurement/measureFns.js';
|
|
239
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
240
|
-
// ③ sketching DSL + drawing factories
|
|
241
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
242
|
-
export { default as Sketcher } from '../../vendored/brepjs/sketching/sketcher.js';
|
|
243
|
-
export { default as FaceSketcher } from '../../vendored/brepjs/sketching/faceSketcher.js';
|
|
244
|
-
export { drawCircle, drawEllipse, drawRoundedRectangle, drawRectangle, drawSingleCircle, drawSingleEllipse, drawPolysides, drawText, } from '../../vendored/brepjs/sketching/drawingFactories.js';
|
|
245
|
-
export { draw } from '../../vendored/brepjs/sketching/drawingPen.js';
|
|
246
|
-
export { makeBaseBox } from '../../vendored/brepjs/sketching/shortcuts.js';
|
|
247
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
248
|
-
// ④ combinators / pure helpers / types
|
|
249
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
250
|
-
export { ok, err, isOk, isErr, unwrap, unwrapOr, map, andThen, } from '../../vendored/brepjs/core/result.js';
|
|
251
|
-
export { vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize, } from '../../vendored/brepjs/core/vecOps.js';
|
|
252
|
-
export { createPlane, createNamedPlane, resolvePlane, } from '../../vendored/brepjs/core/planeOps.js';
|
|
253
|
-
export { kernelError, validationError } from '../../vendored/brepjs/core/errors.js';
|
|
254
|
-
export { DEG2RAD, RAD2DEG } from '../../vendored/brepjs/core/constants.js';
|
|
255
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
256
|
-
// ⑤ raw 2D-morph + transform + face ports (P25: sheetmetal 单一说明符面)
|
|
257
|
-
//
|
|
258
|
-
// The sheetmetal authoring path consumes the vendored morph semantics exactly
|
|
259
|
-
// (handles in, handles out, `Result` only where the vendored chain returns
|
|
260
|
-
// one). These are projected verbatim from the ported tree — same names, same
|
|
261
|
-
// signatures as upstream brepjs — so portable library sources only change the
|
|
262
|
-
// import specifier line (§8.2).
|
|
263
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
264
|
-
import { line as rawLine, wire as rawWire, wireLoop as rawWireLoop, face as rawFace, polygon as rawPolygon, } from '../../vendored/brepjs/topology/primitiveFns.js';
|
|
265
|
-
import { outerWire as rawOuterWire, getSurfaceType as rawSurfaceType, pointOnSurface as rawPointOnSurface, normalAt as rawNormalAt, faceCenter as rawFaceCenter, } from '../../vendored/brepjs/topology/faceFns.js';
|
|
266
|
-
import { sharedEdges as rawSharedEdges } from '../../vendored/brepjs/topology/adjacencyFns.js';
|
|
267
|
-
import { curveStartPoint as rawCurveStartPoint, curveEndPoint as rawCurveEndPoint, } from '../../vendored/brepjs/topology/curveFns.js';
|
|
268
|
-
import { translate as rawTranslate } from '../../vendored/brepjs/topology/transformFns.js';
|
|
269
|
-
import { rotate as rawRotate } from '../../vendored/brepjs/topology/transformFns.js';
|
|
270
|
-
import { isSolid as rawIsSolid } from '../../vendored/brepjs/core/shapeTypes.js';
|
|
271
|
-
import { isPlanarWire as rawIsPlanarWire } from '../../vendored/brepjs/core/validityTypes.js';
|
|
272
|
-
import { isValid as rawIsValid } from '../../vendored/brepjs/topology/healingFns.js';
|
|
273
|
-
export { rawLine as line, rawWire as wire, rawWireLoop as wireLoop, rawFace as face, rawPolygon as polygon, rawOuterWire as outerWire, rawSurfaceType as getSurfaceType, rawPointOnSurface as pointOnSurface, rawNormalAt as normalAt, rawFaceCenter as faceCenter, rawSharedEdges as sharedEdges, rawCurveStartPoint as curveStartPoint, rawCurveEndPoint as curveEndPoint, rawTranslate as translate, rawIsSolid as isSolid, rawIsPlanarWire as isPlanarWire, rawIsValid as isValid, };
|
|
274
|
-
// Upstream brepjs 18's `rotate` takes an axis through an `{ at, axis }` options
|
|
275
|
-
// object; the vendored tree (P5-locked commit) is the four-argument positional
|
|
276
|
-
// form. Export the upstream-aligned wrap so library code written for brepjs
|
|
277
|
-
// rotates with `rotate(shape, angle, { at?, axis? })`.
|
|
278
|
-
/**
|
|
279
|
-
* Rotate a shape by an angle in degrees around an axis.
|
|
280
|
-
* @param shape - The shape to rotate.
|
|
281
|
-
* @param angle - Rotation angle in degrees.
|
|
282
|
-
* @param options - Axis and pivot (`at`) for the rotation; defaults to the Z
|
|
283
|
-
* axis through the origin, matching upstream brepjs.
|
|
284
|
-
* @returns A new rotated shape.
|
|
285
|
-
*/
|
|
286
|
-
export function rotate(shape, angle, options = {}) {
|
|
287
|
-
return rawRotate(shape, angle, options.at ?? [0, 0, 0], options.axis ?? [0, 0, 1]);
|
|
288
|
-
}
|
|
4
|
+
* The vendored BREP TS tree (packages/brepjs) is deleted (裁决 9). Every
|
|
5
|
+
* op projection (primitives / booleans / evolutions / topology queries /
|
|
6
|
+
* sketching DSL / raw 2D-morph ports) is gone with it — those symbols have no
|
|
7
|
+
* receiver (裁决 1). What remains in this module is the ④ group only: the pure
|
|
8
|
+
* combinators / types inlined into core (§5.2) — Result, vectors, planes,
|
|
9
|
+
* errors, constants — which stay flat-exported from the core facade for
|
|
10
|
+
* library authors (import { ok, vecAdd } from '@faicad/faijs').
|
|
11
|
+
*/
|
|
12
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
13
|
+
// ④ combinators / pure helpers / types(2026-09-25 core-decouple:op 投影面
|
|
14
|
+
// ① ② ③ ⑤ 已随 vendored 树删除;④ 全部为 core 内联实现,保留为本文件的
|
|
15
|
+
// 唯一内容。vendored 句柄类型(Vertex/Edge/…/Shape3D/ValidSolid)随裁决 9 删除)
|
|
16
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
17
|
+
export { ok, err, isOk, isErr, unwrap, unwrapOr, map, andThen, } from '../../result/result.js';
|
|
18
|
+
export { vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize, } from './vecOps.js';
|
|
19
|
+
export { createPlane, createNamedPlane, resolvePlane, } from './planeOps.js';
|
|
20
|
+
export { kernelError, validationError } from '../../result/errors.js';
|
|
21
|
+
export { DEG2RAD, RAD2DEG } from './constants.js';
|
|
289
22
|
//# sourceMappingURL=index.js.map
|