@metamesh/modeling 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/README.md +67 -9
- package/dist/api/engine.d.ts +14 -7
- package/dist/api/geometry.d.ts +787 -447
- package/dist/api/index.d.ts +637 -250
- package/dist/api/text.d.ts +6 -4
- package/dist/docs/guides/concepts.md +135 -17
- package/dist/docs/guides/fonts.md +8 -0
- package/dist/docs/guides/fundamentals.md +8 -3
- package/dist/docs/guides/generation.md +6 -4
- package/dist/docs/guides/hosting.md +27 -14
- package/dist/docs/guides/recipes.md +82 -11
- package/dist/docs/manifest.json +1911 -856
- package/dist/docs/reference/engine/Export3mfOptions.md +1 -1
- package/dist/docs/reference/engine/ExportMeshPart.md +1 -1
- package/dist/docs/reference/engine/GenerationOptions.md +1 -1
- package/dist/docs/reference/engine/GeometryResource.md +1 -1
- package/dist/docs/reference/engine/ModelDependencies.md +1 -1
- package/dist/docs/reference/engine/ModelEngine.md +1 -1
- package/dist/docs/reference/engine/ModelEngineOptions.md +4 -8
- package/dist/docs/reference/engine/ModelSession.md +1 -1
- package/dist/docs/reference/engine/ModelSnapshot.md +20 -9
- package/dist/docs/reference/engine/SessionOptions.md +1 -1
- package/dist/docs/reference/engine/SnapshotPart.md +4 -4
- package/dist/docs/reference/engine/categories/host-lifecycle.md +2 -2
- package/dist/docs/reference/engine/createModelEngine.md +3 -3
- package/dist/docs/reference/engine/defaultModelingLimits.md +1 -1
- package/dist/docs/reference/engine/modelingWasmUrl.md +1 -1
- package/dist/docs/reference/engine/validateModel.md +1 -1
- package/dist/docs/reference/engine.md +2 -2
- package/dist/docs/reference/geometry/AcmeThreadProfileSpec.md +1 -1
- package/dist/docs/reference/geometry/AlignedCircularSegmentsOptions.md +17 -4
- package/dist/docs/reference/geometry/{Anchor3.md → Anchor3-type.md} +9 -5
- package/dist/docs/reference/geometry/ArcCurve2.md +7 -7
- package/dist/docs/reference/geometry/ArcCurve3.md +9 -9
- package/dist/docs/reference/geometry/{AttachTransformOptions.md → AttachOptions.md} +14 -5
- package/dist/docs/reference/geometry/AxisAngleRotation3.md +6 -1
- package/dist/docs/reference/geometry/Bounds2.md +4 -4
- package/dist/docs/reference/geometry/Bounds3.md +4 -4
- package/dist/docs/reference/geometry/BoundsFit2.md +3 -3
- package/dist/docs/reference/geometry/BoundsFit3.md +3 -3
- package/dist/docs/reference/geometry/BoundsFitOptions.md +1 -1
- package/dist/docs/reference/geometry/BoundsFromSizeOptions.md +1 -1
- package/dist/docs/reference/geometry/BoxAnchorFace.md +8 -1
- package/dist/docs/reference/geometry/BoxAnchorOptions.md +8 -4
- package/dist/docs/reference/geometry/BoxEdge.md +1 -1
- package/dist/docs/reference/geometry/BoxEdgeSelection.md +1 -1
- package/dist/docs/reference/geometry/BoxEdgeTreatments.md +1 -1
- package/dist/docs/reference/geometry/BoxOptions.md +10 -10
- package/dist/docs/reference/geometry/ButtressPressureFlankSide.md +1 -1
- package/dist/docs/reference/geometry/ButtressThreadProfileSpec.md +1 -1
- package/dist/docs/reference/geometry/ChamferedEdgeTreatment.md +1 -1
- package/dist/docs/reference/geometry/CircleContourOptions.md +1 -1
- package/dist/docs/reference/geometry/CircularPrimitiveOptions.md +1 -1
- package/dist/docs/reference/geometry/CircularResolutionOptions.md +107 -0
- package/dist/docs/reference/geometry/ClearanceHoleDimensions.md +1 -1
- package/dist/docs/reference/geometry/ClearanceHoleFit.md +1 -1
- package/dist/docs/reference/geometry/CompensatedThreadDiameters.md +1 -1
- package/dist/docs/reference/geometry/Contour.md +3 -3
- package/dist/docs/reference/geometry/ContourCurve.md +1 -1
- package/dist/docs/reference/geometry/ContourPoint.md +1 -1
- package/dist/docs/reference/geometry/ContourSegment.md +1 -1
- package/dist/docs/reference/geometry/CorrespondingComponent.md +1 -1
- package/dist/docs/reference/geometry/CorrespondingContour.md +1 -1
- package/dist/docs/reference/geometry/CorrespondingProfile.md +1 -1
- package/dist/docs/reference/geometry/CorrespondingProfileStation.md +1 -1
- package/dist/docs/reference/geometry/CubicBezierCurve2.md +6 -6
- package/dist/docs/reference/geometry/CubicBezierCurve3.md +6 -6
- package/dist/docs/reference/geometry/Curve2.md +1 -1
- package/dist/docs/reference/geometry/Curve3.md +1 -1
- package/dist/docs/reference/geometry/CurveSamplingOptions.md +5 -3
- package/dist/docs/reference/geometry/CustomThreadProfileSpec.md +3 -3
- package/dist/docs/reference/geometry/CylinderAnchorFace.md +8 -1
- package/dist/docs/reference/geometry/CylinderAnchorOptions.md +9 -5
- package/dist/docs/reference/geometry/CylinderOptions.md +3 -3
- package/dist/docs/reference/geometry/CylindricalGearDimensions.md +3 -3
- package/dist/docs/reference/geometry/CylindricalGearMeshKind.md +1 -1
- package/dist/docs/reference/geometry/CylindricalGearOutlineOptions.md +1 -1
- package/dist/docs/reference/geometry/CylindricalGearPairDimensions.md +3 -3
- package/dist/docs/reference/geometry/CylindricalGearPairMotionOptions.md +1 -1
- package/dist/docs/reference/geometry/CylindricalGearPairMotionReport.md +1 -1
- package/dist/docs/reference/geometry/CylindricalGearPairSpec.md +1 -1
- package/dist/docs/reference/geometry/CylindricalGearSpec.md +6 -6
- package/dist/docs/reference/geometry/DEFAULT_GEOMETRY_TOLERANCE.md +1 -1
- package/dist/docs/reference/geometry/EdgeTreatment.md +1 -1
- package/dist/docs/reference/geometry/EllipseContourOptions.md +3 -3
- package/dist/docs/reference/geometry/EndTreatments.md +1 -1
- package/dist/docs/reference/geometry/ExtrudeOptions.md +6 -6
- package/dist/docs/reference/geometry/ExtrusionSamplingOptions.md +5 -5
- package/dist/docs/reference/geometry/FittedTextLayout.md +1 -1
- package/dist/docs/reference/geometry/Frame3.md +6 -6
- package/dist/docs/reference/geometry/GeometryError.md +1 -1
- package/dist/docs/reference/geometry/GeometryErrorCode.md +1 -1
- package/dist/docs/reference/geometry/GeometryErrorContext.md +1 -1
- package/dist/docs/reference/geometry/GeometryResolution.md +14 -5
- package/dist/docs/reference/geometry/GeometrySamplingLimits.md +1 -1
- package/dist/docs/reference/geometry/GeometryToleranceOptions.md +1 -1
- package/dist/docs/reference/geometry/GridPatternOptions.md +11 -5
- package/dist/docs/reference/geometry/HeightfieldMeshLimits.md +1 -1
- package/dist/docs/reference/geometry/HeightfieldOptions.md +5 -5
- package/dist/docs/reference/geometry/HeightfieldPreflight.md +1 -1
- package/dist/docs/reference/geometry/HelicalThreadRidgeMeshOptions.md +5 -5
- package/dist/docs/reference/geometry/HelicalThreadSolidMeshOptions.md +6 -6
- package/dist/docs/reference/geometry/HelicalThreadSolidMeshPreflight.md +1 -1
- package/dist/docs/reference/geometry/IDENTITY_TRANSFORM3.md +7 -3
- package/dist/docs/reference/geometry/InternalThreadCutterOptions.md +6 -6
- package/dist/docs/reference/geometry/LineCurve2.md +4 -4
- package/dist/docs/reference/geometry/LineCurve3.md +4 -4
- package/dist/docs/reference/geometry/LinearPatternOptions.md +12 -5
- package/dist/docs/reference/geometry/LoftCorrespondence.md +1 -1
- package/dist/docs/reference/geometry/LoftMeshStation.md +4 -4
- package/dist/docs/reference/geometry/LoftOptions.md +1 -1
- package/dist/docs/reference/geometry/LoftPlacement.md +1 -1
- package/dist/docs/reference/geometry/METRIC_FASTENER_STANDARDS.md +1 -1
- package/dist/docs/reference/geometry/MatchProfilesOptions.md +1 -1
- package/dist/docs/reference/geometry/MetricFastenerSize.md +1 -1
- package/dist/docs/reference/geometry/MetricFastenerStandard.md +1 -1
- package/dist/docs/reference/geometry/MetricHexNutDimensions.md +1 -1
- package/dist/docs/reference/geometry/MetricSocketCapHeadDimensions.md +1 -1
- package/dist/docs/reference/geometry/ModelingLimits.md +1 -1
- package/dist/docs/reference/geometry/PRINTABLE_THREAD_FIT_POLICIES.md +1 -1
- package/dist/docs/reference/geometry/Path2-type.md +192 -0
- package/dist/docs/reference/geometry/Path2Data.md +14 -0
- package/dist/docs/reference/geometry/Path2Input.md +15 -0
- package/dist/docs/reference/geometry/Path3-type.md +192 -0
- package/dist/docs/reference/geometry/Path3Data.md +14 -0
- package/dist/docs/reference/geometry/Path3Input.md +15 -0
- package/dist/docs/reference/geometry/PathFrame.md +5 -5
- package/dist/docs/reference/geometry/PathLocation.md +65 -0
- package/dist/docs/reference/geometry/PathNormalGuide.md +6 -5
- package/dist/docs/reference/geometry/PathOptions.md +34 -0
- package/dist/docs/reference/geometry/PathPatternOptions.md +3 -3
- package/dist/docs/reference/geometry/PathPlacement.md +4 -4
- package/dist/docs/reference/geometry/PathResamplingOptions.md +80 -0
- package/dist/docs/reference/geometry/Pivot2Options.md +26 -0
- package/dist/docs/reference/geometry/Pivot3Options.md +26 -0
- package/dist/docs/reference/geometry/PlanarMeshOptimizationFallbackReason.md +1 -1
- package/dist/docs/reference/geometry/PlanarMeshOptimizationOptions.md +22 -22
- package/dist/docs/reference/geometry/PlanarMeshOptimizationResult.md +1 -1
- package/dist/docs/reference/geometry/PlanarPatchQuality.md +3 -3
- package/dist/docs/reference/geometry/{Polygon.md → PolygonData.md} +2 -2
- package/dist/docs/reference/geometry/PolylineResamplingOptions.md +4 -4
- package/dist/docs/reference/geometry/PrimitiveAttachment.md +31 -0
- package/dist/docs/reference/geometry/PrimitiveAttachmentOptions.md +104 -0
- package/dist/docs/reference/geometry/PrintableThreadFit.md +1 -1
- package/dist/docs/reference/geometry/PrintableThreadFitPolicy.md +1 -1
- package/dist/docs/reference/geometry/Profile.md +1 -1
- package/dist/docs/reference/geometry/ProfileComponent2.md +1 -1
- package/dist/docs/reference/geometry/ProfileContour2.md +1 -1
- package/dist/docs/reference/geometry/ProfileSpan2.md +3 -3
- package/dist/docs/reference/geometry/ProfiledEdgeTreatment.md +3 -3
- package/dist/docs/reference/geometry/RackPitchDimensions.md +1 -1
- package/dist/docs/reference/geometry/RackPitchSpec.md +5 -5
- package/dist/docs/reference/geometry/RadialPatternOptions.md +17 -22
- package/dist/docs/reference/geometry/RadialSizing.md +1 -1
- package/dist/docs/reference/geometry/RadialSizingOptions.md +1 -1
- package/dist/docs/reference/geometry/RectangleContourOptions.md +3 -3
- package/dist/docs/reference/geometry/RectangleCornerTreatment.md +1 -1
- package/dist/docs/reference/geometry/RectangleCornerTreatments.md +1 -1
- package/dist/docs/reference/geometry/RectangleProfileOptions.md +3 -3
- package/dist/docs/reference/geometry/RegionData.md +14 -0
- package/dist/docs/reference/geometry/RegularPolygonContourOptions.md +3 -3
- package/dist/docs/reference/geometry/ResolvedGeometryTolerance.md +1 -1
- package/dist/docs/reference/geometry/RevolveOptions.md +9 -4
- package/dist/docs/reference/geometry/RoundedEdgeTreatment.md +1 -1
- package/dist/docs/reference/geometry/RowLayoutOptions.md +1 -1
- package/dist/docs/reference/geometry/SampleContourOptions.md +3 -3
- package/dist/docs/reference/geometry/SampleHelixOptions.md +1 -1
- package/dist/docs/reference/geometry/SampleSideProfileOptions.md +3 -3
- package/dist/docs/reference/geometry/SampledCurve2.md +4 -4
- package/dist/docs/reference/geometry/SampledCurve3.md +4 -4
- package/dist/docs/reference/geometry/SampledThreadHelices.md +3 -3
- package/dist/docs/reference/geometry/SideProfileCurve.md +1 -1
- package/dist/docs/reference/geometry/SideProfilePoint.md +1 -1
- package/dist/docs/reference/geometry/SideProfileSegment.md +1 -1
- package/dist/docs/reference/geometry/SmoothEdgeTreatment.md +1 -1
- package/dist/docs/reference/geometry/SolidMeshValidationOptions.md +3 -3
- package/dist/docs/reference/geometry/SphereOptions.md +3 -3
- package/dist/docs/reference/geometry/SquareThreadProfileSpec.md +1 -1
- package/dist/docs/reference/geometry/StrokeCap.md +7 -0
- package/dist/docs/reference/geometry/StrokeJoin.md +7 -0
- package/dist/docs/reference/geometry/{StrokePathRegionOptions.md → StrokeOptions.md} +8 -8
- package/dist/docs/reference/geometry/SvgImportOptions.md +1 -1
- package/dist/docs/reference/geometry/SvgRegionPreflight.md +3 -3
- package/dist/docs/reference/geometry/SvgRegionPreflightGeometryMetrics.md +13 -13
- package/dist/docs/reference/geometry/SvgRegionPreflightRepairs.md +11 -11
- package/dist/docs/reference/geometry/SvgRegionPreflightSourceMetrics.md +9 -9
- package/dist/docs/reference/geometry/SweepOptions.md +6 -6
- package/dist/docs/reference/geometry/SweepOrientation.md +7 -7
- package/dist/docs/reference/geometry/ThreadBevelOptions.md +1 -1
- package/dist/docs/reference/geometry/ThreadCircularSegmentsOptions.md +5 -5
- package/dist/docs/reference/geometry/ThreadCompensationOptions.md +1 -1
- package/dist/docs/reference/geometry/ThreadEndStyle.md +1 -1
- package/dist/docs/reference/geometry/ThreadEndTreatmentOptions.md +1 -1
- package/dist/docs/reference/geometry/ThreadHandedness.md +1 -1
- package/dist/docs/reference/geometry/ThreadHelixOptions.md +3 -3
- package/dist/docs/reference/geometry/ThreadLeadInEnvelope.md +1 -1
- package/dist/docs/reference/geometry/ThreadLeadInShape.md +1 -1
- package/dist/docs/reference/geometry/{ThreadProfile.md → ThreadProfile-type.md} +3 -3
- package/dist/docs/reference/geometry/ThreadProfileBaseSpec.md +1 -1
- package/dist/docs/reference/geometry/ThreadProfileSpec.md +1 -1
- package/dist/docs/reference/geometry/ThreadRole.md +1 -1
- package/dist/docs/reference/geometry/ThreadedNutBevel.md +1 -1
- package/dist/docs/reference/geometry/ThreadedNutOptions.md +6 -6
- package/dist/docs/reference/geometry/ThreadedNutPreflight.md +1 -1
- package/dist/docs/reference/geometry/ThreadedNutShape.md +1 -1
- package/dist/docs/reference/geometry/ThreadedRodOptions.md +6 -6
- package/dist/docs/reference/geometry/TorusOptions.md +8 -8
- package/dist/docs/reference/geometry/Transform2-type.md +255 -0
- package/dist/docs/reference/geometry/Transform2Input.md +19 -0
- package/dist/docs/reference/geometry/Transform2Matrix.md +14 -0
- package/dist/docs/reference/geometry/Transform3-type.md +295 -0
- package/dist/docs/reference/geometry/Transform3Input.md +19 -0
- package/dist/docs/reference/geometry/Transform3Matrix.md +17 -0
- package/dist/docs/reference/geometry/TrapezoidalThreadProfileSpec.md +5 -4
- package/dist/docs/reference/geometry/TriangleMesh.md +1 -1
- package/dist/docs/reference/geometry/TriangleMeshAnalysis.md +2 -2
- package/dist/docs/reference/geometry/TriangleMeshAnalysisOptions.md +1 -1
- package/dist/docs/reference/geometry/TriangleMeshMeasurements.md +1 -1
- package/dist/docs/reference/geometry/TriangleMeshQualityOptions.md +3 -3
- package/dist/docs/reference/geometry/TriangleMeshQualityReport.md +1 -1
- package/dist/docs/reference/geometry/TriangleMeshSignature.md +2 -2
- package/dist/docs/reference/geometry/TriangleMeshSignatureOptions.md +3 -3
- package/dist/docs/reference/geometry/TriangleMeshSignatureTolerances.md +1 -1
- package/dist/docs/reference/geometry/TriangleMeshValidationOptions.md +1 -1
- package/dist/docs/reference/geometry/TriangularThreadProfileSpec.md +1 -1
- package/dist/docs/reference/geometry/TubeOptions.md +8 -8
- package/dist/docs/reference/geometry/Vector2-type.md +269 -0
- package/dist/docs/reference/geometry/Vector2Input.md +19 -0
- package/dist/docs/reference/geometry/Vector2Tuple.md +14 -0
- package/dist/docs/reference/geometry/Vector3-type.md +281 -0
- package/dist/docs/reference/geometry/Vector3Input.md +19 -0
- package/dist/docs/reference/geometry/Vector3Tuple.md +14 -0
- package/dist/docs/reference/geometry/VectorTextArcBaseline.md +3 -3
- package/dist/docs/reference/geometry/VectorTextLayout.md +1 -1
- package/dist/docs/reference/geometry/VectorTextLayoutOptions.md +1 -1
- package/dist/docs/reference/geometry/VectorTextMetrics.md +1 -1
- package/dist/docs/reference/geometry/VectorTextOptions.md +1 -1
- package/dist/docs/reference/geometry/add2.md +36 -0
- package/dist/docs/reference/geometry/add3.md +10 -6
- package/dist/docs/reference/geometry/analyzeTriangleMesh.md +1 -1
- package/dist/docs/reference/geometry/analyzeTriangleMeshQuality.md +2 -2
- package/dist/docs/reference/geometry/{createAnchor3.md → anchor3.md} +13 -9
- package/dist/docs/reference/geometry/anchorFrame3.md +5 -5
- package/dist/docs/reference/geometry/applyTransformDirection3.md +11 -7
- package/dist/docs/reference/geometry/applyTransformPoint3.md +11 -7
- package/dist/docs/reference/geometry/attachmentTransform3.md +77 -0
- package/dist/docs/reference/geometry/boundsCenter.md +7 -7
- package/dist/docs/reference/geometry/boundsFromSize.md +7 -7
- package/dist/docs/reference/geometry/boundsSize.md +7 -7
- package/dist/docs/reference/geometry/boxAnchor3.md +10 -6
- package/dist/docs/reference/geometry/categories/bounds-layout.md +1 -1
- package/dist/docs/reference/geometry/categories/curves-paths.md +15 -10
- package/dist/docs/reference/geometry/categories/mechanical.md +6 -6
- package/dist/docs/reference/geometry/categories/meshes.md +3 -4
- package/dist/docs/reference/geometry/categories/pattern-placement.md +7 -7
- package/dist/docs/reference/geometry/categories/primitive-options.md +4 -4
- package/dist/docs/reference/geometry/categories/profiles-regions.md +5 -6
- package/dist/docs/reference/geometry/categories/resolution-errors.md +3 -2
- package/dist/docs/reference/geometry/categories/transforms-math.md +41 -12
- package/dist/docs/reference/geometry/categories/vector-import.md +5 -5
- package/dist/docs/reference/geometry/circleContour.md +1 -1
- package/dist/docs/reference/geometry/closeToAxis.md +4 -4
- package/dist/docs/reference/geometry/compensateThreadDiameters.md +1 -1
- package/dist/docs/reference/geometry/compensateThreadProfileAxially.md +5 -5
- package/dist/docs/reference/geometry/compensateThreadProfileForFaceting.md +5 -5
- package/dist/docs/reference/geometry/composeTransform3.md +10 -6
- package/dist/docs/reference/geometry/computeClosedParallelTransportFrames.md +10 -6
- package/dist/docs/reference/geometry/computeParallelTransportFrames.md +8 -7
- package/dist/docs/reference/geometry/computeTriangleMeshCentroid.md +4 -4
- package/dist/docs/reference/geometry/{createTriangleMeshSignature.md → computeTriangleMeshSignature.md} +4 -4
- package/dist/docs/reference/geometry/containsBounds.md +1 -1
- package/dist/docs/reference/geometry/contourContainsPoint.md +4 -4
- package/dist/docs/reference/geometry/cross2.md +36 -0
- package/dist/docs/reference/geometry/cross3.md +10 -6
- package/dist/docs/reference/geometry/cylinderAnchor3.md +10 -6
- package/dist/docs/reference/geometry/defaultGeometrySamplingLimits.md +1 -1
- package/dist/docs/reference/geometry/distance2.md +36 -0
- package/dist/docs/reference/geometry/distance3.md +36 -0
- package/dist/docs/reference/geometry/distributeAlongPath.md +8 -6
- package/dist/docs/reference/geometry/dot2.md +36 -0
- package/dist/docs/reference/geometry/dot3.md +9 -5
- package/dist/docs/reference/geometry/ellipseContour.md +1 -1
- package/dist/docs/reference/geometry/eulerTransform3.md +10 -6
- package/dist/docs/reference/geometry/extrudeMesh.md +8 -8
- package/dist/docs/reference/geometry/fitBounds.md +1 -1
- package/dist/docs/reference/geometry/fitTextLayout.md +1 -1
- package/dist/docs/reference/geometry/frameTransform3.md +8 -4
- package/dist/docs/reference/geometry/{getMetricClearanceHole.md → getMetricClearanceHoleDiameter.md} +3 -3
- package/dist/docs/reference/geometry/getMetricFastenerStandard.md +1 -1
- package/dist/docs/reference/geometry/gridPatternTransforms.md +5 -5
- package/dist/docs/reference/geometry/heightfieldMesh.md +1 -1
- package/dist/docs/reference/geometry/{buildHelicalThreadRidgeMesh.md → helicalThreadRidgeMesh.md} +5 -5
- package/dist/docs/reference/geometry/{buildHelicalThreadSolidMesh.md → helicalThreadSolidMesh.md} +5 -5
- package/dist/docs/reference/geometry/inverseTransform3.md +9 -5
- package/dist/docs/reference/geometry/isGeometryError.md +1 -1
- package/dist/docs/reference/geometry/joinTriangleMeshes.md +1 -1
- package/dist/docs/reference/geometry/layoutRow.md +4 -4
- package/dist/docs/reference/geometry/length2.md +30 -0
- package/dist/docs/reference/geometry/length3.md +8 -4
- package/dist/docs/reference/geometry/lerp2.md +42 -0
- package/dist/docs/reference/geometry/lerp3.md +10 -6
- package/dist/docs/reference/geometry/linearPatternTransforms.md +5 -5
- package/dist/docs/reference/geometry/loftMesh.md +2 -1
- package/dist/docs/reference/geometry/matchProfiles.md +1 -1
- package/dist/docs/reference/geometry/measureInternalCylindricalGearPairMotion.md +3 -2
- package/dist/docs/reference/geometry/meshBounds.md +1 -1
- package/dist/docs/reference/geometry/minimumCylindricalGearToothCountWithoutUndercut.md +3 -3
- package/dist/docs/reference/geometry/normalize2.md +36 -0
- package/dist/docs/reference/geometry/normalize3.md +10 -6
- package/dist/docs/reference/geometry/normalizeContour.md +4 -4
- package/dist/docs/reference/geometry/normalizePolygon.md +5 -5
- package/dist/docs/reference/geometry/normalizeRegion.md +5 -5
- package/dist/docs/reference/geometry/optimizePlanarPatches.md +11 -11
- package/dist/docs/reference/geometry/path2.md +42 -0
- package/dist/docs/reference/geometry/path3.md +42 -0
- package/dist/docs/reference/geometry/pathPatternTransforms.md +8 -8
- package/dist/docs/reference/geometry/preflightHeightfield.md +1 -1
- package/dist/docs/reference/geometry/preflightHelicalThreadSolidMesh.md +3 -3
- package/dist/docs/reference/geometry/preflightInternalThreadCutter.md +3 -3
- package/dist/docs/reference/geometry/preflightSvgRegion.md +1 -1
- package/dist/docs/reference/geometry/preflightThreadedNut.md +3 -3
- package/dist/docs/reference/geometry/preflightThreadedRod.md +3 -3
- package/dist/docs/reference/geometry/projectOntoPlane3.md +10 -6
- package/dist/docs/reference/geometry/radialPatternTransforms.md +4 -20
- package/dist/docs/reference/geometry/rectangleContour.md +2 -2
- package/dist/docs/reference/geometry/rectangleProfile.md +2 -2
- package/dist/docs/reference/geometry/regionArea.md +4 -4
- package/dist/docs/reference/geometry/regionBounds.md +4 -4
- package/dist/docs/reference/geometry/regularPolygonContour.md +5 -5
- package/dist/docs/reference/geometry/resamplePolyline2.md +5 -5
- package/dist/docs/reference/geometry/resamplePolyline3.md +5 -5
- package/dist/docs/reference/geometry/resolveAlignedCircularSegments.md +8 -4
- package/dist/docs/reference/geometry/resolveArcSegments.md +6 -6
- package/dist/docs/reference/geometry/resolveCircularSegments.md +6 -5
- package/dist/docs/reference/geometry/resolveCylindricalGear.md +1 -1
- package/dist/docs/reference/geometry/resolveCylindricalGearPair.md +1 -1
- package/dist/docs/reference/geometry/resolveExtrusionDivisions.md +6 -6
- package/dist/docs/reference/geometry/resolveGeometrySamplingLimits.md +1 -1
- package/dist/docs/reference/geometry/resolveGeometryTolerance.md +1 -1
- package/dist/docs/reference/geometry/resolvePrintableThreadFitPolicy.md +1 -1
- package/dist/docs/reference/geometry/resolveRackPitch.md +1 -1
- package/dist/docs/reference/geometry/resolveThreadCircularSegments.md +4 -4
- package/dist/docs/reference/geometry/reverseTriangleMesh.md +1 -1
- package/dist/docs/reference/geometry/revolveMesh.md +10 -10
- package/dist/docs/reference/geometry/rotate2.md +36 -0
- package/dist/docs/reference/geometry/rotationTransform3.md +10 -6
- package/dist/docs/reference/geometry/roundClosedPolylinePath.md +8 -6
- package/dist/docs/reference/geometry/sampleContour.md +3 -3
- package/dist/docs/reference/geometry/sampleCurve2.md +3 -3
- package/dist/docs/reference/geometry/sampleCurve3.md +2 -2
- package/dist/docs/reference/geometry/sampleCylindricalGearOutline.md +1 -1
- package/dist/docs/reference/geometry/sampleHelix.md +5 -5
- package/dist/docs/reference/geometry/sampleInternalCylindricalGearSpaceOutline.md +1 -1
- package/dist/docs/reference/geometry/sampleRackToothPath.md +4 -4
- package/dist/docs/reference/geometry/sampleSideProfile.md +6 -6
- package/dist/docs/reference/geometry/sampleTextContours.md +1 -1
- package/dist/docs/reference/geometry/sampleThreadHelices.md +2 -2
- package/dist/docs/reference/geometry/scale2.md +36 -0
- package/dist/docs/reference/geometry/scale3.md +9 -5
- package/dist/docs/reference/geometry/scaleTransform3.md +10 -6
- package/dist/docs/reference/geometry/signedContourArea.md +1 -1
- package/dist/docs/reference/geometry/starContour.md +4 -4
- package/dist/docs/reference/geometry/strokeRegionData.md +63 -0
- package/dist/docs/reference/geometry/subtract2.md +36 -0
- package/dist/docs/reference/geometry/subtract3.md +10 -6
- package/dist/docs/reference/geometry/sweepMesh.md +9 -9
- package/dist/docs/reference/geometry/{createThreadProfile.md → threadProfile.md} +6 -6
- package/dist/docs/reference/geometry/transform2.md +38 -0
- package/dist/docs/reference/geometry/transform3.md +38 -0
- package/dist/docs/reference/geometry/transformDeterminant3.md +8 -4
- package/dist/docs/reference/geometry/transformRegionData.md +40 -0
- package/dist/docs/reference/geometry/transformTriangleMesh.md +6 -6
- package/dist/docs/reference/geometry/translationTransform3.md +10 -6
- package/dist/docs/reference/geometry/triangulateContour.md +1 -1
- package/dist/docs/reference/geometry/validateSolidMesh.md +2 -2
- package/dist/docs/reference/geometry/validateTransform3.md +9 -5
- package/dist/docs/reference/geometry/validateTriangleMesh.md +1 -1
- package/dist/docs/reference/geometry/vector2.md +31 -0
- package/dist/docs/reference/geometry/vector3.md +38 -0
- package/dist/docs/reference/geometry.md +3 -3
- package/dist/docs/reference/model/Anchor3.md +5 -5
- package/dist/docs/reference/model/AttachOptions.md +10 -5
- package/dist/docs/reference/model/Bounds2.md +4 -4
- package/dist/docs/reference/model/Bounds3.md +4 -4
- package/dist/docs/reference/model/BoxEdge.md +1 -1
- package/dist/docs/reference/model/BoxEdgeSelection.md +1 -1
- package/dist/docs/reference/model/BoxEdgeTreatments.md +1 -1
- package/dist/docs/reference/model/BoxOptions.md +10 -10
- package/dist/docs/reference/model/ChamferedEdgeTreatment.md +1 -1
- package/dist/docs/reference/model/CircleContourOptions.md +1 -1
- package/dist/docs/reference/model/CircleOptions.md +3 -3
- package/dist/docs/reference/model/CircularPrimitiveOptions.md +1 -1
- package/dist/docs/reference/model/Computed.md +1 -1
- package/dist/docs/reference/model/ComputedValue.md +1 -1
- package/dist/docs/reference/model/Contour.md +3 -3
- package/dist/docs/reference/model/CorrespondingComponent.md +1 -1
- package/dist/docs/reference/model/CorrespondingContour.md +1 -1
- package/dist/docs/reference/model/CorrespondingProfile.md +1 -1
- package/dist/docs/reference/model/CorrespondingProfileStation.md +1 -1
- package/dist/docs/reference/model/CylinderOptions.md +3 -3
- package/dist/docs/reference/model/DiagnosticOptions.md +1 -1
- package/dist/docs/reference/model/EdgeTreatment.md +1 -1
- package/dist/docs/reference/model/EllipseContourOptions.md +3 -3
- package/dist/docs/reference/model/EllipseOptions.md +3 -3
- package/dist/docs/reference/model/EndTreatments.md +1 -1
- package/dist/docs/reference/model/ExtrudeOptions.md +6 -6
- package/dist/docs/reference/model/FinalizedModel.md +18 -8
- package/dist/docs/reference/model/FinalizedPart.md +1 -1
- package/dist/docs/reference/model/Frame3.md +6 -6
- package/dist/docs/reference/model/GenerateCallback.md +1 -1
- package/dist/docs/reference/model/GenerateContext.md +5 -5
- package/dist/docs/reference/model/GeneratedPart.md +6 -6
- package/dist/docs/reference/model/GenerationDiagnostic.md +1 -1
- package/dist/docs/reference/model/GenerationError.md +1 -1
- package/dist/docs/reference/model/GeometryResolution.md +5 -5
- package/dist/docs/reference/model/GeometrySamplingLimits.md +1 -1
- package/dist/docs/reference/model/GeometryToleranceOptions.md +1 -1
- package/dist/docs/reference/model/GridPatternOptions.md +11 -5
- package/dist/docs/reference/model/HeightfieldOptions.md +5 -5
- package/dist/docs/reference/model/HelicalThreadRidgeMeshOptions.md +3 -3
- package/dist/docs/reference/model/HelicalThreadSolidMeshPreflight.md +1 -1
- package/dist/docs/reference/model/HullOptions.md +7 -7
- package/dist/docs/reference/model/ImmutableBuffer-type.md +1 -1
- package/dist/docs/reference/model/ImmutableTriangleMesh.md +1 -1
- package/dist/docs/reference/model/ImplicitOptions.md +4 -4
- package/dist/docs/reference/model/InternalThreadCutterOptions.md +4 -4
- package/dist/docs/reference/model/LinearPatternOptions.md +12 -5
- package/dist/docs/reference/model/LoftCorrespondence.md +1 -1
- package/dist/docs/reference/model/LoftOptions.md +1 -1
- package/dist/docs/reference/model/LoftPlacement.md +1 -1
- package/dist/docs/reference/model/LoftStation.md +4 -4
- package/dist/docs/reference/model/MatchProfilesOptions.md +1 -1
- package/dist/docs/reference/model/ModelProgram.md +1 -1
- package/dist/docs/reference/model/ModelingLimits.md +1 -1
- package/dist/docs/reference/model/NumericArray.md +1 -1
- package/dist/docs/reference/model/PartGeometry.md +1 -1
- package/dist/docs/reference/model/PartOptions.md +6 -6
- package/dist/docs/reference/model/Path2-type.md +192 -0
- package/dist/docs/reference/model/Path2Data.md +14 -0
- package/dist/docs/reference/model/Path2Input.md +15 -0
- package/dist/docs/reference/model/Path3-type.md +192 -0
- package/dist/docs/reference/model/Path3Data.md +14 -0
- package/dist/docs/reference/model/Path3Input.md +15 -0
- package/dist/docs/reference/model/PathLocation.md +65 -0
- package/dist/docs/reference/model/PathNormalGuide.md +6 -5
- package/dist/docs/reference/model/PathOptions.md +34 -0
- package/dist/docs/reference/model/PathPatternOptions.md +3 -3
- package/dist/docs/reference/model/PathResamplingOptions.md +79 -0
- package/dist/docs/reference/model/PatternSource.md +2 -2
- package/dist/docs/reference/model/Pivot2Options.md +27 -0
- package/dist/docs/reference/model/Pivot3Options.md +27 -0
- package/dist/docs/reference/model/PlaneOptions.md +3 -3
- package/dist/docs/reference/model/{Polygon-type.md → PolygonData.md} +2 -2
- package/dist/docs/reference/model/PolygonOptions.md +85 -8
- package/dist/docs/reference/model/{PrimitivePlacement.md → PrimitiveAttachment.md} +7 -7
- package/dist/docs/reference/model/{PrimitivePlacementOptions.md → PrimitiveAttachmentOptions.md} +41 -20
- package/dist/docs/reference/model/PrintableThreadFit.md +1 -1
- package/dist/docs/reference/model/PrintableThreadFitPolicy.md +1 -1
- package/dist/docs/reference/model/Profile.md +1 -1
- package/dist/docs/reference/model/ProfileComponent2.md +1 -1
- package/dist/docs/reference/model/ProfileContour2.md +1 -1
- package/dist/docs/reference/model/ProfileSpan2.md +3 -3
- package/dist/docs/reference/model/ProfiledEdgeTreatment.md +3 -3
- package/dist/docs/reference/model/RadialPatternOptions.md +17 -22
- package/dist/docs/reference/model/RadialSizing.md +1 -1
- package/dist/docs/reference/model/RadialSizingOptions.md +1 -1
- package/dist/docs/reference/model/RectangleContourOptions.md +3 -3
- package/dist/docs/reference/model/RectangleCornerTreatment.md +1 -1
- package/dist/docs/reference/model/RectangleCornerTreatments.md +1 -1
- package/dist/docs/reference/model/RectangleOptions.md +10 -10
- package/dist/docs/reference/model/{Region.md → RegionData.md} +4 -4
- package/dist/docs/reference/model/RegularPolygonOptions.md +5 -5
- package/dist/docs/reference/model/RevolveOptions.md +9 -4
- package/dist/docs/reference/model/RoundedEdgeTreatment.md +1 -1
- package/dist/docs/reference/model/Section.md +81 -40
- package/dist/docs/reference/model/SectionHullOptions.md +7 -7
- package/dist/docs/reference/model/SectionInspection.md +10 -10
- package/dist/docs/reference/model/{RegionOffsetJoin.md → SectionOffsetJoin.md} +3 -3
- package/dist/docs/reference/model/{RegionOffsetOptions.md → SectionOffsetOptions.md} +4 -4
- package/dist/docs/reference/model/SmoothEdgeTreatment.md +1 -1
- package/dist/docs/reference/model/Solid.md +66 -26
- package/dist/docs/reference/model/SolidInspection.md +7 -7
- package/dist/docs/reference/model/{SolidRayHit.md → SolidSegmentHit.md} +6 -6
- package/dist/docs/reference/model/SphereOptions.md +3 -3
- package/dist/docs/reference/model/StarOptions.md +10 -10
- package/dist/docs/reference/model/StrokeCap.md +16 -0
- package/dist/docs/reference/model/StrokeJoin.md +16 -0
- package/dist/docs/reference/model/StrokeOptions.md +91 -0
- package/dist/docs/reference/model/SvgOrigin.md +1 -1
- package/dist/docs/reference/model/SvgPathSectionOptions.md +1 -1
- package/dist/docs/reference/model/SvgSectionOptions.md +1 -1
- package/dist/docs/reference/model/SweepOptions.md +6 -6
- package/dist/docs/reference/model/SweepOrientation.md +7 -7
- package/dist/docs/reference/model/TextSectionOptions.md +1 -1
- package/dist/docs/reference/model/ThreadEndStyle.md +1 -1
- package/dist/docs/reference/model/ThreadEndTreatmentOptions.md +1 -1
- package/dist/docs/reference/model/ThreadHandedness.md +1 -1
- package/dist/docs/reference/model/ThreadLeadInEnvelope.md +1 -1
- package/dist/docs/reference/model/ThreadLeadInShape.md +1 -1
- package/dist/docs/reference/model/ThreadProfile.md +3 -3
- package/dist/docs/reference/model/ThreadRidgeOptions.md +1 -1
- package/dist/docs/reference/model/ThreadedNutBevel.md +1 -1
- package/dist/docs/reference/model/ThreadedNutOptions.md +4 -4
- package/dist/docs/reference/model/ThreadedNutPreflight.md +1 -1
- package/dist/docs/reference/model/ThreadedNutShape.md +1 -1
- package/dist/docs/reference/model/ThreadedRodOptions.md +4 -4
- package/dist/docs/reference/model/TorusOptions.md +8 -8
- package/dist/docs/reference/model/Transform2-type.md +256 -0
- package/dist/docs/reference/model/Transform2Input.md +20 -0
- package/dist/docs/reference/model/Transform2Matrix.md +15 -0
- package/dist/docs/reference/model/Transform3-type.md +296 -0
- package/dist/docs/reference/model/Transform3Input.md +20 -0
- package/dist/docs/reference/model/{Transform3.md → Transform3Matrix.md} +3 -3
- package/dist/docs/reference/model/TriangleMesh.md +1 -1
- package/dist/docs/reference/model/TriangleMeshAnalysis.md +2 -2
- package/dist/docs/reference/model/TriangleMeshMeasurements.md +1 -1
- package/dist/docs/reference/model/TubeOptions.md +8 -8
- package/dist/docs/reference/model/Vector2-type.md +270 -0
- package/dist/docs/reference/model/Vector2Input.md +20 -0
- package/dist/docs/reference/model/{Vector2.md → Vector2Tuple.md} +3 -3
- package/dist/docs/reference/model/Vector3-type.md +282 -0
- package/dist/docs/reference/model/Vector3Input.md +20 -0
- package/dist/docs/reference/model/{Vector3.md → Vector3Tuple.md} +3 -3
- package/dist/docs/reference/model/VectorTextLayout.md +1 -1
- package/dist/docs/reference/model/VectorTextMetrics.md +1 -1
- package/dist/docs/reference/model/anchor.md +1 -1
- package/dist/docs/reference/model/box.md +4 -4
- package/dist/docs/reference/model/castSegment.md +40 -0
- package/dist/docs/reference/model/categories/boolean-operations.md +4 -4
- package/dist/docs/reference/model/categories/bounded-surfaces.md +3 -3
- package/dist/docs/reference/model/categories/contracts.md +2 -2
- package/dist/docs/reference/model/categories/core-values-errors.md +5 -5
- package/dist/docs/reference/model/categories/explicit-profiles.md +3 -3
- package/dist/docs/reference/model/categories/extrude-revolve-sweep.md +2 -2
- package/dist/docs/reference/model/categories/generation.md +1 -1
- package/dist/docs/reference/model/categories/inspection.md +7 -8
- package/dist/docs/reference/model/categories/mesh-inspection.md +2 -2
- package/dist/docs/reference/model/categories/paths.md +33 -0
- package/dist/docs/reference/model/categories/primitives.md +3 -3
- package/dist/docs/reference/model/categories/resolution.md +2 -2
- package/dist/docs/reference/model/categories/sections.md +10 -8
- package/dist/docs/reference/model/categories/threads.md +5 -5
- package/dist/docs/reference/model/categories/transforms-placement.md +27 -13
- package/dist/docs/reference/model/circle.md +1 -1
- package/dist/docs/reference/model/components.md +10 -7
- package/dist/docs/reference/model/compose.md +1 -1
- package/dist/docs/reference/model/cylinder.md +1 -1
- package/dist/docs/reference/model/distance.md +2 -2
- package/dist/docs/reference/model/ellipse.md +1 -1
- package/dist/docs/reference/model/extrude.md +3 -3
- package/dist/docs/reference/model/generate.md +1 -1
- package/dist/docs/reference/model/gridPattern.md +4 -4
- package/dist/docs/reference/model/heightfield.md +2 -2
- package/dist/docs/reference/model/hull.md +2 -2
- package/dist/docs/reference/model/immutableBuffer.md +1 -1
- package/dist/docs/reference/model/immutableMesh.md +1 -1
- package/dist/docs/reference/model/implicit.md +3 -3
- package/dist/docs/reference/model/inspectSection.md +1 -1
- package/dist/docs/reference/model/inspectSolid.md +1 -1
- package/dist/docs/reference/model/internalThreadCutter.md +4 -4
- package/dist/docs/reference/model/intersect.md +1 -1
- package/dist/docs/reference/model/isEmpty.md +2 -2
- package/dist/docs/reference/model/linearPattern.md +4 -4
- package/dist/docs/reference/model/loft.md +1 -1
- package/dist/docs/reference/model/matchProfiles.md +2 -2
- package/dist/docs/reference/model/minkowskiSum.md +1 -1
- package/dist/docs/reference/model/path2.md +42 -0
- package/dist/docs/reference/model/path3.md +42 -0
- package/dist/docs/reference/model/pathPattern.md +13 -12
- package/dist/docs/reference/model/polygon.md +4 -4
- package/dist/docs/reference/model/preflightInternalThreadCutter.md +3 -3
- package/dist/docs/reference/model/preflightThreadedNut.md +3 -3
- package/dist/docs/reference/model/preflightThreadedRod.md +3 -3
- package/dist/docs/reference/model/radialPattern.md +5 -37
- package/dist/docs/reference/model/rectangle.md +4 -4
- package/dist/docs/reference/model/regularPolygon.md +1 -1
- package/dist/docs/reference/model/revolve.md +5 -4
- package/dist/docs/reference/model/solidFromMesh.md +1 -1
- package/dist/docs/reference/model/sphere.md +1 -1
- package/dist/docs/reference/model/split.md +1 -1
- package/dist/docs/reference/model/splitByPlane.md +1 -1
- package/dist/docs/reference/model/star.md +4 -4
- package/dist/docs/reference/model/stroke.md +74 -0
- package/dist/docs/reference/model/svgPathSection.md +1 -1
- package/dist/docs/reference/model/svgSection.md +1 -1
- package/dist/docs/reference/model/sweep.md +7 -7
- package/dist/docs/reference/model/textSection.md +1 -1
- package/dist/docs/reference/model/threadRidge.md +2 -2
- package/dist/docs/reference/model/threadedNut.md +4 -4
- package/dist/docs/reference/model/threadedRod.md +4 -4
- package/dist/docs/reference/model/torus.md +3 -3
- package/dist/docs/reference/model/transform2.md +39 -0
- package/dist/docs/reference/model/transform3.md +39 -0
- package/dist/docs/reference/model/tube.md +3 -3
- package/dist/docs/reference/model/union.md +1 -1
- package/dist/docs/reference/model/vector2.md +32 -0
- package/dist/docs/reference/model/vector3.md +39 -0
- package/dist/docs/reference/model.md +9 -8
- package/dist/docs/reference/text/Bounds2.md +4 -4
- package/dist/docs/reference/text/MAX_VECTOR_FONT_BYTES.md +1 -1
- package/dist/docs/reference/text/Vector2Tuple.md +7 -0
- package/dist/docs/reference/text/VectorFont.md +2 -2
- package/dist/docs/reference/text/VectorFontOptions.md +1 -1
- package/dist/docs/reference/text/VectorTextArcBaseline.md +3 -3
- package/dist/docs/reference/text/VectorTextLayout.md +1 -1
- package/dist/docs/reference/text/VectorTextLayoutOptions.md +1 -1
- package/dist/docs/reference/text/VectorTextMetrics.md +1 -1
- package/dist/docs/reference/text/VectorTextOptions.md +1 -1
- package/dist/docs/reference/text/categories/font-preparation.md +4 -4
- package/dist/docs/reference/text/prepareVectorFont.md +2 -2
- package/dist/docs/reference/text.md +1 -1
- package/dist/engine/construction-operations.js +31 -14
- package/dist/engine/deferred-context.js +11 -181
- package/dist/engine/execution.js +39 -8
- package/dist/engine/extrusion-finishing.js +1 -1
- package/dist/engine/index.js +6 -1
- package/dist/engine/inspection-operations.js +13 -11
- package/dist/engine/loft-operations.js +35 -14
- package/dist/engine/model-summary.js +8 -5
- package/dist/engine/native/material-components.js +305 -0
- package/dist/engine/native/regions.js +2 -1
- package/dist/engine/native/threads.js +3 -3
- package/dist/engine/native/transforms.js +11 -8
- package/dist/engine/operation-environment.js +2 -2
- package/dist/engine/pattern-operations.js +3 -3
- package/dist/engine/placement.js +2 -2
- package/dist/engine/primitive-anchors.js +17 -17
- package/dist/engine/primitive-operations.js +1 -1
- package/dist/engine/primitive-profiles.js +8 -7
- package/dist/engine/profile-mesh.js +7 -7
- package/dist/engine/recipe-realization.js +35 -21
- package/dist/engine/section-operations.js +52 -11
- package/dist/engine/session-graph.js +1 -1
- package/dist/engine/session-native.js +1 -1
- package/dist/engine/session-snapshot.js +17 -6
- package/dist/engine/session.js +13 -8
- package/dist/engine/shape-anchors.js +5 -11
- package/dist/engine/transform-operations.js +66 -49
- package/dist/geometry/anchors.js +40 -33
- package/dist/geometry/curves/sampling.js +14 -14
- package/dist/geometry/edge-finishing.js +1 -1
- package/dist/geometry/extrusion.js +13 -16
- package/dist/geometry/index.js +13 -10
- package/dist/geometry/loft/loft-simple-mesh.js +6 -6
- package/dist/geometry/loft/loft.js +22 -13
- package/dist/geometry/math/immutable-value.js +20 -0
- package/dist/geometry/math/vector-value.js +168 -0
- package/dist/geometry/math/vector2.js +80 -0
- package/dist/geometry/math/vector3.js +37 -7
- package/dist/geometry/mechanical/gear-motion.js +8 -5
- package/dist/geometry/mechanical/gears.js +38 -38
- package/dist/geometry/mechanical/index.js +3 -3
- package/dist/geometry/mechanical/standards.js +1 -1
- package/dist/geometry/mechanical/thread-helices.js +2 -3
- package/dist/geometry/mechanical/thread-mesh-plan.js +4 -5
- package/dist/geometry/mechanical/thread-mesh.js +7 -7
- package/dist/geometry/mechanical/thread-profiles.js +5 -5
- package/dist/geometry/mechanical/thread-solids.js +2 -2
- package/dist/geometry/mechanical/thread-surface.js +1 -1
- package/dist/geometry/mechanical/threads.js +8 -8
- package/dist/geometry/mesh/mesh-planar.js +25 -27
- package/dist/geometry/mesh/mesh-quality.js +5 -5
- package/dist/geometry/mesh/mesh-signature.js +13 -13
- package/dist/geometry/mesh/mesh-solid-intersections.js +5 -1
- package/dist/geometry/mesh/mesh-solid.js +7 -7
- package/dist/geometry/mesh/mesh.js +4 -15
- package/dist/geometry/paths/closest-point.js +63 -0
- package/dist/geometry/paths/frames.js +44 -14
- package/dist/geometry/paths/helix.js +16 -6
- package/dist/geometry/paths/path-value.js +252 -0
- package/dist/geometry/paths/planar.js +36 -23
- package/dist/geometry/paths/resampling.js +27 -5
- package/dist/geometry/patterns/placements.js +100 -27
- package/dist/geometry/patterns.js +2 -2
- package/dist/geometry/polygon-clipping.js +17 -0
- package/dist/geometry/primitive-resolution.js +4 -1
- package/dist/geometry/profiles/contour.js +6 -6
- package/dist/geometry/profiles/matched.js +4 -4
- package/dist/geometry/profiles/profiles.js +4 -4
- package/dist/geometry/profiles/rectangle.js +4 -4
- package/dist/geometry/profiles/side-profile.js +7 -7
- package/dist/geometry/profiles/span-sampling.js +1 -1
- package/dist/geometry/resolution.js +51 -39
- package/dist/geometry/revolve/revolve-mesh.js +12 -7
- package/dist/geometry/stroke-path.js +57 -68
- package/dist/geometry/svg/fill.js +7 -21
- package/dist/geometry/svg-import.js +23 -23
- package/dist/geometry/sweeps/options.js +5 -4
- package/dist/geometry/sweeps/orientation.js +5 -5
- package/dist/geometry/sweeps/stations.js +14 -14
- package/dist/geometry/sweeps/sweep-closed.js +5 -5
- package/dist/geometry/sweeps/sweep-mesh.js +9 -3
- package/dist/geometry/sweeps/sweep-open.js +4 -4
- package/dist/geometry/sweeps/validation.js +4 -7
- package/dist/geometry/transform-chain.js +172 -0
- package/dist/geometry/transform-geometry.js +27 -30
- package/dist/geometry/transform-matrix.js +14 -0
- package/dist/geometry/transform2.js +60 -0
- package/dist/geometry/transform3.js +70 -26
- package/dist/index.js +4 -0
- package/dist/model/execution-binding.js +10 -5
- package/dist/model/geometry-recipes.js +15 -0
- package/dist/{engine → model}/immutable-generation-data.js +88 -6
- package/dist/model/operation-dispatch.js +10 -3
- package/dist/model/operations.js +45 -35
- package/dist/model/recipe-declaration.js +199 -0
- package/dist/model/shape-handles.js +17 -5
- package/dist/text/index.js +15 -9
- package/dist/text/vector-text-layout.js +31 -26
- package/package.json +1 -1
- package/dist/docs/reference/geometry/Path2.md +0 -14
- package/dist/docs/reference/geometry/Path3.md +0 -14
- package/dist/docs/reference/geometry/PrimitivePlacement.md +0 -31
- package/dist/docs/reference/geometry/PrimitivePlacementOptions.md +0 -83
- package/dist/docs/reference/geometry/Region.md +0 -14
- package/dist/docs/reference/geometry/StrokePathCap.md +0 -7
- package/dist/docs/reference/geometry/StrokePathJoin.md +0 -7
- package/dist/docs/reference/geometry/Transform3.md +0 -12
- package/dist/docs/reference/geometry/Vector2.md +0 -7
- package/dist/docs/reference/geometry/Vector3.md +0 -7
- package/dist/docs/reference/geometry/attachTransform.md +0 -73
- package/dist/docs/reference/geometry/cumulativePathLengths.md +0 -33
- package/dist/docs/reference/geometry/measureTriangleMesh.md +0 -55
- package/dist/docs/reference/geometry/pathLength.md +0 -33
- package/dist/docs/reference/geometry/rotateAroundAxis3.md +0 -38
- package/dist/docs/reference/geometry/strokePathRegion.md +0 -63
- package/dist/docs/reference/geometry/transformContour.md +0 -42
- package/dist/docs/reference/geometry/transformPath2.md +0 -40
- package/dist/docs/reference/geometry/transformPath3.md +0 -33
- package/dist/docs/reference/geometry/transformRegion.md +0 -40
- package/dist/docs/reference/model/Transform2.md +0 -15
- package/dist/docs/reference/model/fromRegion.md +0 -33
- package/dist/docs/reference/model/rayCast.md +0 -40
- package/dist/docs/reference/model/toRegion.md +0 -33
- package/dist/docs/reference/model/toTriangleMesh.md +0 -27
- package/dist/docs/reference/text/Vector2.md +0 -7
- package/dist/engine/geometry-recipes.js +0 -12
- package/dist/engine/pattern-transform.js +0 -9
- package/dist/geometry/paths/path.js +0 -32
package/dist/api/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Immutable modeling recipes and math values; the host owns geometry evaluation. @packageDocumentation */
|
|
2
2
|
|
|
3
3
|
/** ACME 29-degree included-angle profile. */
|
|
4
4
|
declare interface AcmeThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
@@ -30,23 +30,21 @@ export declare function anchor(shape: Solid | Section, name: string): Anchor3;
|
|
|
30
30
|
*/
|
|
31
31
|
export declare interface Anchor3 {
|
|
32
32
|
/** Unit outward normal used as the anchor's local +Z direction. */
|
|
33
|
-
readonly direction:
|
|
33
|
+
readonly direction: Vector3Tuple;
|
|
34
34
|
/** World-space attachment position. */
|
|
35
|
-
readonly position:
|
|
35
|
+
readonly position: Vector3Tuple;
|
|
36
36
|
/** Roll guide projected into the plane perpendicular to `direction`. */
|
|
37
|
-
readonly up:
|
|
37
|
+
readonly up: Vector3Tuple;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
/**
|
|
41
|
-
* Degree-based anchor attachment controls for a scoped solid.
|
|
42
|
-
*/
|
|
40
|
+
/** Options controlling how one anchor is attached to another. */
|
|
43
41
|
export declare interface AttachOptions {
|
|
44
42
|
/** Align outward directions face-to-face (`opposed`) or in parallel (`same`). */
|
|
45
43
|
readonly alignment?: "opposed" | "same";
|
|
46
|
-
/** Separation along the target anchor's outward direction in
|
|
44
|
+
/** Separation along the target anchor's outward direction in model units. */
|
|
47
45
|
readonly gap?: number;
|
|
48
46
|
/** Additional right-handed roll about the attached direction, in degrees. */
|
|
49
|
-
readonly
|
|
47
|
+
readonly spin?: number;
|
|
50
48
|
/** Optional numeric comparison overrides. */
|
|
51
49
|
readonly tolerance?: GeometryToleranceOptions;
|
|
52
50
|
}
|
|
@@ -54,17 +52,17 @@ export declare interface AttachOptions {
|
|
|
54
52
|
/** Axis-aligned bounds in two-dimensional model space. */
|
|
55
53
|
export declare interface Bounds2 {
|
|
56
54
|
/** Inclusive maximum X/Y coordinates. */
|
|
57
|
-
readonly max:
|
|
55
|
+
readonly max: Vector2Tuple;
|
|
58
56
|
/** Inclusive minimum X/Y coordinates. */
|
|
59
|
-
readonly min:
|
|
57
|
+
readonly min: Vector2Tuple;
|
|
60
58
|
}
|
|
61
59
|
|
|
62
60
|
/** Axis-aligned bounds in three-dimensional model space. */
|
|
63
61
|
export declare interface Bounds3 {
|
|
64
62
|
/** Inclusive maximum X/Y/Z coordinates. */
|
|
65
|
-
readonly max:
|
|
63
|
+
readonly max: Vector3Tuple;
|
|
66
64
|
/** Inclusive minimum X/Y/Z coordinates. */
|
|
67
|
-
readonly min:
|
|
65
|
+
readonly min: Vector3Tuple;
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
/**
|
|
@@ -103,7 +101,7 @@ export declare type BoxEdgeTreatments = Readonly<
|
|
|
103
101
|
/**
|
|
104
102
|
* Dimensions, placement, and uniform or independently selected finishing for an axis-aligned box.
|
|
105
103
|
*/
|
|
106
|
-
export declare interface BoxOptions extends
|
|
104
|
+
export declare interface BoxOptions extends PrimitiveAttachment {
|
|
107
105
|
/** Explicit sampling ceilings for edge treatments, bounded by the host policy. */
|
|
108
106
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
109
107
|
/**
|
|
@@ -112,7 +110,7 @@ export declare interface BoxOptions extends PrimitivePlacement {
|
|
|
112
110
|
*/
|
|
113
111
|
readonly center?: boolean;
|
|
114
112
|
/** Positive uniform size or explicit `[X, Y, Z]` extents in millimetres. */
|
|
115
|
-
readonly size: number |
|
|
113
|
+
readonly size: number | Vector3Tuple;
|
|
116
114
|
/** Uniform treatment or independent disjoint nominal edge/group treatments. */
|
|
117
115
|
readonly treatment?: EdgeTreatment | BoxEdgeTreatments;
|
|
118
116
|
}
|
|
@@ -137,6 +135,13 @@ declare interface ButtressThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
|
137
135
|
readonly pressureFlankSide?: ButtressPressureFlankSide;
|
|
138
136
|
}
|
|
139
137
|
|
|
138
|
+
/** Copies intersections along the finite directed origin-to-endpoint segment. */
|
|
139
|
+
export declare function castSegment(
|
|
140
|
+
solid: Solid,
|
|
141
|
+
origin: Vector3Input,
|
|
142
|
+
endpoint: Vector3Input,
|
|
143
|
+
): readonly SolidSegmentHit[];
|
|
144
|
+
|
|
140
145
|
/**
|
|
141
146
|
* A planar edge or corner chamfer with equal or independent surface setbacks.
|
|
142
147
|
*/
|
|
@@ -180,7 +185,7 @@ export declare type CircleContourOptions = CircularPrimitiveOptions &
|
|
|
180
185
|
/**
|
|
181
186
|
* Circular dimensions with exactly one nominal radius or diameter.
|
|
182
187
|
*/
|
|
183
|
-
export declare type CircleOptions = CircleContourOptions &
|
|
188
|
+
export declare type CircleOptions = CircleContourOptions & PrimitiveAttachment;
|
|
184
189
|
|
|
185
190
|
/**
|
|
186
191
|
* Tessellation controls shared by circular primitives across Geometry entry points.
|
|
@@ -200,11 +205,13 @@ export declare interface CircularPrimitiveOptions {
|
|
|
200
205
|
}
|
|
201
206
|
|
|
202
207
|
/**
|
|
203
|
-
*
|
|
208
|
+
* Observes disconnected material pieces as session-restricted solid selections.
|
|
204
209
|
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
210
|
+
* Each piece retains its enclosed cavities. A sealed hollow box is one component; adding a loose
|
|
211
|
+
* ball inside its cavity produces two. Recombining the pieces preserves the original material.
|
|
212
|
+
* This does not cut connected geometry. Containment is bounded to 2,000,000 comparisons.
|
|
213
|
+
* Selection order and cardinality depend on evaluated topology. Results and recipes using them
|
|
214
|
+
* can only be evaluated in this session; composition itself requires no engine.
|
|
208
215
|
*
|
|
209
216
|
* @example Move disconnected pieces independently
|
|
210
217
|
* ```ts
|
|
@@ -216,7 +223,10 @@ export declare interface CircularPrimitiveOptions {
|
|
|
216
223
|
*/
|
|
217
224
|
export declare function components(solid: Solid): readonly Solid[];
|
|
218
225
|
|
|
219
|
-
/**
|
|
226
|
+
/**
|
|
227
|
+
* Observes filled 2D islands, retaining each island's holes; empty gives [].
|
|
228
|
+
* Selections and recipes using them can only be evaluated in this session.
|
|
229
|
+
*/
|
|
220
230
|
export declare function components(section: Section): readonly Section[];
|
|
221
231
|
|
|
222
232
|
/** Combines disjoint components without resolving overlap. */
|
|
@@ -241,7 +251,7 @@ export declare type ComputedValue<T> = T | Computed<T>;
|
|
|
241
251
|
* Polygon exteriors are counter-clockwise and holes are clockwise. Algorithms
|
|
242
252
|
* may reject duplicate adjacent points or fewer than three effective vertices.
|
|
243
253
|
*/
|
|
244
|
-
export declare type Contour = readonly
|
|
254
|
+
export declare type Contour = readonly Vector2Tuple[];
|
|
245
255
|
|
|
246
256
|
/** One sampled component retaining contour identities and logical point correspondence. */
|
|
247
257
|
export declare interface CorrespondingComponent {
|
|
@@ -275,6 +285,20 @@ export declare type CorrespondingProfileStation = LoftPlacement & {
|
|
|
275
285
|
readonly profile: CorrespondingProfile;
|
|
276
286
|
};
|
|
277
287
|
|
|
288
|
+
/**
|
|
289
|
+
* Explicit physical sampling and allocation policy for reusable curves.
|
|
290
|
+
*/
|
|
291
|
+
declare interface CurveSamplingOptions {
|
|
292
|
+
/** Exact segment count overrides physical criteria; curve parameters are spaced uniformly. */
|
|
293
|
+
readonly segments?: number;
|
|
294
|
+
/** Millimetre sampling policy; circularSegments applies only to arcs. */
|
|
295
|
+
readonly resolution?: GeometryResolution;
|
|
296
|
+
/** Output vertex ceiling of at least two; may only lower limits.maxPathPoints. */
|
|
297
|
+
readonly maxVertices?: number;
|
|
298
|
+
/** Explicit sampling ceilings; omitted values use package defaults without ambient state. */
|
|
299
|
+
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
300
|
+
}
|
|
301
|
+
|
|
278
302
|
/** Caller-defined periodic axial/radial profile in millimetres. */
|
|
279
303
|
declare interface CustomThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
280
304
|
/** Selects a caller-defined periodic profile. */
|
|
@@ -283,7 +307,7 @@ declare interface CustomThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
|
283
307
|
* Open path spanning exactly `[-pitch/2, pitch/2]`, with both endpoints on the minor envelope,
|
|
284
308
|
* one connected ridge, one contiguous crest, and radial zero at the major envelope.
|
|
285
309
|
*/
|
|
286
|
-
readonly points: readonly
|
|
310
|
+
readonly points: readonly Vector2Tuple[];
|
|
287
311
|
}
|
|
288
312
|
|
|
289
313
|
/**
|
|
@@ -306,7 +330,7 @@ export declare function cylinder(options: CylinderOptions): Solid;
|
|
|
306
330
|
*/
|
|
307
331
|
export declare type CylinderOptions = CircularPrimitiveOptions &
|
|
308
332
|
RadialSizingOptions &
|
|
309
|
-
|
|
333
|
+
PrimitiveAttachment & {
|
|
310
334
|
/**
|
|
311
335
|
* Centers the solid on the Z origin when `true`; otherwise its bottom is at `Z = 0`.
|
|
312
336
|
* @defaultValue `true`
|
|
@@ -343,7 +367,7 @@ export declare interface DiagnosticOptions<P> {
|
|
|
343
367
|
* Uses actual geometry, not bounding-box separation or distance between object origins.
|
|
344
368
|
* Contact or overlapping material returns zero, including one solid inside another.
|
|
345
369
|
* The kernel's search range is managed internally; the result is not capped at a caller limit.
|
|
346
|
-
* Empty
|
|
370
|
+
* Empty geometry and component selections from another session reject. Results follow native numeric precision.
|
|
347
371
|
*
|
|
348
372
|
* @example Measure the gap between two blocks
|
|
349
373
|
* ```ts
|
|
@@ -380,13 +404,13 @@ export declare type EllipseContourOptions = CircularPrimitiveOptions &
|
|
|
380
404
|
(
|
|
381
405
|
| {
|
|
382
406
|
/** Positive XY radii in millimetres; mutually exclusive with size. */
|
|
383
|
-
readonly radius:
|
|
407
|
+
readonly radius: Vector2Tuple;
|
|
384
408
|
/** Full XY extents are unavailable when radius is supplied. */
|
|
385
409
|
readonly size?: never;
|
|
386
410
|
}
|
|
387
411
|
| {
|
|
388
412
|
/** Positive full XY extents in millimetres; mutually exclusive with radius. */
|
|
389
|
-
readonly size:
|
|
413
|
+
readonly size: Vector2Tuple;
|
|
390
414
|
/** XY radii are unavailable when size is supplied. */
|
|
391
415
|
readonly radius?: never;
|
|
392
416
|
}
|
|
@@ -395,7 +419,8 @@ export declare type EllipseContourOptions = CircularPrimitiveOptions &
|
|
|
395
419
|
/**
|
|
396
420
|
* Ellipse dimensions in local XY, with exactly one radii or full-size tuple.
|
|
397
421
|
*/
|
|
398
|
-
export declare type EllipseOptions = EllipseContourOptions &
|
|
422
|
+
export declare type EllipseOptions = EllipseContourOptions &
|
|
423
|
+
PrimitiveAttachment;
|
|
399
424
|
|
|
400
425
|
/**
|
|
401
426
|
* Independent inward finishing on primitive or straight convex extrusion ends.
|
|
@@ -447,9 +472,9 @@ declare interface ExtrusionSamplingOptions {
|
|
|
447
472
|
/** Operation-level physical policy over the nearest model scope. */
|
|
448
473
|
readonly resolution?: GeometryResolution;
|
|
449
474
|
/** Finite uniform or XY scale of the top profile; defaults to one. */
|
|
450
|
-
readonly scaleTop?: number |
|
|
475
|
+
readonly scaleTop?: number | Vector2Input;
|
|
451
476
|
/** Finite rotation of the top profile about +Z, in degrees; defaults to zero. */
|
|
452
|
-
readonly
|
|
477
|
+
readonly twist?: number;
|
|
453
478
|
}
|
|
454
479
|
|
|
455
480
|
/** Finalized manufacturing snapshot. Its arrays are independent of all native values. */
|
|
@@ -460,19 +485,21 @@ export declare interface FinalizedModel {
|
|
|
460
485
|
readonly bounds: Bounds3;
|
|
461
486
|
/** Aggregate counts, unique backing storage, volume, and execution timings. */
|
|
462
487
|
readonly stats: {
|
|
488
|
+
/** Number of declared output parts, including repeated geometry instances. */
|
|
489
|
+
readonly partCount: number;
|
|
463
490
|
/** Aggregate position-buffer vertex count. */
|
|
464
|
-
readonly
|
|
491
|
+
readonly vertexCount: number;
|
|
465
492
|
/** Aggregate indexed triangle count. */
|
|
466
|
-
readonly
|
|
493
|
+
readonly triangleCount: number;
|
|
467
494
|
/** Signed enclosed volume of all selected parts in cubic millimetres. */
|
|
468
495
|
readonly volumeMm3: number;
|
|
469
496
|
/** Unique transferable backing-buffer bytes, counted once across all parts. */
|
|
470
|
-
readonly
|
|
497
|
+
readonly byteCount: number;
|
|
471
498
|
/** Synchronous callback duration in milliseconds. */
|
|
472
499
|
readonly buildMs: number;
|
|
473
500
|
/** Manufacturing validation and buffer finalization duration in milliseconds. */
|
|
474
501
|
readonly finalizationMs: number;
|
|
475
|
-
/** Total
|
|
502
|
+
/** Total generation duration, including cache retention and native cleanup, in milliseconds. */
|
|
476
503
|
readonly generationMs: number;
|
|
477
504
|
};
|
|
478
505
|
}
|
|
@@ -490,18 +517,15 @@ export declare interface FinalizedPart extends TriangleMesh {
|
|
|
490
517
|
/** A right-handed orthonormal coordinate frame expressed in world coordinates. */
|
|
491
518
|
export declare interface Frame3 {
|
|
492
519
|
/** World-space origin of the local frame. */
|
|
493
|
-
readonly origin:
|
|
520
|
+
readonly origin: Vector3Tuple;
|
|
494
521
|
/** Unit vector defining the local +X axis. */
|
|
495
|
-
readonly xAxis:
|
|
522
|
+
readonly xAxis: Vector3Tuple;
|
|
496
523
|
/** Unit vector defining the local +Y axis. */
|
|
497
|
-
readonly yAxis:
|
|
524
|
+
readonly yAxis: Vector3Tuple;
|
|
498
525
|
/** Unit vector defining the local +Z axis. */
|
|
499
|
-
readonly zAxis:
|
|
526
|
+
readonly zAxis: Vector3Tuple;
|
|
500
527
|
}
|
|
501
528
|
|
|
502
|
-
/** Imports explicit region topology once. */
|
|
503
|
-
export declare function fromRegion(region: Region): Section;
|
|
504
|
-
|
|
505
529
|
/**
|
|
506
530
|
* Defines a typed model without executing it. Use `computed` only for work worth reusing.
|
|
507
531
|
*
|
|
@@ -587,9 +611,9 @@ export declare interface GeometryResolution {
|
|
|
587
611
|
/** Optional maximum sampled edge length in millimetres. */
|
|
588
612
|
readonly maxSegmentLength?: number;
|
|
589
613
|
/** Upper safety bound for a full circle; defaults to the selected maxCircularSegments (512 by default). */
|
|
590
|
-
readonly
|
|
614
|
+
readonly maxSegments?: number;
|
|
591
615
|
/** Lower full-circle segment count; defaults to 16 or a lower selected circular ceiling. */
|
|
592
|
-
readonly
|
|
616
|
+
readonly minSegments?: number;
|
|
593
617
|
}
|
|
594
618
|
|
|
595
619
|
/** Explicit allocation ceilings for pure sampling and host-owned modeling operations. */
|
|
@@ -627,16 +651,17 @@ export declare function gridPattern(
|
|
|
627
651
|
options: GridPatternOptions,
|
|
628
652
|
): readonly Solid[];
|
|
629
653
|
|
|
630
|
-
/** Repeats a filled Section on
|
|
654
|
+
/** Repeats a filled Section on an XY grid; any explicit frame must preserve the XY plane. */
|
|
631
655
|
export declare function gridPattern(
|
|
632
656
|
source: PatternSource<Section>,
|
|
633
|
-
options: GridPatternOptions
|
|
657
|
+
options: GridPatternOptions<2>,
|
|
634
658
|
): readonly Section[];
|
|
635
659
|
|
|
636
660
|
/**
|
|
637
661
|
* XY or XYZ grid with X varying fastest. The first item starts at the local origin.
|
|
662
|
+
* Dimension 2 restricts counts and spacing to XY; any frame must preserve the XY plane.
|
|
638
663
|
*/
|
|
639
|
-
export declare type GridPatternOptions = {
|
|
664
|
+
export declare type GridPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
640
665
|
/** Center the complete distribution around its local origin; defaults to false. */
|
|
641
666
|
readonly center?: boolean;
|
|
642
667
|
/** Optional right-handed local axes and origin for the grid. */
|
|
@@ -644,21 +669,24 @@ export declare type GridPatternOptions = {
|
|
|
644
669
|
} & (
|
|
645
670
|
| {
|
|
646
671
|
/** Positive integer counts on X and Y. */
|
|
647
|
-
readonly count:
|
|
672
|
+
readonly count: Vector2Tuple;
|
|
648
673
|
/** Signed millimetres between adjacent copies on X and Y. */
|
|
649
|
-
readonly spacing:
|
|
650
|
-
}
|
|
651
|
-
| {
|
|
652
|
-
/** Positive integer counts on X, Y and Z. */
|
|
653
|
-
readonly count: Vector3;
|
|
654
|
-
/** Signed millimetres between adjacent copies on X, Y and Z. */
|
|
655
|
-
readonly spacing: Vector3;
|
|
674
|
+
readonly spacing: Vector2Tuple;
|
|
656
675
|
}
|
|
676
|
+
| (Dimension extends 3
|
|
677
|
+
? {
|
|
678
|
+
/** Positive integer counts on X, Y and Z. */
|
|
679
|
+
readonly count: Vector3Tuple;
|
|
680
|
+
/** Signed millimetres between adjacent copies on X, Y and Z. */
|
|
681
|
+
readonly spacing: Vector3Tuple;
|
|
682
|
+
}
|
|
683
|
+
: never)
|
|
657
684
|
);
|
|
658
685
|
|
|
659
686
|
/**
|
|
660
687
|
* Closed rectilinear top above a flat base, with uniform or explicit XY coordinates.
|
|
661
688
|
* Samples each grid height once; center-error triangulation also samples each cell centre.
|
|
689
|
+
* The retained callback must capture independent immutable inputs, not live session readers or parameters.
|
|
662
690
|
*
|
|
663
691
|
* @example Heightfield
|
|
664
692
|
* ```ts
|
|
@@ -681,7 +709,7 @@ export declare function heightfield(options: HeightfieldOptions): Solid;
|
|
|
681
709
|
*/
|
|
682
710
|
export declare type HeightfieldOptions = {
|
|
683
711
|
/** Absolute top Z at the supplied XY point. Every sample must be above baseZ. */
|
|
684
|
-
readonly height: (point:
|
|
712
|
+
readonly height: (point: Vector2Tuple) => number;
|
|
685
713
|
/** Flat bottom Z. Defaults to zero. */
|
|
686
714
|
readonly baseZ?: number;
|
|
687
715
|
/**
|
|
@@ -694,11 +722,11 @@ export declare type HeightfieldOptions = {
|
|
|
694
722
|
} & (
|
|
695
723
|
| {
|
|
696
724
|
/** Positive XY footprint for uniform sampling. */
|
|
697
|
-
readonly size:
|
|
725
|
+
readonly size: Vector2Tuple;
|
|
698
726
|
/** Exact positive integer X/Y interval counts. */
|
|
699
727
|
readonly segments: readonly [x: number, y: number];
|
|
700
728
|
/** Lower-left footprint XY. Omitted centers the footprint on XY. */
|
|
701
|
-
readonly origin?:
|
|
729
|
+
readonly origin?: Vector2Tuple;
|
|
702
730
|
/** Explicit coordinates cannot be combined with uniform sampling. */
|
|
703
731
|
readonly coordinates?: never;
|
|
704
732
|
}
|
|
@@ -738,7 +766,7 @@ export declare interface HelicalThreadRidgeMeshOptions {
|
|
|
738
766
|
/** Nominal major diameter before any caller-owned fit compensation. */
|
|
739
767
|
readonly majorDiameter: number;
|
|
740
768
|
/** Angular offset of the first start in degrees. Default: `0`. */
|
|
741
|
-
readonly
|
|
769
|
+
readonly phase?: number;
|
|
742
770
|
/** Validated periodic profile repeated around the shaft. */
|
|
743
771
|
readonly profile: ThreadProfile;
|
|
744
772
|
/** Optional circular-resolution policy. */
|
|
@@ -773,19 +801,19 @@ export declare interface HelicalThreadSolidMeshPreflight {
|
|
|
773
801
|
*/
|
|
774
802
|
export declare function hull(options: HullOptions): Solid;
|
|
775
803
|
|
|
776
|
-
/** Convex filled XY hull of finite points or
|
|
804
|
+
/** Convex filled XY hull of finite points or filled section recipes. */
|
|
777
805
|
export declare function hull(options: SectionHullOptions): Section;
|
|
778
806
|
|
|
779
|
-
/** Hull inputs are either finite points or
|
|
807
|
+
/** Hull inputs are either finite points or solid recipes. */
|
|
780
808
|
export declare type HullOptions =
|
|
781
809
|
| {
|
|
782
810
|
/** Finite millimetre XYZ points to include in the convex hull. */
|
|
783
|
-
readonly points: readonly
|
|
811
|
+
readonly points: readonly Vector3Input[];
|
|
784
812
|
/** Point input excludes solid input. */
|
|
785
813
|
readonly solids?: never;
|
|
786
814
|
}
|
|
787
815
|
| {
|
|
788
|
-
/**
|
|
816
|
+
/** Solid recipes to include in the convex hull. */
|
|
789
817
|
readonly solids: readonly Solid[];
|
|
790
818
|
/** Solid input excludes point input. */
|
|
791
819
|
readonly points?: never;
|
|
@@ -847,13 +875,16 @@ export declare interface ImmutableTriangleMesh {
|
|
|
847
875
|
readonly indices: ImmutableBuffer<Uint32Array>;
|
|
848
876
|
}
|
|
849
877
|
|
|
850
|
-
/**
|
|
878
|
+
/**
|
|
879
|
+
* Bounded positive-inside implicit field constructor.
|
|
880
|
+
* The retained callback must capture independent immutable inputs, not live session readers or parameters.
|
|
881
|
+
*/
|
|
851
882
|
export declare function implicit(options: ImplicitOptions): Solid;
|
|
852
883
|
|
|
853
884
|
/** Positive-inside sampling, bounded to 4M native BCC grid slots and 8M field calls. */
|
|
854
885
|
export declare interface ImplicitOptions {
|
|
855
886
|
/** Positive-inside scalar field evaluated at finite XYZ points. */
|
|
856
|
-
readonly field: (point:
|
|
887
|
+
readonly field: (point: Vector3Tuple) => number;
|
|
857
888
|
/** Axis-aligned XYZ bounds in millimetres. */
|
|
858
889
|
readonly bounds: Bounds3;
|
|
859
890
|
/** Positive sampling edge length in millimetres. */
|
|
@@ -892,8 +923,8 @@ export declare function inspectSolid(solid: Solid): SolidInspection;
|
|
|
892
923
|
* @example Internal thread
|
|
893
924
|
* ```ts
|
|
894
925
|
* import { cylinder, internalThreadCutter } from "@metamesh/modeling";
|
|
895
|
-
* import {
|
|
896
|
-
* const profile =
|
|
926
|
+
* import { threadProfile } from "@metamesh/modeling/geometry";
|
|
927
|
+
* const profile = threadProfile({ kind: "triangular", pitch: 1.75 });
|
|
897
928
|
* const body = cylinder({ diameter: 20, height: 12, center: false });
|
|
898
929
|
* const cutter = internalThreadCutter({ nominalMajorDiameter: 12, length: 12, profile });
|
|
899
930
|
* body.subtract([cutter]);
|
|
@@ -928,7 +959,7 @@ export declare function intersect(solids: readonly Solid[]): Solid;
|
|
|
928
959
|
export declare function intersect(sections: readonly Section[]): Section;
|
|
929
960
|
|
|
930
961
|
/**
|
|
931
|
-
* Checks whether a
|
|
962
|
+
* Checks whether a solid or filled section contains no geometry during host execution.
|
|
932
963
|
*
|
|
933
964
|
* Accepts a 3D Solid or 2D Section handle, not a finalized model or raw triangle mesh.
|
|
934
965
|
* Useful after a Boolean operation whose inputs may not overlap; no mesh is extracted.
|
|
@@ -956,18 +987,19 @@ export declare function linearPattern(
|
|
|
956
987
|
options: LinearPatternOptions,
|
|
957
988
|
): readonly Solid[];
|
|
958
989
|
|
|
959
|
-
/** Repeats a filled Section
|
|
990
|
+
/** Repeats a filled Section along an XY direction, defaulting to +X. */
|
|
960
991
|
export declare function linearPattern(
|
|
961
992
|
source: PatternSource<Section>,
|
|
962
|
-
options: LinearPatternOptions
|
|
993
|
+
options: LinearPatternOptions<2>,
|
|
963
994
|
): readonly Section[];
|
|
964
995
|
|
|
965
996
|
/**
|
|
966
997
|
* Equal linear intervals determined by exactly two of count, spacing and total length.
|
|
998
|
+
* Dimension defaults to 3; Section patterns use 2 and accept XY vector directions.
|
|
967
999
|
*/
|
|
968
|
-
export declare type LinearPatternOptions = {
|
|
1000
|
+
export declare type LinearPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
969
1001
|
/** Direction of repetition; magnitude is ignored. Defaults to +X. */
|
|
970
|
-
readonly direction?:
|
|
1002
|
+
readonly direction?: Dimension extends 2 ? Vector2Input : Vector3Input;
|
|
971
1003
|
} & (
|
|
972
1004
|
| {
|
|
973
1005
|
/** Positive copy count, including the original. */
|
|
@@ -1072,11 +1104,14 @@ export declare type LoftPlacement =
|
|
|
1072
1104
|
* A Section or point loop at an explicit height or frame.
|
|
1073
1105
|
*/
|
|
1074
1106
|
export declare type LoftStation = LoftPlacement & {
|
|
1075
|
-
/**
|
|
1076
|
-
readonly profile: Section |
|
|
1107
|
+
/** Filled Section recipe or ordered XY boundary point data. */
|
|
1108
|
+
readonly profile: Section | Path2Input;
|
|
1077
1109
|
};
|
|
1078
1110
|
|
|
1079
|
-
/**
|
|
1111
|
+
/**
|
|
1112
|
+
* Matches a profile family using operation settings over host resolution and limits.
|
|
1113
|
+
* Requires active synchronous model execution. Use Geometry's matchProfiles for standalone preparation.
|
|
1114
|
+
*/
|
|
1080
1115
|
export declare function matchProfiles(
|
|
1081
1116
|
profiles: readonly Profile[],
|
|
1082
1117
|
options?: MatchProfilesOptions,
|
|
@@ -1124,14 +1159,100 @@ export declare type PartGeometry = Solid | TriangleMesh | ImmutableTriangleMesh;
|
|
|
1124
1159
|
export declare interface PartOptions {
|
|
1125
1160
|
/** Local geometry or a lazy reader; native objects never cross a revision. */
|
|
1126
1161
|
readonly geometry: ComputedValue<PartGeometry>;
|
|
1127
|
-
/** XYZ translation in millimetres, applied after rotation; defaults to zero. */
|
|
1128
|
-
readonly position?: ComputedValue<
|
|
1129
|
-
/**
|
|
1130
|
-
readonly rotation?: ComputedValue<
|
|
1162
|
+
/** XYZ vector or tuple translation in millimetres, applied after rotation; defaults to zero. */
|
|
1163
|
+
readonly position?: ComputedValue<Vector3Input>;
|
|
1164
|
+
/** XYZ vector or tuple of fixed global X, Y, Z rotations in degrees; defaults to zero. */
|
|
1165
|
+
readonly rotation?: ComputedValue<Vector3Input>;
|
|
1131
1166
|
/** Optional six-digit hexadecimal semantic part color. */
|
|
1132
1167
|
readonly color?: string;
|
|
1133
1168
|
}
|
|
1134
1169
|
|
|
1170
|
+
/** Immutable directed XY polyline. Closure is explicit and does not imply a filled Section. */
|
|
1171
|
+
export declare interface Path2 {
|
|
1172
|
+
/** Coordinate dimension; identifies planar paths even when empty. */
|
|
1173
|
+
readonly dimension: 2;
|
|
1174
|
+
/** Whether traversal includes the last-to-first edge. */
|
|
1175
|
+
readonly closed: boolean;
|
|
1176
|
+
/** Returns frozen tuple coordinates; closure remains separate metadata. Repeated calls do not allocate. */
|
|
1177
|
+
toArray(): Path2Data;
|
|
1178
|
+
/** Total sampled edge length in model units, including the closing edge when closed. */
|
|
1179
|
+
length(): number;
|
|
1180
|
+
/** Axis-aligned bounds, or undefined for an empty path. */
|
|
1181
|
+
bounds(): Bounds2 | undefined;
|
|
1182
|
+
/** Finds the nearest edge location; requires at least two vertices. */
|
|
1183
|
+
closestPoint(point: Vector2Input): PathLocation<Vector2>;
|
|
1184
|
+
/** Applies an XY placement without reordering traversal, including after reflection. */
|
|
1185
|
+
transform(placement: Transform2Input): Path2;
|
|
1186
|
+
/** Reverses vertex order and traversal; neither the source nor its coordinates are mutated. */
|
|
1187
|
+
reverse(): Path2;
|
|
1188
|
+
/** Returns a path sampled at equal arc lengths. Corners may be bridged; closure is preserved. */
|
|
1189
|
+
resample(options?: PathResamplingOptions): Path2;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* Snapshots finite XY coordinates as an immutable sampled path, independent of engine initialization.
|
|
1194
|
+
* Open paths may be empty or have one point; closed paths need three vertices and omit a duplicated
|
|
1195
|
+
* seam. Repeated adjacent vertices are retained. No winding normalization or filling is performed.
|
|
1196
|
+
* Malformed dimensions or topology throw INVALID_ARGUMENT; nonfinite coordinates or measurement
|
|
1197
|
+
* overflow throw NON_FINITE_VALUE; exhausted allocation ceilings throw COMPLEXITY_LIMIT GeometryError.
|
|
1198
|
+
* A path input retains its closure. Limits bound construction only; resampling takes its own limits.
|
|
1199
|
+
*/
|
|
1200
|
+
export declare function path2(input: Path2Input, options?: PathOptions): Path2;
|
|
1201
|
+
|
|
1202
|
+
/** XY point tuples for interchange; closure is supplied by the consuming operation or Path2 value. */
|
|
1203
|
+
export declare type Path2Data = readonly Vector2Tuple[];
|
|
1204
|
+
|
|
1205
|
+
/** An immutable XY sampled path or a collection of XY tuples and fluent vectors. */
|
|
1206
|
+
export declare type Path2Input = Path2 | readonly Vector2Input[];
|
|
1207
|
+
|
|
1208
|
+
/** Immutable directed XYZ polyline; it represents sampled edges, not an analytic curve. */
|
|
1209
|
+
export declare interface Path3 {
|
|
1210
|
+
/** Coordinate dimension; identifies spatial paths even when empty. */
|
|
1211
|
+
readonly dimension: 3;
|
|
1212
|
+
/** Whether traversal includes the last-to-first edge. */
|
|
1213
|
+
readonly closed: boolean;
|
|
1214
|
+
/** Returns frozen tuple coordinates; closure remains separate metadata. Repeated calls do not allocate. */
|
|
1215
|
+
toArray(): Path3Data;
|
|
1216
|
+
/** Total sampled edge length in model units, including the closing edge when closed. */
|
|
1217
|
+
length(): number;
|
|
1218
|
+
/** Axis-aligned bounds, or undefined for an empty path. */
|
|
1219
|
+
bounds(): Bounds3 | undefined;
|
|
1220
|
+
/** Finds the nearest edge location; requires at least two vertices. */
|
|
1221
|
+
closestPoint(point: Vector3Input): PathLocation<Vector3>;
|
|
1222
|
+
/** Applies an XYZ placement without changing traversal order or closure. */
|
|
1223
|
+
transform(placement: Transform3Input): Path3;
|
|
1224
|
+
/** Reverses vertex order and traversal without mutating the source. */
|
|
1225
|
+
reverse(): Path3;
|
|
1226
|
+
/** Returns a path sampled at equal arc lengths. Corners may be bridged; closure is preserved. */
|
|
1227
|
+
resample(options?: PathResamplingOptions): Path3;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Snapshots finite XYZ coordinates as an immutable sampled path with the same closure, seam,
|
|
1232
|
+
* allocation and error rules as path2. Analytic curves must be sampled explicitly first.
|
|
1233
|
+
*/
|
|
1234
|
+
export declare function path3(input: Path3Input, options?: PathOptions): Path3;
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* XYZ point tuples for interchange; closure is supplied by the consuming operation or Path3 value.
|
|
1238
|
+
*/
|
|
1239
|
+
export declare type Path3Data = readonly Vector3Tuple[];
|
|
1240
|
+
|
|
1241
|
+
/** An immutable XYZ sampled path or a collection of XYZ tuples and fluent vectors. */
|
|
1242
|
+
export declare type Path3Input = Path3 | readonly Vector3Input[];
|
|
1243
|
+
|
|
1244
|
+
/** Nearest location on a sampled boundary, rather than inside a filled shape or on an analytic curve. */
|
|
1245
|
+
export declare interface PathLocation<Point extends Vector2 | Vector3> {
|
|
1246
|
+
/** Immutable position on the selected edge. */
|
|
1247
|
+
readonly point: Point;
|
|
1248
|
+
/** Euclidean distance from the query in model units. */
|
|
1249
|
+
readonly distance: number;
|
|
1250
|
+
/** Starting vertex of the selected edge; ties keep the first edge in traversal order. */
|
|
1251
|
+
readonly edgeIndex: number;
|
|
1252
|
+
/** Clamped fraction along that edge, not the whole path's normalized arc length. */
|
|
1253
|
+
readonly fraction: number;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1135
1256
|
/**
|
|
1136
1257
|
* Supplies a profile-X orientation guide for each original normalized sweep station.
|
|
1137
1258
|
*
|
|
@@ -1140,9 +1261,17 @@ export declare interface PartOptions {
|
|
|
1140
1261
|
* @returns A finite guide vector that is not parallel to the local path tangent.
|
|
1141
1262
|
*/
|
|
1142
1263
|
export declare type PathNormalGuide = (
|
|
1143
|
-
point:
|
|
1264
|
+
point: Vector3Tuple,
|
|
1144
1265
|
index: number,
|
|
1145
|
-
) =>
|
|
1266
|
+
) => Vector3Input;
|
|
1267
|
+
|
|
1268
|
+
/** Topology and allocation ceiling for an immutable sampled path. */
|
|
1269
|
+
export declare interface PathOptions {
|
|
1270
|
+
/** Connects the last vertex to the first; closed paths omit the repeated seam. Defaults to false. */
|
|
1271
|
+
readonly closed?: boolean;
|
|
1272
|
+
/** Construction point ceiling; defaults to package sampling limits. Later sampling has its own options. */
|
|
1273
|
+
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1274
|
+
}
|
|
1146
1275
|
|
|
1147
1276
|
/**
|
|
1148
1277
|
* Physical arc-length copies along a sampled path, with optional tangent orientation.
|
|
@@ -1154,17 +1283,17 @@ export declare type PathNormalGuide = (
|
|
|
1154
1283
|
*/
|
|
1155
1284
|
export declare function pathPattern(
|
|
1156
1285
|
source: PatternSource,
|
|
1157
|
-
path:
|
|
1286
|
+
path: Path3Input,
|
|
1158
1287
|
options: PathPatternOptions,
|
|
1159
1288
|
): readonly Solid[];
|
|
1160
1289
|
|
|
1161
1290
|
/**
|
|
1162
|
-
* Repeats a filled Section along a sampled XY path
|
|
1163
|
-
*
|
|
1291
|
+
* Repeats a filled Section along a sampled XY path. Tangent orientation maps local +X
|
|
1292
|
+
* to the path tangent counterclockwise, preserving the XY plane.
|
|
1164
1293
|
*/
|
|
1165
1294
|
export declare function pathPattern(
|
|
1166
1295
|
source: PatternSource<Section>,
|
|
1167
|
-
path:
|
|
1296
|
+
path: Path2Input,
|
|
1168
1297
|
options: PathPatternOptions,
|
|
1169
1298
|
): readonly Section[];
|
|
1170
1299
|
|
|
@@ -1172,26 +1301,56 @@ export declare function pathPattern(
|
|
|
1172
1301
|
export declare interface PathPatternOptions {
|
|
1173
1302
|
/** Positive number of copies; open paths include both endpoints when greater than one. */
|
|
1174
1303
|
readonly count: number;
|
|
1175
|
-
/**
|
|
1304
|
+
/** Raw point closure defaults to false; a path value supplies closure and rejects conflicts. */
|
|
1176
1305
|
readonly closed?: boolean;
|
|
1177
|
-
/** Preserve
|
|
1306
|
+
/** Preserve orientation, or align local +X for Sections / +Z for Solids to the tangent. Defaults to fixed. */
|
|
1178
1307
|
readonly orientation?: "fixed" | "tangent";
|
|
1179
1308
|
}
|
|
1180
1309
|
|
|
1310
|
+
/** Equal arc-length sampling; the path itself owns whether its closing edge is included. */
|
|
1311
|
+
export declare interface PathResamplingOptions extends CurveSamplingOptions {
|
|
1312
|
+
/** Exact arc-length intervals; closed paths need at least three. Otherwise physical resolution or the effective source edge count controls sampling. */
|
|
1313
|
+
readonly segments?: number;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1181
1316
|
/**
|
|
1182
|
-
* One
|
|
1317
|
+
* One immutable shape, or a synchronous factory called once per copy in index order.
|
|
1183
1318
|
*/
|
|
1184
1319
|
export declare type PatternSource<T extends Solid | Section = Solid> =
|
|
1185
1320
|
T | ((index: number) => T);
|
|
1186
1321
|
|
|
1322
|
+
/** A fixed XY point in world coordinates; omitted pivots use the coordinate origin. */
|
|
1323
|
+
export declare interface Pivot2Options {
|
|
1324
|
+
/** World-space point left fixed by rotation or scaling. */
|
|
1325
|
+
readonly pivot?: Vector2Input;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
/** A fixed XYZ point in world coordinates; omitted pivots use the coordinate origin. */
|
|
1329
|
+
export declare interface Pivot3Options {
|
|
1330
|
+
/** World-space point left fixed by rotation or scaling. */
|
|
1331
|
+
readonly pivot?: Vector3Input;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1187
1334
|
/** A world-space cutting plane, retaining the half-space in the normal's direction. */
|
|
1188
1335
|
export declare interface PlaneOptions {
|
|
1189
1336
|
/** Finite nonzero plane normal; magnitude does not affect the plane. */
|
|
1190
|
-
readonly normal:
|
|
1337
|
+
readonly normal: Vector3Input;
|
|
1191
1338
|
/** Signed millimetre distance from the origin along the unit normal. Defaults to zero. */
|
|
1192
1339
|
readonly offset?: number;
|
|
1193
1340
|
}
|
|
1194
1341
|
|
|
1342
|
+
/**
|
|
1343
|
+
* Fills one closed millimetre XY outline, explicit outer/hole topology, or compound contours.
|
|
1344
|
+
* Closing edges are implicit. Compound contours use nonzero fill unless selected otherwise.
|
|
1345
|
+
* Explicit topology must be simple and disjoint; compound winding may resolve overlaps.
|
|
1346
|
+
*
|
|
1347
|
+
* @example Extrude a triangular plate
|
|
1348
|
+
* ```ts
|
|
1349
|
+
* polygon([[0, 0], [20, 0], [10, 12]]).extrude({ height: 3 });
|
|
1350
|
+
* ```
|
|
1351
|
+
*/
|
|
1352
|
+
export declare function polygon(input: Path2Input | PolygonOptions): Section;
|
|
1353
|
+
|
|
1195
1354
|
/**
|
|
1196
1355
|
* One bounded two-dimensional polygon.
|
|
1197
1356
|
*
|
|
@@ -1199,83 +1358,79 @@ export declare interface PlaneOptions {
|
|
|
1199
1358
|
* their duplicated closing point. Holes must lie inside `outer` and must not
|
|
1200
1359
|
* intersect each other or the exterior.
|
|
1201
1360
|
*/
|
|
1202
|
-
export declare interface
|
|
1361
|
+
export declare interface PolygonData {
|
|
1203
1362
|
/** Clockwise interior boundaries, each omitting its duplicated closing point. */
|
|
1204
1363
|
readonly holes: readonly Contour[];
|
|
1205
1364
|
/** Counter-clockwise exterior boundary, omitting its duplicated closing point. */
|
|
1206
1365
|
readonly outer: Contour;
|
|
1207
1366
|
}
|
|
1208
1367
|
|
|
1209
|
-
/**
|
|
1210
|
-
* Fills one closed millimetre XY outline, explicit outer/hole topology, or compound contours.
|
|
1211
|
-
* Closing edges are implicit. Compound contours use nonzero fill unless selected otherwise.
|
|
1212
|
-
* Explicit topology must be simple and disjoint; compound winding may resolve overlaps.
|
|
1213
|
-
*
|
|
1214
|
-
* @example Extrude a triangular plate
|
|
1215
|
-
* ```ts
|
|
1216
|
-
* polygon([[0, 0], [20, 0], [10, 12]]).extrude({ height: 3 });
|
|
1217
|
-
* ```
|
|
1218
|
-
*/
|
|
1219
|
-
export declare function polygon(input: Contour | PolygonOptions): Section;
|
|
1220
|
-
|
|
1221
1368
|
/** Explicit polygon topology or compound contours; all closing edges are implicit. */
|
|
1222
1369
|
export declare type PolygonOptions =
|
|
1223
1370
|
| {
|
|
1224
1371
|
/** One simple exterior boundary, normalized to counterclockwise winding. */
|
|
1225
|
-
readonly outer:
|
|
1372
|
+
readonly outer: Path2Input;
|
|
1226
1373
|
/** Disjoint simple holes inside the exterior; normalized to clockwise winding. */
|
|
1227
|
-
readonly holes?: readonly
|
|
1374
|
+
readonly holes?: readonly Path2Input[];
|
|
1228
1375
|
/** Explicit topology excludes compound contours. */
|
|
1229
1376
|
readonly contours?: never;
|
|
1230
1377
|
/** Explicit topology determines fill without a winding rule. */
|
|
1231
1378
|
readonly fillRule?: never;
|
|
1379
|
+
/** Explicit topology excludes serialized multi-polygon data. */
|
|
1380
|
+
readonly polygons?: never;
|
|
1232
1381
|
}
|
|
1233
1382
|
| {
|
|
1234
1383
|
/** Compound boundaries; may overlap or contain holes according to the fill rule. */
|
|
1235
|
-
readonly contours: readonly
|
|
1384
|
+
readonly contours: readonly Path2Input[];
|
|
1236
1385
|
/** Winding interpretation; defaults to nonzero. An empty list creates an empty Section. */
|
|
1237
1386
|
readonly fillRule?: "nonzero" | "evenodd";
|
|
1238
1387
|
/** Compound contours exclude explicit topology. */
|
|
1239
1388
|
readonly outer?: never;
|
|
1240
1389
|
/** Compound contours determine their own holes. */
|
|
1241
1390
|
readonly holes?: never;
|
|
1391
|
+
/** Compound fill excludes serialized multi-polygon data. */
|
|
1392
|
+
readonly polygons?: never;
|
|
1393
|
+
}
|
|
1394
|
+
| {
|
|
1395
|
+
/** Explicit filled polygons for serialization and interchange; an empty array is empty. */
|
|
1396
|
+
readonly polygons: RegionData;
|
|
1397
|
+
/** Serialized topology excludes a standalone outer contour. */
|
|
1398
|
+
readonly outer?: never;
|
|
1399
|
+
/** Each serialized polygon owns its own holes. */
|
|
1400
|
+
readonly holes?: never;
|
|
1401
|
+
/** Serialized topology excludes compound contours. */
|
|
1402
|
+
readonly contours?: never;
|
|
1403
|
+
/** Serialized polygons define fill explicitly. */
|
|
1404
|
+
readonly fillRule?: never;
|
|
1242
1405
|
};
|
|
1243
1406
|
|
|
1244
|
-
/**
|
|
1407
|
+
/** Internal-thread facts using host resolution and limits; requires active synchronous model execution. */
|
|
1245
1408
|
export declare function preflightInternalThreadCutter(
|
|
1246
1409
|
options: InternalThreadCutterOptions,
|
|
1247
1410
|
): HelicalThreadSolidMeshPreflight;
|
|
1248
1411
|
|
|
1249
|
-
/**
|
|
1412
|
+
/** Nut/cutter facts using host resolution and limits; requires active synchronous model execution. */
|
|
1250
1413
|
export declare function preflightThreadedNut(
|
|
1251
1414
|
options: ThreadedNutOptions,
|
|
1252
1415
|
): ThreadedNutPreflight;
|
|
1253
1416
|
|
|
1254
|
-
/**
|
|
1417
|
+
/** External-thread facts using host resolution and limits; requires active synchronous model execution. */
|
|
1255
1418
|
export declare function preflightThreadedRod(
|
|
1256
1419
|
options: ThreadedRodOptions,
|
|
1257
1420
|
): HelicalThreadSolidMeshPreflight;
|
|
1258
1421
|
|
|
1259
|
-
/**
|
|
1260
|
-
export declare interface
|
|
1261
|
-
/** Applied after local construction; Section
|
|
1262
|
-
readonly
|
|
1422
|
+
/** Anchor attachment shared by solid and filled-section factories. */
|
|
1423
|
+
export declare interface PrimitiveAttachment {
|
|
1424
|
+
/** Applied after local construction; Section attachment must preserve the XY plane. */
|
|
1425
|
+
readonly attachment?: PrimitiveAttachmentOptions;
|
|
1263
1426
|
}
|
|
1264
1427
|
|
|
1265
1428
|
/** Maps an explicit or named shape-local attachment anchor onto a world-space anchor. */
|
|
1266
|
-
export declare interface
|
|
1429
|
+
export declare interface PrimitiveAttachmentOptions extends AttachOptions {
|
|
1267
1430
|
/** Shape-local source frame or a named primitive anchor such as bottom. */
|
|
1268
1431
|
readonly source: Anchor3 | string;
|
|
1269
1432
|
/** World-space target frame in millimetres. */
|
|
1270
1433
|
readonly target: Anchor3;
|
|
1271
|
-
/** Align outward directions face-to-face or in parallel. Defaults to opposed. */
|
|
1272
|
-
readonly alignment?: "opposed" | "same";
|
|
1273
|
-
/** Finite separation along the target direction in millimetres. Defaults to zero. */
|
|
1274
|
-
readonly gap?: number;
|
|
1275
|
-
/** Finite additional roll around the attached direction in degrees. Defaults to zero. */
|
|
1276
|
-
readonly spinDegrees?: number;
|
|
1277
|
-
/** Explicit numeric comparison overrides for anchor normalization. */
|
|
1278
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
1279
1434
|
}
|
|
1280
1435
|
|
|
1281
1436
|
/**
|
|
@@ -1332,7 +1487,7 @@ export declare interface ProfiledEdgeTreatment {
|
|
|
1332
1487
|
* First coordinates decrease and second coordinates increase. Cylinder/extrusion ends use
|
|
1333
1488
|
* cap inset first, side setback second; planar corners use incoming then outgoing edges.
|
|
1334
1489
|
*/
|
|
1335
|
-
readonly profile: readonly
|
|
1490
|
+
readonly profile: readonly Vector2Tuple[];
|
|
1336
1491
|
}
|
|
1337
1492
|
|
|
1338
1493
|
/** An identified line, circular arc, or cubic Bézier between corresponding landmarks. */
|
|
@@ -1348,33 +1503,33 @@ export declare type ProfileSpan2 = {
|
|
|
1348
1503
|
/** Selects a straight span. */
|
|
1349
1504
|
readonly kind: "line";
|
|
1350
1505
|
/** Start point in millimetres. */
|
|
1351
|
-
readonly start:
|
|
1506
|
+
readonly start: Vector2Tuple;
|
|
1352
1507
|
/** End point in millimetres. */
|
|
1353
|
-
readonly end:
|
|
1508
|
+
readonly end: Vector2Tuple;
|
|
1354
1509
|
}
|
|
1355
1510
|
| {
|
|
1356
1511
|
/** Selects the geometric curve or span family. */
|
|
1357
1512
|
readonly kind: "arc";
|
|
1358
1513
|
/** Center point in millimetres. */
|
|
1359
|
-
readonly center:
|
|
1514
|
+
readonly center: Vector2Tuple;
|
|
1360
1515
|
/** Circular radius in millimetres. */
|
|
1361
1516
|
readonly radius: number;
|
|
1362
1517
|
/** Initial counterclockwise angle in degrees. */
|
|
1363
|
-
readonly
|
|
1518
|
+
readonly startAngle: number;
|
|
1364
1519
|
/** Signed counterclockwise angular sweep in degrees. */
|
|
1365
|
-
readonly
|
|
1520
|
+
readonly sweepAngle: number;
|
|
1366
1521
|
}
|
|
1367
1522
|
| {
|
|
1368
1523
|
/** Selects a cubic Bézier span with the same coordinates as CubicBezierCurve2. */
|
|
1369
1524
|
readonly kind: "cubic";
|
|
1370
1525
|
/** Start point in millimetres. */
|
|
1371
|
-
readonly start:
|
|
1526
|
+
readonly start: Vector2Tuple;
|
|
1372
1527
|
/** First control point in millimetres. */
|
|
1373
|
-
readonly control1:
|
|
1528
|
+
readonly control1: Vector2Tuple;
|
|
1374
1529
|
/** Second control point in millimetres. */
|
|
1375
|
-
readonly control2:
|
|
1530
|
+
readonly control2: Vector2Tuple;
|
|
1376
1531
|
/** End point in millimetres. */
|
|
1377
|
-
readonly end:
|
|
1532
|
+
readonly end: Vector2Tuple;
|
|
1378
1533
|
}
|
|
1379
1534
|
);
|
|
1380
1535
|
|
|
@@ -1384,7 +1539,7 @@ export declare type ProfileSpan2 = {
|
|
|
1384
1539
|
* @example Six copies around Z
|
|
1385
1540
|
* ```ts
|
|
1386
1541
|
* const pin = cylinder({ height: 6, radius: 2 }).translate([12, 0, 0]);
|
|
1387
|
-
* radialPattern(pin, { count: 6, axis: [0, 0, 1],
|
|
1542
|
+
* radialPattern(pin, { count: 6, axis: [0, 0, 1], angle: 60 });
|
|
1388
1543
|
* ```
|
|
1389
1544
|
*/
|
|
1390
1545
|
export declare function radialPattern(
|
|
@@ -1392,29 +1547,33 @@ export declare function radialPattern(
|
|
|
1392
1547
|
options: RadialPatternOptions,
|
|
1393
1548
|
): readonly Solid[];
|
|
1394
1549
|
|
|
1395
|
-
/** Repeats a filled Section about
|
|
1550
|
+
/** Repeats a filled Section counterclockwise about a fixed XY pivot, using the implicit +Z axis. */
|
|
1396
1551
|
export declare function radialPattern(
|
|
1397
1552
|
source: PatternSource<Section>,
|
|
1398
|
-
options: RadialPatternOptions
|
|
1553
|
+
options: RadialPatternOptions<2>,
|
|
1399
1554
|
): readonly Section[];
|
|
1400
1555
|
|
|
1401
1556
|
/**
|
|
1402
|
-
*
|
|
1557
|
+
* Degree rotations about a fixed world-space pivot; XY patterns use the implicit +Z axis.
|
|
1403
1558
|
*/
|
|
1404
|
-
export declare
|
|
1405
|
-
/** Number of
|
|
1559
|
+
export declare type RadialPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
1560
|
+
/** Number of shapes to return, including the original. */
|
|
1406
1561
|
readonly count: number;
|
|
1407
|
-
/** Axis of the right-handed rotation. Its magnitude is ignored. */
|
|
1408
|
-
readonly axis: Vector3;
|
|
1409
1562
|
/** Signed rotation from one copy to the next, in degrees. */
|
|
1410
|
-
readonly
|
|
1411
|
-
/**
|
|
1412
|
-
readonly
|
|
1413
|
-
}
|
|
1563
|
+
readonly angle: number;
|
|
1564
|
+
/** Fixed world-space rotation pivot; defaults to the coordinate origin. */
|
|
1565
|
+
readonly pivot?: Dimension extends 2 ? Vector2Input : Vector3Input;
|
|
1566
|
+
} & (Dimension extends 2
|
|
1567
|
+
? {
|
|
1568
|
+
/** XY rotation uses +Z; an explicit spatial axis is unavailable. */
|
|
1569
|
+
readonly axis?: never;
|
|
1570
|
+
}
|
|
1571
|
+
: {
|
|
1572
|
+
/** Axis of the right-handed rotation. Its nonzero magnitude is ignored. */
|
|
1573
|
+
readonly axis: Vector3Input;
|
|
1574
|
+
});
|
|
1414
1575
|
|
|
1415
|
-
/**
|
|
1416
|
-
* Radial dimensions refer to polygon vertices or compensate faceting to meet polygon faces.
|
|
1417
|
-
*/
|
|
1576
|
+
/** Radial dimensions refer to polygon vertices or compensate faceting to meet polygon faces. */
|
|
1418
1577
|
export declare type RadialSizing = "vertex" | "face";
|
|
1419
1578
|
|
|
1420
1579
|
/**
|
|
@@ -1427,13 +1586,6 @@ export declare interface RadialSizingOptions {
|
|
|
1427
1586
|
readonly sizing?: RadialSizing;
|
|
1428
1587
|
}
|
|
1429
1588
|
|
|
1430
|
-
/** Copies intersections along the finite directed origin-to-endpoint segment. */
|
|
1431
|
-
export declare function rayCast(
|
|
1432
|
-
solid: Solid,
|
|
1433
|
-
origin: Vector3,
|
|
1434
|
-
endpoint: Vector3,
|
|
1435
|
-
): readonly SolidRayHit[];
|
|
1436
|
-
|
|
1437
1589
|
/**
|
|
1438
1590
|
* Filled rectangular section with uniform or independently treated corners.
|
|
1439
1591
|
*
|
|
@@ -1449,7 +1601,7 @@ export declare function rectangle(options: RectangleOptions): Section;
|
|
|
1449
1601
|
*/
|
|
1450
1602
|
export declare interface RectangleContourOptions {
|
|
1451
1603
|
/** Positive uniform size or explicit XY extents in millimetres. */
|
|
1452
|
-
readonly size: number |
|
|
1604
|
+
readonly size: number | Vector2Tuple;
|
|
1453
1605
|
/** Center on XY; otherwise the minimum corner is the origin. Defaults to true. */
|
|
1454
1606
|
readonly center?: boolean;
|
|
1455
1607
|
/** Uniform treatment or four corner treatments. Exact round segments describe a complete circle and must divide by four. */
|
|
@@ -1478,25 +1630,10 @@ export declare type RectangleCornerTreatments = readonly [
|
|
|
1478
1630
|
* Rectangle dimensions, placement and uniform or per-corner treatment.
|
|
1479
1631
|
*/
|
|
1480
1632
|
export declare interface RectangleOptions
|
|
1481
|
-
extends RectangleContourOptions,
|
|
1633
|
+
extends RectangleContourOptions, PrimitiveAttachment {}
|
|
1482
1634
|
|
|
1483
1635
|
/** A two-dimensional region represented by disjoint filled polygons. */
|
|
1484
|
-
export declare type
|
|
1485
|
-
|
|
1486
|
-
/** Clipper2 join styles accepted by robust region offsets. */
|
|
1487
|
-
export declare type RegionOffsetJoin = "miter" | "round" | "square";
|
|
1488
|
-
|
|
1489
|
-
/** Options controlling robust Clipper2 region offsets. */
|
|
1490
|
-
export declare interface RegionOffsetOptions {
|
|
1491
|
-
/** Number of segments per full circle for round joins. */
|
|
1492
|
-
readonly circularSegments?: number;
|
|
1493
|
-
/** Corner treatment; defaults to `round`. */
|
|
1494
|
-
readonly join?: RegionOffsetJoin;
|
|
1495
|
-
/** Maximum miter extension in offset-distance multiples; at least two. */
|
|
1496
|
-
readonly miterLimit?: number;
|
|
1497
|
-
/** Operation-level physical tessellation policy over the active model-wide policy. */
|
|
1498
|
-
readonly resolution?: GeometryResolution;
|
|
1499
|
-
}
|
|
1636
|
+
export declare type RegionData = readonly PolygonData[];
|
|
1500
1637
|
|
|
1501
1638
|
/**
|
|
1502
1639
|
* Regular polygon with a vertex on +X.
|
|
@@ -1512,13 +1649,13 @@ export declare function regularPolygon(options: RegularPolygonOptions): Section;
|
|
|
1512
1649
|
* Regular polygon dimensions, radial convention and degree rotation.
|
|
1513
1650
|
*/
|
|
1514
1651
|
export declare type RegularPolygonOptions = RadialSizingOptions &
|
|
1515
|
-
|
|
1652
|
+
PrimitiveAttachment & {
|
|
1516
1653
|
/** Positive nominal radius in millimetres, interpreted according to sizing. */
|
|
1517
1654
|
readonly radius: number;
|
|
1518
1655
|
/** Exact integer side count from three through 100000. */
|
|
1519
1656
|
readonly sides: number;
|
|
1520
1657
|
/** Counterclockwise rotation in degrees; defaults to zero with a vertex on +X. */
|
|
1521
|
-
readonly
|
|
1658
|
+
readonly rotation?: number;
|
|
1522
1659
|
};
|
|
1523
1660
|
|
|
1524
1661
|
/**
|
|
@@ -1532,7 +1669,7 @@ export declare type RegularPolygonOptions = RadialSizingOptions &
|
|
|
1532
1669
|
*
|
|
1533
1670
|
* // Contour coordinates are [radius, Z].
|
|
1534
1671
|
* const [profile] = matchProfiles([rectangleProfile({ size: [4, 16], center: false })]);
|
|
1535
|
-
* revolve(profile!, {
|
|
1672
|
+
* revolve(profile!, { degrees: 270 });
|
|
1536
1673
|
* ```
|
|
1537
1674
|
*/
|
|
1538
1675
|
export declare function revolve(
|
|
@@ -1545,12 +1682,14 @@ export declare function revolve(
|
|
|
1545
1682
|
*/
|
|
1546
1683
|
export declare interface RevolveOptions extends CircularPrimitiveOptions {
|
|
1547
1684
|
/**
|
|
1548
|
-
* Positive
|
|
1685
|
+
* Positive sweep in degrees, no greater than 360. Defaults to a full revolution;
|
|
1686
|
+
* smaller sweeps form partial revolutions with end caps.
|
|
1549
1687
|
* Segment counts describe a complete circle and scale to this angular span. Native filled
|
|
1550
1688
|
* revolutions require at least three sweep intervals: adaptive sampling refines to that floor,
|
|
1551
1689
|
* while exact counts that imply fewer intervals reject. Pure revolveMesh supports one interval.
|
|
1690
|
+
* @defaultValue `360`
|
|
1552
1691
|
*/
|
|
1553
|
-
readonly
|
|
1692
|
+
readonly degrees?: number;
|
|
1554
1693
|
/** Explicit output and sampling allocation ceilings. */
|
|
1555
1694
|
readonly limits?: Partial<ModelingLimits>;
|
|
1556
1695
|
}
|
|
@@ -1566,10 +1705,12 @@ export declare interface RoundedEdgeTreatment extends CircularPrimitiveOptions {
|
|
|
1566
1705
|
}
|
|
1567
1706
|
|
|
1568
1707
|
/**
|
|
1569
|
-
* Immutable deferred filled XY section recipe
|
|
1570
|
-
*
|
|
1571
|
-
*
|
|
1572
|
-
*
|
|
1708
|
+
* Immutable deferred filled XY section recipe. Construction and composition require no engine.
|
|
1709
|
+
* Ordinary recipes may be reused across sessions regardless of where constructed.
|
|
1710
|
+
* Observed components and recipes using them can only be evaluated in their originating session.
|
|
1711
|
+
* Methods leave the source unchanged; observations require a synchronous model execution.
|
|
1712
|
+
* Distances use millimetres; rotations use counterclockwise degrees.
|
|
1713
|
+
* Explicit resolution settings are captured; unspecified settings inherit the evaluating host's defaults.
|
|
1573
1714
|
*
|
|
1574
1715
|
* @example Extrude an outline with a border
|
|
1575
1716
|
* ```ts
|
|
@@ -1580,20 +1721,30 @@ export declare interface RoundedEdgeTreatment extends CircularPrimitiveOptions {
|
|
|
1580
1721
|
* ```
|
|
1581
1722
|
*/
|
|
1582
1723
|
export declare interface Section {
|
|
1583
|
-
/** Compile-time
|
|
1724
|
+
/** Compile-time identity brand for an immutable filled section recipe. */
|
|
1584
1725
|
readonly [sectionBrand]: "Section";
|
|
1585
1726
|
/** Translates XY coordinates in millimetres. */
|
|
1586
|
-
translate(this: Section, offset:
|
|
1587
|
-
/** Rotates counterclockwise about the origin by a scalar angle in degrees. */
|
|
1588
|
-
rotate(this: Section, degrees: number): Section;
|
|
1727
|
+
translate(this: Section, offset: Vector2Input): Section;
|
|
1589
1728
|
/**
|
|
1590
|
-
*
|
|
1729
|
+
* Rotates counterclockwise in degrees.
|
|
1730
|
+
* `options.pivot` is a fixed world-space point; omission uses the coordinate origin.
|
|
1591
1731
|
*/
|
|
1592
|
-
|
|
1732
|
+
rotate(this: Section, degrees: number, options?: Pivot2Options): Section;
|
|
1733
|
+
/**
|
|
1734
|
+
* Uniform or per-axis nonsingular scaling; negative factors reflect geometry.
|
|
1735
|
+
* `options.pivot` is a fixed world-space point; omission uses the coordinate origin.
|
|
1736
|
+
*/
|
|
1737
|
+
scale(
|
|
1738
|
+
this: Section,
|
|
1739
|
+
factors: number | Vector2Input,
|
|
1740
|
+
options?: Pivot2Options,
|
|
1741
|
+
): Section;
|
|
1593
1742
|
/** Reflection across an origin line/plane. */
|
|
1594
|
-
mirror(this: Section, normal:
|
|
1595
|
-
/**
|
|
1596
|
-
transform(this: Section,
|
|
1743
|
+
mirror(this: Section, normal: Vector2Input): Section;
|
|
1744
|
+
/** Applies a reusable XY placement or canonical row-major matrix. */
|
|
1745
|
+
transform(this: Section, placement: Transform2Input): Section;
|
|
1746
|
+
/** Copies canonical filled polygons for interchange; requires an active model execution. */
|
|
1747
|
+
toRegionData(this: Section): RegionData;
|
|
1597
1748
|
/** Native section difference; an empty cutter array preserves the source. */
|
|
1598
1749
|
subtract(this: Section, cutters: readonly Section[]): Section;
|
|
1599
1750
|
/**
|
|
@@ -1604,7 +1755,7 @@ export declare interface Section {
|
|
|
1604
1755
|
*/
|
|
1605
1756
|
simplify(this: Section, tolerance: number): Section;
|
|
1606
1757
|
/**
|
|
1607
|
-
* Returns a new
|
|
1758
|
+
* Returns a new recipe with copied named anchors; existing names may be replaced.
|
|
1608
1759
|
*/
|
|
1609
1760
|
withAnchors(
|
|
1610
1761
|
this: Section,
|
|
@@ -1616,7 +1767,7 @@ export declare interface Section {
|
|
|
1616
1767
|
offset(
|
|
1617
1768
|
this: Section,
|
|
1618
1769
|
distance: number,
|
|
1619
|
-
options?:
|
|
1770
|
+
options?: SectionOffsetOptions,
|
|
1620
1771
|
): Section;
|
|
1621
1772
|
/**
|
|
1622
1773
|
* Extrudes along +Z with degree twist and top scaling.
|
|
@@ -1629,21 +1780,21 @@ export declare interface Section {
|
|
|
1629
1780
|
/**
|
|
1630
1781
|
* Sweeps this filled section using the selected frame policy and degree twist.
|
|
1631
1782
|
*/
|
|
1632
|
-
sweep(this: Section, path:
|
|
1783
|
+
sweep(this: Section, path: Path3Input, options?: SweepOptions): Solid;
|
|
1633
1784
|
}
|
|
1634
1785
|
|
|
1635
1786
|
declare const sectionBrand: unique symbol;
|
|
1636
1787
|
|
|
1637
|
-
/** Planar convex hull inputs are finite XY points or
|
|
1788
|
+
/** Planar convex hull inputs are finite XY points or filled section recipes. */
|
|
1638
1789
|
export declare type SectionHullOptions =
|
|
1639
1790
|
| {
|
|
1640
1791
|
/** At least three finite millimetre XY points spanning positive area. */
|
|
1641
|
-
readonly points: readonly
|
|
1792
|
+
readonly points: readonly Vector2Input[];
|
|
1642
1793
|
/** Point input excludes section input. */
|
|
1643
1794
|
readonly sections?: never;
|
|
1644
1795
|
}
|
|
1645
1796
|
| {
|
|
1646
|
-
/** One through 1000
|
|
1797
|
+
/** One through 1000 filled section recipes to include in the convex hull. */
|
|
1647
1798
|
readonly sections: readonly Section[];
|
|
1648
1799
|
/** Section input excludes point input. */
|
|
1649
1800
|
readonly points?: never;
|
|
@@ -1659,15 +1810,30 @@ export declare interface SectionInspection {
|
|
|
1659
1810
|
/** Filled section area in square millimetres. */
|
|
1660
1811
|
readonly area: number;
|
|
1661
1812
|
/** Number of extracted outer and hole contours. */
|
|
1662
|
-
readonly
|
|
1813
|
+
readonly contourCount: number;
|
|
1663
1814
|
/** Inclusive maximum coordinates in millimetres. */
|
|
1664
|
-
readonly max:
|
|
1815
|
+
readonly max: Vector2Tuple;
|
|
1665
1816
|
/** Inclusive minimum coordinates in millimetres. */
|
|
1666
|
-
readonly min:
|
|
1817
|
+
readonly min: Vector2Tuple;
|
|
1667
1818
|
/** Number of disconnected filled section components. */
|
|
1668
|
-
readonly
|
|
1819
|
+
readonly componentCount: number;
|
|
1669
1820
|
/** Number of native section vertices. */
|
|
1670
|
-
readonly
|
|
1821
|
+
readonly vertexCount: number;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
/** Clipper2 join styles accepted by robust region offsets. */
|
|
1825
|
+
export declare type SectionOffsetJoin = "miter" | "round" | "square";
|
|
1826
|
+
|
|
1827
|
+
/** Options controlling robust Clipper2 region offsets. */
|
|
1828
|
+
export declare interface SectionOffsetOptions {
|
|
1829
|
+
/** Number of segments per full circle for round joins. */
|
|
1830
|
+
readonly circularSegments?: number;
|
|
1831
|
+
/** Corner treatment; defaults to `round`. */
|
|
1832
|
+
readonly join?: SectionOffsetJoin;
|
|
1833
|
+
/** Maximum miter extension in offset-distance multiples; at least two. */
|
|
1834
|
+
readonly miterLimit?: number;
|
|
1835
|
+
/** Operation-level physical tessellation policy over the active model-wide policy. */
|
|
1836
|
+
readonly resolution?: GeometryResolution;
|
|
1671
1837
|
}
|
|
1672
1838
|
|
|
1673
1839
|
/** A cubic corner transition with zero curvature at its straight tangent joins. */
|
|
@@ -1685,8 +1851,11 @@ export declare interface SmoothEdgeTreatment {
|
|
|
1685
1851
|
}
|
|
1686
1852
|
|
|
1687
1853
|
/**
|
|
1688
|
-
* Immutable deferred solid recipe
|
|
1689
|
-
*
|
|
1854
|
+
* Immutable deferred solid recipe. Construction and composition require no engine.
|
|
1855
|
+
* Ordinary recipes may be reused across sessions regardless of where constructed.
|
|
1856
|
+
* Explicit resolution settings are captured; unspecified settings inherit the evaluating host's defaults.
|
|
1857
|
+
* Observed components and recipes using them can only be evaluated in their originating session.
|
|
1858
|
+
* Methods leave the source unchanged and use millimetres and degrees.
|
|
1690
1859
|
* A no-op may reuse the receiver; final part placement belongs in `part` options.
|
|
1691
1860
|
*
|
|
1692
1861
|
* @example Shape a body with a through bore
|
|
@@ -1697,26 +1866,34 @@ export declare interface SmoothEdgeTreatment {
|
|
|
1697
1866
|
* ```
|
|
1698
1867
|
*/
|
|
1699
1868
|
export declare interface Solid {
|
|
1700
|
-
/** Compile-time
|
|
1869
|
+
/** Compile-time identity brand for an immutable solid recipe. */
|
|
1701
1870
|
readonly [solidBrand]: "Solid";
|
|
1702
1871
|
/**
|
|
1703
1872
|
* Translates XYZ coordinates in millimetres.
|
|
1704
1873
|
*/
|
|
1705
|
-
translate(this: Solid, offset:
|
|
1874
|
+
translate(this: Solid, offset: Vector3Input): Solid;
|
|
1706
1875
|
/**
|
|
1707
|
-
* Rotates about
|
|
1876
|
+
* Rotates about global X, then Y, then Z in degrees.
|
|
1877
|
+
* `options.pivot` is a fixed world-space point; omission uses the coordinate origin.
|
|
1708
1878
|
*/
|
|
1709
|
-
rotate(this: Solid, degrees:
|
|
1879
|
+
rotate(this: Solid, degrees: Vector3Input, options?: Pivot3Options): Solid;
|
|
1710
1880
|
/**
|
|
1711
|
-
*
|
|
1881
|
+
* Uniform or per-axis nonsingular scaling; negative factors reflect geometry.
|
|
1882
|
+
* `options.pivot` is a fixed world-space point; omission uses the coordinate origin.
|
|
1712
1883
|
*/
|
|
1713
|
-
scale(
|
|
1884
|
+
scale(
|
|
1885
|
+
this: Solid,
|
|
1886
|
+
factors: number | Vector3Input,
|
|
1887
|
+
options?: Pivot3Options,
|
|
1888
|
+
): Solid;
|
|
1714
1889
|
/**
|
|
1715
1890
|
* Reflection across an origin line/plane.
|
|
1716
1891
|
*/
|
|
1717
|
-
mirror(this: Solid, normal:
|
|
1718
|
-
/**
|
|
1719
|
-
transform(this: Solid,
|
|
1892
|
+
mirror(this: Solid, normal: Vector3Input): Solid;
|
|
1893
|
+
/** Applies a reusable XYZ placement or canonical row-major matrix. */
|
|
1894
|
+
transform(this: Solid, placement: Transform3Input): Solid;
|
|
1895
|
+
/** Copies manufacturing mesh buffers for interchange; requires an active model execution. */
|
|
1896
|
+
toTriangleMesh(this: Solid): TriangleMesh;
|
|
1720
1897
|
/**
|
|
1721
1898
|
* Robust difference; an empty cutter array preserves the source.
|
|
1722
1899
|
*/
|
|
@@ -1729,7 +1906,7 @@ export declare interface Solid {
|
|
|
1729
1906
|
*/
|
|
1730
1907
|
simplify(this: Solid, tolerance: number): Solid;
|
|
1731
1908
|
/**
|
|
1732
|
-
* Returns a new
|
|
1909
|
+
* Returns a new recipe with copied named anchors; existing names may be replaced.
|
|
1733
1910
|
*/
|
|
1734
1911
|
withAnchors(this: Solid, anchors: Readonly<Record<string, Anchor3>>): Solid;
|
|
1735
1912
|
/**
|
|
@@ -1741,8 +1918,8 @@ export declare interface Solid {
|
|
|
1741
1918
|
target: Anchor3,
|
|
1742
1919
|
options?: AttachOptions,
|
|
1743
1920
|
): Solid;
|
|
1744
|
-
/**
|
|
1745
|
-
|
|
1921
|
+
/** Returns an immutable copy with this native tolerance; zero selects the kernel minimum. */
|
|
1922
|
+
withTolerance(this: Solid, tolerance: number): Solid;
|
|
1746
1923
|
/** Projects this solid into a filled XY section. */
|
|
1747
1924
|
projectSection(this: Solid): Section;
|
|
1748
1925
|
/** Takes a filled horizontal slice at Z millimetres. */
|
|
@@ -1775,11 +1952,11 @@ export declare interface SolidInspection {
|
|
|
1775
1952
|
/** Whether this native solid contains no material. */
|
|
1776
1953
|
readonly isEmpty: boolean;
|
|
1777
1954
|
/** Inclusive maximum coordinates in millimetres. */
|
|
1778
|
-
readonly max:
|
|
1955
|
+
readonly max: Vector3Tuple;
|
|
1779
1956
|
/** Inclusive minimum coordinates in millimetres. */
|
|
1780
|
-
readonly min:
|
|
1781
|
-
/** Number of
|
|
1782
|
-
readonly
|
|
1957
|
+
readonly min: Vector3Tuple;
|
|
1958
|
+
/** Number of disconnected material components, each retaining enclosed cavities. */
|
|
1959
|
+
readonly componentCount: number;
|
|
1783
1960
|
/** Enclosed native solid volume in cubic millimetres. */
|
|
1784
1961
|
readonly volume: number;
|
|
1785
1962
|
/** Total native surface area in square millimetres. */
|
|
@@ -1789,15 +1966,15 @@ export declare interface SolidInspection {
|
|
|
1789
1966
|
}
|
|
1790
1967
|
|
|
1791
1968
|
/** Copied surface intersection from a finite directed segment. Distance is in millimetres. */
|
|
1792
|
-
export declare interface
|
|
1969
|
+
export declare interface SolidSegmentHit {
|
|
1793
1970
|
/** Copied numeric native face identity. */
|
|
1794
1971
|
readonly faceId: number;
|
|
1795
|
-
/** Distance from the
|
|
1972
|
+
/** Distance from the segment origin in millimetres. */
|
|
1796
1973
|
readonly distance: number;
|
|
1797
1974
|
/** Intersection position in millimetres. */
|
|
1798
|
-
readonly position:
|
|
1975
|
+
readonly position: Vector3Tuple;
|
|
1799
1976
|
/** Outward unit surface normal at the intersection. */
|
|
1800
|
-
readonly normal:
|
|
1977
|
+
readonly normal: Vector3Tuple;
|
|
1801
1978
|
}
|
|
1802
1979
|
|
|
1803
1980
|
/**
|
|
@@ -1814,7 +1991,7 @@ export declare function sphere(options: SphereOptions): Solid;
|
|
|
1814
1991
|
* Exactly one radius or diameter, placement, and tessellation for an origin-centered sphere.
|
|
1815
1992
|
*/
|
|
1816
1993
|
export declare type SphereOptions = CircularPrimitiveOptions &
|
|
1817
|
-
|
|
1994
|
+
PrimitiveAttachment &
|
|
1818
1995
|
(
|
|
1819
1996
|
| {
|
|
1820
1997
|
/** Positive radius in millimetres; mutually exclusive with diameter. */
|
|
@@ -1900,7 +2077,7 @@ export declare function star(options: StarOptions): Section;
|
|
|
1900
2077
|
/**
|
|
1901
2078
|
* Alternating outer and inner vertices, centered on the XY origin.
|
|
1902
2079
|
*/
|
|
1903
|
-
export declare interface StarOptions extends
|
|
2080
|
+
export declare interface StarOptions extends PrimitiveAttachment {
|
|
1904
2081
|
/** Explicit sampling ceilings, bounded by the host policy. */
|
|
1905
2082
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1906
2083
|
/** Positive outer vertex radius in millimetres. */
|
|
@@ -1910,7 +2087,46 @@ export declare interface StarOptions extends PrimitivePlacement {
|
|
|
1910
2087
|
/** Integer outer point count from three through 50000. */
|
|
1911
2088
|
readonly points: number;
|
|
1912
2089
|
/** Initial counterclockwise rotation in degrees; defaults to zero. */
|
|
1913
|
-
readonly
|
|
2090
|
+
readonly rotation?: number;
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
/**
|
|
2094
|
+
* Creates a centered-width native Section along a sampled XY path.
|
|
2095
|
+
*
|
|
2096
|
+
* Shares caps, joins and physical sampling with Geometry's strokeRegionData. Native union
|
|
2097
|
+
* resolves overlapping stroke primitives. Session resolution and resource ceilings apply;
|
|
2098
|
+
* closed paths omit the duplicated seam. Returns an immutable deferred recipe.
|
|
2099
|
+
*
|
|
2100
|
+
* @example Extrude a rounded track
|
|
2101
|
+
* ```ts
|
|
2102
|
+
* stroke([[0, 0], [20, 0], [20, 10]], { width: 3, join: "round", cap: "round" }).extrude({ height: 2 });
|
|
2103
|
+
* ```
|
|
2104
|
+
*/
|
|
2105
|
+
export declare function stroke(
|
|
2106
|
+
path: Path2Input,
|
|
2107
|
+
options: StrokeOptions,
|
|
2108
|
+
): Section;
|
|
2109
|
+
|
|
2110
|
+
/** End-cap treatment for an open stroked path. */
|
|
2111
|
+
export declare type StrokeCap = "butt" | "round" | "square";
|
|
2112
|
+
|
|
2113
|
+
/** Join treatment where adjacent stroked path segments meet. */
|
|
2114
|
+
export declare type StrokeJoin = "bevel" | "miter" | "round";
|
|
2115
|
+
|
|
2116
|
+
/** Physical stroke and topology controls shared by pure regions and native Sections. */
|
|
2117
|
+
export declare interface StrokeOptions {
|
|
2118
|
+
/** Explicit path, circular and expanded-profile allocation ceilings. */
|
|
2119
|
+
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
2120
|
+
/** Raw point closure defaults to false; a Path2 supplies its closure and rejects conflicts. */
|
|
2121
|
+
readonly closed?: boolean;
|
|
2122
|
+
/** End-cap treatment for an open path. Ignored for closed paths. Default: `butt`. */
|
|
2123
|
+
readonly cap?: StrokeCap;
|
|
2124
|
+
/** Corner treatment; miters exceeding SVG's default limit of 4 become bevels. Default: `miter`. */
|
|
2125
|
+
readonly join?: StrokeJoin;
|
|
2126
|
+
/** Physical tessellation policy for round caps and joins. */
|
|
2127
|
+
readonly resolution?: GeometryResolution;
|
|
2128
|
+
/** Positive total stroke width in millimetres, centered on the sampled path. */
|
|
2129
|
+
readonly width: number;
|
|
1914
2130
|
}
|
|
1915
2131
|
|
|
1916
2132
|
/** Placement of painted SVG geometry after SVG Y-axis inversion. */
|
|
@@ -1990,7 +2206,7 @@ export declare interface SvgSectionOptions {
|
|
|
1990
2206
|
*/
|
|
1991
2207
|
export declare function sweep(
|
|
1992
2208
|
shape: CorrespondingProfile,
|
|
1993
|
-
path:
|
|
2209
|
+
path: Path3Input,
|
|
1994
2210
|
options?: SweepOptions,
|
|
1995
2211
|
): Solid;
|
|
1996
2212
|
|
|
@@ -1998,7 +2214,7 @@ export declare function sweep(
|
|
|
1998
2214
|
* Controls shared by pure mesh construction and filled modeling sweeps.
|
|
1999
2215
|
*/
|
|
2000
2216
|
export declare interface SweepOptions {
|
|
2001
|
-
/**
|
|
2217
|
+
/** Raw point closure defaults to false; a Path3 supplies its closure and rejects conflicts. */
|
|
2002
2218
|
readonly closed?: boolean;
|
|
2003
2219
|
/** Explicit output and sampling allocation ceilings. */
|
|
2004
2220
|
readonly limits?: Partial<ModelingLimits>;
|
|
@@ -2007,11 +2223,11 @@ export declare interface SweepOptions {
|
|
|
2007
2223
|
/** Physical sampling of nonzero twist; inserted stations retain authored station controls. */
|
|
2008
2224
|
readonly resolution?: GeometryResolution;
|
|
2009
2225
|
/** Total additional profile rotation in degrees, with progression selected by twistBy. */
|
|
2010
|
-
readonly
|
|
2226
|
+
readonly twist?: number;
|
|
2011
2227
|
/** Twist advances by physical path length (default), or normalized authored station position, including a closed seam gap. */
|
|
2012
2228
|
readonly twistBy?: "length" | "stations";
|
|
2013
2229
|
/** Positive uniform/XY scale, or one XY pair per path station. Defaults to one. */
|
|
2014
|
-
readonly scale?: number |
|
|
2230
|
+
readonly scale?: number | Vector2Input | readonly Vector2Input[];
|
|
2015
2231
|
/** Corresponding point-index advance at a rotationally equivalent closed seam. */
|
|
2016
2232
|
readonly seamProfileOffset?: number;
|
|
2017
2233
|
}
|
|
@@ -2024,13 +2240,13 @@ export declare type SweepOrientation =
|
|
|
2024
2240
|
/** Minimizes frame rotation by parallel transport. */
|
|
2025
2241
|
readonly kind: "transport";
|
|
2026
2242
|
/** Initial profile +X guide, projected perpendicular to the first tangent. */
|
|
2027
|
-
readonly initialNormal?:
|
|
2243
|
+
readonly initialNormal?: Vector3Input;
|
|
2028
2244
|
}
|
|
2029
2245
|
| {
|
|
2030
2246
|
/** Projects one fixed world-space normal at every path station. */
|
|
2031
2247
|
readonly kind: "fixed-normal";
|
|
2032
2248
|
/** Directed profile +X guide; must not be parallel to any local tangent. */
|
|
2033
|
-
readonly normal:
|
|
2249
|
+
readonly normal: Vector3Input;
|
|
2034
2250
|
}
|
|
2035
2251
|
| {
|
|
2036
2252
|
/** Uses an explicitly directed normal callback at each original normalized station. */
|
|
@@ -2088,9 +2304,9 @@ declare interface ThreadBevelOptions {
|
|
|
2088
2304
|
* @example Threaded nut
|
|
2089
2305
|
* ```ts
|
|
2090
2306
|
* import { threadedNut } from "@metamesh/modeling";
|
|
2091
|
-
* import {
|
|
2307
|
+
* import { threadProfile } from "@metamesh/modeling/geometry";
|
|
2092
2308
|
*
|
|
2093
|
-
* const profile =
|
|
2309
|
+
* const profile = threadProfile({ kind: "triangular", pitch: 1.75 });
|
|
2094
2310
|
* threadedNut({ nominalMajorDiameter: 12, thickness: 8, width: 20, shape: "hex", profile, fit: "normal" });
|
|
2095
2311
|
* ```
|
|
2096
2312
|
*/
|
|
@@ -2152,9 +2368,9 @@ export declare type ThreadedNutShape = "hex" | "round" | "square";
|
|
|
2152
2368
|
* @example Threaded rod
|
|
2153
2369
|
* ```ts
|
|
2154
2370
|
* import { threadedRod } from "@metamesh/modeling";
|
|
2155
|
-
* import {
|
|
2371
|
+
* import { threadProfile } from "@metamesh/modeling/geometry";
|
|
2156
2372
|
*
|
|
2157
|
-
* const profile =
|
|
2373
|
+
* const profile = threadProfile({ kind: "triangular", pitch: 1.75 });
|
|
2158
2374
|
* threadedRod({ nominalMajorDiameter: 12, length: 24, profile, fit: "normal" });
|
|
2159
2375
|
* ```
|
|
2160
2376
|
*/
|
|
@@ -2237,7 +2453,7 @@ export declare interface ThreadProfile {
|
|
|
2237
2453
|
/** Adjacent axial thread spacing in millimetres. */
|
|
2238
2454
|
readonly pitch: number;
|
|
2239
2455
|
/** Immutable open `[axial, radial]` path spanning one pitch. */
|
|
2240
|
-
readonly points: readonly
|
|
2456
|
+
readonly points: readonly Vector2Tuple[];
|
|
2241
2457
|
/** Axial width of the flat at the minor envelope. */
|
|
2242
2458
|
readonly rootFlatWidth: number;
|
|
2243
2459
|
}
|
|
@@ -2267,9 +2483,6 @@ export declare function threadRidge(options: ThreadRidgeOptions): Solid;
|
|
|
2267
2483
|
/** Parameters for a helical ridge before solid construction. */
|
|
2268
2484
|
export declare type ThreadRidgeOptions = HelicalThreadRidgeMeshOptions;
|
|
2269
2485
|
|
|
2270
|
-
/** Explicit copied topology inspection; not needed for section operations. */
|
|
2271
|
-
export declare function toRegion(section: Section): Region;
|
|
2272
|
-
|
|
2273
2486
|
/**
|
|
2274
2487
|
* Torus around +Z.
|
|
2275
2488
|
*
|
|
@@ -2283,7 +2496,7 @@ export declare function torus(options: TorusOptions): Solid;
|
|
|
2283
2496
|
/**
|
|
2284
2497
|
* Dimensions and independent ring/profile tessellation for a torus around the Z axis.
|
|
2285
2498
|
*/
|
|
2286
|
-
export declare interface TorusOptions extends
|
|
2499
|
+
export declare interface TorusOptions extends PrimitiveAttachment {
|
|
2287
2500
|
/** Explicit sampling ceilings, bounded by the host policy. */
|
|
2288
2501
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
2289
2502
|
/** Radius from the Z axis to the profile center, in millimetres; greater than `minorRadius`. */
|
|
@@ -2298,11 +2511,51 @@ export declare interface TorusOptions extends PrimitivePlacement {
|
|
|
2298
2511
|
readonly resolution?: GeometryResolution;
|
|
2299
2512
|
}
|
|
2300
2513
|
|
|
2301
|
-
/**
|
|
2302
|
-
export declare
|
|
2514
|
+
/** Immutable reusable XY placement. Methods apply in written order; angles are degrees. */
|
|
2515
|
+
export declare interface Transform2 {
|
|
2516
|
+
/** Applies a translation in model units after this placement. */
|
|
2517
|
+
translate(offset: Vector2Input): Transform2;
|
|
2518
|
+
/** Rotates counterclockwise in degrees about an optional world-space pivot (default origin). */
|
|
2519
|
+
rotate(degrees: number, options?: Pivot2Options): Transform2;
|
|
2520
|
+
/** Scales about an optional world-space pivot; finite nonzero factors may reflect. */
|
|
2521
|
+
scale(factors: number | Vector2Input, options?: Pivot2Options): Transform2;
|
|
2522
|
+
/** Applies this placement first, then `next`; neither operand is mutated. */
|
|
2523
|
+
andThen(next: Transform2Input): Transform2;
|
|
2524
|
+
/** Returns the inverse; singular and numerically unstable transforms throw GeometryError. */
|
|
2525
|
+
inverse(): Transform2;
|
|
2526
|
+
/** Transforms a finite point, including translation. Returns a fresh immutable vector. */
|
|
2527
|
+
applyPoint(point: Vector2Input): Vector2;
|
|
2528
|
+
/** Transforms a finite direction, excluding translation and retaining scale. This is not a normal transform. */
|
|
2529
|
+
applyDirection(direction: Vector2Input): Vector2;
|
|
2530
|
+
/** Applies the inverse transpose and normalizes. Ignores translation; rejects zero normals. */
|
|
2531
|
+
applyNormal(normal: Vector2Input): Vector2;
|
|
2532
|
+
/** Returns the frozen canonical row-major 3x3 matrix for interchange. */
|
|
2533
|
+
toMatrix(): Transform2Matrix;
|
|
2534
|
+
/** Embeds this placement in XYZ, leaving Z unchanged, for solids and 3D paths. */
|
|
2535
|
+
to3D(): Transform3;
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
/**
|
|
2539
|
+
* Creates an immutable XY transform, identity by default. Matrices are copied and validated.
|
|
2540
|
+
* Pass it directly to Section.transform() and planar data helpers; to3D() explicitly crosses into XYZ.
|
|
2541
|
+
* Zero scales and singular matrices throw GeometryError; negative scales reflect.
|
|
2542
|
+
*
|
|
2543
|
+
* @example
|
|
2544
|
+
* ```ts
|
|
2545
|
+
* const placement = transform2().rotate(90).translate([10, 0]);
|
|
2546
|
+
* placement.applyPoint([1, 0]).toArray(); // approximately [10, 1]
|
|
2547
|
+
* ```
|
|
2548
|
+
*/
|
|
2549
|
+
export declare function transform2(matrix?: Transform2Matrix): Transform2;
|
|
2550
|
+
|
|
2551
|
+
/** An immutable XY transform or its canonical row-major matrix for interchange. */
|
|
2552
|
+
export declare type Transform2Input = Transform2 | Transform2Matrix;
|
|
2303
2553
|
|
|
2304
|
-
/**
|
|
2305
|
-
|
|
2554
|
+
/**
|
|
2555
|
+
* A row-major affine 3x3 XY matrix applied to column vectors.
|
|
2556
|
+
* Translation occupies indices 2 and 5; the final row is `[0, 0, 1]`.
|
|
2557
|
+
*/
|
|
2558
|
+
export declare type Transform2Matrix = readonly [
|
|
2306
2559
|
m00: number,
|
|
2307
2560
|
m01: number,
|
|
2308
2561
|
m02: number,
|
|
@@ -2314,13 +2567,60 @@ export declare type Transform2 = readonly [
|
|
|
2314
2567
|
m22: number,
|
|
2315
2568
|
];
|
|
2316
2569
|
|
|
2570
|
+
/** Immutable reusable XYZ placement. Methods apply in written order; angles are degrees. */
|
|
2571
|
+
export declare interface Transform3 {
|
|
2572
|
+
/** Applies a translation in model units after this placement. */
|
|
2573
|
+
translate(offset: Vector3Input): Transform3;
|
|
2574
|
+
/** Rotates about global X, then Y, then Z in degrees, about an optional world-space pivot. */
|
|
2575
|
+
rotate(degrees: Vector3Input, options?: Pivot3Options): Transform3;
|
|
2576
|
+
/** Rotates right-handed in degrees about a nonzero axis and optional world-space pivot. */
|
|
2577
|
+
rotateAxis(
|
|
2578
|
+
axis: Vector3Input,
|
|
2579
|
+
degrees: number,
|
|
2580
|
+
options?: Pivot3Options,
|
|
2581
|
+
): Transform3;
|
|
2582
|
+
/** Scales about an optional world-space pivot; finite nonzero factors may reflect. */
|
|
2583
|
+
scale(factors: number | Vector3Input, options?: Pivot3Options): Transform3;
|
|
2584
|
+
/** Applies this placement first, then `next`; equivalent to composeTransform3(next, current). */
|
|
2585
|
+
andThen(next: Transform3Input): Transform3;
|
|
2586
|
+
/** Returns the inverse; singular and numerically unstable transforms throw GeometryError. */
|
|
2587
|
+
inverse(): Transform3;
|
|
2588
|
+
/** Transforms a finite point, including translation. Returns a fresh immutable vector. */
|
|
2589
|
+
applyPoint(point: Vector3Input): Vector3;
|
|
2590
|
+
/** Transforms a finite direction, excluding translation and retaining scale. This is not a normal transform. */
|
|
2591
|
+
applyDirection(direction: Vector3Input): Vector3;
|
|
2592
|
+
/** Applies the inverse transpose and normalizes. Ignores translation; rejects zero normals. */
|
|
2593
|
+
applyNormal(normal: Vector3Input): Vector3;
|
|
2594
|
+
/** Returns the frozen canonical row-major 4x4 matrix for interchange. */
|
|
2595
|
+
toMatrix(): Transform3Matrix;
|
|
2596
|
+
/** Restricts to XY; throws GeometryError for a plane change or singular XY restriction. */
|
|
2597
|
+
to2D(): Transform2;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
/**
|
|
2601
|
+
* Creates an immutable XYZ transform, identity by default. Matrices are copied and validated.
|
|
2602
|
+
* Calls apply in written order; rotations use degrees and pivots use current world coordinates.
|
|
2603
|
+
* Zero scales, singular matrices, nonfinite inputs and zero rotation axes throw GeometryError.
|
|
2604
|
+
* Use frameTransform3(frame) as the input for existing orthonormal frame placement.
|
|
2605
|
+
*
|
|
2606
|
+
* @example
|
|
2607
|
+
* ```ts
|
|
2608
|
+
* const placement = transform3().rotate([0, 0, 90]).translate([10, 0, 0]);
|
|
2609
|
+
* placement.applyPoint([1, 0, 0]).toArray(); // approximately [10, 1, 0]
|
|
2610
|
+
* ```
|
|
2611
|
+
*/
|
|
2612
|
+
export declare function transform3(matrix?: Transform3Matrix): Transform3;
|
|
2613
|
+
|
|
2614
|
+
/** An immutable XYZ transform or its canonical row-major matrix for interchange. */
|
|
2615
|
+
export declare type Transform3Input = Transform3 | Transform3Matrix;
|
|
2616
|
+
|
|
2317
2617
|
/**
|
|
2318
2618
|
* A row-major affine 4x4 matrix applied to column vectors.
|
|
2319
2619
|
*
|
|
2320
2620
|
* Translation occupies indices 3, 7, and 11. The final row must be
|
|
2321
2621
|
* `[0, 0, 0, 1]` within the active geometry tolerance.
|
|
2322
2622
|
*/
|
|
2323
|
-
export declare type
|
|
2623
|
+
export declare type Transform3Matrix = readonly [
|
|
2324
2624
|
m00: number,
|
|
2325
2625
|
m01: number,
|
|
2326
2626
|
m02: number,
|
|
@@ -2349,10 +2649,11 @@ declare interface TrapezoidalThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
|
2349
2649
|
*/
|
|
2350
2650
|
readonly depth?: number;
|
|
2351
2651
|
/**
|
|
2352
|
-
*
|
|
2652
|
+
* Full angle between the flanks in degrees, from `0` inclusive to `180` exclusive.
|
|
2653
|
+
* Each flank uses half this angle from the radial direction; `90` gives 45-degree slopes.
|
|
2353
2654
|
* @defaultValue `30`
|
|
2354
2655
|
*/
|
|
2355
|
-
readonly
|
|
2656
|
+
readonly includedAngle?: number;
|
|
2356
2657
|
}
|
|
2357
2658
|
|
|
2358
2659
|
/**
|
|
@@ -2369,7 +2670,7 @@ export declare interface TriangleMesh {
|
|
|
2369
2670
|
* Measurements and optional edge-connected topology from one validated mesh traversal.
|
|
2370
2671
|
*/
|
|
2371
2672
|
export declare interface TriangleMeshAnalysis extends TriangleMeshMeasurements {
|
|
2372
|
-
/** Number of referenced edge-connected
|
|
2673
|
+
/** Number of referenced edge-connected boundary shells when `includeTopology` is requested; cavities count separately. */
|
|
2373
2674
|
readonly connectedComponentCount?: number;
|
|
2374
2675
|
/** Number of distinct indexed undirected edges when `includeTopology` is requested. */
|
|
2375
2676
|
readonly edgeCount?: number;
|
|
@@ -2423,7 +2724,7 @@ export declare function tube(options: TubeOptions): Solid;
|
|
|
2423
2724
|
* Dimensions, placement, and tessellation for a hollow Z-axis tube.
|
|
2424
2725
|
*/
|
|
2425
2726
|
export declare interface TubeOptions
|
|
2426
|
-
extends CircularPrimitiveOptions,
|
|
2727
|
+
extends CircularPrimitiveOptions, PrimitiveAttachment {
|
|
2427
2728
|
/**
|
|
2428
2729
|
* Centers the tube on the Z origin when `true`; otherwise its bottom is at `Z = 0`.
|
|
2429
2730
|
* @defaultValue `true`
|
|
@@ -2452,11 +2753,97 @@ export declare function union(solids: readonly Solid[]): Solid;
|
|
|
2452
2753
|
/** Native filled section union; dimensions cannot be mixed. */
|
|
2453
2754
|
export declare function union(sections: readonly Section[]): Section;
|
|
2454
2755
|
|
|
2756
|
+
/** Immutable XY arithmetic; vector operations return new values and measurements return numbers. */
|
|
2757
|
+
export declare interface Vector2 {
|
|
2758
|
+
/** X coordinate in the vector's coordinate units. */
|
|
2759
|
+
readonly x: number;
|
|
2760
|
+
/** Y coordinate in the vector's coordinate units. */
|
|
2761
|
+
readonly y: number;
|
|
2762
|
+
/** Adds another vector component-wise. */
|
|
2763
|
+
add(other: Vector2Input): Vector2;
|
|
2764
|
+
/** Subtracts another vector component-wise. */
|
|
2765
|
+
subtract(other: Vector2Input): Vector2;
|
|
2766
|
+
/** Multiplies by a finite dimensionless scalar. */
|
|
2767
|
+
scale(factor: number): Vector2;
|
|
2768
|
+
/** Returns a unit vector; rejects length at or below finite nonnegative `epsilon` (default `1e-12`). */
|
|
2769
|
+
normalize(epsilon?: number): Vector2;
|
|
2770
|
+
/** Interpolates toward another vector by finite dimensionless `t`; extrapolation is allowed. */
|
|
2771
|
+
lerp(other: Vector2Input, t: number): Vector2;
|
|
2772
|
+
/** Returns the scalar dot product. */
|
|
2773
|
+
dot(other: Vector2Input): number;
|
|
2774
|
+
/** Returns the signed scalar cross product; positive means the other vector is counterclockwise. */
|
|
2775
|
+
cross(other: Vector2Input): number;
|
|
2776
|
+
/** Returns Euclidean length in the vector's coordinate units. */
|
|
2777
|
+
length(): number;
|
|
2778
|
+
/** Returns Euclidean distance to another vector in the same coordinate units. */
|
|
2779
|
+
distance(other: Vector2Input): number;
|
|
2780
|
+
/** Returns this value's frozen readonly tuple for interchange; repeated calls do not allocate. */
|
|
2781
|
+
toArray(): Vector2Tuple;
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
/**
|
|
2785
|
+
* Creates immutable XY arithmetic from a finite tuple or vector, snapshotting the coordinates.
|
|
2786
|
+
* Values and results are finite. Invalid dimensions throw `INVALID_ARGUMENT`; nonfinite coordinates
|
|
2787
|
+
* and overflow throw `NON_FINITE_VALUE` GeometryError.
|
|
2788
|
+
* Use transform2().applyDirection(value) for rotations and nonuniform scaling.
|
|
2789
|
+
*/
|
|
2790
|
+
export declare function vector2(input: Vector2Input): Vector2;
|
|
2791
|
+
|
|
2792
|
+
/** An XY tuple or immutable fluent vector accepted by vector operations. */
|
|
2793
|
+
export declare type Vector2Input = Vector2Tuple | Vector2;
|
|
2794
|
+
|
|
2455
2795
|
/** A two-dimensional Cartesian vector or point. */
|
|
2456
|
-
export declare type
|
|
2796
|
+
export declare type Vector2Tuple = readonly [x: number, y: number];
|
|
2797
|
+
|
|
2798
|
+
/** Immutable XYZ arithmetic; vector operations return new values and measurements return numbers. */
|
|
2799
|
+
export declare interface Vector3 {
|
|
2800
|
+
/** X coordinate in the vector's coordinate units. */
|
|
2801
|
+
readonly x: number;
|
|
2802
|
+
/** Y coordinate in the vector's coordinate units. */
|
|
2803
|
+
readonly y: number;
|
|
2804
|
+
/** Z coordinate in the vector's coordinate units. */
|
|
2805
|
+
readonly z: number;
|
|
2806
|
+
/** Adds another vector component-wise. */
|
|
2807
|
+
add(other: Vector3Input): Vector3;
|
|
2808
|
+
/** Subtracts another vector component-wise. */
|
|
2809
|
+
subtract(other: Vector3Input): Vector3;
|
|
2810
|
+
/** Multiplies by a finite dimensionless scalar. */
|
|
2811
|
+
scale(factor: number): Vector3;
|
|
2812
|
+
/** Returns a unit vector; rejects length at or below finite nonnegative `epsilon` (default `1e-12`). */
|
|
2813
|
+
normalize(epsilon?: number): Vector3;
|
|
2814
|
+
/** Interpolates toward another vector by finite dimensionless `t`; extrapolation is allowed. */
|
|
2815
|
+
lerp(other: Vector3Input, t: number): Vector3;
|
|
2816
|
+
/** Returns the scalar dot product. */
|
|
2817
|
+
dot(other: Vector3Input): number;
|
|
2818
|
+
/** Returns the right-handed cross product as a new vector. */
|
|
2819
|
+
cross(other: Vector3Input): Vector3;
|
|
2820
|
+
/** Returns Euclidean length in the vector's coordinate units. */
|
|
2821
|
+
length(): number;
|
|
2822
|
+
/** Returns Euclidean distance to another vector in the same coordinate units. */
|
|
2823
|
+
distance(other: Vector3Input): number;
|
|
2824
|
+
/** Returns this value's frozen readonly tuple for interchange; repeated calls do not allocate. */
|
|
2825
|
+
toArray(): Vector3Tuple;
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2828
|
+
/**
|
|
2829
|
+
* Creates immutable XYZ arithmetic from a finite tuple or vector, snapshotting the coordinates.
|
|
2830
|
+
* Values and results are finite. Invalid dimensions throw `INVALID_ARGUMENT`; nonfinite coordinates
|
|
2831
|
+
* and overflow throw `NON_FINITE_VALUE` GeometryError.
|
|
2832
|
+
* Use transform3().applyDirection(value) for rotations and nonuniform scaling.
|
|
2833
|
+
*
|
|
2834
|
+
* @example
|
|
2835
|
+
* ```ts
|
|
2836
|
+
* const direction = vector3([1, 2, 3]).add([4, 0, 0]).normalize().scale(10);
|
|
2837
|
+
* const alignment = direction.dot([0, 0, 1]);
|
|
2838
|
+
* ```
|
|
2839
|
+
*/
|
|
2840
|
+
export declare function vector3(input: Vector3Input): Vector3;
|
|
2841
|
+
|
|
2842
|
+
/** An XYZ tuple or immutable fluent vector accepted by vector operations. */
|
|
2843
|
+
export declare type Vector3Input = Vector3Tuple | Vector3;
|
|
2457
2844
|
|
|
2458
2845
|
/** A three-dimensional Cartesian vector or point. */
|
|
2459
|
-
export declare type
|
|
2846
|
+
export declare type Vector3Tuple = readonly [x: number, y: number, z: number];
|
|
2460
2847
|
|
|
2461
2848
|
/**
|
|
2462
2849
|
* Immutable vector layout with no browser, font parser, or kernel ownership.
|