@metamesh/modeling 0.15.0 → 0.17.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 +59 -0
- package/README.md +54 -6
- package/dist/api/engine.d.ts +4 -3
- package/dist/api/geometry.d.ts +608 -266
- package/dist/api/index.d.ts +516 -110
- package/dist/api/text.d.ts +6 -6
- package/dist/docs/guides/concepts.md +298 -106
- package/dist/docs/guides/fonts.md +9 -8
- package/dist/docs/guides/fundamentals.md +17 -21
- package/dist/docs/guides/generation.md +24 -23
- package/dist/docs/guides/hosting.md +25 -20
- package/dist/docs/guides/recipes.md +68 -36
- package/dist/docs/guides/standalone-model.md +42 -0
- package/dist/docs/manifest.json +1034 -296
- 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 +1 -1
- package/dist/docs/reference/engine/ModelSession.md +1 -1
- package/dist/docs/reference/engine/ModelSnapshot.md +2 -2
- package/dist/docs/reference/engine/SessionOptions.md +1 -1
- package/dist/docs/reference/engine/SnapshotPart.md +7 -4
- package/dist/docs/reference/engine/categories/host-lifecycle.md +8 -3
- package/dist/docs/reference/engine/createModelEngine.md +1 -1
- 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 +6 -2
- package/dist/docs/reference/geometry/AcmeThreadProfileSpec.md +5 -1
- package/dist/docs/reference/geometry/AlignedCircularSegmentsOptions.md +1 -1
- package/dist/docs/reference/geometry/Anchor3-type.md +6 -5
- package/dist/docs/reference/geometry/ArcCurve2.md +7 -3
- package/dist/docs/reference/geometry/ArcCurve3.md +9 -5
- package/dist/docs/reference/geometry/AttachOptions.md +2 -1
- package/dist/docs/reference/geometry/AxisAngleRotation3.md +2 -1
- package/dist/docs/reference/geometry/Bounds2-type.md +127 -0
- package/dist/docs/reference/geometry/Bounds2Data.md +45 -0
- package/dist/docs/reference/geometry/Bounds2Input.md +21 -0
- package/dist/docs/reference/geometry/Bounds2Options.md +72 -0
- package/dist/docs/reference/geometry/Bounds3-type.md +127 -0
- package/dist/docs/reference/geometry/Bounds3Data.md +45 -0
- package/dist/docs/reference/geometry/Bounds3Input.md +21 -0
- package/dist/docs/reference/geometry/Bounds3Options.md +72 -0
- package/dist/docs/reference/geometry/BoundsFit2.md +6 -5
- package/dist/docs/reference/geometry/BoundsFit3.md +6 -5
- package/dist/docs/reference/geometry/BoundsFitOptions.md +2 -1
- package/dist/docs/reference/geometry/BoxAnchorFace.md +2 -1
- package/dist/docs/reference/geometry/BoxAnchorOptions.md +5 -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 +3 -3
- package/dist/docs/reference/geometry/ButtressPressureFlankSide.md +8 -1
- package/dist/docs/reference/geometry/ButtressThreadProfileSpec.md +5 -1
- package/dist/docs/reference/geometry/ChamferedEdgeTreatment.md +1 -1
- package/dist/docs/reference/geometry/CircleContourOptions.md +5 -1
- package/dist/docs/reference/geometry/CircularPrimitiveOptions.md +1 -1
- package/dist/docs/reference/geometry/CircularResolutionOptions.md +1 -1
- package/dist/docs/reference/geometry/CircularSampling.md +41 -0
- package/dist/docs/reference/geometry/CircularSamplingOptions.md +14 -0
- package/dist/docs/reference/geometry/ClearanceHoleDimensions.md +6 -1
- package/dist/docs/reference/geometry/ClearanceHoleFit.md +8 -1
- package/dist/docs/reference/geometry/CompensatedThreadDiameters.md +6 -1
- package/dist/docs/reference/geometry/Contour.md +10 -4
- package/dist/docs/reference/geometry/ContourCurve.md +5 -1
- package/dist/docs/reference/geometry/ContourPoint.md +6 -1
- package/dist/docs/reference/geometry/ContourSegment.md +5 -1
- package/dist/docs/reference/geometry/CorrespondingComponent.md +5 -1
- package/dist/docs/reference/geometry/CorrespondingContour.md +5 -1
- package/dist/docs/reference/geometry/CorrespondingProfile.md +5 -1
- package/dist/docs/reference/geometry/CorrespondingProfileStation.md +5 -1
- package/dist/docs/reference/geometry/CubicBezierCurve2.md +10 -6
- package/dist/docs/reference/geometry/CubicBezierCurve3.md +10 -6
- package/dist/docs/reference/geometry/Curve2.md +5 -1
- package/dist/docs/reference/geometry/Curve3.md +5 -1
- package/dist/docs/reference/geometry/CurveSamplingOptions.md +5 -1
- package/dist/docs/reference/geometry/CustomThreadProfileSpec.md +7 -3
- package/dist/docs/reference/geometry/CylinderAnchorFace.md +2 -1
- package/dist/docs/reference/geometry/CylinderAnchorOptions.md +4 -3
- package/dist/docs/reference/geometry/CylinderOptions.md +1 -1
- package/dist/docs/reference/geometry/CylindricalGearDimensions.md +6 -1
- package/dist/docs/reference/geometry/CylindricalGearMeshKind.md +8 -1
- package/dist/docs/reference/geometry/CylindricalGearOutlineOptions.md +5 -1
- package/dist/docs/reference/geometry/CylindricalGearPairDimensions.md +5 -1
- package/dist/docs/reference/geometry/CylindricalGearPairMotionOptions.md +5 -1
- package/dist/docs/reference/geometry/CylindricalGearPairMotionReport.md +6 -1
- package/dist/docs/reference/geometry/CylindricalGearPairSpec.md +5 -1
- package/dist/docs/reference/geometry/CylindricalGearSpec.md +6 -1
- 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 +7 -3
- package/dist/docs/reference/geometry/EndTreatments.md +1 -1
- package/dist/docs/reference/geometry/ExtrudeOptions.md +5 -1
- package/dist/docs/reference/geometry/ExtrusionSamplingOptions.md +5 -1
- package/dist/docs/reference/geometry/FittedTextLayout.md +7 -3
- package/dist/docs/reference/geometry/Frame3.md +10 -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 +1 -1
- package/dist/docs/reference/geometry/GeometrySamplingLimits.md +5 -1
- package/dist/docs/reference/geometry/GeometryToleranceOptions.md +1 -1
- package/dist/docs/reference/geometry/GridPatternOptions.md +4 -4
- package/dist/docs/reference/geometry/HeightfieldMeshLimits.md +5 -1
- package/dist/docs/reference/geometry/HeightfieldOptions.md +9 -5
- package/dist/docs/reference/geometry/HeightfieldPreflight.md +9 -4
- package/dist/docs/reference/geometry/HelicalThreadRidgeMeshOptions.md +5 -1
- package/dist/docs/reference/geometry/HelicalThreadSolidMeshOptions.md +5 -1
- package/dist/docs/reference/geometry/HelicalThreadSolidMeshPreflight.md +7 -2
- package/dist/docs/reference/geometry/IDENTITY_TRANSFORM3.md +4 -3
- package/dist/docs/reference/geometry/InternalThreadCutterOptions.md +5 -1
- package/dist/docs/reference/geometry/KnuckleHingeBaseSpec.md +82 -0
- package/dist/docs/reference/geometry/KnuckleHingeDimensions.md +148 -0
- package/dist/docs/reference/geometry/KnuckleHingeInterval.md +46 -0
- package/dist/docs/reference/geometry/KnuckleHingeSamplingOptions.md +51 -0
- package/dist/docs/reference/geometry/KnuckleHingeSpec.md +22 -0
- package/dist/docs/reference/geometry/LineCurve2.md +8 -4
- package/dist/docs/reference/geometry/LineCurve3.md +8 -4
- package/dist/docs/reference/geometry/LinearPatternOptions.md +1 -1
- package/dist/docs/reference/geometry/LoftCorrespondence.md +6 -1
- package/dist/docs/reference/geometry/LoftMeshStation.md +5 -1
- package/dist/docs/reference/geometry/LoftOptions.md +5 -1
- package/dist/docs/reference/geometry/LoftPlacement.md +5 -1
- package/dist/docs/reference/geometry/METRIC_FASTENER_STANDARDS.md +5 -1
- package/dist/docs/reference/geometry/MatchProfilesOptions.md +5 -1
- package/dist/docs/reference/geometry/MetricFastenerSize.md +9 -2
- package/dist/docs/reference/geometry/MetricFastenerStandard.md +5 -1
- package/dist/docs/reference/geometry/MetricHexNutDimensions.md +6 -1
- package/dist/docs/reference/geometry/MetricSocketCapHeadDimensions.md +6 -1
- package/dist/docs/reference/geometry/ModelingLimits.md +1 -1
- package/dist/docs/reference/geometry/PRINTABLE_THREAD_FIT_POLICIES.md +5 -1
- package/dist/docs/reference/geometry/Path2-type.md +12 -8
- package/dist/docs/reference/geometry/Path2Data.md +40 -4
- package/dist/docs/reference/geometry/Path2Input.md +8 -3
- package/dist/docs/reference/geometry/Path3-type.md +12 -8
- package/dist/docs/reference/geometry/Path3Data.md +40 -4
- package/dist/docs/reference/geometry/Path3Input.md +8 -3
- package/dist/docs/reference/geometry/PathFrame.md +9 -5
- package/dist/docs/reference/geometry/PathLocation.md +5 -1
- package/dist/docs/reference/geometry/PathNormalGuide.md +8 -4
- package/dist/docs/reference/geometry/PathOptions.md +5 -1
- package/dist/docs/reference/geometry/PathPatternOptions.md +1 -1
- package/dist/docs/reference/geometry/PathPlacement.md +8 -4
- package/dist/docs/reference/geometry/PathResamplingOptions.md +5 -1
- package/dist/docs/reference/geometry/Pivot2Options.md +2 -1
- package/dist/docs/reference/geometry/Pivot3Options.md +2 -1
- package/dist/docs/reference/geometry/PlanarMeshOptimizationFallbackReason.md +8 -1
- package/dist/docs/reference/geometry/PlanarMeshOptimizationOptions.md +5 -1
- package/dist/docs/reference/geometry/PlanarMeshOptimizationResult.md +5 -1
- package/dist/docs/reference/geometry/PlanarPatchQuality.md +7 -3
- package/dist/docs/reference/geometry/PolygonData.md +7 -2
- package/dist/docs/reference/geometry/PolylineResamplingOptions.md +5 -1
- package/dist/docs/reference/geometry/PrimitiveAttachment.md +1 -1
- package/dist/docs/reference/geometry/PrimitiveAttachmentOptions.md +1 -1
- package/dist/docs/reference/geometry/PrintableThreadFit.md +8 -1
- package/dist/docs/reference/geometry/PrintableThreadFitPolicy.md +6 -1
- package/dist/docs/reference/geometry/Profile.md +8 -2
- package/dist/docs/reference/geometry/ProfileComponent2.md +5 -1
- package/dist/docs/reference/geometry/ProfileContour2.md +8 -2
- package/dist/docs/reference/geometry/ProfileSpan2.md +7 -3
- package/dist/docs/reference/geometry/ProfiledEdgeTreatment.md +3 -3
- package/dist/docs/reference/geometry/RackPitchDimensions.md +6 -1
- package/dist/docs/reference/geometry/RackPitchSpec.md +6 -1
- package/dist/docs/reference/geometry/RadialPatternOptions.md +1 -1
- 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 +7 -3
- package/dist/docs/reference/geometry/RectangleCornerTreatment.md +5 -1
- package/dist/docs/reference/geometry/RectangleCornerTreatments.md +5 -1
- package/dist/docs/reference/geometry/RectangleProfileOptions.md +7 -3
- package/dist/docs/reference/geometry/RegionData.md +6 -2
- package/dist/docs/reference/geometry/RegularPolygonContourOptions.md +5 -1
- package/dist/docs/reference/geometry/ResolvedGeometryTolerance.md +1 -1
- package/dist/docs/reference/geometry/RevolveOptions.md +5 -1
- package/dist/docs/reference/geometry/RoundedEdgeTreatment.md +1 -1
- package/dist/docs/reference/geometry/RowLayoutOptions.md +2 -1
- package/dist/docs/reference/geometry/SampleContourOptions.md +5 -1
- package/dist/docs/reference/geometry/SampleHelixOptions.md +5 -1
- package/dist/docs/reference/geometry/SampleSideProfileOptions.md +5 -1
- package/dist/docs/reference/geometry/SampledCurve2.md +8 -4
- package/dist/docs/reference/geometry/SampledCurve3.md +8 -4
- package/dist/docs/reference/geometry/SampledThreadHelices.md +7 -3
- package/dist/docs/reference/geometry/SideProfileCurve.md +5 -1
- package/dist/docs/reference/geometry/SideProfilePoint.md +6 -1
- package/dist/docs/reference/geometry/SideProfileSegment.md +5 -1
- package/dist/docs/reference/geometry/SmoothEdgeTreatment.md +1 -1
- package/dist/docs/reference/geometry/SolidMeshValidationOptions.md +5 -1
- package/dist/docs/reference/geometry/SphereOptions.md +1 -1
- package/dist/docs/reference/geometry/SquareThreadProfileSpec.md +5 -1
- package/dist/docs/reference/geometry/StrokeCap.md +8 -1
- package/dist/docs/reference/geometry/StrokeJoin.md +8 -1
- package/dist/docs/reference/geometry/StrokeOptions.md +5 -1
- package/dist/docs/reference/geometry/SvgImportOptions.md +20 -1
- package/dist/docs/reference/geometry/SvgRegionPreflight.md +21 -2
- package/dist/docs/reference/geometry/SvgRegionPreflightGeometryMetrics.md +7 -3
- package/dist/docs/reference/geometry/SvgRegionPreflightRepairs.md +6 -1
- package/dist/docs/reference/geometry/SvgRegionPreflightSourceMetrics.md +6 -1
- package/dist/docs/reference/geometry/SweepOptions.md +5 -1
- package/dist/docs/reference/geometry/SweepOrientation.md +5 -1
- package/dist/docs/reference/geometry/ThreadBevelOptions.md +5 -1
- package/dist/docs/reference/geometry/ThreadCircularSegmentsOptions.md +5 -1
- package/dist/docs/reference/geometry/ThreadCompensationOptions.md +5 -1
- package/dist/docs/reference/geometry/ThreadEndStyle.md +8 -1
- package/dist/docs/reference/geometry/ThreadEndTreatmentOptions.md +5 -1
- package/dist/docs/reference/geometry/ThreadHandedness.md +8 -1
- package/dist/docs/reference/geometry/ThreadHelixOptions.md +5 -1
- package/dist/docs/reference/geometry/ThreadLeadInEnvelope.md +8 -1
- package/dist/docs/reference/geometry/ThreadLeadInShape.md +8 -1
- package/dist/docs/reference/geometry/ThreadProfile-type.md +7 -3
- package/dist/docs/reference/geometry/ThreadProfileBaseSpec.md +5 -1
- package/dist/docs/reference/geometry/ThreadProfileSpec.md +5 -1
- package/dist/docs/reference/geometry/ThreadRole.md +8 -1
- package/dist/docs/reference/geometry/ThreadedNutBevel.md +8 -1
- package/dist/docs/reference/geometry/ThreadedNutOptions.md +5 -1
- package/dist/docs/reference/geometry/ThreadedNutPreflight.md +7 -3
- package/dist/docs/reference/geometry/ThreadedNutShape.md +8 -1
- package/dist/docs/reference/geometry/ThreadedRodOptions.md +5 -1
- package/dist/docs/reference/geometry/TorusOptions.md +1 -1
- package/dist/docs/reference/geometry/Transform2-type.md +6 -5
- package/dist/docs/reference/geometry/Transform2Data.md +15 -0
- package/dist/docs/reference/geometry/Transform2Input.md +4 -3
- package/dist/docs/reference/geometry/Transform3-type.md +6 -5
- package/dist/docs/reference/geometry/Transform3Data.md +18 -0
- package/dist/docs/reference/geometry/Transform3Input.md +4 -3
- package/dist/docs/reference/geometry/TrapezoidalThreadProfileSpec.md +5 -1
- package/dist/docs/reference/geometry/TriangleMesh.md +6 -1
- package/dist/docs/reference/geometry/TriangleMeshAnalysis.md +7 -3
- package/dist/docs/reference/geometry/TriangleMeshAnalysisOptions.md +5 -1
- package/dist/docs/reference/geometry/TriangleMeshMeasurements.md +7 -3
- package/dist/docs/reference/geometry/TriangleMeshQualityOptions.md +5 -1
- package/dist/docs/reference/geometry/TriangleMeshQualityReport.md +5 -1
- package/dist/docs/reference/geometry/TriangleMeshSignature.md +7 -3
- package/dist/docs/reference/geometry/TriangleMeshSignatureOptions.md +6 -1
- package/dist/docs/reference/geometry/TriangleMeshSignatureTolerances.md +6 -1
- package/dist/docs/reference/geometry/TriangleMeshValidationOptions.md +5 -1
- package/dist/docs/reference/geometry/TriangularThreadProfileSpec.md +5 -1
- package/dist/docs/reference/geometry/TubeOptions.md +1 -1
- package/dist/docs/reference/geometry/Vector2-type.md +6 -5
- package/dist/docs/reference/geometry/Vector2Data.md +15 -0
- package/dist/docs/reference/geometry/Vector2Input.md +4 -3
- package/dist/docs/reference/geometry/Vector3-type.md +6 -5
- package/dist/docs/reference/geometry/Vector3Data.md +15 -0
- package/dist/docs/reference/geometry/Vector3Input.md +4 -3
- package/dist/docs/reference/geometry/VectorTextArcBaseline.md +6 -1
- package/dist/docs/reference/geometry/VectorTextLayout.md +5 -1
- package/dist/docs/reference/geometry/VectorTextLayoutOptions.md +7 -3
- package/dist/docs/reference/geometry/VectorTextMetrics.md +7 -3
- package/dist/docs/reference/geometry/VectorTextOptions.md +5 -1
- package/dist/docs/reference/geometry/add2.md +7 -6
- package/dist/docs/reference/geometry/add3.md +7 -6
- package/dist/docs/reference/geometry/analyzeTriangleMesh.md +5 -1
- package/dist/docs/reference/geometry/analyzeTriangleMeshQuality.md +5 -1
- package/dist/docs/reference/geometry/anchor3.md +2 -1
- package/dist/docs/reference/geometry/anchorFrame3.md +5 -1
- package/dist/docs/reference/geometry/applyTransformDirection3.md +8 -7
- package/dist/docs/reference/geometry/applyTransformPoint3.md +8 -7
- package/dist/docs/reference/geometry/attachmentTransform3.md +5 -4
- package/dist/docs/reference/geometry/bounds2.md +39 -0
- package/dist/docs/reference/geometry/bounds3.md +39 -0
- package/dist/docs/reference/geometry/boundsCenter.md +12 -11
- package/dist/docs/reference/geometry/boundsSize.md +12 -11
- package/dist/docs/reference/geometry/boxAnchor3.md +4 -3
- package/dist/docs/reference/geometry/categories/bounds-layout.md +25 -9
- package/dist/docs/reference/geometry/categories/curves-paths.md +21 -9
- package/dist/docs/reference/geometry/categories/mechanical.md +22 -10
- package/dist/docs/reference/geometry/categories/meshes.md +16 -7
- package/dist/docs/reference/geometry/categories/pattern-placement.md +6 -4
- package/dist/docs/reference/geometry/categories/primitive-options.md +8 -2
- package/dist/docs/reference/geometry/categories/profiles-regions.md +21 -12
- package/dist/docs/reference/geometry/categories/resolution-errors.md +8 -3
- package/dist/docs/reference/geometry/categories/transforms-math.md +21 -12
- package/dist/docs/reference/geometry/categories/vector-import.md +11 -5
- package/dist/docs/reference/geometry/circleContour.md +5 -1
- package/dist/docs/reference/geometry/closeToAxis.md +14 -5
- package/dist/docs/reference/geometry/compensateThreadDiameters.md +5 -1
- package/dist/docs/reference/geometry/compensateThreadProfileAxially.md +5 -1
- package/dist/docs/reference/geometry/compensateThreadProfileForFaceting.md +5 -1
- package/dist/docs/reference/geometry/composeTransform3.md +7 -6
- package/dist/docs/reference/geometry/computeClosedParallelTransportFrames.md +5 -1
- package/dist/docs/reference/geometry/computeParallelTransportFrames.md +11 -2
- package/dist/docs/reference/geometry/computeTriangleMeshCentroid.md +13 -5
- package/dist/docs/reference/geometry/computeTriangleMeshSignature.md +5 -1
- package/dist/docs/reference/geometry/contourContainsPoint.md +8 -4
- package/dist/docs/reference/geometry/cross2.md +6 -5
- package/dist/docs/reference/geometry/cross3.md +7 -6
- package/dist/docs/reference/geometry/cylinderAnchor3.md +3 -2
- package/dist/docs/reference/geometry/defaultGeometrySamplingLimits.md +5 -1
- package/dist/docs/reference/geometry/distance2.md +6 -5
- package/dist/docs/reference/geometry/distance3.md +6 -5
- package/dist/docs/reference/geometry/distributeAlongPath.md +5 -1
- package/dist/docs/reference/geometry/dot2.md +6 -5
- package/dist/docs/reference/geometry/dot3.md +6 -5
- package/dist/docs/reference/geometry/ellipseContour.md +5 -1
- package/dist/docs/reference/geometry/eulerTransform3.md +7 -6
- package/dist/docs/reference/geometry/extrudeMesh.md +5 -1
- package/dist/docs/reference/geometry/fitBounds.md +10 -9
- package/dist/docs/reference/geometry/fitTextLayout.md +13 -5
- package/dist/docs/reference/geometry/frameTransform3.md +5 -4
- package/dist/docs/reference/geometry/getMetricClearanceHoleDiameter.md +5 -1
- package/dist/docs/reference/geometry/getMetricFastenerStandard.md +5 -1
- package/dist/docs/reference/geometry/gridPatternTransforms.md +4 -4
- package/dist/docs/reference/geometry/heightfieldMesh.md +11 -2
- package/dist/docs/reference/geometry/helicalThreadRidgeMesh.md +5 -1
- package/dist/docs/reference/geometry/helicalThreadSolidMesh.md +5 -1
- package/dist/docs/reference/geometry/inverseTransform3.md +6 -5
- package/dist/docs/reference/geometry/isGeometryError.md +5 -2
- package/dist/docs/reference/geometry/joinTriangleMeshes.md +5 -1
- package/dist/docs/reference/geometry/layoutRow.md +11 -7
- package/dist/docs/reference/geometry/length2.md +5 -4
- package/dist/docs/reference/geometry/length3.md +5 -4
- package/dist/docs/reference/geometry/lerp2.md +7 -6
- package/dist/docs/reference/geometry/lerp3.md +7 -6
- package/dist/docs/reference/geometry/linearPatternTransforms.md +4 -4
- package/dist/docs/reference/geometry/loftMesh.md +5 -1
- package/dist/docs/reference/geometry/matchProfiles.md +11 -2
- package/dist/docs/reference/geometry/measureInternalCylindricalGearPairMotion.md +5 -1
- package/dist/docs/reference/geometry/meshBounds.md +8 -4
- package/dist/docs/reference/geometry/minimumCylindricalGearToothCountWithoutUndercut.md +5 -1
- package/dist/docs/reference/geometry/normalize2.md +10 -6
- package/dist/docs/reference/geometry/normalize3.md +10 -6
- package/dist/docs/reference/geometry/normalizeContour.md +8 -4
- package/dist/docs/reference/geometry/normalizePolygon.md +5 -1
- package/dist/docs/reference/geometry/normalizeRegion.md +5 -1
- package/dist/docs/reference/geometry/optimizePlanarPatches.md +5 -1
- package/dist/docs/reference/geometry/path2.md +14 -2
- package/dist/docs/reference/geometry/path3.md +8 -1
- package/dist/docs/reference/geometry/pathPatternTransforms.md +9 -5
- package/dist/docs/reference/geometry/preflightHeightfield.md +11 -2
- package/dist/docs/reference/geometry/preflightHelicalThreadSolidMesh.md +11 -2
- package/dist/docs/reference/geometry/preflightInternalThreadCutter.md +13 -2
- package/dist/docs/reference/geometry/preflightSvgRegion.md +24 -2
- package/dist/docs/reference/geometry/preflightThreadedNut.md +12 -2
- package/dist/docs/reference/geometry/preflightThreadedRod.md +12 -2
- package/dist/docs/reference/geometry/projectOntoPlane3.md +7 -6
- package/dist/docs/reference/geometry/radialPatternTransforms.md +4 -4
- package/dist/docs/reference/geometry/rectangleContour.md +10 -3
- package/dist/docs/reference/geometry/rectangleProfile.md +10 -2
- package/dist/docs/reference/geometry/regionArea.md +5 -1
- package/dist/docs/reference/geometry/regionBounds.md +8 -4
- package/dist/docs/reference/geometry/regularPolygonContour.md +8 -4
- package/dist/docs/reference/geometry/resamplePolyline2.md +8 -4
- package/dist/docs/reference/geometry/resamplePolyline3.md +8 -4
- package/dist/docs/reference/geometry/resolveAlignedCircularSegments.md +1 -1
- package/dist/docs/reference/geometry/resolveArcSegments.md +1 -1
- package/dist/docs/reference/geometry/resolveCircularSampling.md +40 -0
- package/dist/docs/reference/geometry/resolveCircularSegments.md +1 -1
- package/dist/docs/reference/geometry/resolveCylindricalGear.md +5 -1
- package/dist/docs/reference/geometry/resolveCylindricalGearPair.md +5 -1
- package/dist/docs/reference/geometry/resolveExtrusionDivisions.md +5 -1
- package/dist/docs/reference/geometry/resolveGeometrySamplingLimits.md +5 -1
- package/dist/docs/reference/geometry/resolveGeometryTolerance.md +1 -1
- package/dist/docs/reference/geometry/resolveKnuckleHinge.md +59 -0
- package/dist/docs/reference/geometry/resolvePrintableThreadFitPolicy.md +5 -1
- package/dist/docs/reference/geometry/resolveRackPitch.md +5 -1
- package/dist/docs/reference/geometry/resolveThreadCircularSegments.md +5 -1
- package/dist/docs/reference/geometry/reverseTriangleMesh.md +5 -1
- package/dist/docs/reference/geometry/revolveMesh.md +5 -1
- package/dist/docs/reference/geometry/rotate2.md +6 -5
- package/dist/docs/reference/geometry/rotationTransform3.md +7 -6
- package/dist/docs/reference/geometry/roundClosedPolylinePath.md +8 -4
- package/dist/docs/reference/geometry/sampleContour.md +12 -2
- package/dist/docs/reference/geometry/sampleCurve2.md +6 -3
- package/dist/docs/reference/geometry/sampleCurve3.md +5 -1
- package/dist/docs/reference/geometry/sampleCylindricalGearOutline.md +5 -1
- package/dist/docs/reference/geometry/sampleHelix.md +13 -5
- package/dist/docs/reference/geometry/sampleInternalCylindricalGearSpaceOutline.md +5 -1
- package/dist/docs/reference/geometry/sampleRackToothPath.md +8 -4
- package/dist/docs/reference/geometry/sampleSideProfile.md +15 -5
- package/dist/docs/reference/geometry/sampleTextContours.md +5 -1
- package/dist/docs/reference/geometry/sampleThreadHelices.md +5 -1
- package/dist/docs/reference/geometry/scale2.md +6 -5
- package/dist/docs/reference/geometry/scale3.md +6 -5
- package/dist/docs/reference/geometry/scaleTransform3.md +7 -6
- package/dist/docs/reference/geometry/signedContourArea.md +5 -1
- package/dist/docs/reference/geometry/starContour.md +8 -4
- package/dist/docs/reference/geometry/strokeRegionData.md +5 -1
- package/dist/docs/reference/geometry/subtract2.md +7 -6
- package/dist/docs/reference/geometry/subtract3.md +7 -6
- package/dist/docs/reference/geometry/sweepMesh.md +5 -1
- package/dist/docs/reference/geometry/threadProfile.md +5 -1
- package/dist/docs/reference/geometry/transform2.md +14 -7
- package/dist/docs/reference/geometry/transform3.md +16 -7
- package/dist/docs/reference/geometry/transformDeterminant3.md +5 -4
- package/dist/docs/reference/geometry/transformRegionData.md +5 -1
- package/dist/docs/reference/geometry/transformTriangleMesh.md +5 -1
- package/dist/docs/reference/geometry/translationTransform3.md +7 -6
- package/dist/docs/reference/geometry/triangulateContour.md +5 -1
- package/dist/docs/reference/geometry/validateSolidMesh.md +9 -2
- package/dist/docs/reference/geometry/validateTransform3.md +6 -5
- package/dist/docs/reference/geometry/validateTriangleMesh.md +5 -1
- package/dist/docs/reference/geometry/vector2.md +10 -2
- package/dist/docs/reference/geometry/vector3.md +10 -2
- package/dist/docs/reference/geometry.md +7 -5
- package/dist/docs/reference/model/Anchor3.md +6 -5
- package/dist/docs/reference/model/AttachOptions.md +2 -1
- package/dist/docs/reference/model/Bounds2-type.md +125 -0
- package/dist/docs/reference/model/Bounds2Data.md +44 -0
- package/dist/docs/reference/model/Bounds2Input.md +19 -0
- package/dist/docs/reference/model/Bounds2Options.md +70 -0
- package/dist/docs/reference/model/Bounds3-type.md +125 -0
- package/dist/docs/reference/model/Bounds3Data.md +44 -0
- package/dist/docs/reference/model/Bounds3Input.md +19 -0
- package/dist/docs/reference/model/Bounds3Options.md +70 -0
- 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 +3 -3
- 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 +1 -1
- package/dist/docs/reference/model/CircularPrimitiveOptions.md +1 -1
- package/dist/docs/reference/model/Computed.md +6 -1
- package/dist/docs/reference/model/ComputedValue.md +5 -1
- package/dist/docs/reference/model/Contour.md +6 -4
- 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 +1 -1
- package/dist/docs/reference/model/DiagnosticOptions.md +6 -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 +1 -1
- package/dist/docs/reference/model/EndTreatments.md +1 -1
- package/dist/docs/reference/model/ExtrudeOptions.md +1 -1
- package/dist/docs/reference/model/FinalizedModel.md +3 -3
- 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 +5 -1
- package/dist/docs/reference/model/GenerateContext.md +5 -1
- package/dist/docs/reference/model/GeneratedPart.md +5 -1
- package/dist/docs/reference/model/GenerationDiagnostic.md +6 -1
- package/dist/docs/reference/model/GenerationError.md +5 -1
- package/dist/docs/reference/model/GeometryResolution.md +1 -1
- 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 +5 -4
- package/dist/docs/reference/model/HeightfieldOptions.md +5 -5
- package/dist/docs/reference/model/HelicalThreadRidgeMeshOptions.md +2 -1
- package/dist/docs/reference/model/HelicalThreadSolidMeshPreflight.md +3 -2
- package/dist/docs/reference/model/HoleCutterOptions.md +77 -0
- package/dist/docs/reference/model/HoleCutterOverrun.md +35 -0
- package/dist/docs/reference/model/HoleCutterRecess.md +87 -0
- package/dist/docs/reference/model/HullOptions.md +1 -1
- package/dist/docs/reference/model/ImmutableBuffer-type.md +5 -1
- package/dist/docs/reference/model/ImmutableTriangleMesh.md +5 -1
- package/dist/docs/reference/model/ImplicitOptions.md +6 -6
- package/dist/docs/reference/model/InternalThreadCutterOptions.md +2 -1
- package/dist/docs/reference/model/KnuckleHinge-type.md +47 -0
- package/dist/docs/reference/model/KnuckleHingeBaseSpec.md +77 -0
- package/dist/docs/reference/model/KnuckleHingeHalfOptions.md +38 -0
- package/dist/docs/reference/model/KnuckleHingeOptions.md +38 -0
- package/dist/docs/reference/model/KnuckleHingeSamplingOptions.md +47 -0
- package/dist/docs/reference/model/KnuckleHingeSpec.md +18 -0
- package/dist/docs/reference/model/KnuckleHingeWeb.md +53 -0
- package/dist/docs/reference/model/LinearPatternOptions.md +2 -1
- 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 +1 -1
- package/dist/docs/reference/model/MatchProfilesOptions.md +1 -1
- package/dist/docs/reference/model/ModelProgram.md +5 -1
- package/dist/docs/reference/model/ModelingLimits.md +1 -1
- package/dist/docs/reference/model/NumericArray.md +8 -1
- package/dist/docs/reference/model/PartGeometry.md +5 -1
- package/dist/docs/reference/model/PartOptions.md +5 -1
- package/dist/docs/reference/model/Path2-type.md +12 -8
- package/dist/docs/reference/model/Path2Data.md +40 -4
- package/dist/docs/reference/model/Path2Input.md +8 -3
- package/dist/docs/reference/model/Path3-type.md +12 -8
- package/dist/docs/reference/model/Path3Data.md +40 -4
- package/dist/docs/reference/model/Path3Input.md +8 -3
- package/dist/docs/reference/model/PathLocation.md +5 -1
- package/dist/docs/reference/model/PathNormalGuide.md +4 -4
- package/dist/docs/reference/model/PathOptions.md +5 -1
- package/dist/docs/reference/model/PathPatternOptions.md +2 -1
- package/dist/docs/reference/model/PathResamplingOptions.md +5 -1
- package/dist/docs/reference/model/PatternSource.md +2 -1
- package/dist/docs/reference/model/Pivot2Options.md +2 -1
- package/dist/docs/reference/model/Pivot3Options.md +2 -1
- package/dist/docs/reference/model/PlaneOptions.md +1 -1
- package/dist/docs/reference/model/PolygonData.md +3 -2
- package/dist/docs/reference/model/PolygonOptions.md +1 -1
- package/dist/docs/reference/model/PrimitiveAttachment.md +2 -1
- package/dist/docs/reference/model/PrimitiveAttachmentOptions.md +2 -1
- package/dist/docs/reference/model/PrintableThreadFit.md +2 -1
- package/dist/docs/reference/model/PrintableThreadFitPolicy.md +2 -1
- package/dist/docs/reference/model/Profile.md +4 -2
- package/dist/docs/reference/model/ProfileComponent2.md +1 -1
- package/dist/docs/reference/model/ProfileContour2.md +4 -2
- 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 +2 -1
- 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 +3 -3
- package/dist/docs/reference/model/RegionData.md +2 -2
- package/dist/docs/reference/model/RegularPolygonOptions.md +1 -1
- package/dist/docs/reference/model/RevolveOptions.md +1 -1
- package/dist/docs/reference/model/RoundedEdgeTreatment.md +1 -1
- package/dist/docs/reference/model/Section.md +9 -2
- package/dist/docs/reference/model/SectionHullOptions.md +1 -1
- package/dist/docs/reference/model/SectionInspection.md +4 -4
- package/dist/docs/reference/model/SectionOffsetJoin.md +1 -1
- package/dist/docs/reference/model/SectionOffsetOptions.md +1 -1
- package/dist/docs/reference/model/SmoothEdgeTreatment.md +1 -1
- package/dist/docs/reference/model/Solid.md +9 -2
- package/dist/docs/reference/model/SolidInspection.md +4 -4
- package/dist/docs/reference/model/SolidSegmentHit.md +4 -4
- package/dist/docs/reference/model/SphereOptions.md +1 -1
- package/dist/docs/reference/model/StarOptions.md +1 -1
- package/dist/docs/reference/model/StrokeCap.md +1 -1
- package/dist/docs/reference/model/StrokeJoin.md +1 -1
- package/dist/docs/reference/model/StrokeOptions.md +1 -1
- 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 +14 -1
- package/dist/docs/reference/model/SweepOptions.md +1 -1
- package/dist/docs/reference/model/SweepOrientation.md +1 -1
- package/dist/docs/reference/model/TextSectionOptions.md +1 -1
- package/dist/docs/reference/model/ThreadEndStyle.md +2 -1
- package/dist/docs/reference/model/ThreadEndTreatmentOptions.md +2 -1
- package/dist/docs/reference/model/ThreadHandedness.md +2 -1
- package/dist/docs/reference/model/ThreadLeadInEnvelope.md +2 -1
- package/dist/docs/reference/model/ThreadLeadInShape.md +2 -1
- package/dist/docs/reference/model/ThreadProfile.md +4 -3
- package/dist/docs/reference/model/ThreadRidgeOptions.md +2 -1
- package/dist/docs/reference/model/ThreadedNutBevel.md +2 -1
- package/dist/docs/reference/model/ThreadedNutOptions.md +2 -1
- package/dist/docs/reference/model/ThreadedNutPreflight.md +4 -3
- package/dist/docs/reference/model/ThreadedNutShape.md +2 -1
- package/dist/docs/reference/model/ThreadedRodOptions.md +2 -1
- package/dist/docs/reference/model/TorusOptions.md +1 -1
- package/dist/docs/reference/model/Transform2-type.md +6 -5
- package/dist/docs/reference/model/Transform2Data.md +16 -0
- package/dist/docs/reference/model/Transform2Input.md +4 -3
- package/dist/docs/reference/model/Transform3-type.md +6 -5
- package/dist/docs/reference/model/Transform3Data.md +19 -0
- package/dist/docs/reference/model/Transform3Input.md +4 -3
- package/dist/docs/reference/model/TriangleMesh.md +1 -1
- package/dist/docs/reference/model/TriangleMeshAnalysis.md +3 -3
- package/dist/docs/reference/model/TriangleMeshMeasurements.md +3 -3
- package/dist/docs/reference/model/TubeOptions.md +1 -1
- package/dist/docs/reference/model/Vector2-type.md +6 -5
- package/dist/docs/reference/model/{Vector2Tuple.md → Vector2Data.md} +3 -3
- package/dist/docs/reference/model/Vector2Input.md +4 -3
- package/dist/docs/reference/model/Vector3-type.md +6 -5
- package/dist/docs/reference/model/{Vector3Tuple.md → Vector3Data.md} +3 -3
- package/dist/docs/reference/model/Vector3Input.md +4 -3
- package/dist/docs/reference/model/VectorTextLayout.md +1 -1
- package/dist/docs/reference/model/VectorTextMetrics.md +3 -3
- package/dist/docs/reference/model/anchor.md +2 -1
- package/dist/docs/reference/model/bounds2.md +37 -0
- package/dist/docs/reference/model/bounds3.md +37 -0
- package/dist/docs/reference/model/box.md +2 -2
- package/dist/docs/reference/model/castSegment.md +1 -1
- package/dist/docs/reference/model/categories/boolean-operations.md +10 -3
- package/dist/docs/reference/model/categories/bounded-surfaces.md +5 -3
- package/dist/docs/reference/model/categories/bounds.md +38 -0
- package/dist/docs/reference/model/categories/contracts.md +4 -2
- package/dist/docs/reference/model/categories/core-values-errors.md +11 -11
- package/dist/docs/reference/model/categories/explicit-profiles.md +6 -4
- package/dist/docs/reference/model/categories/extrude-revolve-sweep.md +12 -3
- package/dist/docs/reference/model/categories/generation.md +11 -2
- package/dist/docs/reference/model/categories/hinges.md +38 -0
- package/dist/docs/reference/model/categories/inspection.md +9 -2
- package/dist/docs/reference/model/categories/mesh-inspection.md +5 -3
- package/dist/docs/reference/model/categories/paths.md +15 -7
- package/dist/docs/reference/model/categories/primitives.md +14 -4
- package/dist/docs/reference/model/categories/resolution.md +4 -2
- package/dist/docs/reference/model/categories/sections.md +10 -5
- package/dist/docs/reference/model/categories/threads.md +10 -7
- package/dist/docs/reference/model/categories/transforms-placement.md +17 -9
- package/dist/docs/reference/model/circle.md +1 -1
- package/dist/docs/reference/model/components.md +1 -1
- 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 +1 -1
- package/dist/docs/reference/model/ellipse.md +1 -1
- package/dist/docs/reference/model/extrude.md +1 -1
- package/dist/docs/reference/model/generate.md +5 -1
- package/dist/docs/reference/model/gridPattern.md +2 -1
- package/dist/docs/reference/model/heightfield.md +5 -2
- package/dist/docs/reference/model/holeCutter.md +45 -0
- package/dist/docs/reference/model/hull.md +1 -1
- package/dist/docs/reference/model/immutableBuffer.md +5 -1
- package/dist/docs/reference/model/immutableMesh.md +5 -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 +2 -1
- package/dist/docs/reference/model/intersect.md +1 -1
- package/dist/docs/reference/model/isEmpty.md +1 -1
- package/dist/docs/reference/model/knuckleHinge.md +47 -0
- package/dist/docs/reference/model/linearPattern.md +2 -1
- package/dist/docs/reference/model/loft.md +1 -1
- package/dist/docs/reference/model/matchProfiles.md +1 -1
- package/dist/docs/reference/model/minkowskiSum.md +1 -1
- package/dist/docs/reference/model/path2.md +14 -2
- package/dist/docs/reference/model/path3.md +8 -1
- package/dist/docs/reference/model/pathPattern.md +2 -1
- package/dist/docs/reference/model/polygon.md +5 -2
- package/dist/docs/reference/model/preflightInternalThreadCutter.md +8 -2
- package/dist/docs/reference/model/preflightThreadedNut.md +8 -2
- package/dist/docs/reference/model/preflightThreadedRod.md +8 -2
- package/dist/docs/reference/model/radialPattern.md +2 -1
- package/dist/docs/reference/model/rectangle.md +5 -2
- package/dist/docs/reference/model/regularPolygon.md +1 -1
- package/dist/docs/reference/model/revolve.md +1 -1
- 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 +1 -1
- package/dist/docs/reference/model/stroke.md +1 -1
- package/dist/docs/reference/model/svgPathSection.md +1 -1
- package/dist/docs/reference/model/svgSection.md +5 -1
- package/dist/docs/reference/model/sweep.md +1 -1
- package/dist/docs/reference/model/textSection.md +1 -1
- package/dist/docs/reference/model/threadRidge.md +2 -1
- package/dist/docs/reference/model/threadedNut.md +2 -1
- package/dist/docs/reference/model/threadedRod.md +2 -1
- package/dist/docs/reference/model/torus.md +1 -1
- package/dist/docs/reference/model/transform2.md +14 -7
- package/dist/docs/reference/model/transform3.md +16 -7
- package/dist/docs/reference/model/tube.md +1 -1
- package/dist/docs/reference/model/union.md +1 -1
- package/dist/docs/reference/model/vector2.md +10 -2
- package/dist/docs/reference/model/vector3.md +10 -2
- package/dist/docs/reference/model.md +15 -8
- package/dist/docs/reference/text/Bounds2Data.md +34 -0
- package/dist/docs/reference/text/MAX_VECTOR_FONT_BYTES.md +1 -1
- package/dist/docs/reference/text/Vector2Data.md +7 -0
- package/dist/docs/reference/text/VectorFont.md +7 -7
- package/dist/docs/reference/text/VectorFontOptions.md +1 -1
- package/dist/docs/reference/text/VectorTextArcBaseline.md +1 -1
- package/dist/docs/reference/text/VectorTextLayout.md +1 -1
- package/dist/docs/reference/text/VectorTextLayoutOptions.md +3 -3
- package/dist/docs/reference/text/VectorTextMetrics.md +3 -3
- package/dist/docs/reference/text/VectorTextOptions.md +1 -1
- package/dist/docs/reference/text/categories/font-preparation.md +6 -4
- package/dist/docs/reference/text/prepareVectorFont.md +1 -1
- package/dist/docs/reference/text.md +4 -2
- package/dist/engine/construction-operations.js +1 -1
- package/dist/engine/extrusion-finishing.js +2 -29
- package/dist/engine/hole-cutter-operation.js +148 -0
- package/dist/engine/knuckle-hinge-operation.js +128 -0
- package/dist/engine/loft-operations.js +1 -1
- package/dist/engine/mechanical-operations.js +3 -1
- package/dist/engine/modeling-context.js +20 -1
- package/dist/engine/primitive-operations.js +19 -6
- package/dist/engine/recipe-realization.js +4 -2
- package/dist/engine/section-operations.js +2 -2
- package/dist/engine/transform-operations.js +3 -3
- package/dist/geometry/bounds-value.js +121 -0
- package/dist/geometry/bounds.js +10 -25
- package/dist/geometry/circular-sampling.js +45 -0
- package/dist/geometry/convex-offset.js +41 -0
- package/dist/geometry/curves/sampling.js +1 -2
- package/dist/geometry/errors.js +1 -0
- package/dist/geometry/heightfield.js +12 -1
- package/dist/geometry/index.js +5 -2
- package/dist/geometry/math/immutable-value.js +1 -1
- package/dist/geometry/math/vector-value.js +11 -3
- package/dist/geometry/math/vector2.js +1 -0
- package/dist/geometry/math/vector3.js +1 -0
- package/dist/geometry/mechanical/index.js +1 -0
- package/dist/geometry/mechanical/knuckle-hinge.js +110 -0
- package/dist/geometry/mechanical/thread-mesh-plan.js +7 -2
- package/dist/geometry/mechanical/thread-solids.js +29 -4
- package/dist/geometry/mesh/mesh-centroid.js +1 -0
- package/dist/geometry/mesh/mesh-solid.js +1 -0
- package/dist/geometry/paths/frames.js +1 -0
- package/dist/geometry/paths/helix.js +1 -0
- package/dist/geometry/paths/path-value.js +43 -27
- package/dist/geometry/paths/resampling.js +2 -2
- package/dist/geometry/patterns/placements.js +3 -3
- package/dist/geometry/patterns.js +3 -1
- package/dist/geometry/profiles/contour.js +1 -0
- package/dist/geometry/profiles/matched.js +1 -0
- package/dist/geometry/profiles/profiles.js +3 -23
- package/dist/geometry/profiles/rectangle.js +10 -1
- package/dist/geometry/profiles/side-profile.js +2 -0
- package/dist/geometry/svg/matrix.js +21 -0
- package/dist/geometry/svg-import.js +140 -52
- package/dist/geometry/sweeps/options.js +1 -1
- package/dist/geometry/text-fitting.js +1 -0
- package/dist/geometry/transform-matrix.js +1 -1
- package/dist/geometry/{transform-chain.js → transform-value.js} +24 -15
- package/dist/index.js +2 -1
- package/dist/model/execution-binding.js +1 -1
- package/dist/model/geometry-recipes.js +1 -1
- package/dist/model/hole-cutter.js +1 -0
- package/dist/model/immutable-generation-data.js +4 -12
- package/dist/model/knuckle-hinge.js +1 -0
- package/dist/model/operations.js +78 -3
- package/dist/model/recipe-declaration.js +11 -2
- package/package.json +1 -1
- package/dist/docs/reference/geometry/Bounds2.md +0 -39
- package/dist/docs/reference/geometry/Bounds3.md +0 -39
- package/dist/docs/reference/geometry/BoundsFromSizeOptions.md +0 -23
- package/dist/docs/reference/geometry/Transform2Matrix.md +0 -14
- package/dist/docs/reference/geometry/Transform3Matrix.md +0 -17
- package/dist/docs/reference/geometry/Vector2Tuple.md +0 -14
- package/dist/docs/reference/geometry/Vector3Tuple.md +0 -14
- package/dist/docs/reference/geometry/boundsFromSize.md +0 -83
- package/dist/docs/reference/geometry/containsBounds.md +0 -72
- package/dist/docs/reference/model/Bounds2.md +0 -39
- package/dist/docs/reference/model/Bounds3.md +0 -39
- package/dist/docs/reference/model/Transform2Matrix.md +0 -15
- package/dist/docs/reference/model/Transform3Matrix.md +0 -18
- package/dist/docs/reference/text/Bounds2.md +0 -34
- package/dist/docs/reference/text/Vector2Tuple.md +0 -7
package/dist/api/geometry.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare interface AcmeThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/** Adds two finite XY vectors component-wise. */
|
|
15
|
-
export declare const add2: (a:
|
|
15
|
+
export declare const add2: (a: Vector2Data, b: Vector2Data) => Vector2Data;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Adds two finite XYZ vectors component-wise.
|
|
@@ -21,7 +21,7 @@ export declare const add2: (a: Vector2Tuple, b: Vector2Tuple) => Vector2Tuple;
|
|
|
21
21
|
* add3([1, 2, 3], [4, 5, 6]); // [5, 7, 9]
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
export declare const add3: (a:
|
|
24
|
+
export declare const add3: (a: Vector3Data, b: Vector3Data) => Vector3Data;
|
|
25
25
|
|
|
26
26
|
/** Controls full-circle sampling that must satisfy one or more topology alignments. */
|
|
27
27
|
export declare interface AlignedCircularSegmentsOptions {
|
|
@@ -89,11 +89,11 @@ export declare function analyzeTriangleMeshQuality(
|
|
|
89
89
|
*/
|
|
90
90
|
export declare interface Anchor3 {
|
|
91
91
|
/** Unit outward normal used as the anchor's local +Z direction. */
|
|
92
|
-
readonly direction:
|
|
92
|
+
readonly direction: Vector3Data;
|
|
93
93
|
/** World-space attachment position. */
|
|
94
|
-
readonly position:
|
|
94
|
+
readonly position: Vector3Data;
|
|
95
95
|
/** Roll guide projected into the plane perpendicular to `direction`. */
|
|
96
|
-
readonly up:
|
|
96
|
+
readonly up: Vector3Data;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
/**
|
|
@@ -138,9 +138,9 @@ export declare function anchorFrame3(
|
|
|
138
138
|
* @returns A fresh transformed direction.
|
|
139
139
|
*/
|
|
140
140
|
export declare function applyTransformDirection3(
|
|
141
|
-
transform:
|
|
142
|
-
direction:
|
|
143
|
-
):
|
|
141
|
+
transform: Transform3Data,
|
|
142
|
+
direction: Vector3Data,
|
|
143
|
+
): Vector3Data;
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
146
|
* Applies an affine transform to a point, including translation.
|
|
@@ -150,16 +150,16 @@ export declare function applyTransformDirection3(
|
|
|
150
150
|
* @returns A fresh transformed point.
|
|
151
151
|
*/
|
|
152
152
|
export declare function applyTransformPoint3(
|
|
153
|
-
transform:
|
|
154
|
-
point:
|
|
155
|
-
):
|
|
153
|
+
transform: Transform3Data,
|
|
154
|
+
point: Vector3Data,
|
|
155
|
+
): Vector3Data;
|
|
156
156
|
|
|
157
157
|
/** Planar circular arc with counterclockwise degree angles. */
|
|
158
158
|
export declare interface ArcCurve2 {
|
|
159
159
|
/** Selects a circular arc in the XY plane. */
|
|
160
160
|
readonly kind: "arc";
|
|
161
161
|
/** Circle center in millimetres. */
|
|
162
|
-
readonly center:
|
|
162
|
+
readonly center: Vector2Data;
|
|
163
163
|
/** Positive circular radius in millimetres. */
|
|
164
164
|
readonly radius: number;
|
|
165
165
|
/** Initial angle in degrees; defaults to zero. */
|
|
@@ -173,13 +173,13 @@ export declare interface ArcCurve3 {
|
|
|
173
173
|
/** Selects a circular arc in the supplied plane. */
|
|
174
174
|
readonly kind: "arc";
|
|
175
175
|
/** Circle center in millimetres. */
|
|
176
|
-
readonly center:
|
|
176
|
+
readonly center: Vector3Data;
|
|
177
177
|
/** Positive circular radius in millimetres. */
|
|
178
178
|
readonly radius: number;
|
|
179
179
|
/** Orthogonal unit direction at zero degrees. */
|
|
180
|
-
readonly xAxis:
|
|
180
|
+
readonly xAxis: Vector3Data;
|
|
181
181
|
/** Orthogonal unit direction at positive ninety degrees. */
|
|
182
|
-
readonly yAxis:
|
|
182
|
+
readonly yAxis: Vector3Data;
|
|
183
183
|
/** Initial angle in degrees; defaults to zero. */
|
|
184
184
|
readonly startAngle?: number;
|
|
185
185
|
/** Nonzero signed sweep in degrees, bounded to one complete turn. */
|
|
@@ -204,7 +204,7 @@ export declare function attachmentTransform3(
|
|
|
204
204
|
source: Anchor3,
|
|
205
205
|
target: Anchor3,
|
|
206
206
|
options?: AttachOptions,
|
|
207
|
-
):
|
|
207
|
+
): Transform3Data;
|
|
208
208
|
|
|
209
209
|
/** Options controlling how one anchor is attached to another. */
|
|
210
210
|
export declare interface AttachOptions {
|
|
@@ -235,36 +235,126 @@ export declare type AxisAngleRotation3 =
|
|
|
235
235
|
readonly degrees?: never;
|
|
236
236
|
};
|
|
237
237
|
|
|
238
|
-
/**
|
|
239
|
-
export declare interface Bounds2 {
|
|
238
|
+
/** Immutable finite XY bounds in millimetres, with tuple coordinates for data interoperability. */
|
|
239
|
+
export declare interface Bounds2 extends Bounds2Data {
|
|
240
|
+
/** Returns nonnegative X/Y dimensions in millimetres, including zero extents. */
|
|
241
|
+
size(): Vector2;
|
|
242
|
+
/** Returns the midpoint in millimetres. */
|
|
243
|
+
center(): Vector2;
|
|
244
|
+
/** Tests positioned XY containment, including touching boundaries. */
|
|
245
|
+
containsBounds(other: Bounds2Input): boolean;
|
|
246
|
+
/** Returns this value's frozen plain record; repeated calls do not allocate. */
|
|
247
|
+
toData(): Bounds2Data;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Constructs immutable finite XY bounds from ordered extrema or nonnegative size in millimetres.
|
|
252
|
+
*
|
|
253
|
+
* Zero extents are valid. Invalid dimensions, nonfinite coordinates, reversed bounds and
|
|
254
|
+
* overflowing extents throw `INVALID_ARGUMENT` GeometryError. Use `toData()` for plain records.
|
|
255
|
+
* Size construction centers on the origin unless `center` is false. Size and extrema are exclusive.
|
|
256
|
+
* Compiled Generator packages passing these values to host recipes or computed data require
|
|
257
|
+
* runtime 9.0.0 or newer in major 9.
|
|
258
|
+
*/
|
|
259
|
+
export declare function bounds2(input: Bounds2Options): Bounds2;
|
|
260
|
+
|
|
261
|
+
/** Plain axis-aligned XY bounds for interchange; use bounds2 for immutable measurement methods. */
|
|
262
|
+
export declare interface Bounds2Data {
|
|
240
263
|
/** Inclusive maximum X/Y coordinates. */
|
|
241
|
-
readonly max:
|
|
264
|
+
readonly max: Vector2Data;
|
|
242
265
|
/** Inclusive minimum X/Y coordinates. */
|
|
243
|
-
readonly min:
|
|
266
|
+
readonly min: Vector2Data;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/** An immutable XY bounds value or its plain min/max representation. */
|
|
270
|
+
export declare type Bounds2Input = Bounds2 | Bounds2Data;
|
|
271
|
+
|
|
272
|
+
/** XY bounds construction from existing extrema or nonnegative dimensions, never both. */
|
|
273
|
+
export declare type Bounds2Options =
|
|
274
|
+
| (Bounds2Input & {
|
|
275
|
+
/** Preserves the size query when snapshotting an existing fluent value. */
|
|
276
|
+
readonly size?: Bounds2["size"];
|
|
277
|
+
/** Preserves the center query when snapshotting an existing fluent value. */
|
|
278
|
+
readonly center?: Bounds2["center"];
|
|
279
|
+
})
|
|
280
|
+
| {
|
|
281
|
+
/** Nonnegative XY dimensions in millimetres. */
|
|
282
|
+
readonly size: Vector2Data;
|
|
283
|
+
/** Center on the origin; false starts at the origin. Defaults to true. */
|
|
284
|
+
readonly center?: boolean;
|
|
285
|
+
/** Minimum coordinates are unavailable when size is supplied. */
|
|
286
|
+
readonly min?: never;
|
|
287
|
+
/** Maximum coordinates are unavailable when size is supplied. */
|
|
288
|
+
readonly max?: never;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
/** Immutable finite XYZ bounds in millimetres, with tuple coordinates for data interoperability. */
|
|
292
|
+
export declare interface Bounds3 extends Bounds3Data {
|
|
293
|
+
/** Returns nonnegative X/Y/Z dimensions in millimetres, including zero extents. */
|
|
294
|
+
size(): Vector3;
|
|
295
|
+
/** Returns the midpoint in millimetres. */
|
|
296
|
+
center(): Vector3;
|
|
297
|
+
/** Tests positioned XYZ containment, including touching boundaries. */
|
|
298
|
+
containsBounds(other: Bounds3Input): boolean;
|
|
299
|
+
/** Returns this value's frozen plain record; repeated calls do not allocate. */
|
|
300
|
+
toData(): Bounds3Data;
|
|
244
301
|
}
|
|
245
302
|
|
|
246
|
-
/**
|
|
247
|
-
|
|
303
|
+
/**
|
|
304
|
+
* Constructs immutable finite XYZ bounds from ordered extrema or nonnegative size in millimetres.
|
|
305
|
+
*
|
|
306
|
+
* Zero extents are valid. Invalid dimensions, nonfinite coordinates, reversed bounds and
|
|
307
|
+
* overflowing extents throw `INVALID_ARGUMENT` GeometryError. Use `toData()` for plain records.
|
|
308
|
+
* Size construction centers on the origin unless `center` is false. Size and extrema are exclusive.
|
|
309
|
+
* Compiled Generator packages passing these values to host recipes or computed data require
|
|
310
|
+
* runtime 9.0.0 or newer in major 9.
|
|
311
|
+
*/
|
|
312
|
+
export declare function bounds3(input: Bounds3Options): Bounds3;
|
|
313
|
+
|
|
314
|
+
/** Plain axis-aligned XYZ bounds for interchange; use bounds3 for immutable measurement methods. */
|
|
315
|
+
export declare interface Bounds3Data {
|
|
248
316
|
/** Inclusive maximum X/Y/Z coordinates. */
|
|
249
|
-
readonly max:
|
|
317
|
+
readonly max: Vector3Data;
|
|
250
318
|
/** Inclusive minimum X/Y/Z coordinates. */
|
|
251
|
-
readonly min:
|
|
319
|
+
readonly min: Vector3Data;
|
|
252
320
|
}
|
|
253
321
|
|
|
322
|
+
/** An immutable XYZ bounds value or its plain min/max representation. */
|
|
323
|
+
export declare type Bounds3Input = Bounds3 | Bounds3Data;
|
|
324
|
+
|
|
325
|
+
/** XYZ bounds construction from existing extrema or nonnegative dimensions, never both. */
|
|
326
|
+
export declare type Bounds3Options =
|
|
327
|
+
| (Bounds3Input & {
|
|
328
|
+
/** Preserves the size query when snapshotting an existing fluent value. */
|
|
329
|
+
readonly size?: Bounds3["size"];
|
|
330
|
+
/** Preserves the center query when snapshotting an existing fluent value. */
|
|
331
|
+
readonly center?: Bounds3["center"];
|
|
332
|
+
})
|
|
333
|
+
| {
|
|
334
|
+
/** Nonnegative XYZ dimensions in millimetres. */
|
|
335
|
+
readonly size: Vector3Data;
|
|
336
|
+
/** Center on the origin; false starts at the origin. Defaults to true. */
|
|
337
|
+
readonly center?: boolean;
|
|
338
|
+
/** Minimum coordinates are unavailable when size is supplied. */
|
|
339
|
+
readonly min?: never;
|
|
340
|
+
/** Maximum coordinates are unavailable when size is supplied. */
|
|
341
|
+
readonly max?: never;
|
|
342
|
+
};
|
|
343
|
+
|
|
254
344
|
/** Midpoint of finite XY bounds in millimetres. */
|
|
255
|
-
export declare function boundsCenter(bounds:
|
|
345
|
+
export declare function boundsCenter(bounds: Bounds2Data): Vector2Data;
|
|
256
346
|
|
|
257
347
|
/** Midpoint of finite XYZ bounds in millimetres. */
|
|
258
|
-
export declare function boundsCenter(bounds:
|
|
348
|
+
export declare function boundsCenter(bounds: Bounds3Data): Vector3Data;
|
|
259
349
|
|
|
260
350
|
/** A uniform XY scale followed by translation, and the resulting bounds. */
|
|
261
351
|
export declare interface BoundsFit2 {
|
|
262
352
|
/** Positive uniform scale. */
|
|
263
353
|
readonly scale: number;
|
|
264
354
|
/** Millimetre translation applied after scaling around the origin. */
|
|
265
|
-
readonly position:
|
|
355
|
+
readonly position: Vector2Data;
|
|
266
356
|
/** Bounds after scaling and translation. */
|
|
267
|
-
readonly bounds:
|
|
357
|
+
readonly bounds: Bounds2Data;
|
|
268
358
|
}
|
|
269
359
|
|
|
270
360
|
/** A uniform XYZ scale followed by translation, and the resulting bounds. */
|
|
@@ -272,9 +362,9 @@ export declare interface BoundsFit3 {
|
|
|
272
362
|
/** Positive uniform scale. */
|
|
273
363
|
readonly scale: number;
|
|
274
364
|
/** Millimetre translation applied after scaling around the origin. */
|
|
275
|
-
readonly position:
|
|
365
|
+
readonly position: Vector3Data;
|
|
276
366
|
/** Bounds after scaling and translation. */
|
|
277
|
-
readonly bounds:
|
|
367
|
+
readonly bounds: Bounds3Data;
|
|
278
368
|
}
|
|
279
369
|
|
|
280
370
|
/** Uniform fitting controls; fitting centers the source inside the target. */
|
|
@@ -283,29 +373,11 @@ export declare interface BoundsFitOptions {
|
|
|
283
373
|
readonly maxScale?: number;
|
|
284
374
|
}
|
|
285
375
|
|
|
286
|
-
/** Creates immutable centered XY bounds from nonnegative dimensions in millimetres. */
|
|
287
|
-
export declare function boundsFromSize(
|
|
288
|
-
size: Vector2Tuple,
|
|
289
|
-
options?: BoundsFromSizeOptions,
|
|
290
|
-
): Bounds2;
|
|
291
|
-
|
|
292
|
-
/** Creates immutable centered XYZ bounds from nonnegative dimensions in millimetres. */
|
|
293
|
-
export declare function boundsFromSize(
|
|
294
|
-
size: Vector3Tuple,
|
|
295
|
-
options?: BoundsFromSizeOptions,
|
|
296
|
-
): Bounds3;
|
|
297
|
-
|
|
298
|
-
/** Placement of bounds constructed from nonnegative millimetre dimensions. */
|
|
299
|
-
export declare interface BoundsFromSizeOptions {
|
|
300
|
-
/** Center on the origin; false starts at the origin. Defaults to true. */
|
|
301
|
-
readonly center?: boolean;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
376
|
/** Inclusive XY dimensions in millimetres; zero extents are retained. */
|
|
305
|
-
export declare function boundsSize(bounds:
|
|
377
|
+
export declare function boundsSize(bounds: Bounds2Data): Vector2Data;
|
|
306
378
|
|
|
307
379
|
/** Inclusive XYZ dimensions in millimetres; zero extents are retained. */
|
|
308
|
-
export declare function boundsSize(bounds:
|
|
380
|
+
export declare function boundsSize(bounds: Bounds3Data): Vector3Data;
|
|
309
381
|
|
|
310
382
|
/** Creates an outward face-center anchor using the same local origin convention as box().
|
|
311
383
|
* @remarks origin applies an explicit translation. For rotated components, transform the
|
|
@@ -320,13 +392,13 @@ export declare type BoxAnchorFace =
|
|
|
320
392
|
/** Box dimensions and construction origin for one named face anchor. */
|
|
321
393
|
export declare interface BoxAnchorOptions {
|
|
322
394
|
/** XYZ dimensions, or one uniform dimension, in millimetres. */
|
|
323
|
-
readonly size: number |
|
|
395
|
+
readonly size: number | Vector3Data;
|
|
324
396
|
/** Named outward face whose center is the attachment point. */
|
|
325
397
|
readonly face: BoxAnchorFace;
|
|
326
398
|
/** Centers the box around its construction origin; defaults to true, matching box(). */
|
|
327
399
|
readonly center?: boolean;
|
|
328
400
|
/** Construction origin; centered-box center or noncentered minimum corner. Defaults to zero. */
|
|
329
|
-
readonly origin?:
|
|
401
|
+
readonly origin?: Vector3Data;
|
|
330
402
|
}
|
|
331
403
|
|
|
332
404
|
/** Box edges use +Z top, +Y front and +X right; vertical names list front/back first. */
|
|
@@ -364,7 +436,7 @@ export declare interface BoxOptions extends PrimitiveAttachment {
|
|
|
364
436
|
*/
|
|
365
437
|
readonly center?: boolean;
|
|
366
438
|
/** Positive uniform size or explicit `[X, Y, Z]` extents in millimetres. */
|
|
367
|
-
readonly size: number |
|
|
439
|
+
readonly size: number | Vector3Data;
|
|
368
440
|
/** Uniform treatment or independent disjoint nominal edge/group treatments. */
|
|
369
441
|
readonly treatment?: EdgeTreatment | BoxEdgeTreatments;
|
|
370
442
|
}
|
|
@@ -409,20 +481,18 @@ export declare interface ChamferedEdgeTreatment {
|
|
|
409
481
|
*/
|
|
410
482
|
export declare const circleContour: (options: CircleContourOptions) => Contour;
|
|
411
483
|
|
|
412
|
-
/**
|
|
413
|
-
* Circular profile dimensions with exactly one radius or diameter and explicit sampling.
|
|
414
|
-
*/
|
|
484
|
+
/** Circular profile dimensions with exactly one radius or diameter and explicit sampling. */
|
|
415
485
|
export declare type CircleContourOptions = CircularPrimitiveOptions &
|
|
416
486
|
RadialSizingOptions &
|
|
417
487
|
(
|
|
418
488
|
| {
|
|
419
|
-
/** Positive nominal radius in millimetres
|
|
489
|
+
/** Positive nominal radius in millimetres. */
|
|
420
490
|
readonly radius: number;
|
|
421
|
-
/**
|
|
491
|
+
/** Diameter is unavailable when radius is supplied. */
|
|
422
492
|
readonly diameter?: never;
|
|
423
493
|
}
|
|
424
494
|
| {
|
|
425
|
-
/** Positive
|
|
495
|
+
/** Positive nominal diameter in millimetres. */
|
|
426
496
|
readonly diameter: number;
|
|
427
497
|
/** Radius is unavailable when diameter is supplied. */
|
|
428
498
|
readonly radius?: never;
|
|
@@ -452,6 +522,19 @@ export declare interface CircularResolutionOptions extends GeometryResolution {
|
|
|
452
522
|
readonly sizing?: RadialSizing;
|
|
453
523
|
}
|
|
454
524
|
|
|
525
|
+
/** Full-circle count and radial envelopes of its regular sampled polygon, in millimetres. */
|
|
526
|
+
export declare interface CircularSampling {
|
|
527
|
+
/** Exact resolved full-circle segment count. */
|
|
528
|
+
readonly segments: number;
|
|
529
|
+
/** Distance from the origin to every sampled vertex. */
|
|
530
|
+
readonly vertexRadius: number;
|
|
531
|
+
/** Minimum distance from the origin to each straight sampled edge. */
|
|
532
|
+
readonly faceRadius: number;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/** Nominal circle size and explicit physical sampling; supply exactly one radius or diameter. */
|
|
536
|
+
export declare type CircularSamplingOptions = CircleContourOptions;
|
|
537
|
+
|
|
455
538
|
/** Close, normal, and loose metric clearance-hole diameters in millimetres. */
|
|
456
539
|
export declare interface ClearanceHoleDimensions {
|
|
457
540
|
/** Close-fit clearance-hole diameter. */
|
|
@@ -467,13 +550,14 @@ export declare type ClearanceHoleFit = "close" | "normal" | "loose";
|
|
|
467
550
|
|
|
468
551
|
/**
|
|
469
552
|
* Closes an open, strictly upward [radius, height] side outline to the radius-zero axis.
|
|
553
|
+
*
|
|
470
554
|
* Adds horizontal bottom/top edges at the endpoint heights, retaining axis endpoints once.
|
|
471
555
|
* Returns a counterclockwise filled-boundary contour without a repeated seam vertex.
|
|
472
556
|
* Radii must be nonnegative; the result must enclose nonzero area without touching itself.
|
|
473
557
|
* This is a solid-body closure, not a hollow-wall or mounting-bore construction.
|
|
474
558
|
*/
|
|
475
559
|
export declare function closeToAxis(
|
|
476
|
-
side: readonly
|
|
560
|
+
side: readonly Vector2Data[],
|
|
477
561
|
limits?: Partial<GeometrySamplingLimits>,
|
|
478
562
|
): Contour;
|
|
479
563
|
|
|
@@ -540,9 +624,9 @@ export declare function compensateThreadProfileForFaceting(
|
|
|
540
624
|
* @returns A new frozen transform equal to `after * before`.
|
|
541
625
|
*/
|
|
542
626
|
export declare function composeTransform3(
|
|
543
|
-
after:
|
|
544
|
-
before:
|
|
545
|
-
):
|
|
627
|
+
after: Transform3Data,
|
|
628
|
+
before: Transform3Data,
|
|
629
|
+
): Transform3Data;
|
|
546
630
|
|
|
547
631
|
/**
|
|
548
632
|
* Builds rotation-minimizing frames for a non-duplicated closed path.
|
|
@@ -563,6 +647,7 @@ export declare const computeClosedParallelTransportFrames: (
|
|
|
563
647
|
|
|
564
648
|
/**
|
|
565
649
|
* Builds rotation-minimizing frames by parallel-transporting the previous normal.
|
|
650
|
+
*
|
|
566
651
|
* This avoids the sudden profile flips produced by picking a fresh up-vector per ring.
|
|
567
652
|
* Paths exceeding maxPathPoints (default 100000) reject before frame allocation or guide evaluation.
|
|
568
653
|
* Requires open path values; raw tuples are interpreted as an open path. Invalid paths throw GeometryError.
|
|
@@ -577,6 +662,7 @@ export declare const computeParallelTransportFrames: (
|
|
|
577
662
|
|
|
578
663
|
/**
|
|
579
664
|
* Computes the uniform-density volume centroid of an oriented closed solid, including cavity shells.
|
|
665
|
+
*
|
|
580
666
|
* Coordinates are millimetres. Indexed closure and positive aggregate volume are required; callers
|
|
581
667
|
* may use validateSolidMesh first when geometric intersections and shell orientation are untrusted.
|
|
582
668
|
* Fresh mutable input is inspected on every call, and buffers are never changed.
|
|
@@ -586,7 +672,7 @@ export declare const computeParallelTransportFrames: (
|
|
|
586
672
|
*/
|
|
587
673
|
export declare function computeTriangleMeshCentroid(
|
|
588
674
|
mesh: TriangleMesh,
|
|
589
|
-
):
|
|
675
|
+
): Vector3Data;
|
|
590
676
|
|
|
591
677
|
/**
|
|
592
678
|
* Creates an order-independent regression signature for a manufacturing mesh.
|
|
@@ -605,24 +691,22 @@ export declare function computeTriangleMeshSignature(
|
|
|
605
691
|
options?: TriangleMeshSignatureOptions,
|
|
606
692
|
): TriangleMeshSignature;
|
|
607
693
|
|
|
608
|
-
/** Tests actual XY containment, including touching boundaries; dimensions must match. */
|
|
609
|
-
export declare function containsBounds(outer: Bounds2, inner: Bounds2): boolean;
|
|
610
|
-
|
|
611
|
-
/** Tests actual XYZ containment, including touching boundaries; dimensions must match. */
|
|
612
|
-
export declare function containsBounds(outer: Bounds3, inner: Bounds3): boolean;
|
|
613
|
-
|
|
614
694
|
/**
|
|
615
|
-
* A closed two-dimensional boundary whose first point is not repeated at the end.
|
|
695
|
+
* A sampled closed two-dimensional boundary whose first point is not repeated at the end.
|
|
616
696
|
*
|
|
617
697
|
* Polygon exteriors are counter-clockwise and holes are clockwise. Algorithms
|
|
618
698
|
* may reject duplicate adjacent points or fewer than three effective vertices.
|
|
699
|
+
* Use PolygonData to assign an exterior and its holes, or ProfileContour2 for identified curve spans.
|
|
700
|
+
*
|
|
701
|
+
* @see {@link PolygonData}
|
|
702
|
+
* @see [ProfileContour2](/docs/reference/geometry/ProfileContour2)
|
|
619
703
|
*/
|
|
620
|
-
export declare type Contour = readonly
|
|
704
|
+
export declare type Contour = readonly Vector2Data[];
|
|
621
705
|
|
|
622
706
|
/** Returns true when a point lies inside or on the boundary of a loop. */
|
|
623
707
|
export declare function contourContainsPoint(
|
|
624
708
|
loop: Contour,
|
|
625
|
-
point:
|
|
709
|
+
point: Vector2Data,
|
|
626
710
|
): boolean;
|
|
627
711
|
|
|
628
712
|
/** One explicitly closed planar contour, independent of editor metadata and parameter contracts. */
|
|
@@ -693,7 +777,7 @@ export declare type CorrespondingProfileStation = LoftPlacement & {
|
|
|
693
777
|
};
|
|
694
778
|
|
|
695
779
|
/** Returns the signed scalar cross product; positive means `b` is counter-clockwise from `a`. */
|
|
696
|
-
export declare const cross2: (a:
|
|
780
|
+
export declare const cross2: (a: Vector2Data, b: Vector2Data) => number;
|
|
697
781
|
|
|
698
782
|
/**
|
|
699
783
|
* Returns the right-handed cross product.
|
|
@@ -702,20 +786,20 @@ export declare const cross2: (a: Vector2Tuple, b: Vector2Tuple) => number;
|
|
|
702
786
|
* cross3([1, 0, 0], [0, 1, 0]); // [0, 0, 1]
|
|
703
787
|
* ```
|
|
704
788
|
*/
|
|
705
|
-
export declare const cross3: (a:
|
|
789
|
+
export declare const cross3: (a: Vector3Data, b: Vector3Data) => Vector3Data;
|
|
706
790
|
|
|
707
791
|
/** Planar cubic Bézier with explicit endpoint and control coordinates. */
|
|
708
792
|
export declare interface CubicBezierCurve2 {
|
|
709
793
|
/** Selects a cubic Bézier through two endpoints and two controls. */
|
|
710
794
|
readonly kind: "cubic";
|
|
711
795
|
/** Initial XY point in millimetres. */
|
|
712
|
-
readonly start:
|
|
796
|
+
readonly start: Vector2Data;
|
|
713
797
|
/** First XY control point in millimetres. */
|
|
714
|
-
readonly control1:
|
|
798
|
+
readonly control1: Vector2Data;
|
|
715
799
|
/** Second XY control point in millimetres. */
|
|
716
|
-
readonly control2:
|
|
800
|
+
readonly control2: Vector2Data;
|
|
717
801
|
/** Final XY point in millimetres. */
|
|
718
|
-
readonly end:
|
|
802
|
+
readonly end: Vector2Data;
|
|
719
803
|
}
|
|
720
804
|
|
|
721
805
|
/**
|
|
@@ -725,13 +809,13 @@ export declare interface CubicBezierCurve3 {
|
|
|
725
809
|
/** Selects a cubic Bézier through two endpoints and two controls. */
|
|
726
810
|
readonly kind: "cubic";
|
|
727
811
|
/** Initial XYZ point in millimetres. */
|
|
728
|
-
readonly start:
|
|
812
|
+
readonly start: Vector3Data;
|
|
729
813
|
/** First XYZ control point in millimetres. */
|
|
730
|
-
readonly control1:
|
|
814
|
+
readonly control1: Vector3Data;
|
|
731
815
|
/** Second XYZ control point in millimetres. */
|
|
732
|
-
readonly control2:
|
|
816
|
+
readonly control2: Vector3Data;
|
|
733
817
|
/** Final XYZ point in millimetres. */
|
|
734
|
-
readonly end:
|
|
818
|
+
readonly end: Vector3Data;
|
|
735
819
|
}
|
|
736
820
|
|
|
737
821
|
/** Reusable planar curve definition. */
|
|
@@ -764,7 +848,7 @@ export declare interface CustomThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
|
764
848
|
* Open path spanning exactly `[-pitch/2, pitch/2]`, with both endpoints on the minor envelope,
|
|
765
849
|
* one connected ridge, one contiguous crest, and radial zero at the major envelope.
|
|
766
850
|
*/
|
|
767
|
-
readonly points: readonly
|
|
851
|
+
readonly points: readonly Vector2Data[];
|
|
768
852
|
}
|
|
769
853
|
|
|
770
854
|
/** Creates a cap-center or radial-side anchor using cylinder()'s construction origin.
|
|
@@ -791,7 +875,7 @@ export declare interface CylinderAnchorOptions {
|
|
|
791
875
|
/** Centers the cylinder along Z; defaults to true, matching cylinder(). */
|
|
792
876
|
readonly center?: boolean;
|
|
793
877
|
/** Construction origin; centered-axis midpoint or noncentered bottom axis. Defaults to zero. */
|
|
794
|
-
readonly origin?:
|
|
878
|
+
readonly origin?: Vector3Data;
|
|
795
879
|
}
|
|
796
880
|
|
|
797
881
|
/**
|
|
@@ -968,10 +1052,10 @@ export declare const DEFAULT_GEOMETRY_TOLERANCE: Readonly<{
|
|
|
968
1052
|
export declare const defaultGeometrySamplingLimits: GeometrySamplingLimits;
|
|
969
1053
|
|
|
970
1054
|
/** Returns Euclidean point distance without allocating an intermediate difference vector. */
|
|
971
|
-
export declare const distance2: (a:
|
|
1055
|
+
export declare const distance2: (a: Vector2Data, b: Vector2Data) => number;
|
|
972
1056
|
|
|
973
1057
|
/** Returns Euclidean point distance without allocating an intermediate difference vector. */
|
|
974
|
-
export declare const distance3: (a:
|
|
1058
|
+
export declare const distance3: (a: Vector3Data, b: Vector3Data) => number;
|
|
975
1059
|
|
|
976
1060
|
/**
|
|
977
1061
|
* Places an exact item count at equal arc-length intervals along a sampled path.
|
|
@@ -991,7 +1075,7 @@ export declare const distributeAlongPath: (
|
|
|
991
1075
|
) => readonly PathPlacement[];
|
|
992
1076
|
|
|
993
1077
|
/** Returns the scalar dot product. */
|
|
994
|
-
export declare const dot2: (a:
|
|
1078
|
+
export declare const dot2: (a: Vector2Data, b: Vector2Data) => number;
|
|
995
1079
|
|
|
996
1080
|
/**
|
|
997
1081
|
* Returns the scalar dot product.
|
|
@@ -1000,7 +1084,7 @@ export declare const dot2: (a: Vector2Tuple, b: Vector2Tuple) => number;
|
|
|
1000
1084
|
* dot3([1, 0, 0], [0, 1, 0]); // 0
|
|
1001
1085
|
* ```
|
|
1002
1086
|
*/
|
|
1003
|
-
export declare const dot3: (a:
|
|
1087
|
+
export declare const dot3: (a: Vector3Data, b: Vector3Data) => number;
|
|
1004
1088
|
|
|
1005
1089
|
/**
|
|
1006
1090
|
* Uniform finishing vocabulary shared by applicable solid edges and profile corners.
|
|
@@ -1028,13 +1112,13 @@ export declare type EllipseContourOptions = CircularPrimitiveOptions &
|
|
|
1028
1112
|
(
|
|
1029
1113
|
| {
|
|
1030
1114
|
/** Positive XY radii in millimetres; mutually exclusive with size. */
|
|
1031
|
-
readonly radius:
|
|
1115
|
+
readonly radius: Vector2Data;
|
|
1032
1116
|
/** Full XY extents are unavailable when radius is supplied. */
|
|
1033
1117
|
readonly size?: never;
|
|
1034
1118
|
}
|
|
1035
1119
|
| {
|
|
1036
1120
|
/** Positive full XY extents in millimetres; mutually exclusive with radius. */
|
|
1037
|
-
readonly size:
|
|
1121
|
+
readonly size: Vector2Data;
|
|
1038
1122
|
/** XY radii are unavailable when size is supplied. */
|
|
1039
1123
|
readonly radius?: never;
|
|
1040
1124
|
}
|
|
@@ -1062,8 +1146,8 @@ export declare interface EndTreatments {
|
|
|
1062
1146
|
* @throws {@link GeometryError} When an angle is non-finite.
|
|
1063
1147
|
*/
|
|
1064
1148
|
export declare function eulerTransform3(
|
|
1065
|
-
rotationDegrees:
|
|
1066
|
-
):
|
|
1149
|
+
rotationDegrees: Vector3Data,
|
|
1150
|
+
): Transform3Data;
|
|
1067
1151
|
|
|
1068
1152
|
/**
|
|
1069
1153
|
* Linearly extrudes one simple profile along +Z with robust ear-clipped caps.
|
|
@@ -1108,15 +1192,15 @@ export declare interface ExtrusionSamplingOptions {
|
|
|
1108
1192
|
|
|
1109
1193
|
/** Fits XY bounds uniformly and centers them in the target; zero source axes do not constrain scale. */
|
|
1110
1194
|
export declare function fitBounds(
|
|
1111
|
-
source:
|
|
1112
|
-
target:
|
|
1195
|
+
source: Bounds2Data,
|
|
1196
|
+
target: Bounds2Data,
|
|
1113
1197
|
options?: BoundsFitOptions,
|
|
1114
1198
|
): BoundsFit2;
|
|
1115
1199
|
|
|
1116
1200
|
/** Fits XYZ bounds uniformly and centers them in the target; zero source axes do not constrain scale. */
|
|
1117
1201
|
export declare function fitBounds(
|
|
1118
|
-
source:
|
|
1119
|
-
target:
|
|
1202
|
+
source: Bounds3Data,
|
|
1203
|
+
target: Bounds3Data,
|
|
1120
1204
|
options?: BoundsFitOptions,
|
|
1121
1205
|
): BoundsFit3;
|
|
1122
1206
|
|
|
@@ -1125,12 +1209,13 @@ export declare interface FittedTextLayout extends VectorTextLayout {
|
|
|
1125
1209
|
/** Transformed physical measurements, including nonempty visible ink bounds. */
|
|
1126
1210
|
readonly metrics: VectorTextMetrics & {
|
|
1127
1211
|
/** Finite positive-area ink bounds in final millimetres. */
|
|
1128
|
-
readonly bounds:
|
|
1212
|
+
readonly bounds: Bounds2Data;
|
|
1129
1213
|
};
|
|
1130
1214
|
}
|
|
1131
1215
|
|
|
1132
1216
|
/**
|
|
1133
1217
|
* Uniformly fits visible text ink inside finite XY bounds, centering it on the target.
|
|
1218
|
+
*
|
|
1134
1219
|
* Transforms retained vector paths before sampling, so later textSection/sampleTextContours
|
|
1135
1220
|
* resolution remains in final millimetres. Logical advances scale without translation;
|
|
1136
1221
|
* line count is unchanged. The input layout is preserved.
|
|
@@ -1143,20 +1228,20 @@ export declare interface FittedTextLayout extends VectorTextLayout {
|
|
|
1143
1228
|
*/
|
|
1144
1229
|
export declare function fitTextLayout(
|
|
1145
1230
|
layout: VectorTextLayout,
|
|
1146
|
-
target:
|
|
1231
|
+
target: Bounds2Data,
|
|
1147
1232
|
options?: BoundsFitOptions,
|
|
1148
1233
|
): FittedTextLayout;
|
|
1149
1234
|
|
|
1150
1235
|
/** A right-handed orthonormal coordinate frame expressed in world coordinates. */
|
|
1151
1236
|
export declare interface Frame3 {
|
|
1152
1237
|
/** World-space origin of the local frame. */
|
|
1153
|
-
readonly origin:
|
|
1238
|
+
readonly origin: Vector3Data;
|
|
1154
1239
|
/** Unit vector defining the local +X axis. */
|
|
1155
|
-
readonly xAxis:
|
|
1240
|
+
readonly xAxis: Vector3Data;
|
|
1156
1241
|
/** Unit vector defining the local +Y axis. */
|
|
1157
|
-
readonly yAxis:
|
|
1242
|
+
readonly yAxis: Vector3Data;
|
|
1158
1243
|
/** Unit vector defining the local +Z axis. */
|
|
1159
|
-
readonly zAxis:
|
|
1244
|
+
readonly zAxis: Vector3Data;
|
|
1160
1245
|
}
|
|
1161
1246
|
|
|
1162
1247
|
/**
|
|
@@ -1170,7 +1255,7 @@ export declare interface Frame3 {
|
|
|
1170
1255
|
export declare function frameTransform3(
|
|
1171
1256
|
frame: Frame3,
|
|
1172
1257
|
tolerance?: GeometryToleranceOptions,
|
|
1173
|
-
):
|
|
1258
|
+
): Transform3Data;
|
|
1174
1259
|
|
|
1175
1260
|
/**
|
|
1176
1261
|
* Error raised when a geometry precondition or invariant is not satisfied.
|
|
@@ -1287,16 +1372,16 @@ export declare type GridPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
|
1287
1372
|
} & (
|
|
1288
1373
|
| {
|
|
1289
1374
|
/** Positive integer counts on X and Y. */
|
|
1290
|
-
readonly count:
|
|
1375
|
+
readonly count: Vector2Data;
|
|
1291
1376
|
/** Signed millimetres between adjacent copies on X and Y. */
|
|
1292
|
-
readonly spacing:
|
|
1377
|
+
readonly spacing: Vector2Data;
|
|
1293
1378
|
}
|
|
1294
1379
|
| (Dimension extends 3
|
|
1295
1380
|
? {
|
|
1296
1381
|
/** Positive integer counts on X, Y and Z. */
|
|
1297
|
-
readonly count:
|
|
1382
|
+
readonly count: Vector3Data;
|
|
1298
1383
|
/** Signed millimetres between adjacent copies on X, Y and Z. */
|
|
1299
|
-
readonly spacing:
|
|
1384
|
+
readonly spacing: Vector3Data;
|
|
1300
1385
|
}
|
|
1301
1386
|
: never)
|
|
1302
1387
|
);
|
|
@@ -1304,14 +1389,17 @@ export declare type GridPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
|
1304
1389
|
/** Spatial XYZ matrices for an XY or XYZ grid, in X-fastest order. */
|
|
1305
1390
|
export declare function gridPatternTransforms(
|
|
1306
1391
|
options: GridPatternOptions,
|
|
1307
|
-
): readonly
|
|
1392
|
+
): readonly Transform3Data[];
|
|
1308
1393
|
|
|
1309
1394
|
/**
|
|
1310
1395
|
* Builds a closed indexed mesh from a rectilinear top, matched boundary walls, and flat base.
|
|
1396
|
+
*
|
|
1311
1397
|
* Heights run once per grid point after preflight; center-error adds one evaluation per cell.
|
|
1312
1398
|
* Top winding is +Z, the base is -Z, and sides face outward. Coordinates and heights must fit
|
|
1313
1399
|
* Float32 storage. Explicit axes are captured before sampling; shared wall vertices prevent cracks.
|
|
1314
1400
|
*
|
|
1401
|
+
* @see {@link preflightHeightfield}
|
|
1402
|
+
*
|
|
1315
1403
|
* @example Sample a closed wavy mesh
|
|
1316
1404
|
* ```ts
|
|
1317
1405
|
* heightfieldMesh({
|
|
@@ -1341,7 +1429,7 @@ export declare type HeightfieldMeshLimits = Partial<
|
|
|
1341
1429
|
*/
|
|
1342
1430
|
export declare type HeightfieldOptions = {
|
|
1343
1431
|
/** Absolute top Z at the supplied XY point. Every sample must be above baseZ. */
|
|
1344
|
-
readonly height: (point:
|
|
1432
|
+
readonly height: (point: Vector2Data) => number;
|
|
1345
1433
|
/** Flat bottom Z. Defaults to zero. */
|
|
1346
1434
|
readonly baseZ?: number;
|
|
1347
1435
|
/**
|
|
@@ -1354,11 +1442,11 @@ export declare type HeightfieldOptions = {
|
|
|
1354
1442
|
} & (
|
|
1355
1443
|
| {
|
|
1356
1444
|
/** Positive XY footprint for uniform sampling. */
|
|
1357
|
-
readonly size:
|
|
1445
|
+
readonly size: Vector2Data;
|
|
1358
1446
|
/** Exact positive integer X/Y interval counts. */
|
|
1359
1447
|
readonly segments: readonly [x: number, y: number];
|
|
1360
1448
|
/** Lower-left footprint XY. Omitted centers the footprint on XY. */
|
|
1361
|
-
readonly origin?:
|
|
1449
|
+
readonly origin?: Vector2Data;
|
|
1362
1450
|
/** Explicit coordinates cannot be combined with uniform sampling. */
|
|
1363
1451
|
readonly coordinates?: never;
|
|
1364
1452
|
}
|
|
@@ -1382,15 +1470,15 @@ export declare type HeightfieldOptions = {
|
|
|
1382
1470
|
}
|
|
1383
1471
|
);
|
|
1384
1472
|
|
|
1385
|
-
/**
|
|
1473
|
+
/** Exact grid and mesh buffer allocation counts resolved without evaluating the height callback. */
|
|
1386
1474
|
export declare interface HeightfieldPreflight {
|
|
1387
|
-
/** Number of top grid points;
|
|
1475
|
+
/** Number of top grid points; excludes the extra per-cell height evaluations for center-error. */
|
|
1388
1476
|
readonly sampleCount: number;
|
|
1389
1477
|
/** Number of allocated XYZ vertices. */
|
|
1390
1478
|
readonly vertexCount: number;
|
|
1391
1479
|
/** Number of allocated indexed triangles. */
|
|
1392
1480
|
readonly triangleCount: number;
|
|
1393
|
-
/** Total bytes of Float32 positions and Uint32 indices. */
|
|
1481
|
+
/** Total bytes of Float32 positions and Uint32 indices, excluding temporary storage. */
|
|
1394
1482
|
readonly byteCount: number;
|
|
1395
1483
|
}
|
|
1396
1484
|
|
|
@@ -1461,7 +1549,7 @@ export declare interface HelicalThreadSolidMeshOptions extends HelicalThreadRidg
|
|
|
1461
1549
|
readonly bevelTopSize?: number;
|
|
1462
1550
|
}
|
|
1463
1551
|
|
|
1464
|
-
/**
|
|
1552
|
+
/** Selected sampling counts and conservative allocation estimates, before thread mesh construction. */
|
|
1465
1553
|
export declare interface HelicalThreadSolidMeshPreflight {
|
|
1466
1554
|
/** Uniform axial intervals required only by a requested physical segment-length limit. */
|
|
1467
1555
|
readonly axialIntervals: number;
|
|
@@ -1474,7 +1562,7 @@ export declare interface HelicalThreadSolidMeshPreflight {
|
|
|
1474
1562
|
}
|
|
1475
1563
|
|
|
1476
1564
|
/** Identity transform, safe to share because it is frozen. */
|
|
1477
|
-
export declare const IDENTITY_TRANSFORM3:
|
|
1565
|
+
export declare const IDENTITY_TRANSFORM3: Transform3Data;
|
|
1478
1566
|
|
|
1479
1567
|
/** Options for a compensated internal-thread subtraction tool along +Z. */
|
|
1480
1568
|
export declare interface InternalThreadCutterOptions
|
|
@@ -1494,11 +1582,12 @@ export declare interface InternalThreadCutterOptions
|
|
|
1494
1582
|
* @returns A new frozen transform whose composition with the input is identity.
|
|
1495
1583
|
*/
|
|
1496
1584
|
export declare function inverseTransform3(
|
|
1497
|
-
transform:
|
|
1498
|
-
):
|
|
1585
|
+
transform: Transform3Data,
|
|
1586
|
+
): Transform3Data;
|
|
1499
1587
|
|
|
1500
1588
|
/**
|
|
1501
1589
|
* Recognizes structured geometry errors from separately bundled Modeling copies in the same realm.
|
|
1590
|
+
*
|
|
1502
1591
|
* Ordinary errors and unmarked code-shaped objects are rejected. The marker is execution-local and
|
|
1503
1592
|
* does not survive structured cloning; worker protocols carry their own serialized error envelope.
|
|
1504
1593
|
*/
|
|
@@ -1517,35 +1606,128 @@ export declare function joinTriangleMeshes(
|
|
|
1517
1606
|
meshes: readonly TriangleMesh[],
|
|
1518
1607
|
): TriangleMesh;
|
|
1519
1608
|
|
|
1609
|
+
/** Shared knuckle-joint dimensions in millimetres, independent of mounting geometry. */
|
|
1610
|
+
export declare interface KnuckleHingeBaseSpec {
|
|
1611
|
+
/** Total extent along the +X pin axis, centered at the origin. */
|
|
1612
|
+
readonly length: number;
|
|
1613
|
+
/** Number of equal alternating intervals, starting with half A. */
|
|
1614
|
+
readonly knuckleCount: number;
|
|
1615
|
+
/** Outside vertex-sized barrel diameter. */
|
|
1616
|
+
readonly barrelDiameter: number;
|
|
1617
|
+
/** Vertex-sized shaft diameter, including an externally supplied shaft. */
|
|
1618
|
+
readonly pinDiameter: number;
|
|
1619
|
+
/** Nonnegative per-side radial allowance; bores circumscribe this running envelope. */
|
|
1620
|
+
readonly radialClearance: number;
|
|
1621
|
+
/** Nonnegative total air gap between each neighboring pair of knuckle ends. */
|
|
1622
|
+
readonly axialGap: number;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
/** Immutable joint layout and conservative faceted envelopes; no engine initialization. */
|
|
1626
|
+
export declare interface KnuckleHingeDimensions {
|
|
1627
|
+
/** Validated, copied nominal inputs. */
|
|
1628
|
+
readonly spec: KnuckleHingeSpec;
|
|
1629
|
+
/** Nominal outside barrel radius. */
|
|
1630
|
+
readonly barrelRadius: number;
|
|
1631
|
+
/** Maximum shaft radius under any rotation. */
|
|
1632
|
+
readonly pinRadius: number;
|
|
1633
|
+
/** Minimum face-sized bore radius, including radial clearance. */
|
|
1634
|
+
readonly boreRadius: number;
|
|
1635
|
+
/** Maximum radius at the faceted bore vertices. */
|
|
1636
|
+
readonly boreOuterRadius: number;
|
|
1637
|
+
/** Conservative radial wall before outer end chamfers, accounting for both polygons. */
|
|
1638
|
+
readonly minimumBarrelWall: number;
|
|
1639
|
+
/** Equal length of every interval. */
|
|
1640
|
+
readonly knuckleLength: number;
|
|
1641
|
+
/** Common exact full-circle segment count. */
|
|
1642
|
+
readonly segments: number;
|
|
1643
|
+
/** Alternating schedule ordered from negative to positive X. */
|
|
1644
|
+
readonly knuckles: readonly KnuckleHingeInterval[];
|
|
1645
|
+
/** Integral pin interval; null when the consumer supplies an inserted pin. */
|
|
1646
|
+
readonly pin: Readonly<{
|
|
1647
|
+
/** Start coordinate along X, in millimetres. */
|
|
1648
|
+
start: number;
|
|
1649
|
+
/** Total integral shaft length, including material inside A. */
|
|
1650
|
+
length: number;
|
|
1651
|
+
}> | null;
|
|
1652
|
+
/** Origin at the joint center, direction +X, roll guide +Z. */
|
|
1653
|
+
readonly axis: Anchor3;
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
/** One equal-length barrel interval in the shared pin-centered frame. */
|
|
1657
|
+
export declare interface KnuckleHingeInterval {
|
|
1658
|
+
/** Alternating owner, beginning with A at the negative end of X. */
|
|
1659
|
+
readonly side: "a" | "b";
|
|
1660
|
+
/** Start along X, in millimetres. */
|
|
1661
|
+
readonly start: number;
|
|
1662
|
+
/** Axial length, excluding the neighboring gaps. */
|
|
1663
|
+
readonly length: number;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
/** Shared circular sampling for barrels, shafts, and bores. */
|
|
1667
|
+
export declare interface KnuckleHingeSamplingOptions {
|
|
1668
|
+
/** Exact full-circle count, divisible by four and at least four; overrides adaptive sampling. */
|
|
1669
|
+
readonly segments?: number;
|
|
1670
|
+
/** Physical tessellation policy. Exact circular counts must also be divisible by four. */
|
|
1671
|
+
readonly resolution?: GeometryResolution;
|
|
1672
|
+
/** Explicit allocation ceilings; defaults to the pure geometry sampling limits. */
|
|
1673
|
+
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* Knuckle-joint construction modes and interval ownership.
|
|
1678
|
+
*
|
|
1679
|
+
* Print-in-place requires an odd count of at least three: A owns both
|
|
1680
|
+
* end anchors and the entire shaft. Inserted-pin bores both halves and supplies no shaft.
|
|
1681
|
+
* Lift-off requires exactly two intervals; A's integral pin enters B without a far anchor.
|
|
1682
|
+
*/
|
|
1683
|
+
export declare type KnuckleHingeSpec = KnuckleHingeBaseSpec &
|
|
1684
|
+
(
|
|
1685
|
+
| {
|
|
1686
|
+
/** Captive integral shaft or bores for an externally supplied pin. */
|
|
1687
|
+
readonly mode: "print-in-place" | "inserted-pin";
|
|
1688
|
+
/** Engagement applies only to lift-off construction. */
|
|
1689
|
+
readonly pinEngagement?: never;
|
|
1690
|
+
}
|
|
1691
|
+
| {
|
|
1692
|
+
/** Detachable socket on a finite integral pin. */
|
|
1693
|
+
readonly mode: "lift-off";
|
|
1694
|
+
/** Lift-off has one fixed interval and one removable interval. */
|
|
1695
|
+
readonly knuckleCount: 2;
|
|
1696
|
+
/** Positive axial engagement into B, no greater than its knuckle length. */
|
|
1697
|
+
readonly pinEngagement: number;
|
|
1698
|
+
}
|
|
1699
|
+
);
|
|
1700
|
+
|
|
1520
1701
|
/**
|
|
1521
1702
|
* Returns immutable translations for a +X row of finite XYZ bounds with a nonnegative gap.
|
|
1703
|
+
*
|
|
1522
1704
|
* Each minimum Y/Z becomes zero, and the first minimum X becomes zero. Supply bounds after
|
|
1523
1705
|
* any intended part rotation; translations apply to those bounds. An empty input returns [].
|
|
1524
1706
|
*/
|
|
1525
1707
|
export declare function layoutRow(
|
|
1526
|
-
bounds: readonly
|
|
1708
|
+
bounds: readonly Bounds3Data[],
|
|
1527
1709
|
options?: RowLayoutOptions,
|
|
1528
|
-
): readonly
|
|
1710
|
+
): readonly Vector3Data[];
|
|
1529
1711
|
|
|
1530
1712
|
/** Returns Euclidean vector length in the vector's coordinate units. */
|
|
1531
|
-
export declare const length2: (vector:
|
|
1713
|
+
export declare const length2: (vector: Vector2Data) => number;
|
|
1532
1714
|
|
|
1533
1715
|
/** Returns Euclidean vector length in the vector's coordinate units. */
|
|
1534
|
-
export declare const length3: (vector:
|
|
1716
|
+
export declare const length3: (vector: Vector3Data) => number;
|
|
1535
1717
|
|
|
1536
1718
|
/** Linearly interpolates two vectors; `t` is dimensionless and may extrapolate. */
|
|
1537
1719
|
export declare const lerp2: (
|
|
1538
|
-
a:
|
|
1539
|
-
b:
|
|
1720
|
+
a: Vector2Data,
|
|
1721
|
+
b: Vector2Data,
|
|
1540
1722
|
t: number,
|
|
1541
|
-
) =>
|
|
1723
|
+
) => Vector2Data;
|
|
1542
1724
|
|
|
1543
1725
|
/** Linearly interpolates two vectors; `t` is dimensionless and may extrapolate. */
|
|
1544
1726
|
export declare const lerp3: (
|
|
1545
|
-
a:
|
|
1546
|
-
b:
|
|
1727
|
+
a: Vector3Data,
|
|
1728
|
+
b: Vector3Data,
|
|
1547
1729
|
t: number,
|
|
1548
|
-
) =>
|
|
1730
|
+
) => Vector3Data;
|
|
1549
1731
|
|
|
1550
1732
|
/**
|
|
1551
1733
|
* Equal linear intervals determined by exactly two of count, spacing and total length.
|
|
@@ -1584,16 +1766,16 @@ export declare type LinearPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
|
1584
1766
|
/** Spatial XYZ matrix placements in millimetres, including the original at the origin. */
|
|
1585
1767
|
export declare function linearPatternTransforms(
|
|
1586
1768
|
options: LinearPatternOptions,
|
|
1587
|
-
): readonly
|
|
1769
|
+
): readonly Transform3Data[];
|
|
1588
1770
|
|
|
1589
1771
|
/** Straight planar curve in millimetres. */
|
|
1590
1772
|
export declare interface LineCurve2 {
|
|
1591
1773
|
/** Selects straight interpolation between the two endpoints. */
|
|
1592
1774
|
readonly kind: "line";
|
|
1593
1775
|
/** Initial XY point in millimetres. */
|
|
1594
|
-
readonly start:
|
|
1776
|
+
readonly start: Vector2Data;
|
|
1595
1777
|
/** Final XY point in millimetres. */
|
|
1596
|
-
readonly end:
|
|
1778
|
+
readonly end: Vector2Data;
|
|
1597
1779
|
}
|
|
1598
1780
|
|
|
1599
1781
|
/** Straight spatial curve in millimetres. */
|
|
@@ -1601,9 +1783,9 @@ export declare interface LineCurve3 {
|
|
|
1601
1783
|
/** Selects straight interpolation between the two endpoints. */
|
|
1602
1784
|
readonly kind: "line";
|
|
1603
1785
|
/** Initial XYZ point in millimetres. */
|
|
1604
|
-
readonly start:
|
|
1786
|
+
readonly start: Vector3Data;
|
|
1605
1787
|
/** Final XYZ point in millimetres. */
|
|
1606
|
-
readonly end:
|
|
1788
|
+
readonly end: Vector3Data;
|
|
1607
1789
|
}
|
|
1608
1790
|
|
|
1609
1791
|
/**
|
|
@@ -1687,6 +1869,7 @@ export declare type LoftPlacement =
|
|
|
1687
1869
|
|
|
1688
1870
|
/**
|
|
1689
1871
|
* Explicitly matches identified component/contour/span topology across a family.
|
|
1872
|
+
*
|
|
1690
1873
|
* Every paired span uses the maximum physical subdivision count requested by any member.
|
|
1691
1874
|
* Cubics share a checked uniform parameter grid, including grids selected by exact paired requests.
|
|
1692
1875
|
* Input order and winding are preserved. Collapsed spans retain repeated logical slots, which
|
|
@@ -1734,7 +1917,7 @@ export declare function measureInternalCylindricalGearPairMotion(
|
|
|
1734
1917
|
* @returns Fresh immutable minimum and maximum XYZ tuples.
|
|
1735
1918
|
* @throws {@link GeometryError} When the mesh is structurally invalid.
|
|
1736
1919
|
*/
|
|
1737
|
-
export declare const meshBounds: (mesh: TriangleMesh) =>
|
|
1920
|
+
export declare const meshBounds: (mesh: TriangleMesh) => Bounds3Data;
|
|
1738
1921
|
|
|
1739
1922
|
/**
|
|
1740
1923
|
* Curated metric modeling dimensions for clearance holes, regular hex nuts,
|
|
@@ -1765,7 +1948,7 @@ export declare const METRIC_FASTENER_STANDARDS: Readonly<{
|
|
|
1765
1948
|
M12: MetricFastenerStandard;
|
|
1766
1949
|
}>;
|
|
1767
1950
|
|
|
1768
|
-
/**
|
|
1951
|
+
/** Supported metric fastener sizes. */
|
|
1769
1952
|
export declare type MetricFastenerSize =
|
|
1770
1953
|
"M2" | "M2.5" | "M3" | "M4" | "M5" | "M6" | "M8" | "M10" | "M12";
|
|
1771
1954
|
|
|
@@ -1825,23 +2008,25 @@ export declare interface ModelingLimits extends GeometrySamplingLimits {
|
|
|
1825
2008
|
|
|
1826
2009
|
/**
|
|
1827
2010
|
* Returns a unit vector; `epsilon` is a finite, non-negative length threshold (default `1e-12`).
|
|
2011
|
+
*
|
|
1828
2012
|
* Rejects invalid thresholds, nonfinite lengths, and lengths at or below the threshold with
|
|
1829
2013
|
* `INVALID_TOLERANCE`, `NON_FINITE_VALUE`, and `DEGENERATE_GEOMETRY` respectively.
|
|
1830
2014
|
*/
|
|
1831
2015
|
export declare const normalize2: (
|
|
1832
|
-
vector:
|
|
2016
|
+
vector: Vector2Data,
|
|
1833
2017
|
epsilon?: number,
|
|
1834
|
-
) =>
|
|
2018
|
+
) => Vector2Data;
|
|
1835
2019
|
|
|
1836
2020
|
/**
|
|
1837
2021
|
* Returns a unit vector; `epsilon` is a finite, non-negative length threshold (default `1e-12`).
|
|
2022
|
+
*
|
|
1838
2023
|
* Rejects invalid thresholds, nonfinite lengths, and lengths at or below the threshold with
|
|
1839
2024
|
* `INVALID_TOLERANCE`, `NON_FINITE_VALUE`, and `DEGENERATE_GEOMETRY` respectively.
|
|
1840
2025
|
*/
|
|
1841
2026
|
export declare const normalize3: (
|
|
1842
|
-
vector:
|
|
2027
|
+
vector: Vector3Data,
|
|
1843
2028
|
epsilon?: number,
|
|
1844
|
-
) =>
|
|
2029
|
+
) => Vector3Data;
|
|
1845
2030
|
|
|
1846
2031
|
/**
|
|
1847
2032
|
* Cleans and validates one closed loop.
|
|
@@ -1852,7 +2037,7 @@ export declare const normalize3: (
|
|
|
1852
2037
|
* returned unchanged when their winding and tolerance policy match.
|
|
1853
2038
|
*/
|
|
1854
2039
|
export declare function normalizeContour(
|
|
1855
|
-
input: readonly
|
|
2040
|
+
input: readonly Vector2Data[],
|
|
1856
2041
|
counterClockwise: boolean,
|
|
1857
2042
|
tolerance?: GeometryToleranceOptions,
|
|
1858
2043
|
): Contour;
|
|
@@ -1902,11 +2087,11 @@ export declare interface Path2 {
|
|
|
1902
2087
|
readonly dimension: 2;
|
|
1903
2088
|
/** Whether traversal includes the last-to-first edge. */
|
|
1904
2089
|
readonly closed: boolean;
|
|
1905
|
-
/** Returns frozen
|
|
1906
|
-
|
|
2090
|
+
/** Returns complete deeply frozen path data, including dimension and closure. Repeated calls do not allocate. */
|
|
2091
|
+
toData(): Path2Data;
|
|
1907
2092
|
/** Total sampled edge length in model units, including the closing edge when closed. */
|
|
1908
2093
|
length(): number;
|
|
1909
|
-
/**
|
|
2094
|
+
/** Immutable axis-aligned bounds, or undefined for an empty path. */
|
|
1910
2095
|
bounds(): Bounds2 | undefined;
|
|
1911
2096
|
/** Finds the nearest edge location; requires at least two vertices. */
|
|
1912
2097
|
closestPoint(point: Vector2Input): PathLocation<Vector2>;
|
|
@@ -1920,19 +2105,29 @@ export declare interface Path2 {
|
|
|
1920
2105
|
|
|
1921
2106
|
/**
|
|
1922
2107
|
* Snapshots finite XY coordinates as an immutable sampled path, independent of engine initialization.
|
|
2108
|
+
*
|
|
1923
2109
|
* Open paths may be empty or have one point; closed paths need three vertices and omit a duplicated
|
|
1924
2110
|
* seam. Repeated adjacent vertices are retained. No winding normalization or filling is performed.
|
|
1925
2111
|
* Malformed dimensions or topology throw INVALID_ARGUMENT; nonfinite coordinates or measurement
|
|
1926
2112
|
* overflow throw NON_FINITE_VALUE; exhausted allocation ceilings throw COMPLEXITY_LIMIT GeometryError.
|
|
1927
2113
|
* A path input retains its closure. Limits bound construction only; resampling takes its own limits.
|
|
2114
|
+
*
|
|
2115
|
+
* Use `toData()` for a frozen record that restores coordinates, closure, and dimension together.
|
|
1928
2116
|
*/
|
|
1929
2117
|
export declare function path2(input: Path2Input, options?: PathOptions): Path2;
|
|
1930
2118
|
|
|
1931
|
-
/**
|
|
1932
|
-
export declare
|
|
2119
|
+
/** Complete plain XY path representation, including topology and empty-path dimensional identity. */
|
|
2120
|
+
export declare interface Path2Data {
|
|
2121
|
+
/** Coordinate dimension, retained even when points is empty. */
|
|
2122
|
+
readonly dimension: 2;
|
|
2123
|
+
/** Frozen or caller-owned XY coordinates; closed paths omit a duplicated seam. */
|
|
2124
|
+
readonly points: readonly Vector2Data[];
|
|
2125
|
+
/** Whether traversal includes the last-to-first edge. */
|
|
2126
|
+
readonly closed: boolean;
|
|
2127
|
+
}
|
|
1933
2128
|
|
|
1934
|
-
/**
|
|
1935
|
-
export declare type Path2Input = Path2 | readonly Vector2Input[];
|
|
2129
|
+
/** A matching path value, complete plain path data, or a collection of vectors. */
|
|
2130
|
+
export declare type Path2Input = Path2 | Path2Data | readonly Vector2Input[];
|
|
1936
2131
|
|
|
1937
2132
|
/** Immutable directed XYZ polyline; it represents sampled edges, not an analytic curve. */
|
|
1938
2133
|
export declare interface Path3 {
|
|
@@ -1940,11 +2135,11 @@ export declare interface Path3 {
|
|
|
1940
2135
|
readonly dimension: 3;
|
|
1941
2136
|
/** Whether traversal includes the last-to-first edge. */
|
|
1942
2137
|
readonly closed: boolean;
|
|
1943
|
-
/** Returns frozen
|
|
1944
|
-
|
|
2138
|
+
/** Returns complete deeply frozen path data, including dimension and closure. Repeated calls do not allocate. */
|
|
2139
|
+
toData(): Path3Data;
|
|
1945
2140
|
/** Total sampled edge length in model units, including the closing edge when closed. */
|
|
1946
2141
|
length(): number;
|
|
1947
|
-
/**
|
|
2142
|
+
/** Immutable axis-aligned bounds, or undefined for an empty path. */
|
|
1948
2143
|
bounds(): Bounds3 | undefined;
|
|
1949
2144
|
/** Finds the nearest edge location; requires at least two vertices. */
|
|
1950
2145
|
closestPoint(point: Vector3Input): PathLocation<Vector3>;
|
|
@@ -1959,25 +2154,34 @@ export declare interface Path3 {
|
|
|
1959
2154
|
/**
|
|
1960
2155
|
* Snapshots finite XYZ coordinates as an immutable sampled path with the same closure, seam,
|
|
1961
2156
|
* allocation and error rules as path2. Analytic curves must be sampled explicitly first.
|
|
2157
|
+
*
|
|
2158
|
+
* Use `toData()` for a frozen record that restores coordinates, closure, and dimension together.
|
|
2159
|
+
*
|
|
2160
|
+
* @see {@link path2} for shared construction rules.
|
|
1962
2161
|
*/
|
|
1963
2162
|
export declare function path3(input: Path3Input, options?: PathOptions): Path3;
|
|
1964
2163
|
|
|
1965
|
-
/**
|
|
1966
|
-
|
|
1967
|
-
*/
|
|
1968
|
-
|
|
2164
|
+
/** Complete plain XYZ path representation, including topology and empty-path dimensional identity. */
|
|
2165
|
+
export declare interface Path3Data {
|
|
2166
|
+
/** Coordinate dimension, retained even when points is empty. */
|
|
2167
|
+
readonly dimension: 3;
|
|
2168
|
+
/** Frozen or caller-owned XYZ coordinates; closed paths omit a duplicated seam. */
|
|
2169
|
+
readonly points: readonly Vector3Data[];
|
|
2170
|
+
/** Whether traversal includes the last-to-first edge. */
|
|
2171
|
+
readonly closed: boolean;
|
|
2172
|
+
}
|
|
1969
2173
|
|
|
1970
|
-
/**
|
|
1971
|
-
export declare type Path3Input = Path3 | readonly Vector3Input[];
|
|
2174
|
+
/** A matching path value, complete plain path data, or a collection of vectors. */
|
|
2175
|
+
export declare type Path3Input = Path3 | Path3Data | readonly Vector3Input[];
|
|
1972
2176
|
|
|
1973
2177
|
/** Orthonormal right-handed frame sampled along a path. */
|
|
1974
2178
|
export declare interface PathFrame {
|
|
1975
2179
|
/** Unit path tangent. */
|
|
1976
|
-
readonly tangent:
|
|
2180
|
+
readonly tangent: Vector3Data;
|
|
1977
2181
|
/** Unit transported profile X axis. */
|
|
1978
|
-
readonly normal:
|
|
2182
|
+
readonly normal: Vector3Data;
|
|
1979
2183
|
/** Unit profile Y axis equal to tangent × normal. */
|
|
1980
|
-
readonly binormal:
|
|
2184
|
+
readonly binormal: Vector3Data;
|
|
1981
2185
|
}
|
|
1982
2186
|
|
|
1983
2187
|
/** Nearest location on a sampled boundary, rather than inside a filled shape or on an analytic curve. */
|
|
@@ -2000,7 +2204,7 @@ export declare interface PathLocation<Point extends Vector2 | Vector3> {
|
|
|
2000
2204
|
* @returns A finite guide vector that is not parallel to the local path tangent.
|
|
2001
2205
|
*/
|
|
2002
2206
|
export declare type PathNormalGuide = (
|
|
2003
|
-
point:
|
|
2207
|
+
point: Vector3Data,
|
|
2004
2208
|
index: number,
|
|
2005
2209
|
) => Vector3Input;
|
|
2006
2210
|
|
|
@@ -2023,7 +2227,9 @@ export declare interface PathPatternOptions {
|
|
|
2023
2227
|
}
|
|
2024
2228
|
|
|
2025
2229
|
/**
|
|
2026
|
-
* Equal physical arc-length placements along a sampled XYZ path.
|
|
2230
|
+
* Equal physical arc-length placements along a sampled XYZ path.
|
|
2231
|
+
*
|
|
2232
|
+
* Tangent orientation maps +Z
|
|
2027
2233
|
* onto the local path tangent; fixed orientation only translates. Closed paths omit a repeated seam.
|
|
2028
2234
|
* Explicit sampling ceilings bound both input points and output placements.
|
|
2029
2235
|
*/
|
|
@@ -2031,14 +2237,14 @@ export declare function pathPatternTransforms(
|
|
|
2031
2237
|
path: Path3Input,
|
|
2032
2238
|
options: PathPatternOptions,
|
|
2033
2239
|
limits?: Partial<GeometrySamplingLimits>,
|
|
2034
|
-
): readonly
|
|
2240
|
+
): readonly Transform3Data[];
|
|
2035
2241
|
|
|
2036
2242
|
/** Position and unit tangent for one path-distributed item. */
|
|
2037
2243
|
export declare interface PathPlacement {
|
|
2038
2244
|
/** Interpolated point on the sampled path. */
|
|
2039
|
-
readonly position:
|
|
2245
|
+
readonly position: Vector3Data;
|
|
2040
2246
|
/** Unit tangent of the path segment containing the placement. */
|
|
2041
|
-
readonly tangent:
|
|
2247
|
+
readonly tangent: Vector3Data;
|
|
2042
2248
|
}
|
|
2043
2249
|
|
|
2044
2250
|
/** Equal arc-length sampling; the path itself owns whether its closing edge is included. */
|
|
@@ -2137,7 +2343,7 @@ export declare interface PlanarPatchQuality {
|
|
|
2137
2343
|
/** Smallest interior triangle angle in degrees. */
|
|
2138
2344
|
readonly minimumTriangleAngleDegrees: number;
|
|
2139
2345
|
/** Consistently wound unit normal for the patch plane. */
|
|
2140
|
-
readonly normal:
|
|
2346
|
+
readonly normal: Vector3Data;
|
|
2141
2347
|
/** Plane offset in `dot(normal, position) = planeOffset` form, in model units. */
|
|
2142
2348
|
readonly planeOffset: number;
|
|
2143
2349
|
/** Total patch area in squared model units. */
|
|
@@ -2149,11 +2355,14 @@ export declare interface PlanarPatchQuality {
|
|
|
2149
2355
|
}
|
|
2150
2356
|
|
|
2151
2357
|
/**
|
|
2152
|
-
* One
|
|
2358
|
+
* One filled two-dimensional polygon with an exterior and optional holes.
|
|
2153
2359
|
*
|
|
2154
2360
|
* `outer` is counter-clockwise and each hole is clockwise. Boundary arrays omit
|
|
2155
2361
|
* their duplicated closing point. Holes must lie inside `outer` and must not
|
|
2156
2362
|
* intersect each other or the exterior.
|
|
2363
|
+
*
|
|
2364
|
+
* @see {@link Contour}
|
|
2365
|
+
* @see {@link RegionData}
|
|
2157
2366
|
*/
|
|
2158
2367
|
export declare interface PolygonData {
|
|
2159
2368
|
/** Clockwise interior boundaries, each omitting its duplicated closing point. */
|
|
@@ -2172,31 +2381,63 @@ export declare interface PolylineResamplingOptions extends CurveSamplingOptions
|
|
|
2172
2381
|
readonly closed?: boolean;
|
|
2173
2382
|
}
|
|
2174
2383
|
|
|
2175
|
-
/**
|
|
2384
|
+
/**
|
|
2385
|
+
* Checks grid options, Float32 axis precision, and output limits; returns exact mesh buffer counts.
|
|
2386
|
+
*
|
|
2387
|
+
* This pure operation needs no engine and neither evaluates `height` nor allocates mesh buffers.
|
|
2388
|
+
* Successful preflight leaves height values, Float32 base storage, and generated mesh validity to
|
|
2389
|
+
* construction. `byteCount` covers position and index buffers, not total working memory.
|
|
2390
|
+
*
|
|
2391
|
+
* @see {@link heightfieldMesh}
|
|
2392
|
+
*/
|
|
2176
2393
|
export declare function preflightHeightfield(
|
|
2177
2394
|
options: HeightfieldOptions,
|
|
2178
2395
|
limits?: HeightfieldMeshLimits,
|
|
2179
2396
|
): HeightfieldPreflight;
|
|
2180
2397
|
|
|
2181
2398
|
/**
|
|
2182
|
-
*
|
|
2183
|
-
*
|
|
2399
|
+
* Checks thread dimensions, profile, end treatments, sampling, and conservative estimates against output limits.
|
|
2400
|
+
*
|
|
2401
|
+
* This pure operation needs no engine and constructs planning data without vertex or index buffers.
|
|
2402
|
+
* `circularSegments` is the selected count; row and triangle counts are conservative estimates.
|
|
2403
|
+
* Successful preflight leaves generated coordinate and topology checks to mesh construction.
|
|
2404
|
+
*
|
|
2405
|
+
* @see {@link helicalThreadSolidMesh}
|
|
2184
2406
|
*/
|
|
2185
2407
|
export declare function preflightHelicalThreadSolidMesh(
|
|
2186
2408
|
options: HelicalThreadSolidMeshOptions,
|
|
2187
2409
|
): HelicalThreadSolidMeshPreflight;
|
|
2188
2410
|
|
|
2189
|
-
/**
|
|
2411
|
+
/**
|
|
2412
|
+
* Resolves compensated cutter dimensions and checks extended mesh estimates against output limits.
|
|
2413
|
+
*
|
|
2414
|
+
* This pure operation uses explicit resolution and limits or package defaults, without an active
|
|
2415
|
+
* host execution. It includes the cutter's one-pitch extension beyond each requested face and
|
|
2416
|
+
* creates planning data without mesh buffers or native objects. Row and triangle counts are
|
|
2417
|
+
* estimates; mesh validity and native construction are checked later.
|
|
2418
|
+
*
|
|
2419
|
+
* @see {@link preflightHelicalThreadSolidMesh}
|
|
2420
|
+
* @see {@link helicalThreadSolidMesh}
|
|
2421
|
+
*/
|
|
2190
2422
|
export declare function preflightInternalThreadCutter(
|
|
2191
2423
|
options: InternalThreadCutterOptions,
|
|
2192
2424
|
): HelicalThreadSolidMeshPreflight;
|
|
2193
2425
|
|
|
2194
2426
|
/**
|
|
2195
|
-
*
|
|
2427
|
+
* Parses and validates bounded SVG input, constructing its normalized sampled region and diagnostics.
|
|
2428
|
+
*
|
|
2429
|
+
* This pure operation performs curve flattening, fill and stroke construction, and polygon union;
|
|
2430
|
+
* it needs no browser or engine. Geometry counts measure the returned region at the selected
|
|
2431
|
+
* resolution, rather than predicting later mesh allocation. With `fit`, painted bounds are
|
|
2432
|
+
* uniformly centered inside the target and adaptive sampling remains in final millimetres.
|
|
2433
|
+
* Refinement runs at most eight bounded import passes; exact circular counts retain precedence.
|
|
2434
|
+
* Without `fit` the region may be empty. Tiny-island and short-edge indicators do not establish
|
|
2435
|
+
* manufacturability or later solid validity.
|
|
2196
2436
|
*
|
|
2197
2437
|
* @param svg - Complete SVG XML source, limited to 256 KiB of UTF-8.
|
|
2198
2438
|
* @param options - Physical flattening and viewport-origin controls.
|
|
2199
2439
|
* @returns The canonical normalized region plus bounded source, topology, and safe-repair facts.
|
|
2440
|
+
* @throws {@link GeometryError} When XML, supported-feature, geometry, or complexity checks fail.
|
|
2200
2441
|
*/
|
|
2201
2442
|
export declare function preflightSvgRegion(
|
|
2202
2443
|
svg: string,
|
|
@@ -2204,14 +2445,29 @@ export declare function preflightSvgRegion(
|
|
|
2204
2445
|
): SvgRegionPreflight;
|
|
2205
2446
|
|
|
2206
2447
|
/**
|
|
2207
|
-
*
|
|
2208
|
-
*
|
|
2448
|
+
* Checks nut dimensions, chamfers, end-face wall, and the extended compensated cutter's allocation plan.
|
|
2449
|
+
*
|
|
2450
|
+
* This pure operation uses explicit resolution and limits or package defaults, without an active
|
|
2451
|
+
* host execution. It resolves body/cutter dimensions without mesh buffers or native objects.
|
|
2452
|
+
* `thread` contains conservative cutter estimates, excluding the body and Boolean result.
|
|
2453
|
+
* Successful preflight leaves mesh validity, native construction, and manufacturing fit to later checks.
|
|
2454
|
+
*
|
|
2455
|
+
* @see {@link preflightHelicalThreadSolidMesh}
|
|
2209
2456
|
*/
|
|
2210
2457
|
export declare function preflightThreadedNut(
|
|
2211
2458
|
options: ThreadedNutOptions,
|
|
2212
2459
|
): ThreadedNutPreflight;
|
|
2213
2460
|
|
|
2214
|
-
/**
|
|
2461
|
+
/**
|
|
2462
|
+
* Resolves compensated rod dimensions and checks conservative mesh estimates against output limits.
|
|
2463
|
+
*
|
|
2464
|
+
* This pure operation uses explicit resolution and limits or package defaults, without an active
|
|
2465
|
+
* host execution. It creates planning data without mesh buffers or native objects; returned row
|
|
2466
|
+
* and triangle counts are estimates. Mesh validity and native construction are checked later.
|
|
2467
|
+
*
|
|
2468
|
+
* @see {@link preflightHelicalThreadSolidMesh}
|
|
2469
|
+
* @see {@link helicalThreadSolidMesh}
|
|
2470
|
+
*/
|
|
2215
2471
|
export declare function preflightThreadedRod(
|
|
2216
2472
|
options: ThreadedRodOptions,
|
|
2217
2473
|
): HelicalThreadSolidMeshPreflight;
|
|
@@ -2266,7 +2522,13 @@ export declare interface PrintableThreadFitPolicy {
|
|
|
2266
2522
|
readonly maleRadialInset: number;
|
|
2267
2523
|
}
|
|
2268
2524
|
|
|
2269
|
-
/**
|
|
2525
|
+
/**
|
|
2526
|
+
* An explicit component/contour/span topology, before shared family sampling with matchProfiles.
|
|
2527
|
+
* Component, contour and span identities establish correspondence across a loft or sweep family.
|
|
2528
|
+
*
|
|
2529
|
+
* @see {@link CorrespondingProfile}
|
|
2530
|
+
* @see {@link matchProfiles}
|
|
2531
|
+
*/
|
|
2270
2532
|
export declare interface Profile {
|
|
2271
2533
|
/** Ordered components with explicit contour identities. */
|
|
2272
2534
|
readonly components: readonly ProfileComponent2[];
|
|
@@ -2282,7 +2544,13 @@ export declare interface ProfileComponent2 {
|
|
|
2282
2544
|
readonly holes: readonly ProfileContour2[];
|
|
2283
2545
|
}
|
|
2284
2546
|
|
|
2285
|
-
/**
|
|
2547
|
+
/**
|
|
2548
|
+
* An identified closed boundary of curve spans, before shared family sampling.
|
|
2549
|
+
* Outer winding is CCW and hole winding is CW. matchProfiles retains span identities in sampled contours.
|
|
2550
|
+
*
|
|
2551
|
+
* @see {@link Contour} for sampled point coordinates.
|
|
2552
|
+
* @see {@link CorrespondingContour} for sampled coordinates with correspondence metadata.
|
|
2553
|
+
*/
|
|
2286
2554
|
export declare interface ProfileContour2 {
|
|
2287
2555
|
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
2288
2556
|
readonly id: string;
|
|
@@ -2299,7 +2567,7 @@ export declare interface ProfiledEdgeTreatment {
|
|
|
2299
2567
|
* First coordinates decrease and second coordinates increase. Cylinder/extrusion ends use
|
|
2300
2568
|
* cap inset first, side setback second; planar corners use incoming then outgoing edges.
|
|
2301
2569
|
*/
|
|
2302
|
-
readonly profile: readonly
|
|
2570
|
+
readonly profile: readonly Vector2Data[];
|
|
2303
2571
|
}
|
|
2304
2572
|
|
|
2305
2573
|
/** An identified line, circular arc, or cubic Bézier between corresponding landmarks. */
|
|
@@ -2315,15 +2583,15 @@ export declare type ProfileSpan2 = {
|
|
|
2315
2583
|
/** Selects a straight span. */
|
|
2316
2584
|
readonly kind: "line";
|
|
2317
2585
|
/** Start point in millimetres. */
|
|
2318
|
-
readonly start:
|
|
2586
|
+
readonly start: Vector2Data;
|
|
2319
2587
|
/** End point in millimetres. */
|
|
2320
|
-
readonly end:
|
|
2588
|
+
readonly end: Vector2Data;
|
|
2321
2589
|
}
|
|
2322
2590
|
| {
|
|
2323
2591
|
/** Selects the geometric curve or span family. */
|
|
2324
2592
|
readonly kind: "arc";
|
|
2325
2593
|
/** Center point in millimetres. */
|
|
2326
|
-
readonly center:
|
|
2594
|
+
readonly center: Vector2Data;
|
|
2327
2595
|
/** Circular radius in millimetres. */
|
|
2328
2596
|
readonly radius: number;
|
|
2329
2597
|
/** Initial counterclockwise angle in degrees. */
|
|
@@ -2335,21 +2603,21 @@ export declare type ProfileSpan2 = {
|
|
|
2335
2603
|
/** Selects a cubic Bézier span with the same coordinates as CubicBezierCurve2. */
|
|
2336
2604
|
readonly kind: "cubic";
|
|
2337
2605
|
/** Start point in millimetres. */
|
|
2338
|
-
readonly start:
|
|
2606
|
+
readonly start: Vector2Data;
|
|
2339
2607
|
/** First control point in millimetres. */
|
|
2340
|
-
readonly control1:
|
|
2608
|
+
readonly control1: Vector2Data;
|
|
2341
2609
|
/** Second control point in millimetres. */
|
|
2342
|
-
readonly control2:
|
|
2610
|
+
readonly control2: Vector2Data;
|
|
2343
2611
|
/** End point in millimetres. */
|
|
2344
|
-
readonly end:
|
|
2612
|
+
readonly end: Vector2Data;
|
|
2345
2613
|
}
|
|
2346
2614
|
);
|
|
2347
2615
|
|
|
2348
2616
|
/** Removes the component parallel to a normalized plane normal. */
|
|
2349
2617
|
export declare const projectOntoPlane3: (
|
|
2350
|
-
vector:
|
|
2351
|
-
normal:
|
|
2352
|
-
) =>
|
|
2618
|
+
vector: Vector3Data,
|
|
2619
|
+
normal: Vector3Data,
|
|
2620
|
+
) => Vector3Data;
|
|
2353
2621
|
|
|
2354
2622
|
/** Resolved pitch-line dimensions for a finite rack segment. */
|
|
2355
2623
|
export declare interface RackPitchDimensions {
|
|
@@ -2412,7 +2680,7 @@ export declare type RadialPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
|
2412
2680
|
/** Rotations about an explicit axis; angles use degrees and the first placement is identity. */
|
|
2413
2681
|
export declare function radialPatternTransforms(
|
|
2414
2682
|
options: RadialPatternOptions,
|
|
2415
|
-
): readonly
|
|
2683
|
+
): readonly Transform3Data[];
|
|
2416
2684
|
|
|
2417
2685
|
/** Radial dimensions refer to polygon vertices or compensate faceting to meet polygon faces. */
|
|
2418
2686
|
export declare type RadialSizing = "vertex" | "face";
|
|
@@ -2428,7 +2696,11 @@ export declare interface RadialSizingOptions {
|
|
|
2428
2696
|
}
|
|
2429
2697
|
|
|
2430
2698
|
/**
|
|
2431
|
-
* Creates an immutable CCW rectangle
|
|
2699
|
+
* Creates an immutable sampled CCW rectangle boundary. Round radius zero is square; tangent saturated endpoints occur once.
|
|
2700
|
+
*
|
|
2701
|
+
* Use [rectangle](/docs/reference/model/rectangle) for a filled Section.
|
|
2702
|
+
*
|
|
2703
|
+
* @see {@link rectangleProfile} for identified edge/corner spans used by matchProfiles.
|
|
2432
2704
|
*
|
|
2433
2705
|
* @example Rounded rectangle outline
|
|
2434
2706
|
* ```ts
|
|
@@ -2444,7 +2716,7 @@ export declare function rectangleContour(
|
|
|
2444
2716
|
*/
|
|
2445
2717
|
export declare interface RectangleContourOptions {
|
|
2446
2718
|
/** Positive uniform size or explicit XY extents in millimetres. */
|
|
2447
|
-
readonly size: number |
|
|
2719
|
+
readonly size: number | Vector2Data;
|
|
2448
2720
|
/** Center on XY; otherwise the minimum corner is the origin. Defaults to true. */
|
|
2449
2721
|
readonly center?: boolean;
|
|
2450
2722
|
/** Uniform treatment or four corner treatments. Exact round segments describe a complete circle and must divide by four. */
|
|
@@ -2472,6 +2744,11 @@ export declare type RectangleCornerTreatments = readonly [
|
|
|
2472
2744
|
/**
|
|
2473
2745
|
* Creates an identified rectangle whose edge/corner spans survive zero and saturated round radii. Outer winding is CCW.
|
|
2474
2746
|
*
|
|
2747
|
+
* Use [rectangle](/docs/reference/model/rectangle) for a filled Section.
|
|
2748
|
+
*
|
|
2749
|
+
* @see {@link matchProfiles} to sample a family with shared landmark correspondence.
|
|
2750
|
+
* @see {@link rectangleContour} for sampled boundary coordinates.
|
|
2751
|
+
*
|
|
2475
2752
|
* @example Retain rectangle landmarks
|
|
2476
2753
|
* ```ts
|
|
2477
2754
|
* rectangleProfile({ size: [30, 20], treatment: { kind: "round", radius: 3 } });
|
|
@@ -2500,9 +2777,14 @@ export declare interface RectangleProfileOptions extends RectangleContourOptions
|
|
|
2500
2777
|
export declare function regionArea(region: RegionData): number;
|
|
2501
2778
|
|
|
2502
2779
|
/** Returns finite axis-aligned bounds for a non-empty region. */
|
|
2503
|
-
export declare function regionBounds(region: RegionData):
|
|
2780
|
+
export declare function regionBounds(region: RegionData): Bounds2Data;
|
|
2504
2781
|
|
|
2505
|
-
/**
|
|
2782
|
+
/**
|
|
2783
|
+
* A two-dimensional region represented by disjoint filled polygons.
|
|
2784
|
+
* Each PolygonData owns one exterior and its holes; an empty region contains no material.
|
|
2785
|
+
*
|
|
2786
|
+
* @see {@link PolygonData}
|
|
2787
|
+
*/
|
|
2506
2788
|
export declare type RegionData = readonly PolygonData[];
|
|
2507
2789
|
|
|
2508
2790
|
/**
|
|
@@ -2515,7 +2797,7 @@ export declare type RegionData = readonly PolygonData[];
|
|
|
2515
2797
|
*/
|
|
2516
2798
|
export declare const regularPolygonContour: (
|
|
2517
2799
|
options: RegularPolygonContourOptions,
|
|
2518
|
-
) => readonly
|
|
2800
|
+
) => readonly Vector2Data[];
|
|
2519
2801
|
|
|
2520
2802
|
/** Exact regular polygon dimensions and counterclockwise degree rotation. */
|
|
2521
2803
|
export declare interface RegularPolygonContourOptions extends RadialSizingOptions {
|
|
@@ -2535,7 +2817,7 @@ export declare interface RegularPolygonContourOptions extends RadialSizingOption
|
|
|
2535
2817
|
* ```
|
|
2536
2818
|
*/
|
|
2537
2819
|
export declare function resamplePolyline2(
|
|
2538
|
-
path: readonly
|
|
2820
|
+
path: readonly Vector2Data[],
|
|
2539
2821
|
options?: PolylineResamplingOptions,
|
|
2540
2822
|
): SampledCurve2;
|
|
2541
2823
|
|
|
@@ -2551,7 +2833,7 @@ export declare function resamplePolyline2(
|
|
|
2551
2833
|
* ```
|
|
2552
2834
|
*/
|
|
2553
2835
|
export declare function resamplePolyline3(
|
|
2554
|
-
path: readonly
|
|
2836
|
+
path: readonly Vector3Data[],
|
|
2555
2837
|
options?: PolylineResamplingOptions,
|
|
2556
2838
|
): SampledCurve3;
|
|
2557
2839
|
|
|
@@ -2607,6 +2889,25 @@ export declare function resolveArcSegments(
|
|
|
2607
2889
|
limits?: Partial<GeometrySamplingLimits>,
|
|
2608
2890
|
): number;
|
|
2609
2891
|
|
|
2892
|
+
/**
|
|
2893
|
+
* Resolves circular sampling and its actual radial envelopes without allocating boundary points.
|
|
2894
|
+
*
|
|
2895
|
+
* Vertex sizing retains the nominal vertex radius; face sizing retains the nominal face radius.
|
|
2896
|
+
* Exact `segments` override resolution, while allocation ceilings still apply. Adaptive sampling
|
|
2897
|
+
* uses the same count calculation as `resolveCircularSegments` and `circleContour` and rejects
|
|
2898
|
+
* exhausted limits rather than coarsening. The returned record is immutable and needs no engine.
|
|
2899
|
+
*
|
|
2900
|
+
* @example Check a nominal 8 mm face-sized bore
|
|
2901
|
+
* ```ts
|
|
2902
|
+
* const bore = resolveCircularSampling({ diameter: 8, segments: 64, sizing: "face" });
|
|
2903
|
+
* bore.faceRadius; // 4 mm
|
|
2904
|
+
* bore.vertexRadius; // slightly larger than 4 mm
|
|
2905
|
+
* ```
|
|
2906
|
+
*/
|
|
2907
|
+
export declare function resolveCircularSampling(
|
|
2908
|
+
options: CircularSamplingOptions,
|
|
2909
|
+
): CircularSampling;
|
|
2910
|
+
|
|
2610
2911
|
/**
|
|
2611
2912
|
* Resolves a deterministic full-circle segment count for one radius.
|
|
2612
2913
|
*
|
|
@@ -2712,6 +3013,23 @@ export declare function resolveGeometryTolerance(
|
|
|
2712
3013
|
options?: GeometryToleranceOptions,
|
|
2713
3014
|
): ResolvedGeometryTolerance;
|
|
2714
3015
|
|
|
3016
|
+
/**
|
|
3017
|
+
* Resolves equal alternating knuckles along +X, centered at the origin, in millimetres.
|
|
3018
|
+
*
|
|
3019
|
+
* Both faces of each running pair use a common polygon count; face-sized bores contain the
|
|
3020
|
+
* shaft's complete rotational envelope. Adaptive sampling satisfies both face and vertex error
|
|
3021
|
+
* bounds; an insufficient ceiling rejects instead of reducing quality. Exact counts are intentional
|
|
3022
|
+
* facets. Zero allowances describe ideal contact, not a printable running fit.
|
|
3023
|
+
*
|
|
3024
|
+
* Rejects nonfinite or nonpositive dimensions, invalid mode/count combinations, exhausted axial
|
|
3025
|
+
* length, missing/excessive lift-off engagement, and nonpositive conservative faceted barrel walls.
|
|
3026
|
+
* Manufacturing minima, strength, mounting, retention, handedness, and motion remain caller policy.
|
|
3027
|
+
*/
|
|
3028
|
+
export declare function resolveKnuckleHinge(
|
|
3029
|
+
spec: KnuckleHingeSpec,
|
|
3030
|
+
options?: KnuckleHingeSamplingOptions,
|
|
3031
|
+
): KnuckleHingeDimensions;
|
|
3032
|
+
|
|
2715
3033
|
/** Resolves and validates a named or caller-defined print-fit policy. */
|
|
2716
3034
|
export declare function resolvePrintableThreadFitPolicy(
|
|
2717
3035
|
fit?: PrintableThreadFit | PrintableThreadFitPolicy,
|
|
@@ -2788,9 +3106,9 @@ export declare interface RevolveOptions extends CircularPrimitiveOptions {
|
|
|
2788
3106
|
* Throws `NON_FINITE_VALUE` for nonfinite coordinates, angles, or derived coordinates.
|
|
2789
3107
|
*/
|
|
2790
3108
|
export declare const rotate2: (
|
|
2791
|
-
vector:
|
|
3109
|
+
vector: Vector2Data,
|
|
2792
3110
|
degrees: number,
|
|
2793
|
-
) =>
|
|
3111
|
+
) => Vector2Data;
|
|
2794
3112
|
|
|
2795
3113
|
/**
|
|
2796
3114
|
* Creates a right-handed axis-angle rotation transform.
|
|
@@ -2801,10 +3119,10 @@ export declare const rotate2: (
|
|
|
2801
3119
|
* @returns A frozen row-major transform.
|
|
2802
3120
|
*/
|
|
2803
3121
|
export declare function rotationTransform3(
|
|
2804
|
-
axis:
|
|
3122
|
+
axis: Vector3Data,
|
|
2805
3123
|
angle: AxisAngleRotation3,
|
|
2806
3124
|
tolerance?: GeometryToleranceOptions,
|
|
2807
|
-
):
|
|
3125
|
+
): Transform3Data;
|
|
2808
3126
|
|
|
2809
3127
|
/**
|
|
2810
3128
|
* Replaces each vertex of a non-duplicated closed polyline with a sampled
|
|
@@ -2821,7 +3139,7 @@ export declare const roundClosedPolylinePath: (
|
|
|
2821
3139
|
radius: number,
|
|
2822
3140
|
segmentsPerCorner: number,
|
|
2823
3141
|
limits?: Partial<GeometrySamplingLimits>,
|
|
2824
|
-
) => readonly
|
|
3142
|
+
) => readonly Vector3Data[];
|
|
2825
3143
|
|
|
2826
3144
|
/**
|
|
2827
3145
|
* A circular edge or corner roundover with explicit physical sampling.
|
|
@@ -2841,6 +3159,7 @@ export declare interface RowLayoutOptions {
|
|
|
2841
3159
|
|
|
2842
3160
|
/**
|
|
2843
3161
|
* Samples 2–32 connected line/cubic segments into a simple, nonzero-area, immutable CCW XY loop.
|
|
3162
|
+
*
|
|
2844
3163
|
* Physical scaling precedes adaptive curve sampling; the final end must repeat start exactly.
|
|
2845
3164
|
* Shared anchors and the closing seam are emitted once. Winding normalization may change the
|
|
2846
3165
|
* starting vertex. The sampled loop is checked for self-intersection and degeneracy by
|
|
@@ -2884,8 +3203,7 @@ export declare interface SampleContourOptions {
|
|
|
2884
3203
|
}
|
|
2885
3204
|
|
|
2886
3205
|
/** Samples a planar curve with the same guarantees and policy as spatial sampling.
|
|
2887
|
-
* @remarks
|
|
2888
|
-
* frozen. At stationary tangents, outgoing secants are preferred and endpoints use a backward fallback.
|
|
3206
|
+
* @remarks Returned planar points and tangents are copied and frozen. At stationary tangents, outgoing secants are preferred and endpoints use a backward fallback.
|
|
2889
3207
|
* @example
|
|
2890
3208
|
* ```ts
|
|
2891
3209
|
* const turn = sampleCurve2({kind: "arc", center: [0,0], radius: 10, sweepAngle: 90});
|
|
@@ -2925,9 +3243,9 @@ export declare function sampleCylindricalGearOutline(
|
|
|
2925
3243
|
/** Immutable planar points and corresponding directed unit tangents. */
|
|
2926
3244
|
export declare interface SampledCurve2 {
|
|
2927
3245
|
/** Curves retain both endpoints, including full-circle seams; closed resampling omits its seam. */
|
|
2928
|
-
readonly points: readonly
|
|
3246
|
+
readonly points: readonly Vector2Data[];
|
|
2929
3247
|
/** Directed unit vectors; stationary derivatives use the nearest usable direction. */
|
|
2930
|
-
readonly tangents: readonly
|
|
3248
|
+
readonly tangents: readonly Vector2Data[];
|
|
2931
3249
|
}
|
|
2932
3250
|
|
|
2933
3251
|
/**
|
|
@@ -2935,9 +3253,9 @@ export declare interface SampledCurve2 {
|
|
|
2935
3253
|
*/
|
|
2936
3254
|
export declare interface SampledCurve3 {
|
|
2937
3255
|
/** Curves retain both endpoints, including full-circle seams; closed resampling omits its seam. */
|
|
2938
|
-
readonly points: readonly
|
|
3256
|
+
readonly points: readonly Vector3Data[];
|
|
2939
3257
|
/** Directed unit vectors; stationary derivatives use the nearest usable direction. */
|
|
2940
|
-
readonly tangents: readonly
|
|
3258
|
+
readonly tangents: readonly Vector3Data[];
|
|
2941
3259
|
}
|
|
2942
3260
|
|
|
2943
3261
|
/** Sampled paths plus conventional pitch and lead measurements. */
|
|
@@ -2945,7 +3263,7 @@ export declare interface SampledThreadHelices {
|
|
|
2945
3263
|
/** Axial advance over one revolution, equal to `pitch * starts`. */
|
|
2946
3264
|
readonly lead: number;
|
|
2947
3265
|
/** One immutable sampled path for each thread start. */
|
|
2948
|
-
readonly paths: readonly
|
|
3266
|
+
readonly paths: readonly (readonly Vector3Data[])[];
|
|
2949
3267
|
/** Adjacent axial thread spacing in millimetres. */
|
|
2950
3268
|
readonly pitch: number;
|
|
2951
3269
|
/** Number of revolutions represented by each path. */
|
|
@@ -2954,6 +3272,7 @@ export declare interface SampledThreadHelices {
|
|
|
2954
3272
|
|
|
2955
3273
|
/**
|
|
2956
3274
|
* Creates `segments + 1` points including exact helix endpoints from finite positive dimensions.
|
|
3275
|
+
*
|
|
2957
3276
|
* Integrated weights must remain finite. The maxPathPoints ceiling defaults to 100000; excessive
|
|
2958
3277
|
* exact counts reject before evaluating axial weights or allocating sample arrays.
|
|
2959
3278
|
* Invalid inputs use GeometryError; exceptions thrown by axialWeight propagate unchanged.
|
|
@@ -2965,7 +3284,7 @@ export declare const sampleHelix: ({
|
|
|
2965
3284
|
segments,
|
|
2966
3285
|
limits,
|
|
2967
3286
|
axialWeight,
|
|
2968
|
-
}: SampleHelixOptions) => readonly
|
|
3287
|
+
}: SampleHelixOptions) => readonly Vector3Data[];
|
|
2969
3288
|
|
|
2970
3289
|
/** Options for a sampled +Z helix with millimetre dimensions. */
|
|
2971
3290
|
export declare interface SampleHelixOptions {
|
|
@@ -3010,10 +3329,11 @@ export declare function sampleInternalCylindricalGearSpaceOutline(
|
|
|
3010
3329
|
export declare function sampleRackToothPath(
|
|
3011
3330
|
spec: RackPitchSpec,
|
|
3012
3331
|
limits?: Partial<GeometrySamplingLimits>,
|
|
3013
|
-
):
|
|
3332
|
+
): readonly Vector2Data[];
|
|
3014
3333
|
|
|
3015
3334
|
/**
|
|
3016
3335
|
* Samples 1–31 line/cubic segments into a deeply immutable open [radius,height] polyline.
|
|
3336
|
+
*
|
|
3017
3337
|
* Anchors must progress strictly upward; nonnegative-radius cubic controls must have ordered
|
|
3018
3338
|
* heights between their endpoints. Cubics use de Casteljau subdivision with a conservative
|
|
3019
3339
|
* control-hull chord-error bound. Lines also obey the optional physical edge-length ceiling.
|
|
@@ -3036,7 +3356,7 @@ export declare function sampleRackToothPath(
|
|
|
3036
3356
|
export declare function sampleSideProfile(
|
|
3037
3357
|
curve: SideProfileCurve,
|
|
3038
3358
|
options?: SampleSideProfileOptions,
|
|
3039
|
-
): readonly
|
|
3359
|
+
): readonly Vector2Data[];
|
|
3040
3360
|
|
|
3041
3361
|
/** Physical scaling and bounded adaptive subdivision for an open profile. */
|
|
3042
3362
|
export declare interface SampleSideProfileOptions {
|
|
@@ -3077,9 +3397,9 @@ export declare function sampleThreadHelices(
|
|
|
3077
3397
|
|
|
3078
3398
|
/** Multiplies a vector by a dimensionless scalar. */
|
|
3079
3399
|
export declare const scale2: (
|
|
3080
|
-
vector:
|
|
3400
|
+
vector: Vector2Data,
|
|
3081
3401
|
scale: number,
|
|
3082
|
-
) =>
|
|
3402
|
+
) => Vector2Data;
|
|
3083
3403
|
|
|
3084
3404
|
/**
|
|
3085
3405
|
* Multiplies a vector by a dimensionless scalar.
|
|
@@ -3089,9 +3409,9 @@ export declare const scale2: (
|
|
|
3089
3409
|
* ```
|
|
3090
3410
|
*/
|
|
3091
3411
|
export declare const scale3: (
|
|
3092
|
-
vector:
|
|
3412
|
+
vector: Vector3Data,
|
|
3093
3413
|
scale: number,
|
|
3094
|
-
) =>
|
|
3414
|
+
) => Vector3Data;
|
|
3095
3415
|
|
|
3096
3416
|
/**
|
|
3097
3417
|
* Creates an immutable axis-aligned scale transform.
|
|
@@ -3102,9 +3422,7 @@ export declare const scale3: (
|
|
|
3102
3422
|
* @param factors - Finite, non-zero XYZ scale factors.
|
|
3103
3423
|
* @returns A frozen row-major transform.
|
|
3104
3424
|
*/
|
|
3105
|
-
export declare function scaleTransform3(
|
|
3106
|
-
factors: Vector3Tuple,
|
|
3107
|
-
): Transform3Matrix;
|
|
3425
|
+
export declare function scaleTransform3(factors: Vector3Data): Transform3Data;
|
|
3108
3426
|
|
|
3109
3427
|
/** An open radius/height outline; consumers own closure, mounting geometry, and wall policy. */
|
|
3110
3428
|
export declare interface SideProfileCurve {
|
|
@@ -3210,7 +3528,7 @@ export declare const starContour: (
|
|
|
3210
3528
|
points: number,
|
|
3211
3529
|
innerRadius?: number,
|
|
3212
3530
|
limits?: Partial<GeometrySamplingLimits>,
|
|
3213
|
-
) => readonly
|
|
3531
|
+
) => readonly Vector2Data[];
|
|
3214
3532
|
|
|
3215
3533
|
/** End-cap treatment for an open stroked path. */
|
|
3216
3534
|
export declare type StrokeCap = "butt" | "round" | "square";
|
|
@@ -3248,10 +3566,7 @@ export declare function strokeRegionData(
|
|
|
3248
3566
|
): RegionData;
|
|
3249
3567
|
|
|
3250
3568
|
/** Subtracts `b` from `a` component-wise. */
|
|
3251
|
-
export declare const subtract2: (
|
|
3252
|
-
a: Vector2Tuple,
|
|
3253
|
-
b: Vector2Tuple,
|
|
3254
|
-
) => Vector2Tuple;
|
|
3569
|
+
export declare const subtract2: (a: Vector2Data, b: Vector2Data) => Vector2Data;
|
|
3255
3570
|
|
|
3256
3571
|
/**
|
|
3257
3572
|
* Subtracts `b` from `a`.
|
|
@@ -3260,13 +3575,16 @@ export declare const subtract2: (
|
|
|
3260
3575
|
* subtract3([4, 5, 6], [1, 2, 3]); // [3, 3, 3]
|
|
3261
3576
|
* ```
|
|
3262
3577
|
*/
|
|
3263
|
-
export declare const subtract3: (
|
|
3264
|
-
a: Vector3Tuple,
|
|
3265
|
-
b: Vector3Tuple,
|
|
3266
|
-
) => Vector3Tuple;
|
|
3578
|
+
export declare const subtract3: (a: Vector3Data, b: Vector3Data) => Vector3Data;
|
|
3267
3579
|
|
|
3268
3580
|
/** Sampling controls for deterministic SVG-to-region conversion. */
|
|
3269
3581
|
export declare interface SvgImportOptions {
|
|
3582
|
+
/**
|
|
3583
|
+
* Uniformly fit painted bounds inside this positioned XY target in millimetres.
|
|
3584
|
+
* Adaptive resolution describes the fitted size; exact circular counts retain precedence.
|
|
3585
|
+
* Empty painted geometry cannot be fitted. Omitted preserves the document's physical size.
|
|
3586
|
+
*/
|
|
3587
|
+
readonly fit?: Bounds2Input;
|
|
3270
3588
|
/** Explicit profile and circular allocation ceilings; bounded SVG source/work limits remain fixed. */
|
|
3271
3589
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
3272
3590
|
/** Exact segments for a complete ellipse or round stroke feature. */
|
|
@@ -3280,8 +3598,14 @@ export declare interface SvgImportOptions {
|
|
|
3280
3598
|
readonly origin?: "center" | "document";
|
|
3281
3599
|
}
|
|
3282
3600
|
|
|
3283
|
-
/**
|
|
3601
|
+
/** Normalized sampled SVG region plus bounded source, geometry, and safe-repair diagnostics. */
|
|
3284
3602
|
export declare interface SvgRegionPreflight {
|
|
3603
|
+
/**
|
|
3604
|
+
* Applied scale and translation from origin-normalized SVG millimetres to final model
|
|
3605
|
+
* millimetres, present only when a fit target was supplied. Reuse it for registered layers
|
|
3606
|
+
* imported with the same origin and document coordinate system.
|
|
3607
|
+
*/
|
|
3608
|
+
readonly fit?: BoundsFit2;
|
|
3285
3609
|
/** Physical and final-topology measurements of `region`. */
|
|
3286
3610
|
readonly geometry: SvgRegionPreflightGeometryMetrics;
|
|
3287
3611
|
/** Appearance-preserving cleanup observed during parsing and normalization. */
|
|
@@ -3297,7 +3621,7 @@ export declare interface SvgRegionPreflightGeometryMetrics {
|
|
|
3297
3621
|
/** Filled area in square millimetres. */
|
|
3298
3622
|
readonly area: number;
|
|
3299
3623
|
/** Millimetre bounds, or `null` when no painted region remains. */
|
|
3300
|
-
readonly bounds:
|
|
3624
|
+
readonly bounds: Bounds2Data | null;
|
|
3301
3625
|
/** Disconnected filled polygons in the final region. */
|
|
3302
3626
|
readonly componentCount: number;
|
|
3303
3627
|
/** Exterior and hole boundary count in the final region. */
|
|
@@ -3482,7 +3806,7 @@ export declare interface ThreadedNutOptions extends Omit<
|
|
|
3482
3806
|
readonly width: number;
|
|
3483
3807
|
}
|
|
3484
3808
|
|
|
3485
|
-
/**
|
|
3809
|
+
/** Resolved body and end-face dimensions plus conservative allocation estimates for the thread cutter. */
|
|
3486
3810
|
export declare interface ThreadedNutPreflight {
|
|
3487
3811
|
/** Polygon segment count used by the nut body. */
|
|
3488
3812
|
readonly bodySegments: number;
|
|
@@ -3494,7 +3818,7 @@ export declare interface ThreadedNutPreflight {
|
|
|
3494
3818
|
readonly minimumBodyFaceInradius: number;
|
|
3495
3819
|
/** Smallest radial wall left between the body and cutter at either requested face. */
|
|
3496
3820
|
readonly minimumFaceWall: number;
|
|
3497
|
-
/** Conservative allocation
|
|
3821
|
+
/** Conservative allocation estimates for the extended cutter; excludes the body and Boolean result. */
|
|
3498
3822
|
readonly thread: HelicalThreadSolidMeshPreflight;
|
|
3499
3823
|
/** Start-aligned circular facet count used by the compensated thread cutter. */
|
|
3500
3824
|
readonly threadCircularSegments: number;
|
|
@@ -3604,7 +3928,7 @@ export declare interface ThreadProfile {
|
|
|
3604
3928
|
/** Adjacent axial thread spacing in millimetres. */
|
|
3605
3929
|
readonly pitch: number;
|
|
3606
3930
|
/** Immutable open `[axial, radial]` path spanning one pitch. */
|
|
3607
|
-
readonly points: readonly
|
|
3931
|
+
readonly points: readonly Vector2Data[];
|
|
3608
3932
|
/** Axial width of the flat at the minor envelope. */
|
|
3609
3933
|
readonly rootFlatWidth: number;
|
|
3610
3934
|
}
|
|
@@ -3682,32 +4006,33 @@ export declare interface Transform2 {
|
|
|
3682
4006
|
/** Applies the inverse transpose and normalizes. Ignores translation; rejects zero normals. */
|
|
3683
4007
|
applyNormal(normal: Vector2Input): Vector2;
|
|
3684
4008
|
/** Returns the frozen canonical row-major 3x3 matrix for interchange. */
|
|
3685
|
-
|
|
4009
|
+
toData(): Transform2Data;
|
|
3686
4010
|
/** Embeds this placement in XYZ, leaving Z unchanged, for solids and 3D paths. */
|
|
3687
4011
|
to3D(): Transform3;
|
|
3688
4012
|
}
|
|
3689
4013
|
|
|
3690
4014
|
/**
|
|
3691
|
-
* Creates an immutable XY transform, identity by default.
|
|
4015
|
+
* Creates an immutable XY transform, identity by default.
|
|
4016
|
+
*
|
|
4017
|
+
* Values and data are copied and validated.
|
|
3692
4018
|
* Pass it directly to Section.transform() and planar data helpers; to3D() explicitly crosses into XYZ.
|
|
3693
4019
|
* Zero scales and singular matrices throw GeometryError; negative scales reflect.
|
|
3694
4020
|
*
|
|
4021
|
+
* Use `toData()` for frozen matrix interchange.
|
|
4022
|
+
*
|
|
3695
4023
|
* @example
|
|
3696
4024
|
* ```ts
|
|
3697
4025
|
* const placement = transform2().rotate(90).translate([10, 0]);
|
|
3698
|
-
* placement.applyPoint([1, 0]).
|
|
4026
|
+
* placement.applyPoint([1, 0]).toData(); // approximately [10, 1]
|
|
3699
4027
|
* ```
|
|
3700
4028
|
*/
|
|
3701
|
-
export declare function transform2(
|
|
3702
|
-
|
|
3703
|
-
/** An immutable XY transform or its canonical row-major matrix for interchange. */
|
|
3704
|
-
export declare type Transform2Input = Transform2 | Transform2Matrix;
|
|
4029
|
+
export declare function transform2(input?: Transform2Input): Transform2;
|
|
3705
4030
|
|
|
3706
4031
|
/**
|
|
3707
4032
|
* A row-major affine 3x3 XY matrix applied to column vectors.
|
|
3708
4033
|
* Translation occupies indices 2 and 5; the final row is `[0, 0, 1]`.
|
|
3709
4034
|
*/
|
|
3710
|
-
export declare type
|
|
4035
|
+
export declare type Transform2Data = readonly [
|
|
3711
4036
|
m00: number,
|
|
3712
4037
|
m01: number,
|
|
3713
4038
|
m02: number,
|
|
@@ -3719,6 +4044,9 @@ export declare type Transform2Matrix = readonly [
|
|
|
3719
4044
|
m22: number,
|
|
3720
4045
|
];
|
|
3721
4046
|
|
|
4047
|
+
/** An immutable XY transform or its canonical row-major matrix for interchange. */
|
|
4048
|
+
export declare type Transform2Input = Transform2 | Transform2Data;
|
|
4049
|
+
|
|
3722
4050
|
/** Immutable reusable XYZ placement. Methods apply in written order; angles are degrees. */
|
|
3723
4051
|
export declare interface Transform3 {
|
|
3724
4052
|
/** Applies a translation in model units after this placement. */
|
|
@@ -3744,27 +4072,29 @@ export declare interface Transform3 {
|
|
|
3744
4072
|
/** Applies the inverse transpose and normalizes. Ignores translation; rejects zero normals. */
|
|
3745
4073
|
applyNormal(normal: Vector3Input): Vector3;
|
|
3746
4074
|
/** Returns the frozen canonical row-major 4x4 matrix for interchange. */
|
|
3747
|
-
|
|
4075
|
+
toData(): Transform3Data;
|
|
3748
4076
|
/** Restricts to XY; throws GeometryError for a plane change or singular XY restriction. */
|
|
3749
4077
|
to2D(): Transform2;
|
|
3750
4078
|
}
|
|
3751
4079
|
|
|
3752
4080
|
/**
|
|
3753
|
-
* Creates an immutable XYZ transform, identity by default.
|
|
4081
|
+
* Creates an immutable XYZ transform, identity by default.
|
|
4082
|
+
*
|
|
4083
|
+
* Values and data are copied and validated.
|
|
3754
4084
|
* Calls apply in written order; rotations use degrees and pivots use current world coordinates.
|
|
3755
4085
|
* Zero scales, singular matrices, nonfinite inputs and zero rotation axes throw GeometryError.
|
|
3756
4086
|
* Use frameTransform3(frame) as the input for existing orthonormal frame placement.
|
|
3757
4087
|
*
|
|
4088
|
+
* Use `toData()` for frozen matrix interchange.
|
|
4089
|
+
* [composeTransform3](/docs/reference/geometry/composeTransform3) takes matrices in after, before order.
|
|
4090
|
+
*
|
|
3758
4091
|
* @example
|
|
3759
4092
|
* ```ts
|
|
3760
4093
|
* const placement = transform3().rotate([0, 0, 90]).translate([10, 0, 0]);
|
|
3761
|
-
* placement.applyPoint([1, 0, 0]).
|
|
4094
|
+
* placement.applyPoint([1, 0, 0]).toData(); // approximately [10, 1, 0]
|
|
3762
4095
|
* ```
|
|
3763
4096
|
*/
|
|
3764
|
-
export declare function transform3(
|
|
3765
|
-
|
|
3766
|
-
/** An immutable XYZ transform or its canonical row-major matrix for interchange. */
|
|
3767
|
-
export declare type Transform3Input = Transform3 | Transform3Matrix;
|
|
4097
|
+
export declare function transform3(input?: Transform3Input): Transform3;
|
|
3768
4098
|
|
|
3769
4099
|
/**
|
|
3770
4100
|
* A row-major affine 4x4 matrix applied to column vectors.
|
|
@@ -3772,7 +4102,7 @@ export declare type Transform3Input = Transform3 | Transform3Matrix;
|
|
|
3772
4102
|
* Translation occupies indices 3, 7, and 11. The final row must be
|
|
3773
4103
|
* `[0, 0, 0, 1]` within the active geometry tolerance.
|
|
3774
4104
|
*/
|
|
3775
|
-
export declare type
|
|
4105
|
+
export declare type Transform3Data = readonly [
|
|
3776
4106
|
m00: number,
|
|
3777
4107
|
m01: number,
|
|
3778
4108
|
m02: number,
|
|
@@ -3791,6 +4121,9 @@ export declare type Transform3Matrix = readonly [
|
|
|
3791
4121
|
m33: number,
|
|
3792
4122
|
];
|
|
3793
4123
|
|
|
4124
|
+
/** An immutable XYZ transform or its canonical row-major matrix for interchange. */
|
|
4125
|
+
export declare type Transform3Input = Transform3 | Transform3Data;
|
|
4126
|
+
|
|
3794
4127
|
/**
|
|
3795
4128
|
* Returns the determinant of a transform's linear 3x3 component.
|
|
3796
4129
|
*
|
|
@@ -3800,7 +4133,7 @@ export declare type Transform3Matrix = readonly [
|
|
|
3800
4133
|
* @returns Signed linear determinant.
|
|
3801
4134
|
*/
|
|
3802
4135
|
export declare function transformDeterminant3(
|
|
3803
|
-
transform:
|
|
4136
|
+
transform: Transform3Data,
|
|
3804
4137
|
): number;
|
|
3805
4138
|
|
|
3806
4139
|
/**
|
|
@@ -3835,8 +4168,8 @@ export declare function transformTriangleMesh(
|
|
|
3835
4168
|
* @returns A frozen row-major transform.
|
|
3836
4169
|
*/
|
|
3837
4170
|
export declare function translationTransform3(
|
|
3838
|
-
offset:
|
|
3839
|
-
):
|
|
4171
|
+
offset: Vector3Data,
|
|
4172
|
+
): Transform3Data;
|
|
3840
4173
|
|
|
3841
4174
|
/** Trapezoidal thread profile with a configurable included angle. */
|
|
3842
4175
|
export declare interface TrapezoidalThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
@@ -3888,7 +4221,7 @@ export declare interface TriangleMeshAnalysisOptions extends TriangleMeshValidat
|
|
|
3888
4221
|
*/
|
|
3889
4222
|
export declare interface TriangleMeshMeasurements {
|
|
3890
4223
|
/** Axis-aligned bounds. */
|
|
3891
|
-
readonly bounds:
|
|
4224
|
+
readonly bounds: Bounds3Data;
|
|
3892
4225
|
/** Signed enclosed volume; positive values correspond to outward winding. */
|
|
3893
4226
|
readonly signedVolume: number;
|
|
3894
4227
|
/** Sum of all triangle areas in squared model units. */
|
|
@@ -3944,7 +4277,7 @@ export declare interface TriangleMeshQualityReport {
|
|
|
3944
4277
|
/** Immutable deterministic measurements for a closed, oriented triangle mesh. */
|
|
3945
4278
|
export declare interface TriangleMeshSignature {
|
|
3946
4279
|
/** Axis-aligned bounds quantized by `tolerances.position`. */
|
|
3947
|
-
readonly bounds:
|
|
4280
|
+
readonly bounds: Bounds3Data;
|
|
3948
4281
|
/** Number of edge-connected closed boundary shells; cavities count separately. */
|
|
3949
4282
|
readonly connectedComponentCount: number;
|
|
3950
4283
|
/** Total orientable genus across all connected components. */
|
|
@@ -4030,6 +4363,7 @@ export declare interface TubeOptions
|
|
|
4030
4363
|
|
|
4031
4364
|
/**
|
|
4032
4365
|
* Checks closed indexed topology, triangle intersections, and alternating nested shell orientation.
|
|
4366
|
+
*
|
|
4033
4367
|
* Outward exterior shells and inward cavity shells are accepted. Separate shells must not touch,
|
|
4034
4368
|
* intersect, or overlap as material. Indexed neighbours may share their own vertex or edge.
|
|
4035
4369
|
*
|
|
@@ -4056,9 +4390,9 @@ export declare function validateSolidMesh(
|
|
|
4056
4390
|
* @throws {@link GeometryError} For non-finite, non-affine, or singular matrices.
|
|
4057
4391
|
*/
|
|
4058
4392
|
export declare function validateTransform3(
|
|
4059
|
-
transform:
|
|
4393
|
+
transform: Transform3Data,
|
|
4060
4394
|
tolerance?: GeometryToleranceOptions,
|
|
4061
|
-
):
|
|
4395
|
+
): Transform3Data;
|
|
4062
4396
|
|
|
4063
4397
|
/**
|
|
4064
4398
|
* Validates mesh buffers, indices, triangle area, and optionally closed topology.
|
|
@@ -4102,22 +4436,26 @@ export declare interface Vector2 {
|
|
|
4102
4436
|
/** Returns Euclidean distance to another vector in the same coordinate units. */
|
|
4103
4437
|
distance(other: Vector2Input): number;
|
|
4104
4438
|
/** Returns this value's frozen readonly tuple for interchange; repeated calls do not allocate. */
|
|
4105
|
-
|
|
4439
|
+
toData(): Vector2Data;
|
|
4106
4440
|
}
|
|
4107
4441
|
|
|
4108
4442
|
/**
|
|
4109
4443
|
* Creates immutable XY arithmetic from a finite tuple or vector, snapshotting the coordinates.
|
|
4444
|
+
*
|
|
4110
4445
|
* Values and results are finite. Invalid dimensions throw `INVALID_ARGUMENT`; nonfinite coordinates
|
|
4111
4446
|
* and overflow throw `NON_FINITE_VALUE` GeometryError.
|
|
4112
4447
|
* Use transform2().applyDirection(value) for rotations and nonuniform scaling.
|
|
4448
|
+
*
|
|
4449
|
+
* Use `toData()` for frozen tuple interchange, or
|
|
4450
|
+
* [normalize2](/docs/reference/geometry/normalize2) for tuple-based normalization in numerical loops.
|
|
4113
4451
|
*/
|
|
4114
4452
|
export declare function vector2(input: Vector2Input): Vector2;
|
|
4115
4453
|
|
|
4116
|
-
/** An XY tuple or immutable fluent vector accepted by vector operations. */
|
|
4117
|
-
export declare type Vector2Input = Vector2Tuple | Vector2;
|
|
4118
|
-
|
|
4119
4454
|
/** A two-dimensional Cartesian vector or point. */
|
|
4120
|
-
export declare type
|
|
4455
|
+
export declare type Vector2Data = readonly [x: number, y: number];
|
|
4456
|
+
|
|
4457
|
+
/** An XY tuple or immutable fluent vector accepted by vector operations. */
|
|
4458
|
+
export declare type Vector2Input = Vector2Data | Vector2;
|
|
4121
4459
|
|
|
4122
4460
|
/** Immutable XYZ arithmetic; vector operations return new values and measurements return numbers. */
|
|
4123
4461
|
export declare interface Vector3 {
|
|
@@ -4146,15 +4484,19 @@ export declare interface Vector3 {
|
|
|
4146
4484
|
/** Returns Euclidean distance to another vector in the same coordinate units. */
|
|
4147
4485
|
distance(other: Vector3Input): number;
|
|
4148
4486
|
/** Returns this value's frozen readonly tuple for interchange; repeated calls do not allocate. */
|
|
4149
|
-
|
|
4487
|
+
toData(): Vector3Data;
|
|
4150
4488
|
}
|
|
4151
4489
|
|
|
4152
4490
|
/**
|
|
4153
4491
|
* Creates immutable XYZ arithmetic from a finite tuple or vector, snapshotting the coordinates.
|
|
4492
|
+
*
|
|
4154
4493
|
* Values and results are finite. Invalid dimensions throw `INVALID_ARGUMENT`; nonfinite coordinates
|
|
4155
4494
|
* and overflow throw `NON_FINITE_VALUE` GeometryError.
|
|
4156
4495
|
* Use transform3().applyDirection(value) for rotations and nonuniform scaling.
|
|
4157
4496
|
*
|
|
4497
|
+
* Use `toData()` for frozen tuple interchange, or
|
|
4498
|
+
* [normalize3](/docs/reference/geometry/normalize3) for tuple-based normalization in numerical loops.
|
|
4499
|
+
*
|
|
4158
4500
|
* @example
|
|
4159
4501
|
* ```ts
|
|
4160
4502
|
* const direction = vector3([1, 2, 3]).add([4, 0, 0]).normalize().scale(10);
|
|
@@ -4163,11 +4505,11 @@ export declare interface Vector3 {
|
|
|
4163
4505
|
*/
|
|
4164
4506
|
export declare function vector3(input: Vector3Input): Vector3;
|
|
4165
4507
|
|
|
4166
|
-
/** An XYZ tuple or immutable fluent vector accepted by vector operations. */
|
|
4167
|
-
export declare type Vector3Input = Vector3Tuple | Vector3;
|
|
4168
|
-
|
|
4169
4508
|
/** A three-dimensional Cartesian vector or point. */
|
|
4170
|
-
export declare type
|
|
4509
|
+
export declare type Vector3Data = readonly [x: number, y: number, z: number];
|
|
4510
|
+
|
|
4511
|
+
/** An XYZ tuple or immutable fluent vector accepted by vector operations. */
|
|
4512
|
+
export declare type Vector3Input = Vector3Data | Vector3;
|
|
4171
4513
|
|
|
4172
4514
|
/** A circular baseline centered at the XY origin, with rigid shaped glyph groups. */
|
|
4173
4515
|
export declare interface VectorTextArcBaseline {
|
|
@@ -4208,7 +4550,7 @@ export declare interface VectorTextLayoutOptions extends VectorTextOptions {
|
|
|
4208
4550
|
/** Text measurements from the same immutable layout that supplies geometry and SVG outlines. */
|
|
4209
4551
|
export declare interface VectorTextMetrics {
|
|
4210
4552
|
/** Visible curve bounds after alignment, or null when the text has no ink. */
|
|
4211
|
-
readonly bounds:
|
|
4553
|
+
readonly bounds: Bounds2Data | null;
|
|
4212
4554
|
/** Unaligned logical advance and negative baseline displacement in mm; arcs retain [arc length, 0]. */
|
|
4213
4555
|
readonly advance: readonly [number, number];
|
|
4214
4556
|
/** Maximum logical line advance in millimetres, including spaces; arc length on circular baselines. */
|