@faicad/faijs 0.29.5 → 0.31.1
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/NOTICE +6 -5
- package/dist/api/align/index.d.ts +64 -0
- package/dist/api/align/index.d.ts.map +1 -0
- package/dist/api/align/index.js +101 -0
- package/dist/api/align/index.js.map +1 -0
- package/dist/api/api-namespace.d.ts +6 -5
- package/dist/api/api-namespace.d.ts.map +1 -1
- package/dist/api/api-namespace.js +89 -5
- package/dist/api/api-namespace.js.map +1 -1
- package/dist/api/appearance.d.ts +0 -2
- package/dist/api/appearance.d.ts.map +1 -1
- package/dist/api/appearance.js +0 -2
- package/dist/api/appearance.js.map +1 -1
- package/dist/api/assembly/entities.d.ts +1 -1
- package/dist/api/assembly/entities.js +1 -1
- package/dist/api/assembly/entities.js.map +1 -1
- package/dist/api/assembly/index.d.ts +1 -1
- package/dist/api/assembly/index.js +1 -1
- package/dist/api/assembly/index.js.map +1 -1
- package/dist/api/assembly/joints.d.ts +33 -15
- package/dist/api/assembly/joints.d.ts.map +1 -1
- package/dist/api/assembly/joints.js +31 -13
- package/dist/api/assembly/joints.js.map +1 -1
- package/dist/api/assembly/preview.d.ts +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 +1 -1
- package/dist/api/assembly/solve.js +1 -1
- package/dist/api/assembly/solve.js.map +1 -1
- package/dist/api/assembly/solvers/assembly-tree.d.ts +1 -1
- package/dist/api/assembly/solvers/assembly-tree.js +1 -1
- package/dist/api/assembly/solvers/assembly-tree.js.map +1 -1
- package/dist/api/assembly/solvers/chain-solver.d.ts +2 -2
- package/dist/api/assembly/solvers/chain-solver.js.map +1 -1
- package/dist/api/assembly/solvers/global-solver.d.ts +1 -2
- package/dist/api/assembly/solvers/global-solver.d.ts.map +1 -1
- package/dist/api/assembly/solvers/global-solver.js +3 -4
- package/dist/api/assembly/solvers/global-solver.js.map +1 -1
- package/dist/api/assembly/solvers/joints-kinematics.js +1 -1
- package/dist/api/assembly/solvers/joints-kinematics.js.map +1 -1
- package/dist/api/assembly/solvers/linalg.d.ts +2 -2
- package/dist/api/assembly/solvers/linalg.js +2 -2
- package/dist/api/assembly/solvers/linalg.js.map +1 -1
- package/dist/api/assembly/solvers/types.d.ts +2 -5
- package/dist/api/assembly/solvers/types.d.ts.map +1 -1
- package/dist/api/assembly/solvers/types.js +1 -4
- package/dist/api/assembly/solvers/types.js.map +1 -1
- package/dist/api/boolean-op/index.d.ts +65 -0
- package/dist/api/boolean-op/index.d.ts.map +1 -0
- package/dist/api/boolean-op/index.js +113 -0
- package/dist/api/boolean-op/index.js.map +1 -0
- package/dist/api/boolean.d.ts.map +1 -1
- package/dist/api/boolean.js +22 -33
- package/dist/api/boolean.js.map +1 -1
- package/dist/api/brep-mirror/booleanFns.d.ts +3 -3
- package/dist/api/brep-mirror/booleanFns.js +5 -5
- package/dist/api/brep-mirror/booleanFns.js.map +1 -1
- package/dist/api/brep-mirror/compoundFns.d.ts +1 -1
- package/dist/api/brep-mirror/compoundFns.js +4 -4
- package/dist/api/brep-mirror/compoundFns.js.map +1 -1
- package/dist/api/brep-mirror/healingFns.d.ts +4 -4
- package/dist/api/brep-mirror/healingFns.js +4 -4
- package/dist/api/brep-mirror/healingFns.js.map +1 -1
- package/dist/api/brep-mirror/hullFns.d.ts +2 -2
- package/dist/api/brep-mirror/hullFns.js +2 -2
- package/dist/api/brep-mirror/hullFns.js.map +1 -1
- package/dist/api/brep-mirror/patternFns.d.ts +5 -5
- package/dist/api/brep-mirror/patternFns.js +10 -10
- package/dist/api/brep-mirror/patternFns.js.map +1 -1
- package/dist/api/brep-mirror/primitiveFns.d.ts +4 -4
- package/dist/api/brep-mirror/primitiveFns.js +4 -4
- package/dist/api/brep-mirror/primitiveFns.js.map +1 -1
- package/dist/api/brep-mirror/roofFns.d.ts +3 -3
- package/dist/api/brep-mirror/roofFns.js +7 -7
- package/dist/api/brep-mirror/roofFns.js.map +1 -1
- package/dist/api/brep-mirror/sweepFns.d.ts +7 -7
- package/dist/api/brep-mirror/sweepFns.js +14 -14
- package/dist/api/brep-mirror/sweepFns.js.map +1 -1
- package/dist/api/brep-mirror/threadFns.d.ts +1 -1
- package/dist/api/brep-mirror/threadFns.js +1 -1
- package/dist/api/brep-mirror/threadFns.js.map +1 -1
- package/dist/api/brep-mirror/topologyFns.d.ts +5 -5
- package/dist/api/brep-mirror/topologyFns.js +8 -8
- package/dist/api/brep-mirror/topologyFns.js.map +1 -1
- package/dist/api/brep-operations/booleanFns.d.ts +40 -0
- package/dist/api/brep-operations/booleanFns.d.ts.map +1 -0
- package/dist/api/brep-operations/booleanFns.js +104 -0
- package/dist/api/brep-operations/booleanFns.js.map +1 -0
- package/dist/api/brep-operations/brepHelpers.d.ts +55 -0
- package/dist/api/brep-operations/brepHelpers.d.ts.map +1 -0
- package/dist/api/brep-operations/brepHelpers.js +131 -0
- package/dist/api/brep-operations/brepHelpers.js.map +1 -0
- package/dist/api/brep-operations/compoundFns.d.ts +46 -0
- package/dist/api/brep-operations/compoundFns.d.ts.map +1 -0
- package/dist/api/brep-operations/compoundFns.js +299 -0
- package/dist/api/brep-operations/compoundFns.js.map +1 -0
- package/dist/api/brep-operations/healingFns.d.ts +91 -0
- package/dist/api/brep-operations/healingFns.d.ts.map +1 -0
- package/dist/api/brep-operations/healingFns.js +321 -0
- package/dist/api/brep-operations/healingFns.js.map +1 -0
- package/dist/api/brep-operations/hullFns.d.ts +20 -0
- package/dist/api/brep-operations/hullFns.d.ts.map +1 -0
- package/dist/api/brep-operations/hullFns.js +46 -0
- package/dist/api/brep-operations/hullFns.js.map +1 -0
- package/dist/api/brep-operations/joinery-brep.d.ts +172 -0
- package/dist/api/brep-operations/joinery-brep.d.ts.map +1 -0
- package/dist/api/brep-operations/joinery-brep.js +463 -0
- package/dist/api/brep-operations/joinery-brep.js.map +1 -0
- package/dist/api/brep-operations/patternFns.d.ts +43 -0
- package/dist/api/brep-operations/patternFns.d.ts.map +1 -0
- package/dist/api/brep-operations/patternFns.js +178 -0
- package/dist/api/brep-operations/patternFns.js.map +1 -0
- package/dist/api/brep-operations/primitiveFns.d.ts +42 -0
- package/dist/api/brep-operations/primitiveFns.d.ts.map +1 -0
- package/dist/api/brep-operations/primitiveFns.js +104 -0
- package/dist/api/brep-operations/primitiveFns.js.map +1 -0
- package/dist/api/brep-operations/roofFns.d.ts +24 -0
- package/dist/api/brep-operations/roofFns.d.ts.map +1 -0
- package/dist/api/brep-operations/roofFns.js +229 -0
- package/dist/api/brep-operations/roofFns.js.map +1 -0
- package/dist/api/brep-operations/straightSkeleton.d.ts +36 -0
- package/dist/api/brep-operations/straightSkeleton.d.ts.map +1 -0
- package/dist/api/brep-operations/straightSkeleton.js +431 -0
- package/dist/api/brep-operations/straightSkeleton.js.map +1 -0
- package/dist/api/brep-operations/sweepFns.d.ts +60 -0
- package/dist/api/brep-operations/sweepFns.d.ts.map +1 -0
- package/dist/api/brep-operations/sweepFns.js +323 -0
- package/dist/api/brep-operations/sweepFns.js.map +1 -0
- package/dist/api/brep-operations/threadFns.d.ts +83 -0
- package/dist/api/brep-operations/threadFns.d.ts.map +1 -0
- package/dist/api/brep-operations/threadFns.js +138 -0
- package/dist/api/brep-operations/threadFns.js.map +1 -0
- package/dist/api/brep-operations/topologyFns.d.ts +111 -0
- package/dist/api/brep-operations/topologyFns.d.ts.map +1 -0
- package/dist/api/brep-operations/topologyFns.js +300 -0
- package/dist/api/brep-operations/topologyFns.js.map +1 -0
- package/dist/api/brep-topology.d.ts +1 -1
- package/dist/api/brep-topology.d.ts.map +1 -1
- package/dist/api/brep-topology.js +1 -1
- package/dist/api/brep-topology.js.map +1 -1
- package/dist/api/brepjs-compat/index.d.ts +1 -1
- package/dist/api/brepjs-compat/index.js +3 -3
- package/dist/api/brepjs-compat/index.js.map +1 -1
- package/dist/api/cadquery-selectors/borrow-bridge.d.ts.map +1 -1
- package/dist/api/cadquery-selectors/borrow-bridge.js +3 -4
- package/dist/api/cadquery-selectors/borrow-bridge.js.map +1 -1
- package/dist/api/chamfer.d.ts +5 -4
- package/dist/api/chamfer.d.ts.map +1 -1
- package/dist/api/chamfer.js +12 -11
- package/dist/api/chamfer.js.map +1 -1
- package/dist/api/curve-sketch/index.d.ts +235 -0
- package/dist/api/curve-sketch/index.d.ts.map +1 -0
- package/dist/api/curve-sketch/index.js +493 -0
- package/dist/api/curve-sketch/index.js.map +1 -0
- package/dist/api/draft.d.ts.map +1 -1
- package/dist/api/draft.js +1 -3
- package/dist/api/draft.js.map +1 -1
- package/dist/api/engrave.d.ts.map +1 -1
- package/dist/api/engrave.js +6 -15
- package/dist/api/engrave.js.map +1 -1
- package/dist/api/export-3mf.d.ts +73 -0
- package/dist/api/export-3mf.d.ts.map +1 -0
- package/dist/api/export-3mf.js +121 -0
- package/dist/api/export-3mf.js.map +1 -0
- package/dist/api/export-brep.d.ts +47 -0
- package/dist/api/export-brep.d.ts.map +1 -0
- package/dist/api/export-brep.js +67 -0
- package/dist/api/export-brep.js.map +1 -0
- package/dist/api/export-step.d.ts +67 -0
- package/dist/api/export-step.d.ts.map +1 -0
- package/dist/api/export-step.js +98 -0
- package/dist/api/export-step.js.map +1 -0
- package/dist/api/export-stl.d.ts +58 -0
- package/dist/api/export-stl.d.ts.map +1 -0
- package/dist/api/export-stl.js +114 -0
- package/dist/api/export-stl.js.map +1 -0
- package/dist/api/extrude.d.ts +8 -11
- package/dist/api/extrude.d.ts.map +1 -1
- package/dist/api/extrude.js +11 -14
- package/dist/api/extrude.js.map +1 -1
- package/dist/api/feature-repair.d.ts +1 -1
- package/dist/api/feature-repair.d.ts.map +1 -1
- package/dist/api/feature-repair.js +1 -7
- package/dist/api/feature-repair.js.map +1 -1
- package/dist/api/fillet-variable.d.ts +2 -2
- package/dist/api/fillet-variable.d.ts.map +1 -1
- package/dist/api/fillet-variable.js +2 -3
- package/dist/api/fillet-variable.js.map +1 -1
- package/dist/api/fillet.d.ts +5 -7
- package/dist/api/fillet.d.ts.map +1 -1
- package/dist/api/fillet.js +5 -8
- package/dist/api/fillet.js.map +1 -1
- package/dist/api/generated/2d.d.ts +4 -0
- package/dist/api/generated/2d.d.ts.map +1 -1
- package/dist/api/generated/2d.js +4 -0
- package/dist/api/generated/2d.js.map +1 -1
- package/dist/api/generated/core.d.ts +4 -0
- package/dist/api/generated/core.d.ts.map +1 -1
- package/dist/api/generated/core.js +4 -0
- package/dist/api/generated/core.js.map +1 -1
- package/dist/api/generated/gear.d.ts +4 -0
- package/dist/api/generated/gear.d.ts.map +1 -1
- package/dist/api/generated/gear.js +4 -0
- package/dist/api/generated/gear.js.map +1 -1
- package/dist/api/generated/io.d.ts +4 -0
- package/dist/api/generated/io.d.ts.map +1 -1
- package/dist/api/generated/io.js +4 -0
- package/dist/api/generated/io.js.map +1 -1
- package/dist/api/generated/kernel.d.ts +4 -0
- package/dist/api/generated/kernel.d.ts.map +1 -1
- package/dist/api/generated/kernel.js +4 -0
- package/dist/api/generated/kernel.js.map +1 -1
- package/dist/api/generated/measurement.d.ts +21 -21
- package/dist/api/generated/measurement.d.ts.map +1 -1
- package/dist/api/generated/measurement.js +25 -21
- package/dist/api/generated/measurement.js.map +1 -1
- package/dist/api/generated/ns.d.ts +4 -0
- package/dist/api/generated/ns.d.ts.map +1 -1
- package/dist/api/generated/ns.js +4 -0
- package/dist/api/generated/ns.js.map +1 -1
- package/dist/api/generated/operations.d.ts +32 -32
- package/dist/api/generated/operations.d.ts.map +1 -1
- package/dist/api/generated/operations.js +58 -54
- package/dist/api/generated/operations.js.map +1 -1
- package/dist/api/generated/projection.d.ts +4 -0
- package/dist/api/generated/projection.d.ts.map +1 -1
- package/dist/api/generated/projection.js +4 -0
- package/dist/api/generated/projection.js.map +1 -1
- package/dist/api/generated/query.d.ts +4 -0
- package/dist/api/generated/query.d.ts.map +1 -1
- package/dist/api/generated/query.js +4 -0
- package/dist/api/generated/query.js.map +1 -1
- package/dist/api/generated/script-face-manifest.d.ts +1 -1
- package/dist/api/generated/script-face-manifest.js +3 -3
- package/dist/api/generated/script-face-manifest.js.map +1 -1
- package/dist/api/generated/script-face.d.ts +1 -1
- package/dist/api/generated/script-face.js +1 -1
- package/dist/api/generated/script-face.js.map +1 -1
- package/dist/api/generated/sketching.d.ts +2 -2
- package/dist/api/generated/sketching.d.ts.map +1 -1
- package/dist/api/generated/sketching.js +8 -4
- package/dist/api/generated/sketching.js.map +1 -1
- package/dist/api/generated/text.d.ts +4 -0
- package/dist/api/generated/text.d.ts.map +1 -1
- package/dist/api/generated/text.js +4 -0
- package/dist/api/generated/text.js.map +1 -1
- package/dist/api/generated/topology.d.ts +45 -45
- package/dist/api/generated/topology.d.ts.map +1 -1
- package/dist/api/generated/topology.js +77 -73
- package/dist/api/generated/topology.js.map +1 -1
- package/dist/api/generated/view.d.ts +4 -0
- package/dist/api/generated/view.d.ts.map +1 -1
- package/dist/api/generated/view.js +4 -0
- package/dist/api/generated/view.js.map +1 -1
- package/dist/api/geom-types/constants.d.ts +11 -0
- package/dist/api/geom-types/constants.d.ts.map +1 -0
- package/dist/api/geom-types/constants.js +11 -0
- package/dist/api/geom-types/constants.js.map +1 -0
- package/dist/api/geom-types/index.d.ts +21 -0
- package/dist/api/geom-types/index.d.ts.map +1 -0
- package/dist/api/geom-types/index.js +22 -0
- package/dist/api/geom-types/index.js.map +1 -0
- package/dist/api/geom-types/planeOps.d.ts +98 -0
- package/dist/api/geom-types/planeOps.d.ts.map +1 -0
- package/dist/api/geom-types/planeOps.js +170 -0
- package/dist/api/geom-types/planeOps.js.map +1 -0
- package/dist/api/geom-types/planeTypes.d.ts +24 -0
- package/dist/api/geom-types/planeTypes.d.ts.map +1 -0
- package/dist/api/geom-types/planeTypes.js +8 -0
- package/dist/api/geom-types/planeTypes.js.map +1 -0
- package/dist/api/geom-types/types.d.ts +64 -0
- package/dist/api/geom-types/types.d.ts.map +1 -0
- package/dist/api/geom-types/types.js +48 -0
- package/dist/api/geom-types/types.js.map +1 -0
- package/dist/api/geom-types/vecOps.d.ts +124 -0
- package/dist/api/geom-types/vecOps.d.ts.map +1 -0
- package/dist/api/geom-types/vecOps.js +202 -0
- package/dist/api/geom-types/vecOps.js.map +1 -0
- package/dist/api/geom.d.ts.map +1 -1
- package/dist/api/geom.js +6 -5
- package/dist/api/geom.js.map +1 -1
- package/dist/api/half-space.d.ts +56 -0
- package/dist/api/half-space.d.ts.map +1 -0
- package/dist/api/half-space.js +82 -0
- package/dist/api/half-space.js.map +1 -0
- package/dist/api/helix.d.ts +11 -2
- package/dist/api/helix.d.ts.map +1 -1
- package/dist/api/helix.js +20 -4
- package/dist/api/helix.js.map +1 -1
- package/dist/api/index.d.ts +19 -7
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +44 -11
- package/dist/api/index.js.map +1 -1
- package/dist/api/internal/compat-op.d.ts +10 -36
- package/dist/api/internal/compat-op.d.ts.map +1 -1
- package/dist/api/internal/compat-op.js +17 -51
- package/dist/api/internal/compat-op.js.map +1 -1
- package/dist/api/internal/compat-projection.d.ts +5 -5
- package/dist/api/internal/compat-projection.js +5 -5
- package/dist/api/internal/compat-projection.js.map +1 -1
- package/dist/api/internal/dual-form-args.d.ts +0 -2
- package/dist/api/internal/dual-form-args.d.ts.map +1 -1
- package/dist/api/internal/dual-form-args.js +1 -3
- package/dist/api/internal/dual-form-args.js.map +1 -1
- package/dist/api/internal/export-members.d.ts +80 -0
- package/dist/api/internal/export-members.d.ts.map +1 -0
- package/dist/api/internal/export-members.js +104 -0
- package/dist/api/internal/export-members.js.map +1 -0
- package/dist/api/internal/l3-bridge.d.ts +22 -37
- package/dist/api/internal/l3-bridge.d.ts.map +1 -1
- package/dist/api/internal/l3-bridge.js +30 -77
- package/dist/api/internal/l3-bridge.js.map +1 -1
- package/dist/api/internal/profile-wire.d.ts +1 -1
- package/dist/api/internal/profile-wire.js +1 -1
- package/dist/api/internal/profile-wire.js.map +1 -1
- package/dist/api/internal/result-unwrap.d.ts +4 -6
- package/dist/api/internal/result-unwrap.d.ts.map +1 -1
- package/dist/api/internal/result-unwrap.js +4 -6
- package/dist/api/internal/result-unwrap.js.map +1 -1
- package/dist/api/knurl.d.ts.map +1 -1
- package/dist/api/knurl.js +5 -3
- package/dist/api/knurl.js.map +1 -1
- package/dist/api/loft.d.ts +2 -2
- package/dist/api/loft.d.ts.map +1 -1
- package/dist/api/loft.js +2 -2
- package/dist/api/loft.js.map +1 -1
- package/dist/api/measure-query/index.d.ts +262 -0
- package/dist/api/measure-query/index.d.ts.map +1 -0
- package/dist/api/measure-query/index.js +390 -0
- package/dist/api/measure-query/index.js.map +1 -0
- package/dist/api/measurement/index.d.ts +3 -3
- package/dist/api/measurement/index.js +3 -3
- package/dist/api/measurement/index.js.map +1 -1
- package/dist/api/meta.d.ts +0 -2
- package/dist/api/meta.d.ts.map +1 -1
- package/dist/api/meta.js +0 -2
- package/dist/api/meta.js.map +1 -1
- package/dist/api/offset2d.d.ts +49 -0
- package/dist/api/offset2d.d.ts.map +1 -0
- package/dist/api/offset2d.js +86 -0
- package/dist/api/offset2d.js.map +1 -0
- package/dist/api/pattern.d.ts.map +1 -1
- package/dist/api/pattern.js +3 -6
- package/dist/api/pattern.js.map +1 -1
- package/dist/api/primitives.d.ts +6 -6
- package/dist/api/primitives.d.ts.map +1 -1
- package/dist/api/primitives.js +19 -17
- package/dist/api/primitives.js.map +1 -1
- package/dist/api/profile.d.ts.map +1 -1
- package/dist/api/profile.js +0 -1
- package/dist/api/profile.js.map +1 -1
- package/dist/api/punch-hole.d.ts.map +1 -1
- package/dist/api/punch-hole.js +0 -1
- package/dist/api/punch-hole.js.map +1 -1
- package/dist/api/replicate.d.ts +6 -8
- package/dist/api/replicate.d.ts.map +1 -1
- package/dist/api/replicate.js +27 -65
- package/dist/api/replicate.js.map +1 -1
- package/dist/api/result.d.ts +1 -1
- package/dist/api/result.js +1 -1
- package/dist/api/result.js.map +1 -1
- package/dist/api/revolve.d.ts +2 -2
- package/dist/api/revolve.js +3 -3
- package/dist/api/revolve.js.map +1 -1
- package/dist/api/screw.d.ts +1 -1
- package/dist/api/screw.d.ts.map +1 -1
- package/dist/api/screw.js +5 -4
- package/dist/api/screw.js.map +1 -1
- package/dist/api/sdf.d.ts.map +1 -1
- package/dist/api/sdf.js +3 -2
- package/dist/api/sdf.js.map +1 -1
- package/dist/api/section-by-plane.d.ts.map +1 -1
- package/dist/api/section-by-plane.js +0 -1
- package/dist/api/section-by-plane.js.map +1 -1
- package/dist/api/shape-type/index.d.ts +141 -0
- package/dist/api/shape-type/index.d.ts.map +1 -0
- package/dist/api/shape-type/index.js +182 -0
- package/dist/api/shape-type/index.js.map +1 -0
- package/dist/api/shell.d.ts +2 -2
- package/dist/api/shell.d.ts.map +1 -1
- package/dist/api/shell.js +12 -3
- package/dist/api/shell.js.map +1 -1
- package/dist/api/sketch-on-face.d.ts +3 -3
- package/dist/api/sketch-on-face.d.ts.map +1 -1
- package/dist/api/sketch-on-face.js +6 -4
- package/dist/api/sketch-on-face.js.map +1 -1
- package/dist/api/sketch-on-plane.d.ts.map +1 -1
- package/dist/api/sketch-on-plane.js +0 -1
- package/dist/api/sketch-on-plane.js.map +1 -1
- package/dist/api/solid-from-faces.d.ts +45 -0
- package/dist/api/solid-from-faces.d.ts.map +1 -0
- package/dist/api/solid-from-faces.js +72 -0
- package/dist/api/solid-from-faces.js.map +1 -0
- package/dist/api/solid-offset/index.d.ts +67 -0
- package/dist/api/solid-offset/index.d.ts.map +1 -0
- package/dist/api/solid-offset/index.js +132 -0
- package/dist/api/solid-offset/index.js.map +1 -0
- package/dist/api/split-by-plane.d.ts.map +1 -1
- package/dist/api/split-by-plane.js +0 -1
- package/dist/api/split-by-plane.js.map +1 -1
- package/dist/api/split.d.ts +1 -1
- package/dist/api/split.js +1 -1
- package/dist/api/split.js.map +1 -1
- package/dist/api/surface/arg-spec.d.ts +37 -44
- package/dist/api/surface/arg-spec.d.ts.map +1 -1
- package/dist/api/surface/arg-spec.js +224 -233
- package/dist/api/surface/arg-spec.js.map +1 -1
- package/dist/api/surface-face/index.d.ts +104 -0
- package/dist/api/surface-face/index.d.ts.map +1 -0
- package/dist/api/surface-face/index.js +217 -0
- package/dist/api/surface-face/index.js.map +1 -0
- package/dist/api/surface.d.ts +44 -0
- package/dist/api/surface.d.ts.map +1 -0
- package/dist/api/surface.js +66 -0
- package/dist/api/surface.js.map +1 -0
- package/dist/api/sweep.d.ts +71 -9
- package/dist/api/sweep.d.ts.map +1 -1
- package/dist/api/sweep.js +13 -6
- package/dist/api/sweep.js.map +1 -1
- package/dist/api/thicken.d.ts +1 -1
- package/dist/api/thicken.d.ts.map +1 -1
- package/dist/api/thicken.js +12 -3
- package/dist/api/thicken.js.map +1 -1
- package/dist/api/transform.d.ts +8 -8
- package/dist/api/transform.d.ts.map +1 -1
- package/dist/api/transform.js +58 -27
- package/dist/api/transform.js.map +1 -1
- package/dist/api/view/cameraFns.d.ts +1 -1
- package/dist/api/view/cameraFns.d.ts.map +1 -1
- package/dist/api/view/cameraFns.js +1 -1
- package/dist/api/view/cameraFns.js.map +1 -1
- package/dist/api/view/index.d.ts +0 -2
- package/dist/api/view/index.d.ts.map +1 -1
- package/dist/api/view/index.js +0 -2
- package/dist/api/view/index.js.map +1 -1
- package/dist/api/view/projectionPlanes.d.ts +1 -1
- package/dist/api/view/projectionPlanes.d.ts.map +1 -1
- package/dist/api/view/projectionPlanes.js.map +1 -1
- package/dist/api/view/view-camera.d.ts +7 -9
- package/dist/api/view/view-camera.d.ts.map +1 -1
- package/dist/api/view/view-camera.js +4 -6
- package/dist/api/view/view-camera.js.map +1 -1
- package/dist/api/view/view-projection.d.ts +0 -2
- package/dist/api/view/view-projection.d.ts.map +1 -1
- package/dist/api/view/view-projection.js +0 -2
- package/dist/api/view/view-projection.js.map +1 -1
- package/dist/api/view/view-sheet.d.ts +0 -2
- package/dist/api/view/view-sheet.d.ts.map +1 -1
- package/dist/api/view/view-sheet.js +0 -2
- package/dist/api/view/view-sheet.js.map +1 -1
- package/dist/api/view-export/index.d.ts +97 -0
- package/dist/api/view-export/index.d.ts.map +1 -0
- package/dist/api/view-export/index.js +118 -0
- package/dist/api/view-export/index.js.map +1 -0
- package/dist/boolean/index.d.ts +23 -0
- package/dist/boolean/index.d.ts.map +1 -0
- package/dist/boolean/index.js +27 -0
- package/dist/boolean/index.js.map +1 -0
- package/dist/brep/brep-chain.d.ts +1 -19
- package/dist/brep/brep-chain.d.ts.map +1 -1
- package/dist/brep/brep-chain.js +0 -1
- package/dist/brep/brep-chain.js.map +1 -1
- package/dist/brep/brep-ops.d.ts +93 -2
- package/dist/brep/brep-ops.d.ts.map +1 -1
- package/dist/brep/brep-ops.js +185 -15
- package/dist/brep/brep-ops.js.map +1 -1
- package/dist/brep/brep-topology.d.ts +20 -0
- package/dist/brep/brep-topology.d.ts.map +1 -1
- package/dist/brep/brep-topology.js +46 -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 +0 -3
- package/dist/brep/engine/adapters/brep-mock.js.map +1 -1
- package/dist/brep/engine/adapters/brepkit.d.ts +4 -3
- package/dist/brep/engine/adapters/brepkit.d.ts.map +1 -1
- package/dist/brep/engine/adapters/brepkit.js +4 -98
- package/dist/brep/engine/adapters/brepkit.js.map +1 -1
- package/dist/brep/engine/adapters/occt.d.ts +1 -1
- package/dist/brep/engine/adapters/occt.d.ts.map +1 -1
- package/dist/brep/engine/adapters/occt.js +4 -148
- package/dist/brep/engine/adapters/occt.js.map +1 -1
- package/dist/brep/engine/native-history.d.ts +27 -0
- package/dist/brep/engine/native-history.d.ts.map +1 -0
- package/dist/brep/engine/native-history.js +54 -0
- package/dist/brep/engine/native-history.js.map +1 -0
- package/dist/brep/engine/primitives.d.ts +2 -3
- package/dist/brep/engine/primitives.d.ts.map +1 -1
- package/dist/brep/engine/primitives.js +1 -2
- package/dist/brep/engine/primitives.js.map +1 -1
- package/dist/brep/engine/registry.d.ts +3 -5
- package/dist/brep/engine/registry.d.ts.map +1 -1
- package/dist/brep/engine/registry.js +2 -2
- package/dist/brep/engine/registry.js.map +1 -1
- package/dist/brep/engine/types.d.ts +35 -77
- package/dist/brep/engine/types.d.ts.map +1 -1
- package/dist/brep/engine/types.js.map +1 -1
- package/dist/brep/export/export-model.d.ts +21 -0
- package/dist/brep/export/export-model.d.ts.map +1 -1
- package/dist/brep/export/export-model.js +171 -73
- package/dist/brep/export/export-model.js.map +1 -1
- package/dist/brep/export/step.d.ts +17 -1
- package/dist/brep/export/step.d.ts.map +1 -1
- package/dist/brep/export/step.js +133 -0
- package/dist/brep/export/step.js.map +1 -1
- package/dist/brep/export/stl.d.ts +22 -1
- package/dist/brep/export/stl.d.ts.map +1 -1
- package/dist/brep/export/stl.js +58 -10
- package/dist/brep/export/stl.js.map +1 -1
- package/dist/brep/export/transform12.d.ts +47 -0
- package/dist/brep/export/transform12.d.ts.map +1 -0
- package/dist/brep/export/transform12.js +87 -0
- package/dist/brep/export/transform12.js.map +1 -0
- package/dist/brep/face-evolution.d.ts +53 -0
- package/dist/brep/face-evolution.d.ts.map +1 -1
- package/dist/brep/face-evolution.js +65 -0
- package/dist/brep/face-evolution.js.map +1 -1
- package/dist/brep/handle-bridge.d.ts +2 -2
- package/dist/brep/handle-bridge.js +2 -2
- package/dist/brep/handle-bridge.js.map +1 -1
- package/dist/brep/index.d.ts +6 -3
- package/dist/brep/index.d.ts.map +1 -1
- package/dist/brep/index.js +6 -3
- package/dist/brep/index.js.map +1 -1
- package/dist/brepkit-kernel/brepkitKernel.d.ts +1 -1
- package/dist/brepkit-kernel/brepkitKernel.js +2 -2
- package/dist/brepkit-kernel/brepkitKernel.js.map +1 -1
- package/dist/browser-host/index.d.ts +4 -1
- package/dist/browser-host/index.d.ts.map +1 -1
- package/dist/browser-host/index.js +7 -1
- package/dist/browser-host/index.js.map +1 -1
- package/dist/browser.d.ts +5 -9
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +5 -26
- package/dist/browser.js.map +1 -1
- package/dist/cad-runtime/admit-compat-lib.d.ts +3 -10
- package/dist/cad-runtime/admit-compat-lib.d.ts.map +1 -1
- package/dist/cad-runtime/admit-compat-lib.js +3 -9
- package/dist/cad-runtime/admit-compat-lib.js.map +1 -1
- package/dist/cad-runtime/backend-dispatch.d.ts +13 -58
- package/dist/cad-runtime/backend-dispatch.d.ts.map +1 -1
- package/dist/cad-runtime/backend-dispatch.js +34 -83
- package/dist/cad-runtime/backend-dispatch.js.map +1 -1
- package/dist/cad-runtime/content-key.d.ts +3 -3
- package/dist/cad-runtime/content-key.js +3 -3
- package/dist/cad-runtime/content-key.js.map +1 -1
- package/dist/cad-runtime/direct-executor.d.ts +6 -3
- package/dist/cad-runtime/direct-executor.d.ts.map +1 -1
- package/dist/cad-runtime/direct-executor.js +31 -9
- package/dist/cad-runtime/direct-executor.js.map +1 -1
- package/dist/cad-runtime/interp/env.d.ts +1 -1
- package/dist/cad-runtime/interp/env.js.map +1 -1
- package/dist/cad-runtime/lib-id.d.ts +0 -2
- package/dist/cad-runtime/lib-id.d.ts.map +1 -1
- package/dist/cad-runtime/lib-id.js +0 -2
- package/dist/cad-runtime/lib-id.js.map +1 -1
- package/dist/cad-runtime/live-shapes.d.ts +3 -5
- package/dist/cad-runtime/live-shapes.d.ts.map +1 -1
- package/dist/cad-runtime/live-shapes.js +8 -10
- package/dist/cad-runtime/live-shapes.js.map +1 -1
- package/dist/cad-runtime/ports.d.ts +31 -3
- package/dist/cad-runtime/ports.d.ts.map +1 -1
- package/dist/cad-runtime/ports.js.map +1 -1
- package/dist/cad-runtime/runtime.d.ts +54 -19
- package/dist/cad-runtime/runtime.d.ts.map +1 -1
- package/dist/cad-runtime/runtime.js +89 -54
- package/dist/cad-runtime/runtime.js.map +1 -1
- package/dist/define-op.d.ts +10 -14
- package/dist/define-op.d.ts.map +1 -1
- package/dist/define-op.js +5 -22
- package/dist/define-op.js.map +1 -1
- package/dist/env-agnostic.d.ts +2 -2
- package/dist/env-agnostic.d.ts.map +1 -1
- package/dist/env-agnostic.js +1 -1
- package/dist/env-agnostic.js.map +1 -1
- package/dist/geometry2d/bridge/plane.d.ts +1 -1
- package/dist/geometry2d/bridge/plane.js +1 -1
- package/dist/geometry2d/bridge/plane.js.map +1 -1
- package/dist/geometry2d/curve2d.d.ts +1 -1
- package/dist/geometry2d/curve2d.js +1 -1
- package/dist/geometry2d/curve2d.js.map +1 -1
- package/dist/index.d.ts +14 -65
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -70
- package/dist/index.js.map +1 -1
- package/dist/io/fai-zip/container-read.d.ts +16 -0
- package/dist/io/fai-zip/container-read.d.ts.map +1 -1
- package/dist/io/fai-zip/container-read.js +22 -0
- package/dist/io/fai-zip/container-read.js.map +1 -1
- package/dist/io/fai-zip/index.d.ts +1 -1
- package/dist/io/fai-zip/index.d.ts.map +1 -1
- package/dist/io/fai-zip/index.js +1 -1
- package/dist/io/fai-zip/index.js.map +1 -1
- package/dist/lang/code-to-args.d.ts.map +1 -1
- package/dist/lang/code-to-args.js +10 -1
- package/dist/lang/code-to-args.js.map +1 -1
- package/dist/lang/determinism-scanner.d.ts.map +1 -1
- package/dist/lang/determinism-scanner.js +22 -9
- package/dist/lang/determinism-scanner.js.map +1 -1
- package/dist/lang/metadata-extractor.d.ts +27 -6
- package/dist/lang/metadata-extractor.d.ts.map +1 -1
- package/dist/lang/metadata-extractor.js +88 -8
- package/dist/lang/metadata-extractor.js.map +1 -1
- package/dist/lang/parse-error.d.ts +4 -0
- package/dist/lang/parse-error.d.ts.map +1 -1
- package/dist/lang/parse-error.js.map +1 -1
- package/dist/lang/security-scanner.d.ts +27 -2
- package/dist/lang/security-scanner.d.ts.map +1 -1
- package/dist/lang/security-scanner.js +29 -2
- package/dist/lang/security-scanner.js.map +1 -1
- package/dist/lang/source-edit.d.ts +2 -2
- package/dist/lang/source-edit.js.map +1 -1
- package/dist/lang/symbol-table.generated.d.ts +53 -0
- package/dist/lang/symbol-table.generated.d.ts.map +1 -1
- package/dist/lang/symbol-table.generated.js +53 -0
- package/dist/lang/symbol-table.generated.js.map +1 -1
- package/dist/mesh/import-model.d.ts +94 -0
- package/dist/mesh/import-model.d.ts.map +1 -0
- package/dist/mesh/import-model.js +15 -0
- package/dist/mesh/import-model.js.map +1 -0
- package/dist/mesh/index.d.ts +19 -63
- package/dist/mesh/index.d.ts.map +1 -1
- package/dist/mesh/index.js +19 -72
- package/dist/mesh/index.js.map +1 -1
- package/dist/mesh/io.d.ts +62 -17
- package/dist/mesh/io.d.ts.map +1 -1
- package/dist/mesh/io.js +210 -41
- package/dist/mesh/io.js.map +1 -1
- package/dist/mesh/primitives.js +1 -1
- package/dist/mesh/primitives.js.map +1 -1
- package/dist/mesh/threemf-bambu.d.ts +12 -1
- package/dist/mesh/threemf-bambu.d.ts.map +1 -1
- package/dist/mesh/threemf-bambu.js +68 -16
- package/dist/mesh/threemf-bambu.js.map +1 -1
- package/dist/mesh/threemf-loader.d.ts +52 -5
- package/dist/mesh/threemf-loader.d.ts.map +1 -1
- package/dist/mesh/threemf-loader.js +139 -41
- package/dist/mesh/threemf-loader.js.map +1 -1
- package/dist/mesh/transform.d.ts +1 -1
- package/dist/mesh/transform.js +1 -1
- package/dist/mesh/transform.js.map +1 -1
- package/dist/mesh/types.d.ts +35 -5
- package/dist/mesh/types.d.ts.map +1 -1
- package/dist/mesh/types.js.map +1 -1
- package/dist/node-host/cli.d.ts +49 -1
- package/dist/node-host/cli.d.ts.map +1 -1
- package/dist/node-host/cli.js +125 -19
- package/dist/node-host/cli.js.map +1 -1
- package/dist/node-host/execute-script.d.ts +56 -0
- package/dist/node-host/execute-script.d.ts.map +1 -0
- package/dist/node-host/execute-script.js +47 -0
- package/dist/node-host/execute-script.js.map +1 -0
- package/dist/node-host/index.d.ts +1 -0
- package/dist/node-host/index.d.ts.map +1 -1
- package/dist/node-host/index.js +4 -0
- package/dist/node-host/index.js.map +1 -1
- package/dist/node.d.ts +2 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +3 -0
- package/dist/node.js.map +1 -1
- package/dist/occt-kernel/generated/occtPlatform.generated.d.ts +260 -0
- package/dist/occt-kernel/generated/occtPlatform.generated.d.ts.map +1 -0
- package/dist/occt-kernel/generated/occtPlatform.generated.js +875 -0
- package/dist/occt-kernel/generated/occtPlatform.generated.js.map +1 -0
- package/dist/occt-kernel/hullGeometry.d.ts +2 -2
- package/dist/occt-kernel/hullGeometry.js +2 -3
- package/dist/occt-kernel/hullGeometry.js.map +1 -1
- package/dist/occt-kernel/hullOps.d.ts +3 -3
- package/dist/occt-kernel/hullOps.js +4 -4
- package/dist/occt-kernel/hullOps.js.map +1 -1
- package/dist/occt-kernel/occt-primitives.d.ts.map +1 -1
- package/dist/occt-kernel/occt-primitives.js +31 -4
- package/dist/occt-kernel/occt-primitives.js.map +1 -1
- package/dist/occt-kernel/occtKernel.d.ts.map +1 -1
- package/dist/occt-kernel/occtKernel.js +18 -0
- package/dist/occt-kernel/occtKernel.js.map +1 -1
- package/dist/occt-scan/recognize.d.ts +58 -0
- package/dist/occt-scan/recognize.d.ts.map +1 -0
- package/dist/occt-scan/recognize.js +216 -0
- package/dist/occt-scan/recognize.js.map +1 -0
- package/dist/primitives/brep-primitives.js +7 -7
- package/dist/primitives/brep-primitives.js.map +1 -1
- package/dist/primitives/index.d.ts +19 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +21 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/result/bug.d.ts +1 -1
- package/dist/result/bug.js +1 -1
- package/dist/result/bug.js.map +1 -1
- package/dist/result/errors.d.ts +2 -2
- package/dist/result/errors.d.ts.map +1 -1
- package/dist/result/errors.js +1 -1
- package/dist/result/errors.js.map +1 -1
- package/dist/result/vec3.d.ts +1 -1
- package/dist/result/vec3.js +1 -1
- package/dist/result/vec3.js.map +1 -1
- package/dist/runtime-state.d.ts +79 -29
- package/dist/runtime-state.d.ts.map +1 -1
- package/dist/runtime-state.js +84 -0
- package/dist/runtime-state.js.map +1 -1
- package/dist/script-globals.d.ts +24 -0
- package/dist/script-globals.d.ts.map +1 -0
- package/dist/script-globals.js +24 -0
- package/dist/script-globals.js.map +1 -0
- package/dist/sdf/index.d.ts +12 -0
- package/dist/sdf/index.d.ts.map +1 -0
- package/dist/sdf/index.js +13 -0
- package/dist/sdf/index.js.map +1 -0
- package/dist/sdk.d.ts +0 -1
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js.map +1 -1
- package/dist/shape.d.ts +24 -0
- package/dist/shape.d.ts.map +1 -1
- package/dist/shape.js +40 -0
- package/dist/shape.js.map +1 -1
- package/dist/topology/naming/lineage.d.ts +3 -2
- package/dist/topology/naming/lineage.d.ts.map +1 -1
- package/dist/topology/naming/lineage.js.map +1 -1
- package/dist/weapp.d.ts +3 -3
- package/dist/weapp.d.ts.map +1 -1
- package/dist/weapp.js +2 -2
- package/dist/weapp.js.map +1 -1
- package/package.json +283 -44
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"face-evolution.js","sourceRoot":"","sources":["../../src/brep/face-evolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,EAAE,aAAa,EAAoB,MAAM,2BAA2B,CAAA;AAE3E,wDAAwD;AACxD,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAA;AAW1C;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,MAAqB,EAAE,KAAiB;IACpE,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAA;AAC3E,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAqB,EACrB,MAAkB,EAClB,MAAkB;IAElB,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,MAAM,OA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C;IACD,MAAM,eAAe,GAAG,YAAY,CAAC,MAAM,CACzC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,CAC5D,CAAA;IAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAA;IACrC,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAoB,CAAA;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChD,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,CAAE,CAAC,CAAC,CAAA;QAClD,CAAC;QACD,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IAClC,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,CAAA;AACzD,CAAC;AAED,uEAAuE;AACvE,SAAS,wBAAwB,CAC/B,KAAoC,EACpC,SAAwB;IAExB,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAA;IAC1C,KAAK,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,KAAK,EAAE,CAAC;QAC1C,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,WAAqD,EAAE,SAAS,CAAC,CAAC,CAAA;IAC5G,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["/**\n * 面演化(face evolution)工具:hash 映射 ↔ ordinal 映射转换\n *\n * @platform occt — 本文件 import occt-kernel(translateWithHashEvolution /\n * scaleWithHashEvolution / directEditWithRoleTable(chamfer 分支) 走 occt-only\n * `*WithHistory` 原生面,D3)。文件级标注满足守卫①(平台 import 自证身份);\n * 文件内的**中立函数**(getFaceHashes/decodeEvolution/booleanWithRoleTable/\n * identityHashEvolution 等只用 L1 BrepEngineApi)不因标注改变函数级中立性——\n * 调用它们的**中立 op**(rotate_euler/scale3d/fillet/boolean 等)不声明 engines,\n * 运行时不拦截(与 replicate.ts 同口径)。\n *\n * See docs/api-contract.md §11 (topology contract) for face evolution context.\n *\n * occt-wasm 的 *WithHistory API 返回 BrepEvolutionData,其中 modified/generated\n * 用面 hash(内存指针哈希)编码。本模块将其解码为 ordinal 映射(面枚举序号),\n * 可安全持久化进 faijs 文本。\n *\n * 核心原理(分析文档 §4.4):\n * getSubShapes(shape,'face')[i] ↔ subShapeHashes(shape,'face',B)[i] 一一对应\n * 因此可以把 hash 映射无损转换为 ordinal 映射。\n */\n\nimport type { BrepHandle, BrepEvolutionData } from './engine/types'\nimport type { BrepEngineApi } from './engine/primitives'\nimport { getOcctKernel, type ShapeHandle } from '../occt-kernel/occtKernel'\n\n/** hash 上界(与 occt-wasm kernel.cpp 一致:`% 2147483647`) */\nexport const HASH_UPPER_BOUND = 2147483647\n\n/**\n * 面演化映射:输入面 ordinal → 输出面 ordinal 列表\n *\n * - 1→1:面被修改但未被切割(如面带孔仍是单面)\n * - 1→N:面被切割成多个面\n * - 不在 map 中:面未被修改或被删除\n */\nexport type FaceEvolution = Map<number, number[]>\n\n/**\n * Collect the hash list of all faces of a shape (via subShapeHashes; efficient, no handles allocated).\n * @param kernel - the OCCT kernel.\n * @param shape - the shape whose face hashes to collect.\n * @returns the array of face hashes.\n */\nexport function getFaceHashes(kernel: BrepEngineApi, shape: BrepHandle): number[] {\n return Array.from(kernel.subShapeHashes(shape, 'face', HASH_UPPER_BOUND))\n}\n\n/**\n * Collect the union of face hashes of two shapes (for WithHistory calls of binary boolean operations).\n *\n * Analysis doc §4.2: fuse/cut/intersect must pass subShapeHashes(A) ∪ subShapeHashes(B)\n * to track both inputs' face evolution.\n * @param kernel - the OCCT kernel.\n * @param shapeA - the first input shape.\n * @param shapeB - the second input shape.\n * @returns the union of the two shapes' face hashes.\n */\nexport function getUnionFaceHashes(\n kernel: BrepEngineApi,\n shapeA: BrepHandle,\n shapeB: BrepHandle,\n): number[] {\n const hashesA = getFaceHashes(kernel, shapeA)\n const hashesB = getFaceHashes(kernel, shapeB)\n return [...new Set([...hashesA, ...hashesB])]\n}\n\n/**\n * 解码 BrepEvolutionData 的 modified 数组为 ordinal 映射。\n *\n * modified 分段编码格式:[inputHash, count, outHash1, outHash2, ...] × N\n *\n * @param kernel the OCCT kernel.\n * @param evo the BrepEvolutionData (from a *WithHistory API).\n * @param inputShape the input shape (for the input face hash → ordinal mapping).\n * @param resultShape the result shape (for the output face hash → ordinal mapping).\n * @returns the FaceEvolution: inOrdinal → outOrdinal[].\n */\nexport function decodeEvolution(\n kernel: BrepEngineApi,\n evo: BrepEvolutionData,\n inputShape: BrepHandle,\n resultShape: BrepHandle,\n): FaceEvolution {\n const inputHashes = getFaceHashes(kernel, inputShape)\n const resultHashes = getFaceHashes(kernel, resultShape)\n\n // 构建 hash → ordinal 查找表\n const resultHashToOrdinal = new Map<number, number>()\n for (let i = 0; i < resultHashes.length; i++) {\n resultHashToOrdinal.set(resultHashes[i], i)\n }\n const inputHashToOrdinal = new Map<number, number>()\n for (let i = 0; i < inputHashes.length; i++) {\n inputHashToOrdinal.set(inputHashes[i], i)\n }\n\n // 解码 modified 数组\n const evolution: FaceEvolution = new Map()\n const modified = evo.modified\n let idx = 0\n while (idx < modified.length) {\n const inHash = modified[idx]\n const count = modified[idx + 1]\n const outOrdinals: number[] = []\n for (let j = 0; j < count; j++) {\n const outHash = modified[idx + 2 + j]\n const outOrdinal = resultHashToOrdinal.get(outHash)\n if (outOrdinal !== undefined) {\n outOrdinals.push(outOrdinal)\n }\n }\n const inOrdinal = inputHashToOrdinal.get(inHash)\n if (inOrdinal !== undefined) {\n evolution.set(inOrdinal, outOrdinals)\n }\n idx += 2 + count\n }\n\n return evolution\n}\n\n\n/**\n * Hash 键面演化:输入面 hash → 输出面 hash 列表(1→多分裂时多个)。\n *\n * 与序号键 FaceEvolution 并列、同源(同一次 *WithHistory 打包结果解出),\n * 一个供 role 传播(hash 键)、一个供选择器/文本(序号键),零额外 wasm 调用。\n */\nexport interface HashEvolution {\n /** 输入面 hash → 输出面 hash 列表(1→多分裂时多个)。 */\n readonly modified: ReadonlyMap<number, readonly number[]>\n /** 输入面中已不存在的面 hash。 */\n readonly deleted: ReadonlySet<number>\n}\n\n/**\n * 把 BrepEvolutionData 解码为 hash 键演化(§2.4)。\n *\n * modified 分段编码格式:[inHash, count, outHash1, ...] × N —— 本身就是\n * hash→hash[] 的 1→多映射,直接按同一格式解出 hash 键版本,不需要\n * getSubShapes 逐句柄 hashCode,也不分配任何句柄。\n *\n * generated 刻意不进 role 传播。**实测依据(2026-09-22,`brep/engine/phase0-kernel-probes.test.ts`)**:\n * `generated` 与 `modified` **同构分段、键集相同**,其值是各输入面派生出的**中间形**——\n * `cut` 实测 12 个 hash、结果里 **0 个存活**(`fillet`/`fuse` 里整个桶为空)。\n * ⇒ 新造面**不能**由 `generated` 定位,只能由\"三类命运\"的补集判定\n * (既不在输入 hash 集合、也不在任何 `modified` 输出里),再交 `construct`/派生词汇命名。\n *\n * @param evo - the BrepEvolutionData (from a *WithHistory API).\n * @returns the hash-keyed evolution.\n */\nexport function decodeHashEvolution(evo: BrepEvolutionData): HashEvolution {\n const modified = new Map<number, number[]>()\n const m = evo.modified\n let idx = 0\n while (idx < m.length) {\n const inHash = m[idx]\n const count = m[idx + 1]\n const outHashes: number[] = []\n for (let j = 0; j < count; j++) {\n outHashes.push(m[idx + 2 + j])\n }\n modified.set(inHash, outHashes)\n idx += 2 + count\n }\n return { modified, deleted: new Set(evo.deleted) }\n}\n\n/**\n * 把一次双输入布尔(cut/fuse/intersect)的打包演化按「inHash 属于 A 还是 B」\n * 拆成 A、B 两张 hash 演化(§3.4 布尔合流,faijs 对 brepjs 的必要扩展)。\n *\n * 现有 *WithHistoryBrep 包装只用 getUnionFaceHashes 传入 A∪B 两边 hash、且只对\n * 基体 a 解码序号演化。本函数对同一份 evo 零额外内核调用:用 subShapeHashes(a)\n * / subShapeHashes(b) 两个集合判定每个 inHash 的归属,各自传播各自的 role 表。\n *\n * @param evo - the BrepEvolutionData (from a binary boolean *WithHistory API).\n * @param hashesA - the face hashes of input A (target), via subShapeHashes.\n * @param hashesB - the face hashes of input B (tool), via subShapeHashes.\n * @returns the A/B split hash evolutions (faces from neither input are dropped).\n */\nexport function splitHashEvolutionByOrigin(\n evo: BrepEvolutionData,\n hashesA: readonly number[],\n hashesB: readonly number[],\n): { a: HashEvolution; b: HashEvolution } {\n const raw = decodeHashEvolution(evo)\n const setA = new Set(hashesA)\n const setB = new Set(hashesB)\n\n const aModified = new Map<number, number[]>()\n const bModified = new Map<number, number[]>()\n for (const [inHash, outs] of raw.modified) {\n if (setA.has(inHash)) aModified.set(inHash, [...outs])\n else if (setB.has(inHash)) bModified.set(inHash, [...outs])\n }\n\n const aDeleted = new Set<number>()\n const bDeleted = new Set<number>()\n for (const h of raw.deleted) {\n if (setA.has(h)) aDeleted.add(h)\n else if (setB.has(h)) bDeleted.add(h)\n }\n\n return { a: { modified: aModified, deleted: aDeleted }, b: { modified: bModified, deleted: bDeleted } }\n}\n\n/**\n * 构造 hash 键恒等演化:输入第 i 面 hash → 输出第 i 面 hash(按枚举序号对齐)。\n *\n * ⚠️ **Phase 0.3 后本函数只用于「内核无 `*WithHistory` 可表达」的 4 个 op**:\n *\n * | op | 为什么不能走权威映射 |\n * |---|---|\n * | `rotate_euler` | 任意欧拉角 + pivot;内核只有**单轴** `rotateWithHistory` |\n * | `scale3d` | 非等比;`generalTransform` 无历史(`scaleWithHistory` 只收均匀 factor) |\n * | `copy` | 深拷贝;内核无 `copyWithHistory` |\n * | `place` | 任意矩阵 `located`;内核无对应历史 API |\n *\n * `translate` / `scale`(均匀)已改走权威映射(`translateWithHashEvolution` /\n * `scaleWithHashEvolution`),不再经过本函数。\n *\n * ⚠️ **本函数的正确性依赖一个曾经未被验证的假设**:刚体变换/深拷贝保持 OCCT 的\n * 面枚举序号。该假设现由 `brep/face-evolution.ordering.test.ts` 实测钉住。\n * 若该测试变红 ⇒ 本函数在这 4 个 op 上会产出**错误的身份映射**,\n * 必须为它们找别的权威来源,**不是**调松测试。\n *\n * @param kernel - the OCCT kernel.\n * @param inputShape - the input shape.\n * @param resultShape - the transformed/copied output shape.\n * @returns the hash identity evolution (modified: in[i] → [out[i]]).\n */\nexport function identityHashEvolution(\n kernel: BrepEngineApi,\n inputShape: BrepHandle,\n resultShape: BrepHandle,\n): HashEvolution {\n const inputHashes = getFaceHashes(kernel, inputShape)\n const resultHashes = getFaceHashes(kernel, resultShape)\n const count = Math.min(inputHashes.length, resultHashes.length)\n const modified = new Map<number, number[]>()\n for (let i = 0; i < count; i++) {\n modified.set(inputHashes[i], [resultHashes[i]])\n }\n return { modified, deleted: new Set() }\n}\n\n/**\n * 平移 + **权威**面演化(Phase 0.3):走内核 `translateWithHistory`。\n *\n * 与 `identityHashEvolution` 的区别:这里的 `inHash → outHash[]` 是 OCCT 自己给的,\n * **不依赖**\"枚举序号在变换后保持\"这个此前从未验证的假设(分析文档 §7 第 6 项)。\n * 实测(`brep/engine/evolution-bindings.test.ts`):刚体变换的权威映射为\n * 1:1 全覆盖(`coveredInputs === 面数`、`deleted` 空、`generated` 空)。\n *\n * @param kernel - the OCCT kernel.\n * @param shape - the input shape.\n * @param d - the translation vector as [dx, dy, dz].\n * @returns the translated handle plus the authority hash evolution.\n */\nexport function translateWithHashEvolution(\n kernel: BrepEngineApi,\n shape: BrepHandle,\n d: readonly [number, number, number],\n): { result: BrepHandle; evolution: HashEvolution } {\n const inputHashes = getFaceHashes(kernel, shape)\n const evo = getOcctKernel().translateWithHistory(shape as unknown as ShapeHandle, d[0], d[1], d[2], inputHashes, HASH_UPPER_BOUND) as unknown as BrepEvolutionData\n return { result: evo.result, evolution: decodeHashEvolution(evo) }\n}\n\n/**\n * 均匀缩放 + **权威**面演化(Phase 0.3):走内核 `scaleWithHistory`。\n *\n * ⚠️ **仅均匀缩放**。非均匀缩放内核无 `*WithHistory`(`generalTransform` 无历史),\n * 故 `scale3d` 无法走本函数——它退回 `identityHashEvolution`,其\"面序保持\"假设\n * 由 `brep/face-evolution.ordering.test.ts` 钉住。\n *\n * @param kernel - the OCCT kernel.\n * @param shape - the input shape.\n * @param center - the fixed point of the scaling (not scaled).\n * @param factor - the uniform scale factor.\n * @returns the scaled handle plus the authority hash evolution.\n */\nexport function scaleWithHashEvolution(\n kernel: BrepEngineApi,\n shape: BrepHandle,\n center: readonly [number, number, number],\n factor: number,\n): { result: BrepHandle; evolution: HashEvolution } {\n const inputHashes = getFaceHashes(kernel, shape)\n const evo = getOcctKernel().scaleWithHistory(\n shape as unknown as ShapeHandle,\n { x: center[0], y: center[1], z: center[2] },\n factor,\n inputHashes,\n HASH_UPPER_BOUND,\n ) as unknown as BrepEvolutionData\n return { result: evo.result, evolution: decodeHashEvolution(evo) }\n}\n\n/**\n * 双输入布尔 + roleTable 合流组合封装(§3.4,api boolean 链式调用用)。\n *\n * 一次 *WithHistory 内核调用同时产出:\n * - result:结果实体\n * - faceEvolution:序号键演化(进 faceEvolutionCache,服务选择器/可视化)\n * - roleTable:A/B 两侧 role 表各自传播后合并(进 roleTableCache,服务命名)\n *\n * 缝面(generated)刻意不进 role 传播(§1.3/R2:generated hash 指向中间形、\n * 实测 0 存活)。新 origin 一律是**本次语句的 StmtId**(Phase 1.6:不再用 LHS\n * 变量名——PartName 会被改名/复用,StmtId 全局唯一)。\n *\n * @param kernel - the OCCT kernel.\n * @param op - the boolean operation ('fuse' | 'cut' | 'intersect').\n * @param a - the target shape.\n * @param b - the tool shape.\n * @param tableA - the target's role table.\n * @param tableB - the tool's role table.\n * @param outStmt - the boolean statement's StmtId (串形;新 origin for seam faces).\n * @returns the result handle, ordinal evolution and merged role table.\n */\nexport function booleanWithRoleTable(\n kernel: BrepEngineApi,\n op: 'fuse' | 'cut' | 'intersect',\n a: BrepHandle,\n b: BrepHandle,\n tableA: ReadonlyMap<unknown, unknown>,\n tableB: ReadonlyMap<unknown, unknown>,\n outStmt: string,\n): { result: BrepHandle; faceEvolution: FaceEvolution; roleTable: ReadonlyMap<unknown, unknown> } {\n const inputHashes = getUnionFaceHashes(kernel, a, b)\n let evo: BrepEvolutionData\n if (op === 'fuse') evo = kernel.fuseWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n else if (op === 'cut') evo = kernel.cutWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n else evo = kernel.intersectWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n\n const faceEvolution = decodeEvolution(kernel, evo, a, evo.result)\n\n // A/B 拆流 → 各自传播 → 合表(§3.4)\n const hashesA = getFaceHashes(kernel, a)\n const hashesB = getFaceHashes(kernel, b)\n const { a: evoA, b: evoB } = splitHashEvolutionByOrigin(evo, hashesA, hashesB)\n const merged = mergeRoleTablesLocal(tableA, evoA, tableB, evoB, outStmt)\n\n // G 组(2026-10-03,Flapper LHS 语料):fuse 的接缝面(两半挤出 union 时\n // 共享平面被 BOP 重建的面)既不属于 A 也不属于 B 的血缘,merge 后无 role —\n // 下游 edgeRef/fillet 查邻面时报 \"no role lineage\"(face-evolution 注释里\n // 一直挂着的 \"seam faces are a Phase 4+ concern\" 正是本盲区)。把不属于任何\n // 已知血缘的结果面登记为新 origin(本次语句)的 `seam` 角色——血缘真实\n // (该面确实诞生于本次布尔),不是伪造映射。\n if (op === 'fuse') {\n const covered = new Set<unknown>()\n for (const roles of merged.values()) {\n for (const hs of (roles as ReadonlyMap<string, readonly number[]>).values()) {\n for (const h of hs) covered.add(h)\n }\n }\n const seamHashes = getFaceHashes(kernel, evo.result).filter((h) => !covered.has(h))\n if (seamHashes.length > 0) {\n (merged as Map<unknown, unknown>).set(outStmt, new Map([['seam', seamHashes]]))\n }\n }\n\n return { result: evo.result, faceEvolution, roleTable: merged }\n}\n\n/** 合表(避免 naming/roles 循环依赖:本文件不 import naming,用结构等价实现)。 */\nfunction mergeRoleTablesLocal(\n tableA: ReadonlyMap<unknown, unknown>,\n evoA: HashEvolution,\n tableB: ReadonlyMap<unknown, unknown>,\n evoB: HashEvolution,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- retained for future boolean generated-face naming\n outPart: string,\n): ReadonlyMap<unknown, unknown> {\n const result = new Map<unknown, unknown>()\n for (const [origin, roles] of tableA) {\n result.set(origin, propagateOriginRoles(roles as ReadonlyMap<string, readonly number[]>, evoA))\n }\n for (const [origin, roles] of tableB) {\n const existing = result.get(origin) as ReadonlyMap<string, readonly number[]> | undefined\n const advanced = propagateOriginRoles(roles as ReadonlyMap<string, readonly number[]>, evoB)\n if (existing) {\n const merged = new Map<string, number[]>()\n for (const [role, hs] of existing) merged.set(role, [...hs])\n for (const [role, hs] of advanced) {\n const prev = merged.get(role)\n merged.set(role, prev ? [...new Set([...prev, ...hs])] : [...hs])\n }\n result.set(origin, merged)\n } else {\n result.set(origin, advanced)\n }\n }\n // 3.6: void outPart removed — boolean seam faces are handled by the \"three fates\"\n // analysis (§4.4): cut has 0 new faces (§7 item 7), fuse seam faces are a Phase 4+ concern.\n // outPart retained for future kernel/byAdjacency on boolean generated faces.\n return result\n}\n\n/** 单 origin 传播(结构等价于 naming/roles.propagateRoles,避免循环依赖)。 */\nfunction propagateOriginRoles(\n roles: ReadonlyMap<string, readonly number[]>,\n evolution: HashEvolution,\n): ReadonlyMap<string, readonly number[]> {\n const updated = new Map<string, number[]>()\n for (const [role, hashes] of roles) {\n const successors: number[] = []\n for (const hash of hashes) {\n if (evolution.deleted.has(hash)) continue\n const modified = evolution.modified.get(hash)\n const targets = modified !== undefined && modified.length > 0 ? modified : [hash]\n for (const h of targets) if (!successors.includes(h)) successors.push(h)\n }\n if (successors.length > 0) updated.set(role, successors)\n }\n return updated\n}\n\n/**\n * Decode a BrepEvolutionData deleted array into the ordinal list of deleted faces.\n * @param kernel - the OCCT kernel.\n * @param evo - the BrepEvolutionData (from a *WithHistory API).\n * @param inputShape - the input shape (for the hash → ordinal mapping).\n * @returns the array of deleted face ordinals.\n */\nexport function decodeDeleted(\n kernel: BrepEngineApi,\n evo: BrepEvolutionData,\n inputShape: BrepHandle,\n): number[] {\n const inputHashes = getFaceHashes(kernel, inputShape)\n const inputHashToOrdinal = new Map<number, number>()\n for (let i = 0; i < inputHashes.length; i++) {\n inputHashToOrdinal.set(inputHashes[i], i)\n }\n\n const deletedOrdinals: number[] = []\n for (const hash of evo.deleted) {\n const ordinal = inputHashToOrdinal.get(hash)\n if (ordinal !== undefined) {\n deletedOrdinals.push(ordinal)\n }\n }\n return deletedOrdinals\n}\n\n// ─── WithHistory 封装函数 ───\n\n/**\n * cutWithHistory 封装:执行切割并返回结果 + 面演化映射。\n *\n * @param kernel OCCT 内核\n * @param a 基体\n * @param b 工具(从基体中减去)\n * @returns { result: 结果 BrepHandle, faceEvolution: 面演化映射 }\n */\nexport function cutWithHistoryBrep(\n kernel: BrepEngineApi,\n a: BrepHandle,\n b: BrepHandle,\n): { result: BrepHandle; faceEvolution: FaceEvolution } {\n const inputHashes = getUnionFaceHashes(kernel, a, b)\n const evo = kernel.cutWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n const faceEvolution = decodeEvolution(kernel, evo, a, evo.result)\n return { result: evo.result, faceEvolution }\n}\n\n/**\n * fuseWithHistory wrapper: performs the fuse and returns the result plus the face evolution mapping.\n * @param kernel - the OCCT kernel.\n * @param a - the base shape.\n * @param b - the tool shape to fuse into the base.\n * @returns the result BrepHandle plus the face evolution mapping.\n */\nexport function fuseWithHistoryBrep(\n kernel: BrepEngineApi,\n a: BrepHandle,\n b: BrepHandle,\n): { result: BrepHandle; faceEvolution: FaceEvolution } {\n const inputHashes = getUnionFaceHashes(kernel, a, b)\n const evo = kernel.fuseWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n const faceEvolution = decodeEvolution(kernel, evo, a, evo.result)\n return { result: evo.result, faceEvolution }\n}\n\n/**\n * intersectWithHistory wrapper: performs the intersection and returns the result plus the face evolution mapping.\n * @param kernel - the OCCT kernel.\n * @param a - the first input shape.\n * @param b - the second input shape.\n * @returns the result BrepHandle plus the face evolution mapping.\n */\nexport function intersectWithHistoryBrep(\n kernel: BrepEngineApi,\n a: BrepHandle,\n b: BrepHandle,\n): { result: BrepHandle; faceEvolution: FaceEvolution } {\n const inputHashes = getUnionFaceHashes(kernel, a, b)\n const evo = kernel.intersectWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n const faceEvolution = decodeEvolution(kernel, evo, a, evo.result)\n return { result: evo.result, faceEvolution }\n}\n\n// ─── 变换操作面演化 ───\n\n/**\n * 构造恒等面演化映射(用于 translate/rotate/scale 等不改变拓扑的操作)。\n *\n * 变换操作不改变面的数量和顺序,每个面 ordinal i → [i]。\n * 避免调用 *WithHistory API(rotate/scale 的 WithHistory 签名与现有 Euler/Vec3 参数不兼容)。\n *\n * @param kernel OCCT 内核\n * @param shape 输入形状(用于获取面数量)\n * @returns 恒等 FaceEvolution\n */\nexport function identityEvolution(\n kernel: BrepEngineApi,\n shape: BrepHandle,\n): FaceEvolution {\n const faceCount = getFaceHashes(kernel, shape).length\n const evolution: FaceEvolution = new Map()\n for (let i = 0; i < faceCount; i++) {\n evolution.set(i, [i])\n }\n return evolution\n}\n\n// ─── directEdit WithHistory 封装(fillet / chamfer:单输入) ───\n\n/**\n * 单输入 directEdit(fillet/chamfer)+ roleTable 传播封装。\n *\n * 与 `booleanWithRoleTable`(双输入)对应:单输入只有一张输入 role 表,\n * 一次 `*WithHistory` 内核调用产出结果 + 面演化,沿 hash 演化推进所有 origin。\n *\n * generated 刻意不进 role 传播(§1.3 事实:generated hash 指向中间形,\n * 实测 0 存活),过渡面的命名由 DerivedFaceTopoRef 在 M2 处理。\n *\n * @param kernel - the OCCT kernel.\n * @param op - the directEdit operation ('fillet' | 'chamfer').\n * @param solid - the input solid (single input, unlike boolean's a/b).\n * @param edgeHandles - the resolved Edge handles to fillet/chamfer.\n * @param radius - the fillet radius or chamfer distance (uniform only).\n * @param inputRoleTable - the input's role table.\n * @param outPart - the statement's LHS variable name (for new origin allocation).\n * @returns the result handle, ordinal evolution and propagated role table.\n */\nexport function directEditWithRoleTable(\n kernel: BrepEngineApi,\n op: 'fillet' | 'chamfer',\n solid: BrepHandle,\n edgeHandles: BrepHandle[],\n radius: number,\n inputRoleTable: ReadonlyMap<unknown, unknown>,\n outPart: string,\n): { result: BrepHandle; faceEvolution: FaceEvolution; roleTable: ReadonlyMap<unknown, unknown> } {\n const inputHashes = getFaceHashes(kernel, solid)\n let evo: BrepEvolutionData\n if (op === 'fillet') {\n evo = kernel.filletWithHistory(solid, edgeHandles, radius, inputHashes, HASH_UPPER_BOUND)\n } else {\n // chamferWithHistory 是 occt-only(L1 无)→ 平台面 getOcctKernel(D3)。\n // BrepHandle(branded number)与 occt-wasm ShapeHandle 运行时同构,品牌转换\n // 只发生在平台边界。\n evo = getOcctKernel().chamferWithHistory(\n solid as unknown as ShapeHandle,\n edgeHandles as unknown as ShapeHandle[],\n radius,\n inputHashes,\n HASH_UPPER_BOUND,\n ) as unknown as BrepEvolutionData\n }\n\n const faceEvolution = decodeEvolution(kernel, evo, solid, evo.result)\n const hashEvo = decodeHashEvolution(evo)\n const propagated = propagateAllOriginsLocal(inputRoleTable, hashEvo)\n\n // 3.4: generated face naming — transition faces are neither input faces nor\n // modified outputs (§4.4 \"三类命运\": 原样幸存 / 改型幸存 / 新造).\n // Role format: `gen:<op>:<i>` (i = enumeration order among generated faces).\n // String formatted directly (no import of role-name.ts — avoids circular dep).\n const resultHashes = getFaceHashes(kernel, evo.result)\n const inputHashSet = new Set(inputHashes)\n const modifiedOutputHashes = new Set<number>()\n for (const outs of hashEvo.modified.values()) {\n for (const h of outs) modifiedOutputHashes.add(h)\n }\n const generatedHashes = resultHashes.filter(\n (h) => !inputHashSet.has(h) && !modifiedOutputHashes.has(h),\n )\n\n if (generatedHashes.length > 0) {\n const genRoles = new Map<string, number[]>()\n for (let i = 0; i < generatedHashes.length; i++) {\n genRoles.set(`gen:${op}:${i}`, [generatedHashes[i]!])\n }\n const roleTable = new Map(propagated)\n roleTable.set(outPart, genRoles)\n return { result: evo.result, faceEvolution, roleTable }\n }\n\n return { result: evo.result, faceEvolution, roleTable: propagated }\n}\n\n/**\n * 单输入 directEdit 的便捷别名:fillet。\n *\n * @param kernel - the OCCT kernel.\n * @param solid - the input solid.\n * @param edgeHandles - the resolved Edge handles.\n * @param radius - the fillet radius (uniform).\n * @param inputRoleTable - the input's role table.\n * @param outPart - the statement's LHS variable name.\n * @returns the result handle, ordinal evolution and propagated role table.\n */\nexport function filletWithRoleTable(\n kernel: BrepEngineApi,\n solid: BrepHandle,\n edgeHandles: BrepHandle[],\n radius: number,\n inputRoleTable: ReadonlyMap<unknown, unknown>,\n outPart: string,\n): { result: BrepHandle; faceEvolution: FaceEvolution; roleTable: ReadonlyMap<unknown, unknown> } {\n return directEditWithRoleTable(kernel, 'fillet', solid, edgeHandles, radius, inputRoleTable, outPart)\n}\n\n/**\n * 单输入 directEdit 的便捷别名:chamfer。\n *\n * @param kernel - the OCCT kernel.\n * @param solid - the input solid.\n * @param edgeHandles - the resolved Edge handles.\n * @param distance - the chamfer distance (uniform).\n * @param inputRoleTable - the input's role table.\n * @param outPart - the statement's LHS variable name.\n * @returns the result handle, ordinal evolution and propagated role table.\n */\nexport function chamferWithRoleTable(\n kernel: BrepEngineApi,\n solid: BrepHandle,\n edgeHandles: BrepHandle[],\n distance: number,\n inputRoleTable: ReadonlyMap<unknown, unknown>,\n outPart: string,\n): { result: BrepHandle; faceEvolution: FaceEvolution; roleTable: ReadonlyMap<unknown, unknown> } {\n return directEditWithRoleTable(kernel, 'chamfer', solid, edgeHandles, distance, inputRoleTable, outPart)\n}\n\n/**\n * 钻孔 roleTable 传播:底孔(圆柱 cut)产生的新造面 = 孔壁,挂**消费它的那条语句**\n * 的 origin(§7.1:drill 的工具体是 op 内部临时件,无其他用户可见坐标可继承)。\n * 角色形态 `hole:<j>`(j = 新造面枚举序)。沿用 `directEditWithRoleTable` 的\n * 三类命运判定(原样幸存 / 改型幸存 / 新造),新造面才派生命名。\n *\n * @param kernel - the OCCT kernel.\n * @param solid - the input solid (the drilled part).\n * @param toolSolid - the drill-bit tool solid (caller-built; released by caller).\n * @param inputRoleTable - the input's role table.\n * @param outStmt - the drilling statement's StmtId (origin for new faces).\n * @returns the result handle, ordinal evolution and role table with `hole:<j>`.\n */\nexport function drillBrepWithRoleTable(\n kernel: BrepEngineApi,\n solid: BrepHandle,\n toolSolid: BrepHandle,\n inputRoleTable: ReadonlyMap<unknown, unknown>,\n outStmt: string,\n): { result: BrepHandle; faceEvolution: FaceEvolution; roleTable: ReadonlyMap<unknown, unknown> } {\n const inputHashes = getFaceHashes(kernel, solid)\n const evo = kernel.cutWithHistory(solid, toolSolid, inputHashes, HASH_UPPER_BOUND)\n const faceEvolution = decodeEvolution(kernel, evo, solid, evo.result)\n const hashEvo = decodeHashEvolution(evo)\n const propagated = propagateAllOriginsLocal(inputRoleTable, hashEvo)\n\n // 三类命运判定:新造面 = 结果 − 输入 − 改型后继(§4.4)。\n const resultHashes = getFaceHashes(kernel, evo.result)\n const inputHashSet = new Set(inputHashes)\n const modifiedOutputHashes = new Set<number>()\n for (const outs of hashEvo.modified.values()) {\n for (const h of outs) modifiedOutputHashes.add(h)\n }\n const generatedHashes = resultHashes.filter(\n (h) => !inputHashSet.has(h) && !modifiedOutputHashes.has(h),\n )\n\n const roleTable = new Map(propagated)\n if (generatedHashes.length > 0) {\n const genRoles = new Map<string, number[]>()\n for (let i = 0; i < generatedHashes.length; i++) {\n genRoles.set(`hole:${i}`, [generatedHashes[i]!])\n }\n roleTable.set(outStmt, genRoles)\n }\n return { result: evo.result, faceEvolution, roleTable }\n}\n\n/** 单输入 roleTable 传播(结构等价于 naming/roles.propagateAllOrigins,避免循环依赖)。 */\nfunction propagateAllOriginsLocal(\n roles: ReadonlyMap<unknown, unknown>,\n evolution: HashEvolution,\n): ReadonlyMap<unknown, unknown> {\n const result = new Map<unknown, unknown>()\n for (const [origin, originRoles] of roles) {\n result.set(origin, propagateOriginRoles(originRoles as ReadonlyMap<string, readonly number[]>, evolution))\n }\n return result\n}\n"]}
|
|
1
|
+
{"version":3,"file":"face-evolution.js","sourceRoot":"","sources":["../../src/brep/face-evolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,EAAE,aAAa,EAAoB,MAAM,2BAA2B,CAAA;AAE3E,wDAAwD;AACxD,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAA;AAW1C;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,MAAqB,EAAE,KAAiB;IACpE,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAA;AAC3E,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAqB,EACrB,MAAkB,EAClB,MAAkB;IAElB,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;AAC/C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAqB,EACrB,GAAsB,EACtB,UAAsB,EACtB,WAAuB;IAEvB,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACrD,MAAM,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IAEvD,wBAAwB;IACxB,MAAM,mBAAmB,GAAG,IAAI,GA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,GAAG,IAAI,GAAG,EAAoB,CAAA;IAC1C,KAAK,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,KAAK,EAAE,CAAC;QAC1C,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,WAAqD,EAAE,SAAS,CAAC,CAAC,CAAA;IAC5G,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["/**\n * 面演化(face evolution)工具:hash 映射 ↔ ordinal 映射转换\n *\n * @platform occt — 本文件 import occt-kernel(translateWithHashEvolution /\n * scaleWithHashEvolution / directEditWithRoleTable(chamfer 分支) 走 occt-only\n * `*WithHistory` 原生面,D3)。文件级标注满足守卫①(平台 import 自证身份);\n * 文件内的**中立函数**(getFaceHashes/decodeEvolution/booleanWithRoleTable/\n * identityHashEvolution 等只用 L1 BrepEngineApi)不因标注改变函数级中立性——\n * 调用它们的**中立 op**(rotate_euler/scale3d/fillet/boolean 等)不声明 engines,\n * 运行时不拦截(与 replicate.ts 同口径)。\n *\n * See docs/api-contract.md §11 (topology contract) for face evolution context.\n *\n * occt-wasm 的 *WithHistory API 返回 BrepEvolutionData,其中 modified/generated\n * 用面 hash(内存指针哈希)编码。本模块将其解码为 ordinal 映射(面枚举序号),\n * 可安全持久化进 faijs 文本。\n *\n * 核心原理(分析文档 §4.4):\n * getSubShapes(shape,'face')[i] ↔ subShapeHashes(shape,'face',B)[i] 一一对应\n * 因此可以把 hash 映射无损转换为 ordinal 映射。\n */\n\nimport type { BrepHandle, BrepEvolutionData } from './engine/types'\nimport type { BrepEngineApi } from './engine/primitives'\nimport { getOcctKernel, type ShapeHandle } from '../occt-kernel/occtKernel'\n\n/** hash 上界(与 occt-wasm kernel.cpp 一致:`% 2147483647`) */\nexport const HASH_UPPER_BOUND = 2147483647\n\n/**\n * 面演化映射:输入面 ordinal → 输出面 ordinal 列表\n *\n * - 1→1:面被修改但未被切割(如面带孔仍是单面)\n * - 1→N:面被切割成多个面\n * - 不在 map 中:面未被修改或被删除\n */\nexport type FaceEvolution = Map<number, number[]>\n\n/**\n * Collect the hash list of all faces of a shape (via subShapeHashes; efficient, no handles allocated).\n * @param kernel - the OCCT kernel.\n * @param shape - the shape whose face hashes to collect.\n * @returns the array of face hashes.\n */\nexport function getFaceHashes(kernel: BrepEngineApi, shape: BrepHandle): number[] {\n return Array.from(kernel.subShapeHashes(shape, 'face', HASH_UPPER_BOUND))\n}\n\n/**\n * Collect the union of face hashes of two shapes (for WithHistory calls of binary boolean operations).\n *\n * Analysis doc §4.2: fuse/cut/intersect must pass subShapeHashes(A) ∪ subShapeHashes(B)\n * to track both inputs' face evolution.\n * @param kernel - the OCCT kernel.\n * @param shapeA - the first input shape.\n * @param shapeB - the second input shape.\n * @returns the union of the two shapes' face hashes.\n */\nexport function getUnionFaceHashes(\n kernel: BrepEngineApi,\n shapeA: BrepHandle,\n shapeB: BrepHandle,\n): number[] {\n const hashesA = getFaceHashes(kernel, shapeA)\n const hashesB = getFaceHashes(kernel, shapeB)\n return [...new Set([...hashesA, ...hashesB])]\n}\n\n/**\n * 解码 BrepEvolutionData 的 modified 数组为 ordinal 映射。\n *\n * modified 分段编码格式:[inputHash, count, outHash1, outHash2, ...] × N\n *\n * @param kernel the OCCT kernel.\n * @param evo the BrepEvolutionData (from a *WithHistory API).\n * @param inputShape the input shape (for the input face hash → ordinal mapping).\n * @param resultShape the result shape (for the output face hash → ordinal mapping).\n * @returns the FaceEvolution: inOrdinal → outOrdinal[].\n */\nexport function decodeEvolution(\n kernel: BrepEngineApi,\n evo: BrepEvolutionData,\n inputShape: BrepHandle,\n resultShape: BrepHandle,\n): FaceEvolution {\n const inputHashes = getFaceHashes(kernel, inputShape)\n const resultHashes = getFaceHashes(kernel, resultShape)\n\n // 构建 hash → ordinal 查找表\n const resultHashToOrdinal = new Map<number, number>()\n for (let i = 0; i < resultHashes.length; i++) {\n resultHashToOrdinal.set(resultHashes[i], i)\n }\n const inputHashToOrdinal = new Map<number, number>()\n for (let i = 0; i < inputHashes.length; i++) {\n inputHashToOrdinal.set(inputHashes[i], i)\n }\n\n // 解码 modified 数组\n const evolution: FaceEvolution = new Map()\n const modified = evo.modified\n let idx = 0\n while (idx < modified.length) {\n const inHash = modified[idx]\n const count = modified[idx + 1]\n const outOrdinals: number[] = []\n for (let j = 0; j < count; j++) {\n const outHash = modified[idx + 2 + j]\n const outOrdinal = resultHashToOrdinal.get(outHash)\n if (outOrdinal !== undefined) {\n outOrdinals.push(outOrdinal)\n }\n }\n const inOrdinal = inputHashToOrdinal.get(inHash)\n if (inOrdinal !== undefined) {\n evolution.set(inOrdinal, outOrdinals)\n }\n idx += 2 + count\n }\n\n return evolution\n}\n\n\n/**\n * Hash 键面演化:输入面 hash → 输出面 hash 列表(1→多分裂时多个)。\n *\n * 与序号键 FaceEvolution 并列、同源(同一次 *WithHistory 打包结果解出),\n * 一个供 role 传播(hash 键)、一个供选择器/文本(序号键),零额外 wasm 调用。\n */\nexport interface HashEvolution {\n /** 输入面 hash → 输出面 hash 列表(1→多分裂时多个)。 */\n readonly modified: ReadonlyMap<number, readonly number[]>\n /** 输入面中已不存在的面 hash。 */\n readonly deleted: ReadonlySet<number>\n}\n\n/**\n * 把 BrepEvolutionData 解码为 hash 键演化(§2.4)。\n *\n * modified 分段编码格式:[inHash, count, outHash1, ...] × N —— 本身就是\n * hash→hash[] 的 1→多映射,直接按同一格式解出 hash 键版本,不需要\n * getSubShapes 逐句柄 hashCode,也不分配任何句柄。\n *\n * generated 刻意不进 role 传播。**实测依据(2026-09-22,`brep/engine/phase0-kernel-probes.test.ts`)**:\n * `generated` 与 `modified` **同构分段、键集相同**,其值是各输入面派生出的**中间形**——\n * `cut` 实测 12 个 hash、结果里 **0 个存活**(`fillet`/`fuse` 里整个桶为空)。\n * ⇒ 新造面**不能**由 `generated` 定位,只能由\"三类命运\"的补集判定\n * (既不在输入 hash 集合、也不在任何 `modified` 输出里),再交 `construct`/派生词汇命名。\n *\n * @param evo - the BrepEvolutionData (from a *WithHistory API).\n * @returns the hash-keyed evolution.\n */\nexport function decodeHashEvolution(evo: BrepEvolutionData): HashEvolution {\n const modified = new Map<number, number[]>()\n const m = evo.modified\n let idx = 0\n while (idx < m.length) {\n const inHash = m[idx]\n const count = m[idx + 1]\n const outHashes: number[] = []\n for (let j = 0; j < count; j++) {\n outHashes.push(m[idx + 2 + j])\n }\n modified.set(inHash, outHashes)\n idx += 2 + count\n }\n return { modified, deleted: new Set(evo.deleted) }\n}\n\n/**\n * 把一次双输入布尔(cut/fuse/intersect)的打包演化按「inHash 属于 A 还是 B」\n * 拆成 A、B 两张 hash 演化(§3.4 布尔合流,faijs 对 brepjs 的必要扩展)。\n *\n * 现有 *WithHistoryBrep 包装只用 getUnionFaceHashes 传入 A∪B 两边 hash、且只对\n * 基体 a 解码序号演化。本函数对同一份 evo 零额外内核调用:用 subShapeHashes(a)\n * / subShapeHashes(b) 两个集合判定每个 inHash 的归属,各自传播各自的 role 表。\n *\n * @param evo - the BrepEvolutionData (from a binary boolean *WithHistory API).\n * @param hashesA - the face hashes of input A (target), via subShapeHashes.\n * @param hashesB - the face hashes of input B (tool), via subShapeHashes.\n * @returns the A/B split hash evolutions (faces from neither input are dropped).\n */\nexport function splitHashEvolutionByOrigin(\n evo: BrepEvolutionData,\n hashesA: readonly number[],\n hashesB: readonly number[],\n): { a: HashEvolution; b: HashEvolution } {\n const raw = decodeHashEvolution(evo)\n const setA = new Set(hashesA)\n const setB = new Set(hashesB)\n\n const aModified = new Map<number, number[]>()\n const bModified = new Map<number, number[]>()\n for (const [inHash, outs] of raw.modified) {\n if (setA.has(inHash)) aModified.set(inHash, [...outs])\n else if (setB.has(inHash)) bModified.set(inHash, [...outs])\n }\n\n const aDeleted = new Set<number>()\n const bDeleted = new Set<number>()\n for (const h of raw.deleted) {\n if (setA.has(h)) aDeleted.add(h)\n else if (setB.has(h)) bDeleted.add(h)\n }\n\n return { a: { modified: aModified, deleted: aDeleted }, b: { modified: bModified, deleted: bDeleted } }\n}\n\n/**\n * 构造 hash 键恒等演化:输入第 i 面 hash → 输出第 i 面 hash(按枚举序号对齐)。\n *\n * ⚠️ **Phase 0.3 后本函数只用于「内核无 `*WithHistory` 可表达」的 4 个 op**:\n *\n * | op | 为什么不能走权威映射 |\n * |---|---|\n * | `rotate_euler` | 任意欧拉角 + pivot;内核只有**单轴** `rotateWithHistory` |\n * | `scale3d` | 非等比;`generalTransform` 无历史(`scaleWithHistory` 只收均匀 factor) |\n * | `copy` | 深拷贝;内核无 `copyWithHistory` |\n * | `place` | 任意矩阵 `located`;内核无对应历史 API |\n *\n * `translate` / `scale`(均匀)已改走权威映射(`translateWithHashEvolution` /\n * `scaleWithHashEvolution`),不再经过本函数。\n *\n * ⚠️ **本函数的正确性依赖一个曾经未被验证的假设**:刚体变换/深拷贝保持 OCCT 的\n * 面枚举序号。该假设现由 `brep/face-evolution.ordering.test.ts` 实测钉住。\n * 若该测试变红 ⇒ 本函数在这 4 个 op 上会产出**错误的身份映射**,\n * 必须为它们找别的权威来源,**不是**调松测试。\n *\n * @param kernel - the OCCT kernel.\n * @param inputShape - the input shape.\n * @param resultShape - the transformed/copied output shape.\n * @returns the hash identity evolution (modified: in[i] → [out[i]]).\n */\nexport function identityHashEvolution(\n kernel: BrepEngineApi,\n inputShape: BrepHandle,\n resultShape: BrepHandle,\n): HashEvolution {\n const inputHashes = getFaceHashes(kernel, inputShape)\n const resultHashes = getFaceHashes(kernel, resultShape)\n const count = Math.min(inputHashes.length, resultHashes.length)\n const modified = new Map<number, number[]>()\n for (let i = 0; i < count; i++) {\n modified.set(inputHashes[i], [resultHashes[i]])\n }\n return { modified, deleted: new Set() }\n}\n\n/**\n * 平移 + **权威**面演化(Phase 0.3):走内核 `translateWithHistory`。\n *\n * 与 `identityHashEvolution` 的区别:这里的 `inHash → outHash[]` 是 OCCT 自己给的,\n * **不依赖**\"枚举序号在变换后保持\"这个此前从未验证的假设(分析文档 §7 第 6 项)。\n * 实测(`brep/engine/evolution-bindings.test.ts`):刚体变换的权威映射为\n * 1:1 全覆盖(`coveredInputs === 面数`、`deleted` 空、`generated` 空)。\n *\n * @param kernel - the OCCT kernel.\n * @param shape - the input shape.\n * @param d - the translation vector as [dx, dy, dz].\n * @returns the translated handle plus the authority hash evolution.\n */\nexport function translateWithHashEvolution(\n kernel: BrepEngineApi,\n shape: BrepHandle,\n d: readonly [number, number, number],\n): { result: BrepHandle; evolution: HashEvolution } {\n const inputHashes = getFaceHashes(kernel, shape)\n const evo = getOcctKernel().translateWithHistory(shape as unknown as ShapeHandle, d[0], d[1], d[2], inputHashes, HASH_UPPER_BOUND) as unknown as BrepEvolutionData\n return { result: evo.result, evolution: decodeHashEvolution(evo) }\n}\n\n/**\n * 均匀缩放 + **权威**面演化(Phase 0.3):走内核 `scaleWithHistory`。\n *\n * ⚠️ **仅均匀缩放**。非均匀缩放内核无 `*WithHistory`(`generalTransform` 无历史),\n * 故 `scale3d` 无法走本函数——它退回 `identityHashEvolution`,其\"面序保持\"假设\n * 由 `brep/face-evolution.ordering.test.ts` 钉住。\n *\n * @param kernel - the OCCT kernel.\n * @param shape - the input shape.\n * @param center - the fixed point of the scaling (not scaled).\n * @param factor - the uniform scale factor.\n * @returns the scaled handle plus the authority hash evolution.\n */\nexport function scaleWithHashEvolution(\n kernel: BrepEngineApi,\n shape: BrepHandle,\n center: readonly [number, number, number],\n factor: number,\n): { result: BrepHandle; evolution: HashEvolution } {\n const inputHashes = getFaceHashes(kernel, shape)\n const evo = getOcctKernel().scaleWithHistory(\n shape as unknown as ShapeHandle,\n { x: center[0], y: center[1], z: center[2] },\n factor,\n inputHashes,\n HASH_UPPER_BOUND,\n ) as unknown as BrepEvolutionData\n return { result: evo.result, evolution: decodeHashEvolution(evo) }\n}\n\n/**\n * 单轴旋转 + **权威**面演化:走内核 `rotateWithHistory`。\n *\n * 仅当旋转可由**单轴**表达时可用(内核只提供单轴 API)。多轴欧拉角\n * `rotate_euler` 仍退回 `identityHashEvolution`(`face-evolution.ordering.test.ts` 钉住)。\n *\n * @param kernel - the OCCT kernel.\n * @param shape - the input shape.\n * @param axisPoint - a point on the rotation axis (the pivot).\n * @param axisDir - the unit rotation-axis direction.\n * @param angleRad - the rotation angle in radians.\n * @returns the rotated handle plus the hash-keyed and ordinal-keyed evolutions.\n */\nexport function rotateWithHashEvolution(\n kernel: BrepEngineApi,\n shape: BrepHandle,\n axisPoint: readonly [number, number, number],\n axisDir: readonly [number, number, number],\n angleRad: number,\n): { result: BrepHandle; evolution: HashEvolution; faceEvolution: FaceEvolution } {\n const inputHashes = getFaceHashes(kernel, shape)\n const evo = getOcctKernel().rotateWithHistory(\n shape as unknown as ShapeHandle,\n { point: { x: axisPoint[0], y: axisPoint[1], z: axisPoint[2] }, direction: { x: axisDir[0], y: axisDir[1], z: axisDir[2] } },\n angleRad,\n inputHashes,\n HASH_UPPER_BOUND,\n ) as unknown as BrepEvolutionData\n return {\n result: evo.result,\n evolution: decodeHashEvolution(evo),\n faceEvolution: decodeEvolution(kernel, evo, shape, evo.result),\n }\n}\n\n/**\n * 镜像 + **权威**面演化:走内核 `mirrorWithHistory`。\n *\n * 镜像不改变面数/顺序(刚体反射),内核给 1:1 映射;brepkit 侧无此能力时\n * 由调用方显式回退 `identityHashEvolution`(**不报错**)。\n *\n * @param kernel - the OCCT kernel.\n * @param shape - the input shape.\n * @param point - a point on the mirror plane.\n * @param normal - the mirror-plane normal.\n * @returns the mirrored handle plus the hash-keyed and ordinal-keyed evolutions.\n */\nexport function mirrorWithHashEvolution(\n kernel: BrepEngineApi,\n shape: BrepHandle,\n point: readonly [number, number, number],\n normal: readonly [number, number, number],\n): { result: BrepHandle; evolution: HashEvolution; faceEvolution: FaceEvolution } {\n const inputHashes = getFaceHashes(kernel, shape)\n const evo = getOcctKernel().mirrorWithHistory(\n shape as unknown as ShapeHandle,\n { x: point[0], y: point[1], z: point[2] },\n { x: normal[0], y: normal[1], z: normal[2] },\n inputHashes,\n HASH_UPPER_BOUND,\n ) as unknown as BrepEvolutionData\n return {\n result: evo.result,\n evolution: decodeHashEvolution(evo),\n faceEvolution: decodeEvolution(kernel, evo, shape, evo.result),\n }\n}\n\n/**\n * 抽壳 + **权威**面演化:走内核 `shellWithHistory`。\n *\n * `shell` 是中立 op(L1 两引擎均有裸实现)——occt 走本函数的权威映射,\n * brepkit 无 `shellWithHistory` 时由调用方显式回退裸 `shell`(**不报错**)。\n *\n * @param kernel - the OCCT kernel.\n * @param solid - the input solid.\n * @param faces - the faces to remove (open faces).\n * @param thickness - the wall thickness.\n * @param tolerance - the tolerance.\n * @returns the shelled handle plus both the hash-keyed and ordinal-keyed evolutions.\n */\nexport function shellWithHashEvolution(\n kernel: BrepEngineApi,\n solid: BrepHandle,\n faces: BrepHandle[],\n thickness: number,\n tolerance: number,\n): { result: BrepHandle; evolution: HashEvolution; faceEvolution: FaceEvolution } {\n const inputHashes = getFaceHashes(kernel, solid)\n const evo = getOcctKernel().shellWithHistory(\n solid as unknown as ShapeHandle,\n faces as unknown as ShapeHandle[],\n thickness,\n tolerance,\n inputHashes,\n HASH_UPPER_BOUND,\n ) as unknown as BrepEvolutionData\n return {\n result: evo.result,\n evolution: decodeHashEvolution(evo),\n faceEvolution: decodeEvolution(kernel, evo, solid, evo.result),\n }\n}\n\n/**\n * 双输入布尔 + roleTable 合流组合封装(§3.4,api boolean 链式调用用)。\n *\n * 一次 *WithHistory 内核调用同时产出:\n * - result:结果实体\n * - faceEvolution:序号键演化(进 faceEvolutionCache,服务选择器/可视化)\n * - roleTable:A/B 两侧 role 表各自传播后合并(进 roleTableCache,服务命名)\n *\n * 缝面(generated)刻意不进 role 传播(§1.3/R2:generated hash 指向中间形、\n * 实测 0 存活)。新 origin 一律是**本次语句的 StmtId**(Phase 1.6:不再用 LHS\n * 变量名——PartName 会被改名/复用,StmtId 全局唯一)。\n *\n * @param kernel - the OCCT kernel.\n * @param op - the boolean operation ('fuse' | 'cut' | 'intersect').\n * @param a - the target shape.\n * @param b - the tool shape.\n * @param tableA - the target's role table.\n * @param tableB - the tool's role table.\n * @param outStmt - the boolean statement's StmtId (串形;新 origin for seam faces).\n * @returns the result handle, ordinal evolution and merged role table.\n */\nexport function booleanWithRoleTable(\n kernel: BrepEngineApi,\n op: 'fuse' | 'cut' | 'intersect',\n a: BrepHandle,\n b: BrepHandle,\n tableA: ReadonlyMap<unknown, unknown>,\n tableB: ReadonlyMap<unknown, unknown>,\n outStmt: string,\n): { result: BrepHandle; faceEvolution: FaceEvolution; roleTable: ReadonlyMap<unknown, unknown> } {\n const inputHashes = getUnionFaceHashes(kernel, a, b)\n let evo: BrepEvolutionData\n if (op === 'fuse') evo = kernel.fuseWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n else if (op === 'cut') evo = kernel.cutWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n else evo = kernel.intersectWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n\n const faceEvolution = decodeEvolution(kernel, evo, a, evo.result)\n\n // A/B 拆流 → 各自传播 → 合表(§3.4)\n const hashesA = getFaceHashes(kernel, a)\n const hashesB = getFaceHashes(kernel, b)\n const { a: evoA, b: evoB } = splitHashEvolutionByOrigin(evo, hashesA, hashesB)\n const merged = mergeRoleTablesLocal(tableA, evoA, tableB, evoB, outStmt)\n\n // G 组(2026-10-03,Flapper LHS 语料):fuse 的接缝面(两半挤出 union 时\n // 共享平面被 BOP 重建的面)既不属于 A 也不属于 B 的血缘,merge 后无 role —\n // 下游 edgeRef/fillet 查邻面时报 \"no role lineage\"(face-evolution 注释里\n // 一直挂着的 \"seam faces are a Phase 4+ concern\" 正是本盲区)。把不属于任何\n // 已知血缘的结果面登记为新 origin(本次语句)的 `seam` 角色——血缘真实\n // (该面确实诞生于本次布尔),不是伪造映射。\n if (op === 'fuse') {\n const covered = new Set<unknown>()\n for (const roles of merged.values()) {\n for (const hs of (roles as ReadonlyMap<string, readonly number[]>).values()) {\n for (const h of hs) covered.add(h)\n }\n }\n const seamHashes = getFaceHashes(kernel, evo.result).filter((h) => !covered.has(h))\n if (seamHashes.length > 0) {\n (merged as Map<unknown, unknown>).set(outStmt, new Map([['seam', seamHashes]]))\n }\n }\n\n return { result: evo.result, faceEvolution, roleTable: merged }\n}\n\n/** 合表(避免 naming/roles 循环依赖:本文件不 import naming,用结构等价实现)。 */\nfunction mergeRoleTablesLocal(\n tableA: ReadonlyMap<unknown, unknown>,\n evoA: HashEvolution,\n tableB: ReadonlyMap<unknown, unknown>,\n evoB: HashEvolution,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- retained for future boolean generated-face naming\n outPart: string,\n): ReadonlyMap<unknown, unknown> {\n const result = new Map<unknown, unknown>()\n for (const [origin, roles] of tableA) {\n result.set(origin, propagateOriginRoles(roles as ReadonlyMap<string, readonly number[]>, evoA))\n }\n for (const [origin, roles] of tableB) {\n const existing = result.get(origin) as ReadonlyMap<string, readonly number[]> | undefined\n const advanced = propagateOriginRoles(roles as ReadonlyMap<string, readonly number[]>, evoB)\n if (existing) {\n const merged = new Map<string, number[]>()\n for (const [role, hs] of existing) merged.set(role, [...hs])\n for (const [role, hs] of advanced) {\n const prev = merged.get(role)\n merged.set(role, prev ? [...new Set([...prev, ...hs])] : [...hs])\n }\n result.set(origin, merged)\n } else {\n result.set(origin, advanced)\n }\n }\n // 3.6: void outPart removed — boolean seam faces are handled by the \"three fates\"\n // analysis (§4.4): cut has 0 new faces (§7 item 7), fuse seam faces are a Phase 4+ concern.\n // outPart retained for future kernel/byAdjacency on boolean generated faces.\n return result\n}\n\n/** 单 origin 传播(结构等价于 naming/roles.propagateRoles,避免循环依赖)。 */\nfunction propagateOriginRoles(\n roles: ReadonlyMap<string, readonly number[]>,\n evolution: HashEvolution,\n): ReadonlyMap<string, readonly number[]> {\n const updated = new Map<string, number[]>()\n for (const [role, hashes] of roles) {\n const successors: number[] = []\n for (const hash of hashes) {\n if (evolution.deleted.has(hash)) continue\n const modified = evolution.modified.get(hash)\n const targets = modified !== undefined && modified.length > 0 ? modified : [hash]\n for (const h of targets) if (!successors.includes(h)) successors.push(h)\n }\n if (successors.length > 0) updated.set(role, successors)\n }\n return updated\n}\n\n/**\n * Decode a BrepEvolutionData deleted array into the ordinal list of deleted faces.\n * @param kernel - the OCCT kernel.\n * @param evo - the BrepEvolutionData (from a *WithHistory API).\n * @param inputShape - the input shape (for the hash → ordinal mapping).\n * @returns the array of deleted face ordinals.\n */\nexport function decodeDeleted(\n kernel: BrepEngineApi,\n evo: BrepEvolutionData,\n inputShape: BrepHandle,\n): number[] {\n const inputHashes = getFaceHashes(kernel, inputShape)\n const inputHashToOrdinal = new Map<number, number>()\n for (let i = 0; i < inputHashes.length; i++) {\n inputHashToOrdinal.set(inputHashes[i], i)\n }\n\n const deletedOrdinals: number[] = []\n for (const hash of evo.deleted) {\n const ordinal = inputHashToOrdinal.get(hash)\n if (ordinal !== undefined) {\n deletedOrdinals.push(ordinal)\n }\n }\n return deletedOrdinals\n}\n\n// ─── WithHistory 封装函数 ───\n\n/**\n * cutWithHistory 封装:执行切割并返回结果 + 面演化映射。\n *\n * @param kernel OCCT 内核\n * @param a 基体\n * @param b 工具(从基体中减去)\n * @returns { result: 结果 BrepHandle, faceEvolution: 面演化映射 }\n */\nexport function cutWithHistoryBrep(\n kernel: BrepEngineApi,\n a: BrepHandle,\n b: BrepHandle,\n): { result: BrepHandle; faceEvolution: FaceEvolution } {\n const inputHashes = getUnionFaceHashes(kernel, a, b)\n const evo = kernel.cutWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n const faceEvolution = decodeEvolution(kernel, evo, a, evo.result)\n return { result: evo.result, faceEvolution }\n}\n\n/**\n * fuseWithHistory wrapper: performs the fuse and returns the result plus the face evolution mapping.\n * @param kernel - the OCCT kernel.\n * @param a - the base shape.\n * @param b - the tool shape to fuse into the base.\n * @returns the result BrepHandle plus the face evolution mapping.\n */\nexport function fuseWithHistoryBrep(\n kernel: BrepEngineApi,\n a: BrepHandle,\n b: BrepHandle,\n): { result: BrepHandle; faceEvolution: FaceEvolution } {\n const inputHashes = getUnionFaceHashes(kernel, a, b)\n const evo = kernel.fuseWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n const faceEvolution = decodeEvolution(kernel, evo, a, evo.result)\n return { result: evo.result, faceEvolution }\n}\n\n/**\n * intersectWithHistory wrapper: performs the intersection and returns the result plus the face evolution mapping.\n * @param kernel - the OCCT kernel.\n * @param a - the first input shape.\n * @param b - the second input shape.\n * @returns the result BrepHandle plus the face evolution mapping.\n */\nexport function intersectWithHistoryBrep(\n kernel: BrepEngineApi,\n a: BrepHandle,\n b: BrepHandle,\n): { result: BrepHandle; faceEvolution: FaceEvolution } {\n const inputHashes = getUnionFaceHashes(kernel, a, b)\n const evo = kernel.intersectWithHistory(a, b, inputHashes, HASH_UPPER_BOUND)\n const faceEvolution = decodeEvolution(kernel, evo, a, evo.result)\n return { result: evo.result, faceEvolution }\n}\n\n// ─── 变换操作面演化 ───\n\n/**\n * 构造恒等面演化映射(用于 translate/rotate/scale 等不改变拓扑的操作)。\n *\n * 变换操作不改变面的数量和顺序,每个面 ordinal i → [i]。\n * 避免调用 *WithHistory API(rotate/scale 的 WithHistory 签名与现有 Euler/Vec3 参数不兼容)。\n *\n * @param kernel OCCT 内核\n * @param shape 输入形状(用于获取面数量)\n * @returns 恒等 FaceEvolution\n */\nexport function identityEvolution(\n kernel: BrepEngineApi,\n shape: BrepHandle,\n): FaceEvolution {\n const faceCount = getFaceHashes(kernel, shape).length\n const evolution: FaceEvolution = new Map()\n for (let i = 0; i < faceCount; i++) {\n evolution.set(i, [i])\n }\n return evolution\n}\n\n// ─── directEdit WithHistory 封装(fillet / chamfer:单输入) ───\n\n/**\n * 单输入 directEdit(fillet/chamfer)+ roleTable 传播封装。\n *\n * 与 `booleanWithRoleTable`(双输入)对应:单输入只有一张输入 role 表,\n * 一次 `*WithHistory` 内核调用产出结果 + 面演化,沿 hash 演化推进所有 origin。\n *\n * generated 刻意不进 role 传播(§1.3 事实:generated hash 指向中间形,\n * 实测 0 存活),过渡面的命名由 DerivedFaceTopoRef 在 M2 处理。\n *\n * @param kernel - the OCCT kernel.\n * @param op - the directEdit operation ('fillet' | 'chamfer').\n * @param solid - the input solid (single input, unlike boolean's a/b).\n * @param edgeHandles - the resolved Edge handles to fillet/chamfer.\n * @param radius - the fillet radius or chamfer distance (uniform only).\n * @param inputRoleTable - the input's role table.\n * @param outPart - the statement's LHS variable name (for new origin allocation).\n * @returns the result handle, ordinal evolution and propagated role table.\n */\nexport function directEditWithRoleTable(\n kernel: BrepEngineApi,\n op: 'fillet' | 'chamfer',\n solid: BrepHandle,\n edgeHandles: BrepHandle[],\n radius: number,\n inputRoleTable: ReadonlyMap<unknown, unknown>,\n outPart: string,\n): { result: BrepHandle; faceEvolution: FaceEvolution; roleTable: ReadonlyMap<unknown, unknown> } {\n const inputHashes = getFaceHashes(kernel, solid)\n let evo: BrepEvolutionData\n if (op === 'fillet') {\n evo = kernel.filletWithHistory(solid, edgeHandles, radius, inputHashes, HASH_UPPER_BOUND)\n } else {\n // chamferWithHistory 是 occt-only(L1 无)→ 平台面 getOcctKernel(D3)。\n // BrepHandle(branded number)与 occt-wasm ShapeHandle 运行时同构,品牌转换\n // 只发生在平台边界。\n evo = getOcctKernel().chamferWithHistory(\n solid as unknown as ShapeHandle,\n edgeHandles as unknown as ShapeHandle[],\n radius,\n inputHashes,\n HASH_UPPER_BOUND,\n ) as unknown as BrepEvolutionData\n }\n\n const faceEvolution = decodeEvolution(kernel, evo, solid, evo.result)\n const hashEvo = decodeHashEvolution(evo)\n const propagated = propagateAllOriginsLocal(inputRoleTable, hashEvo)\n\n // 3.4: generated face naming — transition faces are neither input faces nor\n // modified outputs (§4.4 \"三类命运\": 原样幸存 / 改型幸存 / 新造).\n // Role format: `gen:<op>:<i>` (i = enumeration order among generated faces).\n // String formatted directly (no import of role-name.ts — avoids circular dep).\n const resultHashes = getFaceHashes(kernel, evo.result)\n const inputHashSet = new Set(inputHashes)\n const modifiedOutputHashes = new Set<number>()\n for (const outs of hashEvo.modified.values()) {\n for (const h of outs) modifiedOutputHashes.add(h)\n }\n const generatedHashes = resultHashes.filter(\n (h) => !inputHashSet.has(h) && !modifiedOutputHashes.has(h),\n )\n\n if (generatedHashes.length > 0) {\n const genRoles = new Map<string, number[]>()\n for (let i = 0; i < generatedHashes.length; i++) {\n genRoles.set(`gen:${op}:${i}`, [generatedHashes[i]!])\n }\n const roleTable = new Map(propagated)\n roleTable.set(outPart, genRoles)\n return { result: evo.result, faceEvolution, roleTable }\n }\n\n return { result: evo.result, faceEvolution, roleTable: propagated }\n}\n\n/**\n * 单输入 directEdit 的便捷别名:fillet。\n *\n * @param kernel - the OCCT kernel.\n * @param solid - the input solid.\n * @param edgeHandles - the resolved Edge handles.\n * @param radius - the fillet radius (uniform).\n * @param inputRoleTable - the input's role table.\n * @param outPart - the statement's LHS variable name.\n * @returns the result handle, ordinal evolution and propagated role table.\n */\nexport function filletWithRoleTable(\n kernel: BrepEngineApi,\n solid: BrepHandle,\n edgeHandles: BrepHandle[],\n radius: number,\n inputRoleTable: ReadonlyMap<unknown, unknown>,\n outPart: string,\n): { result: BrepHandle; faceEvolution: FaceEvolution; roleTable: ReadonlyMap<unknown, unknown> } {\n return directEditWithRoleTable(kernel, 'fillet', solid, edgeHandles, radius, inputRoleTable, outPart)\n}\n\n/**\n * 单输入 directEdit 的便捷别名:chamfer。\n *\n * @param kernel - the OCCT kernel.\n * @param solid - the input solid.\n * @param edgeHandles - the resolved Edge handles.\n * @param distance - the chamfer distance (uniform).\n * @param inputRoleTable - the input's role table.\n * @param outPart - the statement's LHS variable name.\n * @returns the result handle, ordinal evolution and propagated role table.\n */\nexport function chamferWithRoleTable(\n kernel: BrepEngineApi,\n solid: BrepHandle,\n edgeHandles: BrepHandle[],\n distance: number,\n inputRoleTable: ReadonlyMap<unknown, unknown>,\n outPart: string,\n): { result: BrepHandle; faceEvolution: FaceEvolution; roleTable: ReadonlyMap<unknown, unknown> } {\n return directEditWithRoleTable(kernel, 'chamfer', solid, edgeHandles, distance, inputRoleTable, outPart)\n}\n\n/**\n * 钻孔 roleTable 传播:底孔(圆柱 cut)产生的新造面 = 孔壁,挂**消费它的那条语句**\n * 的 origin(§7.1:drill 的工具体是 op 内部临时件,无其他用户可见坐标可继承)。\n * 角色形态 `hole:<j>`(j = 新造面枚举序)。沿用 `directEditWithRoleTable` 的\n * 三类命运判定(原样幸存 / 改型幸存 / 新造),新造面才派生命名。\n *\n * @param kernel - the OCCT kernel.\n * @param solid - the input solid (the drilled part).\n * @param toolSolid - the drill-bit tool solid (caller-built; released by caller).\n * @param inputRoleTable - the input's role table.\n * @param outStmt - the drilling statement's StmtId (origin for new faces).\n * @returns the result handle, ordinal evolution and role table with `hole:<j>`.\n */\nexport function drillBrepWithRoleTable(\n kernel: BrepEngineApi,\n solid: BrepHandle,\n toolSolid: BrepHandle,\n inputRoleTable: ReadonlyMap<unknown, unknown>,\n outStmt: string,\n): { result: BrepHandle; faceEvolution: FaceEvolution; roleTable: ReadonlyMap<unknown, unknown> } {\n const inputHashes = getFaceHashes(kernel, solid)\n const evo = kernel.cutWithHistory(solid, toolSolid, inputHashes, HASH_UPPER_BOUND)\n const faceEvolution = decodeEvolution(kernel, evo, solid, evo.result)\n const hashEvo = decodeHashEvolution(evo)\n const propagated = propagateAllOriginsLocal(inputRoleTable, hashEvo)\n\n // 三类命运判定:新造面 = 结果 − 输入 − 改型后继(§4.4)。\n const resultHashes = getFaceHashes(kernel, evo.result)\n const inputHashSet = new Set(inputHashes)\n const modifiedOutputHashes = new Set<number>()\n for (const outs of hashEvo.modified.values()) {\n for (const h of outs) modifiedOutputHashes.add(h)\n }\n const generatedHashes = resultHashes.filter(\n (h) => !inputHashSet.has(h) && !modifiedOutputHashes.has(h),\n )\n\n const roleTable = new Map(propagated)\n if (generatedHashes.length > 0) {\n const genRoles = new Map<string, number[]>()\n for (let i = 0; i < generatedHashes.length; i++) {\n genRoles.set(`hole:${i}`, [generatedHashes[i]!])\n }\n roleTable.set(outStmt, genRoles)\n }\n return { result: evo.result, faceEvolution, roleTable }\n}\n\n/** 单输入 roleTable 传播(结构等价于 naming/roles.propagateAllOrigins,避免循环依赖)。 */\nfunction propagateAllOriginsLocal(\n roles: ReadonlyMap<unknown, unknown>,\n evolution: HashEvolution,\n): ReadonlyMap<unknown, unknown> {\n const result = new Map<unknown, unknown>()\n for (const [origin, originRoles] of roles) {\n result.set(origin, propagateOriginRoles(originRoles as ReadonlyMap<string, readonly number[]>, evolution))\n }\n return result\n}\n"]}
|
|
@@ -19,7 +19,7 @@ import type { BrepEngineApi } from './engine/primitives.js';
|
|
|
19
19
|
* ("OCCT kernel") no longer matches what it returns — the current engine's raw
|
|
20
20
|
* kernel, whatever engine that is. Prefer `getBrepApi()` (typed, engine-neutral,
|
|
21
21
|
* same file) for neutral ops; platform-only code (L2 face) should use
|
|
22
|
-
* `getOcctKernel()` (D3). Kept for
|
|
22
|
+
* `getOcctKernel()` (D3). Kept for compat-face bridging and existing tests.
|
|
23
23
|
* @returns the current BREP engine's kernel instance.
|
|
24
24
|
* @throws when the kernel is not ready (mesh mode or uninitialized) — never silently returns null.
|
|
25
25
|
*/
|
|
@@ -48,7 +48,7 @@ export interface MeshHandleOptions {
|
|
|
48
48
|
/**
|
|
49
49
|
* OCC 句柄身份契约判别(单一真源)。
|
|
50
50
|
*
|
|
51
|
-
* occt-wasm 的 `handle()` 工厂(
|
|
51
|
+
* occt-wasm 的 `handle()` 工厂(occtWasm helpers.ts:25)构造的句柄对象
|
|
52
52
|
* 统一携带 `__occtWasm: true`。本叶子是 faijs 侧唯一允许的判据:
|
|
53
53
|
* define-op 的 `wrapBrepOne` 用它区分"几何句柄"与"纯数据记录",本文件
|
|
54
54
|
* `fromHandle`/`meshHandle` 入口用它做形态断言。禁止在其他文件硬编码
|
|
@@ -18,7 +18,7 @@ import { fromBrep } from '../shape.js';
|
|
|
18
18
|
* ("OCCT kernel") no longer matches what it returns — the current engine's raw
|
|
19
19
|
* kernel, whatever engine that is. Prefer `getBrepApi()` (typed, engine-neutral,
|
|
20
20
|
* same file) for neutral ops; platform-only code (L2 face) should use
|
|
21
|
-
* `getOcctKernel()` (D3). Kept for
|
|
21
|
+
* `getOcctKernel()` (D3). Kept for compat-face bridging and existing tests.
|
|
22
22
|
* @returns the current BREP engine's kernel instance.
|
|
23
23
|
* @throws when the kernel is not ready (mesh mode or uninitialized) — never silently returns null.
|
|
24
24
|
*/
|
|
@@ -50,7 +50,7 @@ export function getBrepApi() {
|
|
|
50
50
|
/**
|
|
51
51
|
* OCC 句柄身份契约判别(单一真源)。
|
|
52
52
|
*
|
|
53
|
-
* occt-wasm 的 `handle()` 工厂(
|
|
53
|
+
* occt-wasm 的 `handle()` 工厂(occtWasm helpers.ts:25)构造的句柄对象
|
|
54
54
|
* 统一携带 `__occtWasm: true`。本叶子是 faijs 侧唯一允许的判据:
|
|
55
55
|
* define-op 的 `wrapBrepOne` 用它区分"几何句柄"与"纯数据记录",本文件
|
|
56
56
|
* `fromHandle`/`meshHandle` 入口用它做形态断言。禁止在其他文件硬编码
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-bridge.js","sourceRoot":"","sources":["../../src/brep/handle-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAWnC;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS;IACvB,MAAM,MAAM,GAAG,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAA;IACxC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,yFAAyF,CAAC,CAAA;IAC5G,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU;IACxB,MAAM,MAAM,GAAG,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAA;IACxC,IAAI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,CAAC;QAChE,OAAO,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,OAA4B,CAAC;KAC5D,CAAA;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,MAAe,EAAE,IAAwB;IAClE,aAAa,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACnC,OAAO,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;AAC9D,CAAC","sourcesContent":["/**\n * handle-bridge — OCCT 句柄 → faijs Shape 的 SDK 桥接(B1)\n *\n *\n * 第三方库要造 BREP 产物,需要\"OCCT handle → mesh\"。`src/brep/brep-ops.ts:17`\n * 有 `import * as THREE from 'three'`,SDK 绝不能 import 它(会把 three 拉进\n * SDK bundle,违反 `src/sdk.test.ts` 的零 heavy 依赖守卫)。本文件在**新建的\n * 零依赖模块**中实现,直接调运行时注入的 `kernel.meshShape`。\n *\n * 依赖约束(硬性):只允许 import `runtime-state`、`api/shape`、type-only\n * `mesh/types`——任何新增依赖必须保持 dist/sdk.js 零 heavy 依赖守卫通过。\n */\n\nimport type { Shape } from '../mesh/types'\nimport { getBackends } from '../runtime-state'\nimport { fromBrep } from '../shape'\nimport type { BrepEngineApi } from './engine/primitives'\n\n/** 结构化内核接口(不 import occt-wasm,只做结构匹配,避免 heavy 依赖) */\ninterface MeshableKernel {\n meshShape(\n handle: unknown,\n opts: { linearDeflection: number; angularDeflection: number },\n ): { positions: ArrayLike<number>; indices: ArrayLike<number> }\n}\n\n/**\n * Get the currently injected BREP kernel instance (untyped escape hatch).\n * @deprecated D12: this exit predates the engine-neutral L1 surface and its name\n * (\"OCCT kernel\") no longer matches what it returns — the current engine's raw\n * kernel, whatever engine that is. Prefer `getBrepApi()` (typed, engine-neutral,\n * same file) for neutral ops; platform-only code (L2 face) should use\n * `getOcctKernel()` (D3). Kept for
|
|
1
|
+
{"version":3,"file":"handle-bridge.js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C9E,wDAAwD,CAC3D,CAAA;IACH,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,MAAe,EAAE,IAAwB;IAClE,aAAa,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACnC,MAAM,MAAM,GAAG,SAAS,EAAoB,CAAA;IAC5C,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE;QACpC,gBAAgB,EAAE,IAAI,EAAE,gBAAgB,IAAI,GAAG;QAC/C,iBAAiB,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC;KACrE,CAAC,CAAA;IACF,OAAO;QACL,SAAS,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,SAA8B,CAAC;QAChE,OAAO,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,OAA4B,CAAC;KAC5D,CAAA;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,MAAe,EAAE,IAAwB;IAClE,aAAa,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACnC,OAAO,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;AAC9D,CAAC","sourcesContent":["/**\n * handle-bridge — OCCT 句柄 → faijs Shape 的 SDK 桥接(B1)\n *\n *\n * 第三方库要造 BREP 产物,需要\"OCCT handle → mesh\"。`src/brep/brep-ops.ts:17`\n * 有 `import * as THREE from 'three'`,SDK 绝不能 import 它(会把 three 拉进\n * SDK bundle,违反 `src/sdk.test.ts` 的零 heavy 依赖守卫)。本文件在**新建的\n * 零依赖模块**中实现,直接调运行时注入的 `kernel.meshShape`。\n *\n * 依赖约束(硬性):只允许 import `runtime-state`、`api/shape`、type-only\n * `mesh/types`——任何新增依赖必须保持 dist/sdk.js 零 heavy 依赖守卫通过。\n */\n\nimport type { Shape } from '../mesh/types'\nimport { getBackends } from '../runtime-state'\nimport { fromBrep } from '../shape'\nimport type { BrepEngineApi } from './engine/primitives'\n\n/** 结构化内核接口(不 import occt-wasm,只做结构匹配,避免 heavy 依赖) */\ninterface MeshableKernel {\n meshShape(\n handle: unknown,\n opts: { linearDeflection: number; angularDeflection: number },\n ): { positions: ArrayLike<number>; indices: ArrayLike<number> }\n}\n\n/**\n * Get the currently injected BREP kernel instance (untyped escape hatch).\n * @deprecated D12: this exit predates the engine-neutral L1 surface and its name\n * (\"OCCT kernel\") no longer matches what it returns — the current engine's raw\n * kernel, whatever engine that is. Prefer `getBrepApi()` (typed, engine-neutral,\n * same file) for neutral ops; platform-only code (L2 face) should use\n * `getOcctKernel()` (D3). Kept for compat-face bridging and existing tests.\n * @returns the current BREP engine's kernel instance.\n * @throws when the kernel is not ready (mesh mode or uninitialized) — never silently returns null.\n */\nexport function getKernel(): unknown {\n const kernel = getBackends().kernel.brep\n if (!kernel) {\n throw new Error('[faijs/bridge] OCCT kernel not available: BREP operations require an initialized kernel')\n }\n return kernel\n}\n\n/**\n * Get the current BREP engine as the **L1 core surface** (`BrepEngineApi`).\n *\n * 2026-09-24 narrowing plan(D12):中立 op 的取内核唯一出口——取代\n * `getBackends().kernel.brep as BrepEngineApi` 的逐点断言。本文件是 L1 契约\n * 的注册点(`registerBrepEngine` 注入的就是 `BrepEngineApi` 实例),此处断言\n * 诚实;平台面(L1 之外的 occt 独有能力)仍走 `getOcctKernel()`(D3)。\n *\n * @returns the current engine's L1 contract surface (`BrepEngineApi`) — typed, engine-neutral.\n * @throws when no BREP engine is registered (uninitialized) — never silently returns null.\n */\nexport function getBrepApi(): BrepEngineApi {\n const kernel = getBackends().kernel.brep\n if (!kernel) {\n throw new Error(\n '[faijs/bridge] BREP engine API not available: BREP operations require an initialized engine',\n )\n }\n return kernel as BrepEngineApi\n}\n\n/**\n * Options controlling how a handle is tessellated.\n */\nexport interface MeshHandleOptions {\n /** linear deflection (mm), default 0.1 — matches the built-in ops (src/brep/brep-ops.ts:27). */\n linearDeflection?: number\n /** angular segment count, default 32 — angularDeflection = 2π / segments. */\n segments?: number\n}\n\n/**\n * OCC 句柄身份契约判别(单一真源)。\n *\n * occt-wasm 的 `handle()` 工厂(occtWasm helpers.ts:25)构造的句柄对象\n * 统一携带 `__occtWasm: true`。本叶子是 faijs 侧唯一允许的判据:\n * define-op 的 `wrapBrepOne` 用它区分\"几何句柄\"与\"纯数据记录\",本文件\n * `fromHandle`/`meshHandle` 入口用它做形态断言。禁止在其他文件硬编码\n * `'__occtWasm' in v` 字符串直查——句柄/数据判定的任何新消费点都必须引用本叶子。\n * @param v - 待判别的值。\n * @returns `true` 当且仅当 `v` 是携带 `__occtWasm: true` 标记的句柄对象。\n */\nexport function isOcctHandle(v: unknown): boolean {\n return typeof v === 'object' && v !== null && (v as { __occtWasm?: unknown }).__occtWasm === true\n}\n\n/** 合法句柄输入:branded numeric id(occt-wasm 的 `ShapeHandle` 运行时形态)或\n * `__occtWasm` 标记对象(`handle()` 工厂产物)。 */\nfunction isHandleLike(v: unknown): boolean {\n return typeof v === 'number' || isOcctHandle(v)\n}\n\n/**\n * 入口形态断言:拒绝把纯数据记录当句柄三角化。\n * 纯数据记录(无 `__occtWasm` 标记的 plain object,如 sheetmetal part 数据)\n * 必须在 SDK 边界被显式拒绝(E_BAD_HANDLE),而不是在 kernel 深处以\n * `OcctError: meshShape: Invalid shape ID 0` 崩溃——define-op 的 wrapBrepOne\n * 已在第一道透传过滤,本断言是第二道防线(防未来未带标记的新句柄形态漏网)。\n */\nfunction requireHandle(handle: unknown, caller: string): void {\n if (!isHandleLike(handle)) {\n throw new Error(\n `[faijs/bridge] ${caller}: E_BAD_HANDLE: expected an OCCT handle (numeric id or ` +\n `__occtWasm-tagged object); got ${handle === null ? 'null' : typeof handle}. ` +\n `Plain data records must not be tessellated as handles.`,\n )\n }\n}\n\n/**\n * Tessellate an OCCT handle into a Shape (without registering a BREP slot).\n * @param handle - the OCCT solid handle to tessellate (numeric id or `__occtWasm`-tagged object).\n * @param opts - optional tessellation options.\n * @returns the tessellated Shape.\n */\nexport function meshHandle(handle: unknown, opts?: MeshHandleOptions): Shape {\n requireHandle(handle, 'meshHandle')\n const kernel = getKernel() as MeshableKernel\n const mesh = kernel.meshShape(handle, {\n linearDeflection: opts?.linearDeflection ?? 0.1,\n angularDeflection: (2 * Math.PI) / Math.max(3, opts?.segments ?? 32),\n })\n return {\n positions: new Float32Array(mesh.positions as ArrayLike<number>),\n indices: new Uint32Array(mesh.indices as ArrayLike<number>),\n }\n}\n\n/**\n * Default path (recommended): tessellate + register the BREP slot in one step.\n * Equivalent to meshHandle(h) + fromBrep(sh, { solid: h }).\n * Library authors only fall back to the meshHandle + fromBrep combination when\n * they need custom tessellation precision.\n * @param handle - the OCCT solid handle to bridge (numeric id or `__occtWasm`-tagged object).\n * @param opts - optional tessellation options.\n * @returns the registered Shape, as returned by fromBrep.\n */\nexport function fromHandle(handle: unknown, opts?: MeshHandleOptions): ReturnType<typeof fromBrep> {\n requireHandle(handle, 'fromHandle')\n return fromBrep(meshHandle(handle, opts), { solid: handle })\n}\n"]}
|
package/dist/brep/index.d.ts
CHANGED
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
* - brep-ops.ts: 核心 BREP 操作(变换、布尔、钻孔、分割、拉伸)
|
|
6
6
|
* - brep-chain.ts: BREP 链状态管理
|
|
7
7
|
* - brep-utils.ts: 通用工具
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
8
|
+
* - brep-topology.ts / primitives-brep.ts / mesh-solid.ts: 拓扑查询、原型、实体化
|
|
9
|
+
* - face-evolution.ts / handle-bridge.ts / effective-deflection.ts: 面演化、句柄桥、偏转
|
|
10
|
+
* - engine/: BREP 引擎注册表与适配器(adapters/ 下 occt、brepkit、brep-mock)
|
|
11
|
+
* - export/: 导出(stl.ts、step.ts、export-model.ts)
|
|
12
|
+
* - svg/: SVG → 实体
|
|
13
|
+
* - text/: 文字 BREP(fontRegistry.ts、text-to-solid.ts)
|
|
11
14
|
*/
|
|
12
15
|
export { solidToShape, translateBrep, rotateBrep, scaleBrep, fuseBrep, cutBrep, commonBrep, drillBrep, splitBrep, extrudeBrep, loadBrep, matrixToArray, type DrillBrepParams, type SplitBrepParams, type SplitBrepResult, type ExtrudeBrepParams, } from './brep-ops.js';
|
|
13
16
|
export { type BrepChainState, createBrepChainState, initBrepChainState, releaseBrepChainState, isCadFormat, } from './brep-chain.js';
|
package/dist/brep/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/brep/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/brep/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EACL,YAAY,EACZ,aAAa,EAAE,UAAU,EAAE,SAAS,EACpC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAC7B,SAAS,EAAE,SAAS,EAAE,WAAW,EACjC,QAAQ,EAAE,aAAa,EACvB,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,KAAK,iBAAiB,GACzF,MAAM,YAAY,CAAA;AAGnB,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EAAE,kBAAkB,EACxC,qBAAqB,EACrB,WAAW,GACZ,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA"}
|
package/dist/brep/index.js
CHANGED
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
* - brep-ops.ts: 核心 BREP 操作(变换、布尔、钻孔、分割、拉伸)
|
|
6
6
|
* - brep-chain.ts: BREP 链状态管理
|
|
7
7
|
* - brep-utils.ts: 通用工具
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
8
|
+
* - brep-topology.ts / primitives-brep.ts / mesh-solid.ts: 拓扑查询、原型、实体化
|
|
9
|
+
* - face-evolution.ts / handle-bridge.ts / effective-deflection.ts: 面演化、句柄桥、偏转
|
|
10
|
+
* - engine/: BREP 引擎注册表与适配器(adapters/ 下 occt、brepkit、brep-mock)
|
|
11
|
+
* - export/: 导出(stl.ts、step.ts、export-model.ts)
|
|
12
|
+
* - svg/: SVG → 实体
|
|
13
|
+
* - text/: 文字 BREP(fontRegistry.ts、text-to-solid.ts)
|
|
11
14
|
*/
|
|
12
15
|
// 核心 BREP 操作
|
|
13
16
|
export { solidToShape, translateBrep, rotateBrep, scaleBrep, fuseBrep, cutBrep, commonBrep, drillBrep, splitBrep, extrudeBrep, loadBrep, matrixToArray, } from './brep-ops.js';
|
package/dist/brep/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/brep/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/brep/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,aAAa;AACb,OAAO,EACL,YAAY,EACZ,aAAa,EAAE,UAAU,EAAE,SAAS,EACpC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAC7B,SAAS,EAAE,SAAS,EAAE,WAAW,EACjC,QAAQ,EAAE,aAAa,GAExB,MAAM,YAAY,CAAA;AAEnB,aAAa;AACb,OAAO,EAEL,oBAAoB,EAAE,kBAAkB,EACxC,qBAAqB,EACrB,WAAW,GACZ,MAAM,cAAc,CAAA;AAErB,OAAO;AACP,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAElD,yDAAyD;AACzD,oFAAoF","sourcesContent":["/**\n * BREP 操作统一导出\n *\n * 目录结构:\n * - brep-ops.ts: 核心 BREP 操作(变换、布尔、钻孔、分割、拉伸)\n * - brep-chain.ts: BREP 链状态管理\n * - brep-utils.ts: 通用工具\n * - brep-topology.ts / primitives-brep.ts / mesh-solid.ts: 拓扑查询、原型、实体化\n * - face-evolution.ts / handle-bridge.ts / effective-deflection.ts: 面演化、句柄桥、偏转\n * - engine/: BREP 引擎注册表与适配器(adapters/ 下 occt、brepkit、brep-mock)\n * - export/: 导出(stl.ts、step.ts、export-model.ts)\n * - svg/: SVG → 实体\n * - text/: 文字 BREP(fontRegistry.ts、text-to-solid.ts)\n */\n\n// 核心 BREP 操作\nexport {\n solidToShape,\n translateBrep, rotateBrep, scaleBrep,\n fuseBrep, cutBrep, commonBrep,\n drillBrep, splitBrep, extrudeBrep,\n loadBrep, matrixToArray,\n type DrillBrepParams, type SplitBrepParams, type SplitBrepResult, type ExtrudeBrepParams,\n} from './brep-ops'\n\n// BREP 链状态管理\nexport {\n type BrepChainState,\n createBrepChainState, initBrepChainState,\n releaseBrepChainState,\n isCadFormat,\n} from './brep-chain'\n\n// 通用工具\nexport { getSolidBoundingBox } from './brep-utils'\n\n// F4 修复:不再反向 re-export executeStatement(ops/dispatcher)。\n// brep/ 不应 re-export ops/ 的符号。宿主从 @faicad/faijs/browser 直接 import executeStatement。\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* brepkit-kernel/brepkitKernel — brepkit 内核 → faijs BrepEngineApi 适配器
|
|
3
3
|
*
|
|
4
|
-
* Phase 4
|
|
4
|
+
* Phase 4:
|
|
5
5
|
* 本文件是 L1 契约 `BrepEngineApi` 的 **brepkit 显式对象字面量实现**——与 occt 侧
|
|
6
6
|
* `occt-primitives.ts` 同构:逐方法接线、方言在适配器内消化、零 `unsupported()` 桩。
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* brepkit-kernel/brepkitKernel — brepkit 内核 → faijs BrepEngineApi 适配器
|
|
3
3
|
*
|
|
4
|
-
* Phase 4
|
|
4
|
+
* Phase 4:
|
|
5
5
|
* 本文件是 L1 契约 `BrepEngineApi` 的 **brepkit 显式对象字面量实现**——与 occt 侧
|
|
6
6
|
* `occt-primitives.ts` 同构:逐方法接线、方言在适配器内消化、零 `unsupported()` 桩。
|
|
7
7
|
*
|
|
@@ -730,7 +730,7 @@ export async function createBrepkitPrimitives() {
|
|
|
730
730
|
},
|
|
731
731
|
circularPattern(shape, _center, axis, _angleStep, count) {
|
|
732
732
|
// ⚠️ brepkit wasm circularPattern(solid, ax, ay, az, count) 无 center/angle 参数:
|
|
733
|
-
// 固定整圆均分(每份 360°/count)。fullAngle=360 时与
|
|
733
|
+
// 固定整圆均分(每份 360°/count)。fullAngle=360 时与 occt 语义一致;
|
|
734
734
|
// 其它角度跨度无法表达(语义限制记录于此,parity 测试用整圆)。
|
|
735
735
|
const compound = kernel.circularPattern(asNum(shape), axis.x, axis.y, axis.z, count);
|
|
736
736
|
return markSolids(arr(kernel.getCompoundSolids(compound))).map(asHandle);
|