@metamesh/modeling 0.18.0 → 0.20.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 +82 -0
- package/README.md +96 -64
- package/dist/api/engine.d.ts +216 -160
- package/dist/api/export.d.ts +204 -0
- package/dist/api/geometry.d.ts +410 -2106
- package/dist/api/index.d.ts +545 -1821
- package/dist/api/math.d.ts +315 -0
- package/dist/api/mechanical.d.ts +1041 -0
- package/dist/api/mesh.d.ts +395 -94
- package/dist/api/text.d.ts +24 -44
- package/dist/docs/guides/concepts.md +54 -523
- package/dist/docs/guides/exporting.md +88 -0
- package/dist/docs/guides/fonts.md +7 -5
- package/dist/docs/guides/fundamentals.md +12 -24
- package/dist/docs/guides/generation.md +76 -61
- package/dist/docs/guides/geometry-values.md +251 -0
- package/dist/docs/guides/hosting.md +58 -80
- package/dist/docs/guides/profiles-and-extrusion.md +400 -0
- package/dist/docs/guides/recipes.md +52 -706
- package/dist/docs/guides/resolution-and-inspection.md +153 -0
- package/dist/docs/guides/solid-joins.md +136 -0
- package/dist/docs/guides/standalone-model.md +5 -3
- package/dist/docs/guides/svg-and-text.md +252 -0
- package/dist/docs/guides/sweeps-and-lofts.md +223 -0
- package/dist/docs/guides/transforms-and-placement.md +323 -0
- package/dist/docs/guides/workers.md +166 -0
- package/dist/docs/manifest.json +5539 -8603
- package/dist/docs/reference/engine/GenerationOptions.md +9 -4
- package/dist/docs/reference/engine/GeometryResource.md +11 -5
- package/dist/docs/reference/engine/ModelDependencies.md +9 -3
- package/dist/docs/reference/engine/ModelEngine.md +8 -3
- package/dist/docs/reference/engine/ModelEngineOptions.md +6 -5
- package/dist/docs/reference/engine/ModelPart.md +12 -6
- package/dist/docs/reference/engine/ModelResult.md +8 -2
- package/dist/docs/reference/engine/ModelRunArguments.md +7 -1
- package/dist/docs/reference/engine/ModelRunOptions.md +9 -4
- package/dist/docs/reference/engine/ModelSession.md +7 -1
- package/dist/docs/reference/engine/SessionOptions.md +9 -4
- package/dist/docs/reference/engine/categories/host-lifecycle.md +11 -10
- package/dist/docs/reference/engine/checkModel.md +11 -1
- package/dist/docs/reference/engine/createModelEngine.md +13 -4
- package/dist/docs/reference/engine/defaultModelingLimits.md +7 -8
- package/dist/docs/reference/engine/modelingWasmUrl.md +7 -1
- package/dist/docs/reference/engine.md +13 -7
- package/dist/docs/reference/export/Export3mfOptions.md +20 -0
- package/dist/docs/reference/export/ExportDiagnostic.md +47 -0
- package/dist/docs/reference/export/ExportFormat.md +13 -0
- package/dist/docs/reference/export/ExportGeometry.md +27 -0
- package/dist/docs/reference/export/ExportGlbOptions.md +114 -0
- package/dist/docs/reference/export/ExportLimits.md +71 -0
- package/dist/docs/reference/export/ExportMaterial.md +35 -0
- package/dist/docs/reference/export/ExportOptions.md +82 -0
- package/dist/docs/reference/export/ExportPart.md +76 -0
- package/dist/docs/reference/export/ExportReport.md +70 -0
- package/dist/docs/reference/export/ExportSink.md +29 -0
- package/dist/docs/reference/export/ExportStlOptions.md +20 -0
- package/dist/docs/reference/export/ExportedFile.md +98 -0
- package/dist/docs/reference/export/categories/mesh-serialization.md +53 -0
- package/dist/docs/reference/export/defaultExportLimits.md +20 -0
- package/dist/docs/reference/export/export3mf.md +62 -0
- package/dist/docs/reference/export/exportGlb.md +66 -0
- package/dist/docs/reference/export/exportStl.md +62 -0
- package/dist/docs/reference/export/write3mf.md +71 -0
- package/dist/docs/reference/export/writeGlb.md +75 -0
- package/dist/docs/reference/export/writeStl.md +71 -0
- package/dist/docs/reference/export.md +27 -0
- package/dist/docs/reference/geometry/AlignedCircularSegmentsOptions.md +9 -3
- package/dist/docs/reference/geometry/Anchor3-type.md +9 -3
- package/dist/docs/reference/geometry/Anchor3Options.md +70 -0
- package/dist/docs/reference/geometry/ArcCurve2.md +8 -2
- package/dist/docs/reference/geometry/ArcCurve3.md +8 -2
- package/dist/docs/reference/geometry/AttachOptions.md +10 -5
- package/dist/docs/reference/geometry/Bounds2-type.md +17 -24
- package/dist/docs/reference/geometry/Bounds2Data.md +10 -9
- package/dist/docs/reference/geometry/Bounds2Input.md +10 -4
- package/dist/docs/reference/geometry/Bounds2Options.md +10 -4
- package/dist/docs/reference/geometry/Bounds3-type.md +17 -24
- package/dist/docs/reference/geometry/Bounds3Data.md +10 -9
- package/dist/docs/reference/geometry/Bounds3Input.md +10 -4
- package/dist/docs/reference/geometry/Bounds3Options.md +10 -4
- package/dist/docs/reference/geometry/BoundsFit2.md +10 -4
- package/dist/docs/reference/geometry/BoundsFit3.md +10 -4
- package/dist/docs/reference/geometry/BoundsFitOptions.md +10 -4
- package/dist/docs/reference/geometry/BoxAnchorFace.md +9 -3
- package/dist/docs/reference/geometry/BoxAnchorOptions.md +9 -3
- package/dist/docs/reference/geometry/ChamferedEdgeTreatment.md +8 -2
- package/dist/docs/reference/geometry/CircleContourOptions.md +8 -2
- package/dist/docs/reference/geometry/CircularPrimitiveOptions.md +8 -3
- package/dist/docs/reference/geometry/CircularResolutionOptions.md +7 -1
- package/dist/docs/reference/geometry/CircularSampling.md +7 -1
- package/dist/docs/reference/geometry/CircularSamplingOptions.md +7 -1
- package/dist/docs/reference/geometry/Contour.md +9 -4
- package/dist/docs/reference/geometry/ContourCurve.md +8 -2
- package/dist/docs/reference/geometry/ContourPoint.md +8 -2
- package/dist/docs/reference/geometry/ContourSegment.md +8 -2
- package/dist/docs/reference/geometry/CorrespondingComponent.md +8 -2
- package/dist/docs/reference/geometry/CorrespondingContour.md +8 -2
- package/dist/docs/reference/geometry/CorrespondingProfile.md +8 -2
- package/dist/docs/reference/geometry/CorrespondingProfileStation.md +9 -3
- package/dist/docs/reference/geometry/CubicBezierCurve2.md +8 -2
- package/dist/docs/reference/geometry/CubicBezierCurve3.md +8 -2
- package/dist/docs/reference/geometry/Curve2.md +8 -2
- package/dist/docs/reference/geometry/Curve3.md +8 -2
- package/dist/docs/reference/geometry/CurveSamplingOptions.md +8 -2
- package/dist/docs/reference/geometry/CylinderAnchorFace.md +9 -3
- package/dist/docs/reference/geometry/CylinderAnchorOptions.md +10 -4
- package/dist/docs/reference/geometry/DEFAULT_GEOMETRY_TOLERANCE.md +7 -1
- package/dist/docs/reference/geometry/EdgeTreatment.md +7 -1
- package/dist/docs/reference/geometry/EllipseContourOptions.md +8 -2
- package/dist/docs/reference/geometry/ExtrusionSamplingOptions.md +15 -10
- package/dist/docs/reference/geometry/FittedTextLayout.md +8 -2
- package/dist/docs/reference/geometry/{Frame3.md → Frame3-type.md} +9 -2
- package/dist/docs/reference/geometry/Frame3Options.md +69 -0
- package/dist/docs/reference/geometry/GeometryError.md +7 -1
- package/dist/docs/reference/geometry/GeometryErrorCode.md +7 -1
- package/dist/docs/reference/geometry/GeometryErrorContext.md +7 -1
- package/dist/docs/reference/geometry/GeometryResolution.md +7 -1
- package/dist/docs/reference/geometry/GeometrySamplingLimits.md +8 -2
- package/dist/docs/reference/geometry/GeometryToleranceOptions.md +8 -2
- package/dist/docs/reference/geometry/GridPatternOptions.md +13 -5
- package/dist/docs/reference/geometry/ImmutableBuffer-type.md +8 -14
- package/dist/docs/reference/geometry/LineCurve2.md +8 -2
- package/dist/docs/reference/geometry/LineCurve3.md +8 -2
- package/dist/docs/reference/geometry/LinearPatternOptions.md +8 -2
- package/dist/docs/reference/geometry/LoftPlacement.md +19 -13
- package/dist/docs/reference/geometry/MatchProfilesOptions.md +8 -2
- package/dist/docs/reference/geometry/ModelingLimits.md +7 -1
- package/dist/docs/reference/geometry/NumericArray.md +8 -2
- package/dist/docs/reference/geometry/Path2-type.md +158 -3
- package/dist/docs/reference/geometry/Path2Data.md +8 -2
- package/dist/docs/reference/geometry/Path2Input.md +8 -2
- package/dist/docs/reference/geometry/Path3-type.md +158 -3
- package/dist/docs/reference/geometry/Path3Data.md +8 -2
- package/dist/docs/reference/geometry/Path3Input.md +8 -2
- package/dist/docs/reference/geometry/PathFrame.md +8 -2
- package/dist/docs/reference/geometry/PathLocation.md +8 -2
- package/dist/docs/reference/geometry/PathNormalGuide.md +9 -3
- package/dist/docs/reference/geometry/PathOptions.md +8 -2
- package/dist/docs/reference/geometry/PathPatternOptions.md +9 -3
- package/dist/docs/reference/geometry/PathPlacement.md +10 -4
- package/dist/docs/reference/geometry/PathResamplingOptions.md +8 -2
- package/dist/docs/reference/geometry/PathStation.md +87 -0
- package/dist/docs/reference/geometry/PathSubdivisionOptions.md +44 -0
- package/dist/docs/reference/geometry/Pivot2Options.md +9 -3
- package/dist/docs/reference/geometry/Pivot3Options.md +9 -3
- package/dist/docs/reference/geometry/PolygonData.md +9 -3
- package/dist/docs/reference/geometry/PolylineResamplingOptions.md +8 -2
- package/dist/docs/reference/geometry/Profile.md +8 -3
- package/dist/docs/reference/geometry/ProfileComponent2.md +8 -2
- package/dist/docs/reference/geometry/ProfileContour2.md +8 -2
- package/dist/docs/reference/geometry/ProfileSpan2.md +8 -2
- package/dist/docs/reference/geometry/ProfiledEdgeTreatment.md +10 -3
- package/dist/docs/reference/geometry/RadialPatternOptions.md +8 -2
- package/dist/docs/reference/geometry/RadialSizing.md +7 -1
- package/dist/docs/reference/geometry/RadialSizingOptions.md +7 -1
- package/dist/docs/reference/geometry/RectangleContourOptions.md +9 -2
- package/dist/docs/reference/geometry/RectangleCornerTreatment.md +8 -2
- package/dist/docs/reference/geometry/RectangleCornerTreatments.md +8 -2
- package/dist/docs/reference/geometry/RectangleProfileOptions.md +8 -2
- package/dist/docs/reference/geometry/RegionData.md +8 -2
- package/dist/docs/reference/geometry/RegularPolygonContourOptions.md +8 -2
- package/dist/docs/reference/geometry/ResolvedGeometryResolution.md +71 -0
- package/dist/docs/reference/geometry/ResolvedGeometryTolerance.md +7 -1
- package/dist/docs/reference/geometry/RoundedEdgeTreatment.md +7 -1
- package/dist/docs/reference/geometry/RowLayoutOptions.md +10 -4
- package/dist/docs/reference/geometry/SampleContourOptions.md +8 -2
- package/dist/docs/reference/geometry/SampleHelixOptions.md +8 -2
- package/dist/docs/reference/geometry/SampleSideProfileOptions.md +8 -2
- package/dist/docs/reference/geometry/SampledCurve2.md +8 -2
- package/dist/docs/reference/geometry/SampledCurve3.md +8 -2
- package/dist/docs/reference/geometry/SideProfileCurve.md +8 -2
- package/dist/docs/reference/geometry/SideProfilePoint.md +8 -2
- package/dist/docs/reference/geometry/SideProfileSegment.md +8 -2
- package/dist/docs/reference/geometry/SmoothEdgeTreatment.md +7 -1
- package/dist/docs/reference/geometry/SplineOptions.md +69 -0
- package/dist/docs/reference/geometry/StarContourOptions.md +12 -2
- package/dist/docs/reference/geometry/StrokeCap.md +8 -2
- package/dist/docs/reference/geometry/StrokeJoin.md +8 -2
- package/dist/docs/reference/geometry/StrokeOptions.md +9 -3
- package/dist/docs/reference/geometry/SvgImportOptions.md +10 -4
- package/dist/docs/reference/geometry/SvgRegionPreflight.md +8 -2
- package/dist/docs/reference/geometry/SvgRegionPreflightGeometryMetrics.md +8 -2
- package/dist/docs/reference/geometry/SvgRegionPreflightRepairs.md +8 -2
- package/dist/docs/reference/geometry/SvgRegionPreflightSourceMetrics.md +8 -2
- package/dist/docs/reference/geometry/Transform2-type.md +9 -3
- package/dist/docs/reference/geometry/Transform2Data.md +9 -3
- package/dist/docs/reference/geometry/Transform2Input.md +9 -3
- package/dist/docs/reference/geometry/Transform3-type.md +10 -4
- package/dist/docs/reference/geometry/Transform3Data.md +9 -3
- package/dist/docs/reference/geometry/Transform3Input.md +12 -5
- package/dist/docs/reference/geometry/Vector2-type.md +9 -3
- package/dist/docs/reference/geometry/Vector2Data.md +9 -3
- package/dist/docs/reference/geometry/Vector2Input.md +9 -3
- package/dist/docs/reference/geometry/Vector3-type.md +33 -3
- package/dist/docs/reference/geometry/Vector3Data.md +9 -3
- package/dist/docs/reference/geometry/Vector3Input.md +9 -3
- package/dist/docs/reference/geometry/VectorTextLayout.md +8 -2
- package/dist/docs/reference/geometry/VectorTextMetrics.md +9 -3
- package/dist/docs/reference/geometry/anchor3.md +23 -26
- package/dist/docs/reference/geometry/anchorFrame3.md +11 -5
- package/dist/docs/reference/geometry/attachmentTransform3.md +14 -8
- package/dist/docs/reference/geometry/bounds2.md +16 -8
- package/dist/docs/reference/geometry/bounds3.md +14 -6
- package/dist/docs/reference/geometry/boundsCenter.md +10 -4
- package/dist/docs/reference/geometry/boundsSize.md +10 -4
- package/dist/docs/reference/geometry/boxAnchor3.md +9 -3
- package/dist/docs/reference/geometry/categories/bounds-layout.md +12 -6
- package/dist/docs/reference/geometry/categories/curves-paths.md +24 -13
- package/dist/docs/reference/geometry/categories/immutable-data.md +40 -0
- package/dist/docs/reference/geometry/categories/pattern-placement.md +11 -5
- package/dist/docs/reference/geometry/categories/primitive-options.md +8 -13
- package/dist/docs/reference/geometry/categories/profiles-regions.md +11 -5
- package/dist/docs/reference/geometry/categories/resolution-errors.md +8 -1
- package/dist/docs/reference/geometry/categories/transforms-math.md +20 -51
- package/dist/docs/reference/geometry/categories/vector-import.md +8 -5
- package/dist/docs/reference/geometry/circleContour.md +8 -2
- package/dist/docs/reference/geometry/closeToAxis.md +12 -2
- package/dist/docs/reference/geometry/computeClosedParallelTransportFrames.md +14 -5
- package/dist/docs/reference/geometry/computeParallelTransportFrames.md +18 -5
- package/dist/docs/reference/geometry/contourContainsPoint.md +12 -2
- package/dist/docs/reference/geometry/cylinderAnchor3.md +11 -5
- package/dist/docs/reference/geometry/defaultGeometrySamplingLimits.md +8 -2
- package/dist/docs/reference/geometry/distributeAlongPath.md +21 -10
- package/dist/docs/reference/geometry/ellipseContour.md +8 -2
- package/dist/docs/reference/geometry/fitBounds.md +18 -4
- package/dist/docs/reference/geometry/fitTextLayout.md +11 -5
- package/dist/docs/reference/geometry/frame3.md +66 -0
- package/dist/docs/reference/geometry/gridPatternTransforms.md +12 -6
- package/dist/docs/reference/geometry/immutableBuffer.md +11 -3
- package/dist/docs/reference/geometry/isGeometryError.md +7 -1
- package/dist/docs/reference/geometry/layoutRow.md +12 -4
- package/dist/docs/reference/geometry/linearPatternTransforms.md +12 -6
- package/dist/docs/reference/geometry/matchProfiles.md +10 -2
- package/dist/docs/reference/geometry/normalizeContour.md +13 -3
- package/dist/docs/reference/geometry/normalizePolygon.md +10 -2
- package/dist/docs/reference/geometry/normalizeRegion.md +10 -2
- package/dist/docs/reference/geometry/path2.md +12 -2
- package/dist/docs/reference/geometry/path3.md +12 -2
- package/dist/docs/reference/geometry/pathPatternTransforms.md +18 -8
- package/dist/docs/reference/geometry/preflightSvgRegion.md +11 -5
- package/dist/docs/reference/geometry/radialPatternTransforms.md +11 -5
- package/dist/docs/reference/geometry/rectangleContour.md +8 -2
- package/dist/docs/reference/geometry/rectangleProfile.md +8 -3
- package/dist/docs/reference/geometry/regionArea.md +8 -2
- package/dist/docs/reference/geometry/regionBounds.md +11 -3
- package/dist/docs/reference/geometry/regularPolygonContour.md +8 -2
- package/dist/docs/reference/geometry/resamplePolyline2.md +12 -2
- package/dist/docs/reference/geometry/resamplePolyline3.md +12 -2
- package/dist/docs/reference/geometry/resolveAlignedCircularSegments.md +10 -4
- package/dist/docs/reference/geometry/resolveArcSegments.md +13 -5
- package/dist/docs/reference/geometry/resolveCircularSampling.md +7 -1
- package/dist/docs/reference/geometry/resolveCircularSegments.md +10 -2
- package/dist/docs/reference/geometry/resolveExtrusionSlices.md +85 -0
- package/dist/docs/reference/geometry/resolveGeometrySamplingLimits.md +10 -2
- package/dist/docs/reference/geometry/resolveGeometryTolerance.md +8 -2
- package/dist/docs/reference/geometry/roundClosedPolylinePath.md +17 -4
- package/dist/docs/reference/geometry/sampleContour.md +10 -4
- package/dist/docs/reference/geometry/sampleCurve2.md +12 -2
- package/dist/docs/reference/geometry/sampleCurve3.md +12 -2
- package/dist/docs/reference/geometry/sampleHelix.md +8 -2
- package/dist/docs/reference/geometry/sampleSideProfile.md +10 -4
- package/dist/docs/reference/geometry/sampleTextContours.md +9 -3
- package/dist/docs/reference/geometry/signedContourArea.md +10 -2
- package/dist/docs/reference/geometry/spline2.md +68 -0
- package/dist/docs/reference/geometry/spline3.md +62 -0
- package/dist/docs/reference/geometry/starContour.md +8 -2
- package/dist/docs/reference/geometry/strokeRegionData.md +14 -5
- package/dist/docs/reference/geometry/transform2.md +11 -3
- package/dist/docs/reference/geometry/transform3.md +29 -6
- package/dist/docs/reference/geometry/transformRegionData.md +12 -2
- package/dist/docs/reference/geometry/triangulateContour.md +11 -3
- package/dist/docs/reference/geometry/vector2.md +12 -4
- package/dist/docs/reference/geometry/vector3.md +14 -4
- package/dist/docs/reference/geometry.md +13 -18
- package/dist/docs/reference/{geometry → math}/AxisAngleRotation3.md +8 -3
- package/dist/docs/reference/math/IDENTITY_TRANSFORM3.md +20 -0
- package/dist/docs/reference/math/add2.md +38 -0
- package/dist/docs/reference/math/add3.md +46 -0
- package/dist/docs/reference/math/applyTransformDirection3.md +46 -0
- package/dist/docs/reference/math/applyTransformPoint3.md +44 -0
- package/dist/docs/reference/math/categories/tuple-matrix.md +67 -0
- package/dist/docs/reference/math/cross2.md +38 -0
- package/dist/docs/reference/math/cross3.md +44 -0
- package/dist/docs/reference/math/distance2.md +38 -0
- package/dist/docs/reference/math/distance3.md +38 -0
- package/dist/docs/reference/math/dot2.md +38 -0
- package/dist/docs/reference/math/dot3.md +44 -0
- package/dist/docs/reference/math/eulerTransform3.md +43 -0
- package/dist/docs/reference/math/inverseTransform3.md +36 -0
- package/dist/docs/reference/math/length2.md +32 -0
- package/dist/docs/reference/math/length3.md +32 -0
- package/dist/docs/reference/math/lerp2.md +46 -0
- package/dist/docs/reference/math/lerp3.md +46 -0
- package/dist/docs/reference/math/multiplyTransform3.md +46 -0
- package/dist/docs/reference/math/normalize2.md +45 -0
- package/dist/docs/reference/math/normalize3.md +45 -0
- package/dist/docs/reference/math/projectOntoPlane3.md +40 -0
- package/dist/docs/reference/math/rotate2.md +40 -0
- package/dist/docs/reference/math/rotationTransform3.md +56 -0
- package/dist/docs/reference/math/scale2.md +38 -0
- package/dist/docs/reference/math/scale3.md +44 -0
- package/dist/docs/reference/math/scaleTransform3.md +39 -0
- package/dist/docs/reference/math/subtract2.md +38 -0
- package/dist/docs/reference/math/subtract3.md +44 -0
- package/dist/docs/reference/math/transformDeterminant3.md +38 -0
- package/dist/docs/reference/math/translationTransform3.md +36 -0
- package/dist/docs/reference/math/validateRigidTransform3.md +38 -0
- package/dist/docs/reference/math/validateTransform3.md +48 -0
- package/dist/docs/reference/math.md +22 -0
- package/dist/docs/reference/{geometry → mechanical}/AcmeThreadProfileSpec.md +9 -4
- package/dist/docs/reference/{geometry → mechanical}/Bevel.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/BevelSize.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ButtressPressureFlankSide.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ButtressThreadProfileSpec.md +9 -4
- package/dist/docs/reference/{geometry → mechanical}/ClearanceHoleDimensions.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ClearanceHoleFit.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/CompensatedThreadDiameters.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/CustomThreadProfileSpec.md +10 -6
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearDimensions.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearMeshKind.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearOutlineOptions.md +9 -8
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearPairDimensions.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearPairMotionOptions.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearPairMotionReport.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearPairSpec.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearSpec.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/InternalThreadCutterOptions.md +11 -8
- package/dist/docs/reference/{geometry → mechanical}/KnuckleHingeBaseSpec.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/KnuckleHingeDimensions.md +9 -4
- package/dist/docs/reference/{geometry → mechanical}/KnuckleHingeInterval.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/KnuckleHingeSamplingOptions.md +9 -8
- package/dist/docs/reference/{geometry → mechanical}/KnuckleHingeSpec.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/METRIC_FASTENER_STANDARDS.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/MetricFastenerSize.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/MetricFastenerStandard.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/MetricHexNutDimensions.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/MetricSocketCapHeadDimensions.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/PRINTABLE_THREAD_FIT_POLICIES.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/PrintableThreadFit.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/PrintableThreadFitPolicy.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/RackPitchDimensions.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/RackPitchSpec.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/SampledThreadHelices.md +8 -6
- package/dist/docs/reference/{geometry → mechanical}/SquareThreadProfileSpec.md +9 -4
- package/dist/docs/reference/{geometry → mechanical}/ThreadBevelOptions.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ThreadCircularSegmentsOptions.md +10 -6
- package/dist/docs/reference/{geometry → mechanical}/ThreadCompensationOptions.md +9 -4
- package/dist/docs/reference/{geometry → mechanical}/ThreadEndStyle.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ThreadEndTreatmentOptions.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ThreadHandedness.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ThreadHelixOptions.md +10 -6
- package/dist/docs/reference/{geometry → mechanical}/ThreadLeadInEnvelope.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ThreadLeadInShape.md +8 -2
- package/dist/docs/reference/{mesh/ThreadProfile.md → mechanical/ThreadProfile-type.md} +8 -6
- package/dist/docs/reference/{geometry → mechanical}/ThreadProfileBaseSpec.md +9 -4
- package/dist/docs/reference/{geometry → mechanical}/ThreadProfileSpec.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ThreadRidgeOptions.md +12 -9
- package/dist/docs/reference/{geometry → mechanical}/ThreadRole.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ThreadSolidOptions.md +13 -10
- package/dist/docs/reference/{geometry → mechanical}/ThreadSolidPreflight.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/ThreadedNutOptions.md +12 -9
- package/dist/docs/reference/{geometry → mechanical}/ThreadedNutPreflight.md +8 -2
- package/dist/docs/reference/mechanical/ThreadedNutShape.md +20 -0
- package/dist/docs/reference/{geometry → mechanical}/ThreadedRodOptions.md +11 -8
- package/dist/docs/reference/{geometry → mechanical}/TrapezoidalThreadProfileSpec.md +9 -4
- package/dist/docs/reference/{geometry → mechanical}/TriangularThreadProfileSpec.md +9 -4
- package/dist/docs/reference/{geometry → mechanical}/categories/mechanical.md +9 -3
- package/dist/docs/reference/{geometry → mechanical}/compensateThreadDiameters.md +9 -3
- package/dist/docs/reference/{geometry → mechanical}/compensateThreadProfileAxially.md +17 -5
- package/dist/docs/reference/{geometry → mechanical}/compensateThreadProfileForFaceting.md +18 -2
- package/dist/docs/reference/{geometry → mechanical}/getMetricClearanceHoleDiameter.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/getMetricFastenerStandard.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/measureInternalCylindricalGearPairMotion.md +14 -6
- package/dist/docs/reference/{geometry → mechanical}/minimumCylindricalGearToothCountWithoutUndercut.md +10 -2
- package/dist/docs/reference/{geometry → mechanical}/preflightInternalThreadCutter.md +13 -5
- package/dist/docs/reference/{geometry → mechanical}/preflightThreadedNut.md +14 -6
- package/dist/docs/reference/{geometry → mechanical}/preflightThreadedRod.md +13 -5
- package/dist/docs/reference/{geometry → mechanical}/resolveCylindricalGear.md +10 -2
- package/dist/docs/reference/{geometry → mechanical}/resolveCylindricalGearPair.md +10 -2
- package/dist/docs/reference/{geometry → mechanical}/resolveKnuckleHinge.md +14 -6
- package/dist/docs/reference/{geometry → mechanical}/resolvePrintableThreadFitPolicy.md +10 -2
- package/dist/docs/reference/{geometry → mechanical}/resolveRackPitch.md +10 -2
- package/dist/docs/reference/{geometry → mechanical}/resolveThreadCircularSegments.md +12 -4
- package/dist/docs/reference/{geometry → mechanical}/sampleCylindricalGearOutline.md +14 -7
- package/dist/docs/reference/{geometry → mechanical}/sampleInternalCylindricalGearSpaceOutline.md +14 -7
- package/dist/docs/reference/{geometry → mechanical}/sampleRackToothPath.md +15 -7
- package/dist/docs/reference/{geometry → mechanical}/sampleThreadHelices.md +13 -5
- package/dist/docs/reference/{geometry → mechanical}/threadProfile.md +12 -2
- package/dist/docs/reference/mechanical.md +19 -0
- package/dist/docs/reference/mesh/ExtrudeMeshOptions.md +39 -40
- package/dist/docs/reference/mesh/HeightfieldMeshLimits.md +8 -6
- package/dist/docs/reference/mesh/HeightfieldPreflight.md +8 -2
- package/dist/docs/reference/mesh/ImmutableTriangleMesh.md +8 -6
- package/dist/docs/reference/mesh/LoftMeshStation.md +8 -7
- package/dist/docs/reference/mesh/MeshRenderOptions.md +28 -0
- package/dist/docs/reference/mesh/PlanarMeshOptimizationFallbackReason.md +9 -3
- package/dist/docs/reference/mesh/PlanarMeshOptimizationOptions.md +11 -6
- package/dist/docs/reference/mesh/PlanarMeshOptimizationResult.md +13 -7
- package/dist/docs/reference/mesh/PlanarPatchQuality.md +7 -5
- package/dist/docs/reference/mesh/RenderMesh.md +68 -0
- package/dist/docs/reference/mesh/SolidMeshValidationOptions.md +7 -5
- package/dist/docs/reference/mesh/TriangleMesh.md +16 -2
- package/dist/docs/reference/mesh/TriangleMeshAnalysis.md +16 -11
- package/dist/docs/reference/mesh/TriangleMeshAnalysisOptions.md +12 -7
- package/dist/docs/reference/mesh/TriangleMeshInput.md +9 -3
- package/dist/docs/reference/mesh/TriangleMeshMeasurements.md +10 -5
- package/dist/docs/reference/mesh/TriangleMeshQualityOptions.md +9 -4
- package/dist/docs/reference/mesh/TriangleMeshQualityReport.md +9 -3
- package/dist/docs/reference/mesh/TriangleMeshSignature.md +9 -4
- package/dist/docs/reference/mesh/TriangleMeshSignatureOptions.md +8 -2
- package/dist/docs/reference/mesh/TriangleMeshSignatureTolerances.md +8 -2
- package/dist/docs/reference/mesh/TriangleMeshTopologyAnalysis.md +17 -12
- package/dist/docs/reference/mesh/TriangleMeshValidationOptions.md +9 -4
- package/dist/docs/reference/mesh/analyze.md +28 -14
- package/dist/docs/reference/mesh/analyzeQuality.md +15 -9
- package/dist/docs/reference/mesh/bounds.md +10 -5
- package/dist/docs/reference/mesh/categories/operations.md +24 -81
- package/dist/docs/reference/mesh/centroid.md +10 -5
- package/dist/docs/reference/mesh/extrude.md +25 -18
- package/dist/docs/reference/mesh/heightfield.md +13 -7
- package/dist/docs/reference/mesh/immutable.md +16 -10
- package/dist/docs/reference/mesh/join.md +11 -5
- package/dist/docs/reference/mesh/loft.md +23 -16
- package/dist/docs/reference/mesh/optimizePlanarPatches.md +24 -18
- package/dist/docs/reference/mesh/preflightHeightfield.md +13 -7
- package/dist/docs/reference/mesh/preflightThreadSolid.md +27 -24
- package/dist/docs/reference/mesh/render.md +59 -0
- package/dist/docs/reference/mesh/reverse.md +11 -5
- package/dist/docs/reference/mesh/revolve.md +17 -13
- package/dist/docs/reference/mesh/signature.md +15 -9
- package/dist/docs/reference/mesh/sweep.md +101 -24
- package/dist/docs/reference/mesh/threadRidge.md +24 -17
- package/dist/docs/reference/mesh/threadSolid.md +28 -21
- package/dist/docs/reference/mesh/transform.md +12 -7
- package/dist/docs/reference/mesh/validate.md +15 -9
- package/dist/docs/reference/mesh/validateSolid.md +14 -8
- package/dist/docs/reference/mesh.md +8 -2
- package/dist/docs/reference/model/BoxEdge.md +11 -3
- package/dist/docs/reference/model/BoxEdgeSelection.md +11 -3
- package/dist/docs/reference/model/BoxEdgeTreatments.md +12 -5
- package/dist/docs/reference/model/BoxOptions.md +14 -9
- package/dist/docs/reference/model/CircleOptions.md +11 -6
- package/dist/docs/reference/model/CornerCutterOptions.md +93 -0
- package/dist/docs/reference/model/CornerCutterTreatment.md +53 -0
- package/dist/docs/reference/model/CutterOverrun.md +43 -0
- package/dist/docs/reference/model/CylinderOptions.md +12 -6
- package/dist/docs/reference/model/DiagnosticOptions.md +7 -1
- package/dist/docs/reference/model/EdgeCutterOptions.md +129 -0
- package/dist/docs/reference/model/EllipseOptions.md +11 -6
- package/dist/docs/reference/model/EndTreatments.md +13 -9
- package/dist/docs/reference/model/ExtrudeOptions.md +48 -44
- package/dist/docs/reference/model/GenerateCallback.md +7 -1
- package/dist/docs/reference/model/GenerateContext.md +23 -24
- package/dist/docs/reference/model/GenerationDiagnostic.md +7 -1
- package/dist/docs/reference/model/GenerationError.md +8 -2
- package/dist/docs/reference/model/HeightfieldOptions.md +8 -8
- package/dist/docs/reference/model/HoleCutterOpening.md +27 -0
- package/dist/docs/reference/model/HoleCutterOptions.md +19 -25
- package/dist/docs/reference/model/HoleCutterRecess.md +13 -5
- package/dist/docs/reference/model/HullOptions.md +12 -6
- package/dist/docs/reference/model/ImmutableValue.md +7 -1
- package/dist/docs/reference/model/ImplicitOptions.md +9 -9
- package/dist/docs/reference/model/JoinOptions.md +73 -0
- package/dist/docs/reference/model/JoinTransition.md +54 -0
- package/dist/docs/reference/model/KnuckleHinge-type.md +8 -3
- package/dist/docs/reference/model/KnuckleHingeHalfOptions.md +7 -1
- package/dist/docs/reference/model/KnuckleHingeOptions.md +8 -4
- package/dist/docs/reference/model/KnuckleHingeWeb.md +7 -1
- package/dist/docs/reference/model/LoftCorrespondence.md +13 -5
- package/dist/docs/reference/model/LoftOptions.md +16 -10
- package/dist/docs/reference/model/LoftStation.md +16 -10
- package/dist/docs/reference/model/Memo.md +54 -0
- package/dist/docs/reference/model/ModelProgram.md +7 -1
- package/dist/docs/reference/model/PartDeclaration.md +12 -8
- package/dist/docs/reference/model/PartGeometry.md +8 -4
- package/dist/docs/reference/model/PartOptions.md +12 -8
- package/dist/docs/reference/model/PatternSource.md +11 -5
- package/dist/docs/reference/model/PlaneOptions.md +11 -8
- package/dist/docs/reference/model/PolygonOptions.md +17 -16
- package/dist/docs/reference/model/PrimitiveAttachment.md +15 -4
- package/dist/docs/reference/model/PrimitiveAttachmentOptions.md +18 -17
- package/dist/docs/reference/model/RectangleOptions.md +31 -30
- package/dist/docs/reference/model/RegularPolygonOptions.md +11 -38
- package/dist/docs/reference/model/RevolveOptions.md +19 -17
- package/dist/docs/reference/model/Section.md +128 -72
- package/dist/docs/reference/model/SectionHullOptions.md +12 -6
- package/dist/docs/reference/model/SectionInspection.md +8 -6
- package/dist/docs/reference/model/SectionOffsetJoin.md +10 -4
- package/dist/docs/reference/model/SectionOffsetOptions.md +11 -6
- package/dist/docs/reference/model/Solid.md +113 -53
- package/dist/docs/reference/model/SolidInspection.md +8 -6
- package/dist/docs/reference/model/SolidSegmentHit.md +9 -7
- package/dist/docs/reference/model/SphereOptions.md +12 -5
- package/dist/docs/reference/model/StarOptions.md +33 -29
- package/dist/docs/reference/model/SvgOrigin.md +10 -4
- package/dist/docs/reference/model/SvgPathSectionOptions.md +13 -9
- package/dist/docs/reference/model/SvgSectionOptions.md +14 -11
- package/dist/docs/reference/model/SweepOptions.md +21 -28
- package/dist/docs/reference/model/SweepOrientation.md +19 -16
- package/dist/docs/reference/model/SweepTransformOptions.md +105 -0
- package/dist/docs/reference/model/TextSectionOptions.md +11 -10
- package/dist/docs/reference/model/TorusOptions.md +13 -7
- package/dist/docs/reference/model/TubeOptions.md +25 -8
- package/dist/docs/reference/model/box.md +14 -6
- package/dist/docs/reference/model/categories/boolean-operations.md +16 -4
- package/dist/docs/reference/model/categories/bounded-surfaces.md +7 -1
- package/dist/docs/reference/model/categories/extrude-revolve-sweep.md +21 -16
- package/dist/docs/reference/model/categories/generation.md +15 -12
- package/dist/docs/reference/model/categories/hinges.md +7 -4
- package/dist/docs/reference/model/categories/mesh-inspection.md +8 -6
- package/dist/docs/reference/model/categories/primitives.md +32 -20
- package/dist/docs/reference/model/categories/sections.md +11 -16
- package/dist/docs/reference/model/categories/threads.md +9 -43
- package/dist/docs/reference/model/categories/transforms-placement.md +17 -41
- package/dist/docs/reference/model/circle.md +15 -5
- package/dist/docs/reference/model/cornerCutter.md +88 -0
- package/dist/docs/reference/model/cylinder.md +11 -3
- package/dist/docs/reference/model/edgeCutter.md +91 -0
- package/dist/docs/reference/model/ellipse.md +15 -5
- package/dist/docs/reference/model/extrude.md +37 -24
- package/dist/docs/reference/model/generate.md +10 -2
- package/dist/docs/reference/model/gridPattern.md +22 -9
- package/dist/docs/reference/model/heightfield.md +7 -1
- package/dist/docs/reference/model/holeCutter.md +34 -13
- package/dist/docs/reference/model/hull.md +9 -2
- package/dist/docs/reference/model/implicit.md +10 -4
- package/dist/docs/reference/model/internalThreadCutter.md +38 -21
- package/dist/docs/reference/model/intersect.md +14 -3
- package/dist/docs/reference/model/join.md +93 -0
- package/dist/docs/reference/model/knuckleHinge.md +7 -2
- package/dist/docs/reference/model/linearPattern.md +22 -9
- package/dist/docs/reference/model/loft.md +27 -16
- package/dist/docs/reference/model/minkowskiSum.md +10 -3
- package/dist/docs/reference/model/pathPattern.md +36 -21
- package/dist/docs/reference/model/polygon.md +18 -7
- package/dist/docs/reference/model/radialPattern.md +22 -9
- package/dist/docs/reference/model/rectangle.md +22 -12
- package/dist/docs/reference/model/regularPolygon.md +15 -5
- package/dist/docs/reference/model/revolve.md +26 -13
- package/dist/docs/reference/model/solidFromMesh.md +16 -6
- package/dist/docs/reference/model/sphere.md +12 -4
- package/dist/docs/reference/model/star.md +20 -10
- package/dist/docs/reference/model/stroke.md +29 -19
- package/dist/docs/reference/model/svgPathSection.md +20 -8
- package/dist/docs/reference/model/svgSection.md +21 -9
- package/dist/docs/reference/model/sweep.md +108 -24
- package/dist/docs/reference/model/textSection.md +19 -9
- package/dist/docs/reference/model/threadRidge.md +22 -17
- package/dist/docs/reference/model/threadedNut.md +31 -22
- package/dist/docs/reference/model/threadedRod.md +27 -18
- package/dist/docs/reference/model/torus.md +13 -5
- package/dist/docs/reference/model/tube.md +11 -3
- package/dist/docs/reference/model/union.md +14 -3
- package/dist/docs/reference/model.md +11 -11
- package/dist/docs/reference/text/MAX_VECTOR_FONT_BYTES.md +7 -1
- package/dist/docs/reference/text/VectorFont.md +22 -12
- package/dist/docs/reference/text/VectorFontOptions.md +7 -1
- package/dist/docs/reference/text/VectorTextArcBaseline.md +7 -1
- package/dist/docs/reference/text/VectorTextLayoutOptions.md +8 -2
- package/dist/docs/reference/text/VectorTextOptions.md +7 -1
- package/dist/docs/reference/text/categories/font-preparation.md +7 -10
- package/dist/docs/reference/text/prepareVectorFont.md +9 -1
- package/dist/docs/reference/text.md +7 -1
- package/dist/engine/execution.js +5 -3
- package/dist/engine/finalization.js +6 -78
- package/dist/engine/index.js +11 -6
- package/dist/engine/native/adapter.js +1 -1
- package/dist/engine/native/construction-mesh.js +51 -0
- package/dist/engine/native/context.js +10 -7
- package/dist/engine/native/index.js +1 -1
- package/dist/engine/native/material-components.js +4 -53
- package/dist/engine/native/mesh-observation.js +55 -0
- package/dist/engine/native/regions.js +44 -23
- package/dist/engine/native/scoped-primitives.js +3 -3
- package/dist/engine/native/scoped-threads.js +1 -13
- package/dist/engine/native/threads.js +2 -2
- package/dist/engine/native/transforms.js +2 -2
- package/dist/engine/operations/construction.js +77 -27
- package/dist/engine/operations/context.js +15 -6
- package/dist/engine/operations/cutters.js +112 -0
- package/dist/engine/operations/environment.js +2 -2
- package/dist/engine/operations/extrusion-finishing.js +56 -29
- package/dist/engine/operations/hole-cutter.js +125 -114
- package/dist/engine/operations/join-collar-profile.js +120 -0
- package/dist/engine/operations/join.js +521 -0
- package/dist/engine/operations/knuckle-hinge.js +25 -20
- package/dist/engine/operations/loft.js +9 -16
- package/dist/engine/operations/mechanical.js +4 -15
- package/dist/engine/operations/primitives/anchors.js +23 -19
- package/dist/engine/operations/primitives/construction.js +38 -12
- package/dist/engine/operations/primitives/correspondence.js +2 -2
- package/dist/engine/operations/primitives/profile-mesh.js +41 -80
- package/dist/engine/operations/primitives/profiles.js +5 -5
- package/dist/engine/operations/sections.js +8 -8
- package/dist/engine/operations/transforms.js +19 -39
- package/dist/engine/placement.js +3 -3
- package/dist/engine/recipe-realization.js +87 -31
- package/dist/engine/session/declarations.js +98 -0
- package/dist/engine/session/dependencies.js +139 -39
- package/dist/engine/session/graph.js +290 -411
- package/dist/engine/session/native-cache.js +1 -1
- package/dist/engine/session/parameters.js +78 -0
- package/dist/engine/session/session.js +7 -7
- package/dist/engine/session/snapshot-cache.js +4 -4
- package/dist/engine/shape-anchors.js +13 -6
- package/dist/export/3mf.js +197 -0
- package/dist/export/capture.js +182 -0
- package/dist/export/glb.js +214 -0
- package/dist/export/index.js +5 -0
- package/dist/export/limits.js +18 -0
- package/dist/export/stl.js +120 -0
- package/dist/export/writer.js +54 -0
- package/dist/geometry/{bounds.js → bounds/operations.js} +3 -1
- package/dist/geometry/{bounds-value.js → bounds/value.js} +24 -20
- package/dist/geometry/curves/evaluation.js +5 -6
- package/dist/geometry/curves/sampling.js +30 -6
- package/dist/geometry/{extrusion.js → extrusion/controls.js} +58 -35
- package/dist/geometry/extrusion/mesh.js +92 -0
- package/dist/geometry/extrusion/stations.js +35 -0
- package/dist/geometry/extrusion/twisted-chamfer.js +265 -0
- package/dist/geometry/immutable-buffer.js +11 -7
- package/dist/geometry/index.js +24 -32
- package/dist/geometry/{model-limits.js → limits.js} +1 -1
- package/dist/geometry/loft/{loft-correspondence.js → correspondence.js} +31 -20
- package/dist/geometry/loft/{loft-geometry.js → geometry.js} +15 -17
- package/dist/geometry/loft/mesh.js +53 -0
- package/dist/geometry/loft/{loft-options.js → options.js} +13 -11
- package/dist/geometry/loft/{loft-simple-mesh.js → simple-mesh.js} +26 -17
- package/dist/geometry/math/interpolation.js +9 -0
- package/dist/geometry/math/vector-value.js +12 -3
- package/dist/geometry/math/vector2.js +18 -5
- package/dist/geometry/math/vector3.js +28 -5
- package/dist/geometry/math-api.js +4 -0
- package/dist/geometry/mechanical/gear-motion.js +7 -5
- package/dist/geometry/mechanical/gears.js +21 -4
- package/dist/geometry/mechanical/knuckle-hinge.js +7 -5
- package/dist/geometry/mechanical/threads/fit.js +8 -2
- package/dist/geometry/mechanical/threads/helices.js +4 -2
- package/dist/geometry/mechanical/threads/mesh-plan.js +4 -2
- package/dist/geometry/mechanical/threads/mesh.js +12 -9
- package/dist/geometry/mechanical/threads/profiles.js +18 -4
- package/dist/geometry/mechanical/threads/solids.js +11 -2
- package/dist/geometry/mechanical-api.js +10 -0
- package/dist/geometry/mesh/{mesh-centroid.js → centroid.js} +2 -1
- package/dist/geometry/{heightfield.js → mesh/heightfield.js} +9 -5
- package/dist/geometry/mesh/join-layers.js +833 -0
- package/dist/geometry/mesh/{mesh.js → operations.js} +11 -18
- package/dist/geometry/mesh/{mesh-planar.js → planar.js} +8 -18
- package/dist/geometry/mesh/{mesh-quality.js → quality.js} +10 -42
- package/dist/geometry/mesh/render-buffers.js +220 -0
- package/dist/geometry/mesh/{mesh-signature.js → signature.js} +1 -1
- package/dist/geometry/mesh/{mesh-solid-intersections.js → solid-intersections.js} +45 -17
- package/dist/geometry/mesh/{mesh-solid.js → solid.js} +10 -6
- package/dist/geometry/mesh/triangle-quality.js +42 -0
- package/dist/geometry/mesh/winding.js +11 -0
- package/dist/geometry/{numeric.js → mesh/write-vertex.js} +1 -1
- package/dist/geometry/mesh-api.js +12 -10
- package/dist/geometry/paths/distribution.js +43 -0
- package/dist/geometry/paths/editing.js +76 -0
- package/dist/geometry/paths/frames.js +16 -11
- package/dist/geometry/paths/helix.js +1 -1
- package/dist/geometry/paths/resampling.js +46 -61
- package/dist/geometry/paths/{planar.js → rounding.js} +8 -67
- package/dist/geometry/paths/spline.js +116 -0
- package/dist/geometry/paths/traversal.js +107 -0
- package/dist/geometry/paths/{path-value.js → value.js} +97 -18
- package/dist/geometry/patterns/placements.js +20 -29
- package/dist/geometry/{patterns.js → patterns/transforms.js} +11 -7
- package/dist/geometry/primitives/cutters.js +70 -0
- package/dist/geometry/{cylinder.js → primitives/cylinder.js} +4 -4
- package/dist/geometry/{edge-finishing.js → primitives/edges.js} +5 -5
- package/dist/geometry/{primitive-resolvers.js → primitives/resolvers.js} +9 -9
- package/dist/geometry/primitives/sampling.js +41 -0
- package/dist/geometry/profiles/contour.js +19 -7
- package/dist/geometry/profiles/{match-profiles.js → matching.js} +9 -6
- package/dist/geometry/profiles/primitives/circle.js +1 -1
- package/dist/geometry/profiles/primitives/ellipse.js +2 -2
- package/dist/geometry/profiles/primitives/rectangle.js +8 -8
- package/dist/geometry/profiles/primitives/star.js +1 -1
- package/dist/geometry/profiles/side-profile.js +8 -5
- package/dist/geometry/profiles/validation.js +1 -1
- package/dist/geometry/{polygon-clipping.js → regions/clipping.js} +1 -1
- package/dist/geometry/{convex-offset.js → regions/convex-offset.js} +1 -1
- package/dist/geometry/regions/offset.js +280 -0
- package/dist/geometry/{regions.js → regions/operations.js} +70 -23
- package/dist/geometry/{stroke-path.js → regions/stroke.js} +46 -20
- package/dist/geometry/{loft/loft-triangulation.js → regions/triangulation.js} +35 -2
- package/dist/geometry/revolve/{revolve-mesh.js → mesh.js} +9 -10
- package/dist/geometry/{circular-sampling.js → sampling/circular.js} +3 -3
- package/dist/geometry/{sampling-limits.js → sampling/limits.js} +6 -2
- package/dist/geometry/{resolution.js → sampling/resolution.js} +15 -14
- package/dist/geometry/svg/fill.js +4 -3
- package/dist/geometry/svg/import.js +47 -64
- package/dist/geometry/svg/path.js +3 -3
- package/dist/geometry/sweep/closed.js +55 -0
- package/dist/geometry/sweep/mesh.js +30 -0
- package/dist/geometry/{sweeps/sweep-open.js → sweep/open.js} +9 -24
- package/dist/geometry/sweep/options.js +1 -0
- package/dist/geometry/{sweeps → sweep}/orientation.js +14 -11
- package/dist/geometry/sweep/seam.js +30 -0
- package/dist/geometry/{sweeps → sweep}/stations.js +75 -10
- package/dist/geometry/sweep/transforms.js +30 -0
- package/dist/geometry/{sweeps → sweep}/validation.js +4 -4
- package/dist/geometry/{text-contours.js → text/contours.js} +3 -3
- package/dist/geometry/{text-fitting.js → text/fitting.js} +4 -3
- package/dist/geometry/text/layout.js +1 -0
- package/dist/geometry/{transform3.js → transforms/affine3.js} +31 -46
- package/dist/geometry/{anchors.js → transforms/anchors.js} +43 -24
- package/dist/geometry/{transform-geometry.js → transforms/apply.js} +8 -5
- package/dist/geometry/{transform2.js → transforms/dimensions.js} +23 -19
- package/dist/geometry/transforms/frame.js +64 -0
- package/dist/geometry/{transform-matrix.js → transforms/matrix-input.js} +8 -1
- package/dist/geometry/{transform-value.js → transforms/value.js} +29 -11
- package/dist/index.js +3 -9
- package/dist/model/cutters.js +1 -0
- package/dist/model/execution-binding.js +3 -3
- package/dist/model/generation.js +4 -2
- package/dist/model/immutable-generation-data.js +15 -13
- package/dist/model/join.js +1 -0
- package/dist/model/operations.js +150 -94
- package/dist/model/recipe-declaration.js +6 -7
- package/dist/model/shape-handles.js +1 -0
- package/dist/text/index.js +3 -0
- package/dist/text/vector-text-layout.js +1 -0
- package/package.json +20 -5
- package/dist/docs/reference/engine/Export3mfOptions.md +0 -46
- package/dist/docs/reference/engine/ExportMeshPart.md +0 -31
- package/dist/docs/reference/engine/ModelingLimits.md +0 -121
- package/dist/docs/reference/engine/export3mf.md +0 -55
- package/dist/docs/reference/geometry/BoxEdge.md +0 -7
- package/dist/docs/reference/geometry/BoxEdgeSelection.md +0 -14
- package/dist/docs/reference/geometry/BoxEdgeTreatments.md +0 -15
- package/dist/docs/reference/geometry/BoxOptions.md +0 -87
- package/dist/docs/reference/geometry/CylinderOptions.md +0 -53
- package/dist/docs/reference/geometry/EndTreatments.md +0 -34
- package/dist/docs/reference/geometry/ExtrudeMeshOptions.md +0 -130
- package/dist/docs/reference/geometry/ExtrudeOptions.md +0 -146
- package/dist/docs/reference/geometry/HeightfieldMeshLimits.md +0 -18
- package/dist/docs/reference/geometry/HeightfieldOptions.md +0 -72
- package/dist/docs/reference/geometry/HeightfieldPreflight.md +0 -58
- package/dist/docs/reference/geometry/IDENTITY_TRANSFORM3.md +0 -19
- package/dist/docs/reference/geometry/ImmutableTriangleMesh.md +0 -43
- package/dist/docs/reference/geometry/LoftCorrespondence.md +0 -24
- package/dist/docs/reference/geometry/LoftMeshStation.md +0 -31
- package/dist/docs/reference/geometry/LoftOptions.md +0 -88
- package/dist/docs/reference/geometry/PlanarMeshOptimizationFallbackReason.md +0 -14
- package/dist/docs/reference/geometry/PlanarMeshOptimizationOptions.md +0 -160
- package/dist/docs/reference/geometry/PlanarMeshOptimizationResult.md +0 -124
- package/dist/docs/reference/geometry/PlanarPatchQuality.md +0 -194
- package/dist/docs/reference/geometry/PrimitiveAttachment.md +0 -29
- package/dist/docs/reference/geometry/PrimitiveAttachmentOptions.md +0 -104
- package/dist/docs/reference/geometry/RevolveOptions.md +0 -91
- package/dist/docs/reference/geometry/SolidMeshValidationOptions.md +0 -38
- package/dist/docs/reference/geometry/SphereOptions.md +0 -15
- package/dist/docs/reference/geometry/SweepOptions.md +0 -113
- package/dist/docs/reference/geometry/SweepOrientation.md +0 -113
- package/dist/docs/reference/geometry/ThreadProfile-type.md +0 -86
- package/dist/docs/reference/geometry/ThreadedNutShape.md +0 -14
- package/dist/docs/reference/geometry/TorusOptions.md +0 -105
- package/dist/docs/reference/geometry/TriangleMesh.md +0 -34
- package/dist/docs/reference/geometry/TriangleMeshAnalysis.md +0 -129
- package/dist/docs/reference/geometry/TriangleMeshAnalysisOptions.md +0 -79
- package/dist/docs/reference/geometry/TriangleMeshInput.md +0 -19
- package/dist/docs/reference/geometry/TriangleMeshMeasurements.md +0 -79
- package/dist/docs/reference/geometry/TriangleMeshQualityOptions.md +0 -43
- package/dist/docs/reference/geometry/TriangleMeshQualityReport.md +0 -194
- package/dist/docs/reference/geometry/TriangleMeshSignature.md +0 -111
- package/dist/docs/reference/geometry/TriangleMeshSignatureOptions.md +0 -46
- package/dist/docs/reference/geometry/TriangleMeshSignatureTolerances.md +0 -34
- package/dist/docs/reference/geometry/TriangleMeshTopologyAnalysis.md +0 -131
- package/dist/docs/reference/geometry/TriangleMeshValidationOptions.md +0 -55
- package/dist/docs/reference/geometry/TubeOptions.md +0 -62
- package/dist/docs/reference/geometry/VectorTextArcBaseline.md +0 -58
- package/dist/docs/reference/geometry/VectorTextLayoutOptions.md +0 -115
- package/dist/docs/reference/geometry/VectorTextOptions.md +0 -54
- package/dist/docs/reference/geometry/add2.md +0 -37
- package/dist/docs/reference/geometry/add3.md +0 -43
- package/dist/docs/reference/geometry/applyTransformDirection3.md +0 -46
- package/dist/docs/reference/geometry/applyTransformPoint3.md +0 -44
- package/dist/docs/reference/geometry/categories/meshes.md +0 -68
- package/dist/docs/reference/geometry/composeTransform3.md +0 -45
- package/dist/docs/reference/geometry/cross2.md +0 -37
- package/dist/docs/reference/geometry/cross3.md +0 -43
- package/dist/docs/reference/geometry/distance2.md +0 -37
- package/dist/docs/reference/geometry/distance3.md +0 -37
- package/dist/docs/reference/geometry/dot2.md +0 -37
- package/dist/docs/reference/geometry/dot3.md +0 -43
- package/dist/docs/reference/geometry/eulerTransform3.md +0 -43
- package/dist/docs/reference/geometry/frameTransform3.md +0 -49
- package/dist/docs/reference/geometry/inverseTransform3.md +0 -35
- package/dist/docs/reference/geometry/length2.md +0 -31
- package/dist/docs/reference/geometry/length3.md +0 -31
- package/dist/docs/reference/geometry/lerp2.md +0 -43
- package/dist/docs/reference/geometry/lerp3.md +0 -43
- package/dist/docs/reference/geometry/normalize2.md +0 -40
- package/dist/docs/reference/geometry/normalize3.md +0 -40
- package/dist/docs/reference/geometry/projectOntoPlane3.md +0 -37
- package/dist/docs/reference/geometry/resolveExtrusionDivisions.md +0 -78
- package/dist/docs/reference/geometry/rotate2.md +0 -37
- package/dist/docs/reference/geometry/rotationTransform3.md +0 -54
- package/dist/docs/reference/geometry/scale2.md +0 -37
- package/dist/docs/reference/geometry/scale3.md +0 -43
- package/dist/docs/reference/geometry/scaleTransform3.md +0 -39
- package/dist/docs/reference/geometry/subtract2.md +0 -37
- package/dist/docs/reference/geometry/subtract3.md +0 -43
- package/dist/docs/reference/geometry/transformDeterminant3.md +0 -37
- package/dist/docs/reference/geometry/translationTransform3.md +0 -36
- package/dist/docs/reference/geometry/validateRigidTransform3.md +0 -35
- package/dist/docs/reference/geometry/validateTransform3.md +0 -48
- package/dist/docs/reference/mesh/AcmeThreadProfileSpec.md +0 -79
- package/dist/docs/reference/mesh/Bevel.md +0 -18
- package/dist/docs/reference/mesh/BevelSize.md +0 -14
- package/dist/docs/reference/mesh/Bounds2.md +0 -125
- package/dist/docs/reference/mesh/Bounds2Data.md +0 -43
- package/dist/docs/reference/mesh/Bounds2Input.md +0 -19
- package/dist/docs/reference/mesh/Bounds3.md +0 -125
- package/dist/docs/reference/mesh/Bounds3Data.md +0 -43
- package/dist/docs/reference/mesh/Bounds3Input.md +0 -19
- package/dist/docs/reference/mesh/ButtressPressureFlankSide.md +0 -14
- package/dist/docs/reference/mesh/ButtressThreadProfileSpec.md +0 -97
- package/dist/docs/reference/mesh/CircularPrimitiveOptions.md +0 -60
- package/dist/docs/reference/mesh/CurveSamplingOptions.md +0 -69
- package/dist/docs/reference/mesh/CustomThreadProfileSpec.md +0 -77
- package/dist/docs/reference/mesh/ExtrusionSamplingOptions.md +0 -81
- package/dist/docs/reference/mesh/Frame3.md +0 -62
- package/dist/docs/reference/mesh/GeometryResolution.md +0 -74
- package/dist/docs/reference/mesh/GeometrySamplingLimits.md +0 -66
- package/dist/docs/reference/mesh/GeometryToleranceOptions.md +0 -46
- package/dist/docs/reference/mesh/HeightfieldOptions.md +0 -72
- package/dist/docs/reference/mesh/ImmutableBuffer.md +0 -108
- package/dist/docs/reference/mesh/LoftCorrespondence.md +0 -24
- package/dist/docs/reference/mesh/LoftOptions.md +0 -88
- package/dist/docs/reference/mesh/LoftPlacement.md +0 -70
- package/dist/docs/reference/mesh/ModelingLimits.md +0 -130
- package/dist/docs/reference/mesh/NumericArray.md +0 -14
- package/dist/docs/reference/mesh/Path2.md +0 -197
- package/dist/docs/reference/mesh/Path2Data.md +0 -50
- package/dist/docs/reference/mesh/Path2Input.md +0 -20
- package/dist/docs/reference/mesh/Path3.md +0 -197
- package/dist/docs/reference/mesh/Path3Data.md +0 -50
- package/dist/docs/reference/mesh/Path3Input.md +0 -20
- package/dist/docs/reference/mesh/PathLocation.md +0 -69
- package/dist/docs/reference/mesh/PathNormalGuide.md +0 -43
- package/dist/docs/reference/mesh/PathResamplingOptions.md +0 -84
- package/dist/docs/reference/mesh/Pivot2Options.md +0 -26
- package/dist/docs/reference/mesh/Pivot3Options.md +0 -26
- package/dist/docs/reference/mesh/RevolveOptions.md +0 -91
- package/dist/docs/reference/mesh/SquareThreadProfileSpec.md +0 -79
- package/dist/docs/reference/mesh/SweepOptions.md +0 -113
- package/dist/docs/reference/mesh/SweepOrientation.md +0 -113
- package/dist/docs/reference/mesh/ThreadEndStyle.md +0 -14
- package/dist/docs/reference/mesh/ThreadEndTreatmentOptions.md +0 -117
- package/dist/docs/reference/mesh/ThreadHandedness.md +0 -14
- package/dist/docs/reference/mesh/ThreadLeadInEnvelope.md +0 -14
- package/dist/docs/reference/mesh/ThreadLeadInShape.md +0 -14
- package/dist/docs/reference/mesh/ThreadProfileBaseSpec.md +0 -53
- package/dist/docs/reference/mesh/ThreadProfileSpec.md +0 -23
- package/dist/docs/reference/mesh/ThreadRidgeOptions.md +0 -145
- package/dist/docs/reference/mesh/ThreadSolidOptions.md +0 -222
- package/dist/docs/reference/mesh/ThreadSolidPreflight.md +0 -58
- package/dist/docs/reference/mesh/Transform2.md +0 -256
- package/dist/docs/reference/mesh/Transform2Data.md +0 -14
- package/dist/docs/reference/mesh/Transform2Input.md +0 -19
- package/dist/docs/reference/mesh/Transform3.md +0 -296
- package/dist/docs/reference/mesh/Transform3Data.md +0 -17
- package/dist/docs/reference/mesh/Transform3Input.md +0 -19
- package/dist/docs/reference/mesh/TrapezoidalThreadProfileSpec.md +0 -96
- package/dist/docs/reference/mesh/TriangularThreadProfileSpec.md +0 -95
- package/dist/docs/reference/mesh/Vector2.md +0 -270
- package/dist/docs/reference/mesh/Vector2Data.md +0 -14
- package/dist/docs/reference/mesh/Vector2Input.md +0 -19
- package/dist/docs/reference/mesh/Vector3.md +0 -282
- package/dist/docs/reference/mesh/Vector3Data.md +0 -14
- package/dist/docs/reference/mesh/Vector3Input.md +0 -19
- package/dist/docs/reference/model/AcmeThreadProfileSpec.md +0 -80
- package/dist/docs/reference/model/Anchor3.md +0 -55
- package/dist/docs/reference/model/AttachOptions.md +0 -69
- package/dist/docs/reference/model/Bevel.md +0 -19
- package/dist/docs/reference/model/BevelSize.md +0 -15
- package/dist/docs/reference/model/Bounds2-type.md +0 -125
- package/dist/docs/reference/model/Bounds2Data.md +0 -44
- package/dist/docs/reference/model/Bounds2Input.md +0 -19
- package/dist/docs/reference/model/Bounds2Options.md +0 -110
- package/dist/docs/reference/model/Bounds3-type.md +0 -125
- package/dist/docs/reference/model/Bounds3Data.md +0 -44
- package/dist/docs/reference/model/Bounds3Input.md +0 -19
- package/dist/docs/reference/model/Bounds3Options.md +0 -110
- package/dist/docs/reference/model/ButtressPressureFlankSide.md +0 -15
- package/dist/docs/reference/model/ButtressThreadProfileSpec.md +0 -98
- package/dist/docs/reference/model/ChamferedEdgeTreatment.md +0 -35
- package/dist/docs/reference/model/CircleContourOptions.md +0 -21
- package/dist/docs/reference/model/CircularPrimitiveOptions.md +0 -62
- package/dist/docs/reference/model/Computed.md +0 -44
- package/dist/docs/reference/model/ComputedValue.md +0 -24
- package/dist/docs/reference/model/Contour.md +0 -24
- package/dist/docs/reference/model/CorrespondingComponent.md +0 -46
- package/dist/docs/reference/model/CorrespondingContour.md +0 -46
- package/dist/docs/reference/model/CorrespondingProfile.md +0 -22
- package/dist/docs/reference/model/CorrespondingProfileStation.md +0 -27
- package/dist/docs/reference/model/CurveSamplingOptions.md +0 -68
- package/dist/docs/reference/model/CustomThreadProfileSpec.md +0 -78
- package/dist/docs/reference/model/EdgeTreatment.md +0 -22
- package/dist/docs/reference/model/EllipseContourOptions.md +0 -21
- package/dist/docs/reference/model/ExtrudeMeshOptions.md +0 -133
- package/dist/docs/reference/model/ExtrusionSamplingOptions.md +0 -84
- package/dist/docs/reference/model/Frame3.md +0 -63
- package/dist/docs/reference/model/GeometryError.md +0 -102
- package/dist/docs/reference/model/GeometryErrorCode.md +0 -15
- package/dist/docs/reference/model/GeometryErrorContext.md +0 -35
- package/dist/docs/reference/model/GeometryResolution.md +0 -70
- package/dist/docs/reference/model/GeometrySamplingLimits.md +0 -62
- package/dist/docs/reference/model/GeometryToleranceOptions.md +0 -46
- package/dist/docs/reference/model/GridPatternOptions.md +0 -50
- package/dist/docs/reference/model/HoleCutterOverrun.md +0 -35
- package/dist/docs/reference/model/ImmutableBuffer-type.md +0 -108
- package/dist/docs/reference/model/ImmutableTriangleMesh.md +0 -43
- package/dist/docs/reference/model/InternalThreadCutterOptions.md +0 -216
- package/dist/docs/reference/model/KnuckleHingeBaseSpec.md +0 -77
- package/dist/docs/reference/model/KnuckleHingeSamplingOptions.md +0 -47
- package/dist/docs/reference/model/KnuckleHingeSpec.md +0 -18
- package/dist/docs/reference/model/LinearPatternOptions.md +0 -39
- package/dist/docs/reference/model/LoftPlacement.md +0 -73
- package/dist/docs/reference/model/MatchProfilesOptions.md +0 -35
- package/dist/docs/reference/model/ModelingLimits.md +0 -126
- package/dist/docs/reference/model/NumericArray.md +0 -14
- package/dist/docs/reference/model/Path2-type.md +0 -196
- package/dist/docs/reference/model/Path2Data.md +0 -50
- package/dist/docs/reference/model/Path2Input.md +0 -20
- package/dist/docs/reference/model/Path3-type.md +0 -196
- package/dist/docs/reference/model/Path3Data.md +0 -50
- package/dist/docs/reference/model/Path3Input.md +0 -20
- package/dist/docs/reference/model/PathLocation.md +0 -69
- package/dist/docs/reference/model/PathNormalGuide.md +0 -46
- package/dist/docs/reference/model/PathOptions.md +0 -38
- package/dist/docs/reference/model/PathPatternOptions.md +0 -48
- package/dist/docs/reference/model/PathResamplingOptions.md +0 -84
- package/dist/docs/reference/model/Pivot2Options.md +0 -28
- package/dist/docs/reference/model/Pivot3Options.md +0 -28
- package/dist/docs/reference/model/PolygonData.md +0 -44
- package/dist/docs/reference/model/PrintableThreadFit.md +0 -15
- package/dist/docs/reference/model/PrintableThreadFitPolicy.md +0 -51
- package/dist/docs/reference/model/Profile.md +0 -24
- package/dist/docs/reference/model/ProfileComponent2.md +0 -46
- package/dist/docs/reference/model/ProfileContour2.md +0 -36
- package/dist/docs/reference/model/ProfileSpan2.md +0 -47
- package/dist/docs/reference/model/ProfiledEdgeTreatment.md +0 -41
- package/dist/docs/reference/model/RadialPatternOptions.md +0 -59
- package/dist/docs/reference/model/RadialSizing.md +0 -15
- package/dist/docs/reference/model/RadialSizingOptions.md +0 -40
- package/dist/docs/reference/model/RectangleContourOptions.md +0 -72
- package/dist/docs/reference/model/RectangleCornerTreatment.md +0 -40
- package/dist/docs/reference/model/RectangleCornerTreatments.md +0 -20
- package/dist/docs/reference/model/RegionData.md +0 -19
- package/dist/docs/reference/model/RoundedEdgeTreatment.md +0 -96
- package/dist/docs/reference/model/SmoothEdgeTreatment.md +0 -76
- package/dist/docs/reference/model/SquareThreadProfileSpec.md +0 -80
- package/dist/docs/reference/model/StarContourOptions.md +0 -81
- package/dist/docs/reference/model/StrokeCap.md +0 -16
- package/dist/docs/reference/model/StrokeJoin.md +0 -16
- package/dist/docs/reference/model/StrokeOptions.md +0 -91
- package/dist/docs/reference/model/ThreadBevelOptions.md +0 -35
- package/dist/docs/reference/model/ThreadEndStyle.md +0 -15
- package/dist/docs/reference/model/ThreadEndTreatmentOptions.md +0 -118
- package/dist/docs/reference/model/ThreadHandedness.md +0 -15
- package/dist/docs/reference/model/ThreadLeadInEnvelope.md +0 -15
- package/dist/docs/reference/model/ThreadLeadInShape.md +0 -15
- package/dist/docs/reference/model/ThreadProfile.md +0 -87
- package/dist/docs/reference/model/ThreadProfileBaseSpec.md +0 -54
- package/dist/docs/reference/model/ThreadProfileSpec.md +0 -24
- package/dist/docs/reference/model/ThreadRidgeOptions.md +0 -141
- package/dist/docs/reference/model/ThreadSolidPreflight.md +0 -59
- package/dist/docs/reference/model/ThreadedNutOptions.md +0 -263
- package/dist/docs/reference/model/ThreadedNutPreflight.md +0 -111
- package/dist/docs/reference/model/ThreadedNutShape.md +0 -15
- package/dist/docs/reference/model/ThreadedRodOptions.md +0 -216
- package/dist/docs/reference/model/Transform2-type.md +0 -257
- package/dist/docs/reference/model/Transform2Data.md +0 -16
- package/dist/docs/reference/model/Transform2Input.md +0 -21
- package/dist/docs/reference/model/Transform3-type.md +0 -297
- package/dist/docs/reference/model/Transform3Data.md +0 -19
- package/dist/docs/reference/model/Transform3Input.md +0 -21
- package/dist/docs/reference/model/TrapezoidalThreadProfileSpec.md +0 -97
- package/dist/docs/reference/model/TriangleMesh.md +0 -34
- package/dist/docs/reference/model/TriangleMeshAnalysis.md +0 -129
- package/dist/docs/reference/model/TriangleMeshMeasurements.md +0 -79
- package/dist/docs/reference/model/TriangleMeshTopologyAnalysis.md +0 -131
- package/dist/docs/reference/model/TriangularThreadProfileSpec.md +0 -96
- package/dist/docs/reference/model/Vector2-type.md +0 -271
- package/dist/docs/reference/model/Vector2Data.md +0 -15
- package/dist/docs/reference/model/Vector2Input.md +0 -21
- package/dist/docs/reference/model/Vector3-type.md +0 -283
- package/dist/docs/reference/model/Vector3Data.md +0 -15
- package/dist/docs/reference/model/Vector3Input.md +0 -21
- package/dist/docs/reference/model/VectorTextLayout.md +0 -40
- package/dist/docs/reference/model/VectorTextMetrics.md +0 -100
- package/dist/docs/reference/model/bounds2.md +0 -37
- package/dist/docs/reference/model/bounds3.md +0 -37
- package/dist/docs/reference/model/categories/bounds.md +0 -38
- package/dist/docs/reference/model/categories/contracts.md +0 -16
- package/dist/docs/reference/model/categories/core-values-errors.md +0 -44
- package/dist/docs/reference/model/categories/explicit-profiles.md +0 -34
- package/dist/docs/reference/model/categories/paths.md +0 -42
- package/dist/docs/reference/model/categories/resolution.md +0 -20
- package/dist/docs/reference/model/immutableBuffer.md +0 -49
- package/dist/docs/reference/model/isGeometryError.md +0 -34
- package/dist/docs/reference/model/matchProfiles.md +0 -42
- package/dist/docs/reference/model/path2.md +0 -54
- package/dist/docs/reference/model/path3.md +0 -49
- package/dist/docs/reference/model/preflightInternalThreadCutter.md +0 -87
- package/dist/docs/reference/model/preflightThreadedNut.md +0 -103
- package/dist/docs/reference/model/preflightThreadedRod.md +0 -87
- package/dist/docs/reference/model/transform2.md +0 -46
- package/dist/docs/reference/model/transform3.md +0 -48
- package/dist/docs/reference/model/vector2.md +0 -40
- package/dist/docs/reference/model/vector3.md +0 -47
- package/dist/docs/reference/text/Bounds2Data.md +0 -34
- package/dist/docs/reference/text/Vector2Data.md +0 -7
- package/dist/docs/reference/text/VectorTextLayout.md +0 -34
- package/dist/docs/reference/text/VectorTextMetrics.md +0 -94
- package/dist/engine/export-3mf.js +0 -23
- package/dist/engine/operations/patterns.js +0 -47
- package/dist/engine/serialize-3mf.js +0 -116
- package/dist/geometry/loft/loft.js +0 -105
- package/dist/geometry/mechanical/index.js +0 -14
- package/dist/geometry/primitive-resolution.js +0 -20
- package/dist/geometry/svg/index.js +0 -1
- package/dist/geometry/sweeps/options.js +0 -29
- package/dist/geometry/sweeps/sweep-closed.js +0 -96
- package/dist/geometry/sweeps/sweep-mesh.js +0 -32
- /package/dist/{geometry/mesh/mesh-types.js → export/types.js} +0 -0
- /package/dist/geometry/mechanical/{standards.js → fastener-standards.js} +0 -0
- /package/dist/geometry/mesh/{mesh-edge-table.js → edge-table.js} +0 -0
- /package/dist/geometry/{primitive-options.js → mesh/types.js} +0 -0
- /package/dist/{engine/mesh-view-cache.js → geometry/mesh/view-cache.js} +0 -0
- /package/dist/geometry/{text-layout.js → primitives/options.js} +0 -0
package/dist/api/geometry.d.ts
CHANGED
|
@@ -1,34 +1,11 @@
|
|
|
1
|
-
/** Pure geometry
|
|
2
|
-
|
|
3
|
-
/** ACME 29-degree included-angle profile. */
|
|
4
|
-
export declare interface AcmeThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
5
|
-
/** Selects the 29-degree ACME profile family. */
|
|
6
|
-
readonly kind: "acme";
|
|
7
|
-
/**
|
|
8
|
-
* Radial depth in millimetres.
|
|
9
|
-
* @defaultValue `pitch / 2`
|
|
10
|
-
*/
|
|
11
|
-
readonly depth?: number;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** Adds two finite XY vectors component-wise. */
|
|
15
|
-
export declare const add2: (a: Vector2Data, b: Vector2Data) => Vector2Data;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Adds two finite XYZ vectors component-wise.
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts
|
|
21
|
-
* add3([1, 2, 3], [4, 5, 6]); // [5, 7, 9]
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export declare const add3: (a: Vector3Data, b: Vector3Data) => Vector3Data;
|
|
1
|
+
/** Pure geometry values, descriptors, and algorithms without host initialization. @packageDocumentation */
|
|
25
2
|
|
|
26
3
|
/** Controls full-circle sampling that must satisfy one or more topology alignments. */
|
|
27
4
|
export declare interface AlignedCircularSegmentsOptions {
|
|
28
5
|
/** Radial sizing used by adaptive error and edge-length checks. Defaults to vertex. */
|
|
29
6
|
readonly sizing?: RadialSizing;
|
|
30
7
|
/**
|
|
31
|
-
*
|
|
8
|
+
* Nonempty alignment factors. Every value must be a positive safe integer; the returned count
|
|
32
9
|
* is divisible by their checked least common multiple.
|
|
33
10
|
*/
|
|
34
11
|
readonly alignTo: readonly number[];
|
|
@@ -46,7 +23,7 @@ export declare interface AlignedCircularSegmentsOptions {
|
|
|
46
23
|
* already satisfy every alignment factor and `minSegments`.
|
|
47
24
|
*/
|
|
48
25
|
readonly segments?: number;
|
|
49
|
-
/**
|
|
26
|
+
/** Explicit physical tessellation policy; omitted fields use package defaults. */
|
|
50
27
|
readonly resolution?: GeometryResolution;
|
|
51
28
|
}
|
|
52
29
|
|
|
@@ -71,19 +48,23 @@ export declare interface Anchor3 {
|
|
|
71
48
|
* `up` is projected onto the plane perpendicular to `direction`, removing small
|
|
72
49
|
* input drift while preserving its roll intent.
|
|
73
50
|
*
|
|
74
|
-
* @param
|
|
75
|
-
* @param direction - Non-zero outward attachment normal.
|
|
76
|
-
* @param up - Non-parallel roll reference; defaults to +Y.
|
|
77
|
-
* @param tolerance - Optional comparison overrides.
|
|
51
|
+
* @param options - Finite position, orientation guides, and optional comparison overrides.
|
|
78
52
|
* @returns A frozen anchor with unit, orthogonal direction and up vectors.
|
|
79
|
-
* @throws {@link GeometryError} For
|
|
80
|
-
*/
|
|
81
|
-
export declare function anchor3(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
53
|
+
* @throws {@link GeometryError} For nonfinite or degenerate inputs.
|
|
54
|
+
*/
|
|
55
|
+
export declare function anchor3(options: Anchor3Options): Anchor3;
|
|
56
|
+
|
|
57
|
+
/** Attachment position in millimetres and orientation guides in local coordinates. */
|
|
58
|
+
export declare interface Anchor3Options {
|
|
59
|
+
/** Finite attachment position in millimetres. */
|
|
60
|
+
readonly position: Vector3Input;
|
|
61
|
+
/** Nonzero outward normal; its magnitude is ignored. */
|
|
62
|
+
readonly direction: Vector3Input;
|
|
63
|
+
/** Nonparallel roll reference projected onto the attachment plane; defaults to +Y. */
|
|
64
|
+
readonly up?: Vector3Input;
|
|
65
|
+
/** Optional numeric comparison overrides. */
|
|
66
|
+
readonly tolerance?: GeometryToleranceOptions;
|
|
67
|
+
}
|
|
87
68
|
|
|
88
69
|
/**
|
|
89
70
|
* Converts an anchor into a right-handed frame with direction as local +Z.
|
|
@@ -97,32 +78,6 @@ export declare function anchorFrame3(
|
|
|
97
78
|
tolerance?: GeometryToleranceOptions,
|
|
98
79
|
): Frame3;
|
|
99
80
|
|
|
100
|
-
/**
|
|
101
|
-
* Applies only the linear component of an affine transform to a direction.
|
|
102
|
-
*
|
|
103
|
-
* The result is not normalized, preserving scale information.
|
|
104
|
-
*
|
|
105
|
-
* @param transform - Valid row-major affine transform.
|
|
106
|
-
* @param direction - Finite XYZ direction.
|
|
107
|
-
* @returns A fresh transformed direction.
|
|
108
|
-
*/
|
|
109
|
-
export declare function applyTransformDirection3(
|
|
110
|
-
transform: Transform3Data,
|
|
111
|
-
direction: Vector3Data,
|
|
112
|
-
): Vector3Data;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Applies an affine transform to a point, including translation.
|
|
116
|
-
*
|
|
117
|
-
* @param transform - Valid row-major affine transform.
|
|
118
|
-
* @param point - Finite XYZ point.
|
|
119
|
-
* @returns A fresh transformed point.
|
|
120
|
-
*/
|
|
121
|
-
export declare function applyTransformPoint3(
|
|
122
|
-
transform: Transform3Data,
|
|
123
|
-
point: Vector3Data,
|
|
124
|
-
): Vector3Data;
|
|
125
|
-
|
|
126
81
|
/** Planar circular arc with counterclockwise degree angles. */
|
|
127
82
|
export declare interface ArcCurve2 {
|
|
128
83
|
/** Selects a circular arc in the XY plane. */
|
|
@@ -166,14 +121,14 @@ export declare interface ArcCurve3 {
|
|
|
166
121
|
* @param source - Anchor expressed in the moving object's local coordinates.
|
|
167
122
|
* @param target - Desired anchor pose in destination coordinates.
|
|
168
123
|
* @param options - Alignment, gap, spin, and tolerance policy.
|
|
169
|
-
* @returns
|
|
170
|
-
* @throws {@link GeometryError} For invalid anchors or
|
|
124
|
+
* @returns An immutable affine transform for the moving object.
|
|
125
|
+
* @throws {@link GeometryError} For invalid anchors or nonfinite options.
|
|
171
126
|
*/
|
|
172
127
|
export declare function attachmentTransform3(
|
|
173
128
|
source: Anchor3,
|
|
174
129
|
target: Anchor3,
|
|
175
130
|
options?: AttachOptions,
|
|
176
|
-
):
|
|
131
|
+
): Transform3;
|
|
177
132
|
|
|
178
133
|
/** Options controlling how one anchor is attached to another. */
|
|
179
134
|
export declare interface AttachOptions {
|
|
@@ -187,32 +142,12 @@ export declare interface AttachOptions {
|
|
|
187
142
|
readonly tolerance?: GeometryToleranceOptions;
|
|
188
143
|
}
|
|
189
144
|
|
|
190
|
-
/**
|
|
191
|
-
|
|
192
|
-
*/
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
readonly degrees: number;
|
|
197
|
-
/** Excluded when the angle is expressed in degrees. */
|
|
198
|
-
readonly radians?: never;
|
|
199
|
-
}
|
|
200
|
-
| {
|
|
201
|
-
/** Finite right-handed angle in radians. */
|
|
202
|
-
readonly radians: number;
|
|
203
|
-
/** Excluded when the angle is expressed in radians. */
|
|
204
|
-
readonly degrees?: never;
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
/** One size for both ends, or independent sizes in bottom/top order. Zero disables an end. */
|
|
208
|
-
export declare type Bevel =
|
|
209
|
-
BevelSize | readonly [bottom: BevelSize, top: BevelSize];
|
|
210
|
-
|
|
211
|
-
/** Nonnegative 45-degree axial/radial bevel size in millimetres, or factory automatic sizing. */
|
|
212
|
-
export declare type BevelSize = number | "auto";
|
|
213
|
-
|
|
214
|
-
/** Immutable finite XY bounds in millimetres, with tuple coordinates for data interoperability. */
|
|
215
|
-
export declare interface Bounds2 extends Bounds2Data {
|
|
145
|
+
/** Immutable finite XY bounds in millimetres, with fluent extrema and measurements. */
|
|
146
|
+
export declare interface Bounds2 {
|
|
147
|
+
/** Inclusive minimum XY coordinates. */
|
|
148
|
+
readonly min: Vector2;
|
|
149
|
+
/** Inclusive maximum XY coordinates. */
|
|
150
|
+
readonly max: Vector2;
|
|
216
151
|
/** Returns nonnegative X/Y dimensions in millimetres, including zero extents. */
|
|
217
152
|
size(): Vector2;
|
|
218
153
|
/** Returns the midpoint in millimetres. */
|
|
@@ -229,8 +164,10 @@ export declare interface Bounds2 extends Bounds2Data {
|
|
|
229
164
|
* Zero extents are valid. Invalid dimensions, nonfinite coordinates, reversed bounds and
|
|
230
165
|
* overflowing extents throw `INVALID_ARGUMENT` GeometryError. Use `toData()` for plain records.
|
|
231
166
|
* Size construction centers on the origin unless `center` is false. Size and extrema are exclusive.
|
|
232
|
-
* Compiled Generator packages passing these values to host recipes or
|
|
233
|
-
*
|
|
167
|
+
* Compiled Generator packages passing these values to host recipes or memo data require
|
|
168
|
+
* the current Modeling runtime.
|
|
169
|
+
*
|
|
170
|
+
* @param input - Ordered extrema, nonnegative size, or an existing XY bounds value to snapshot.
|
|
234
171
|
*/
|
|
235
172
|
export declare function bounds2(input: Bounds2Options | Bounds2): Bounds2;
|
|
236
173
|
|
|
@@ -268,8 +205,12 @@ export declare type Bounds2Options =
|
|
|
268
205
|
readonly max?: never;
|
|
269
206
|
};
|
|
270
207
|
|
|
271
|
-
/** Immutable finite XYZ bounds in millimetres, with
|
|
272
|
-
export declare interface Bounds3
|
|
208
|
+
/** Immutable finite XYZ bounds in millimetres, with fluent extrema and measurements. */
|
|
209
|
+
export declare interface Bounds3 {
|
|
210
|
+
/** Inclusive minimum XYZ coordinates. */
|
|
211
|
+
readonly min: Vector3;
|
|
212
|
+
/** Inclusive maximum XYZ coordinates. */
|
|
213
|
+
readonly max: Vector3;
|
|
273
214
|
/** Returns nonnegative X/Y/Z dimensions in millimetres, including zero extents. */
|
|
274
215
|
size(): Vector3;
|
|
275
216
|
/** Returns the midpoint in millimetres. */
|
|
@@ -286,8 +227,10 @@ export declare interface Bounds3 extends Bounds3Data {
|
|
|
286
227
|
* Zero extents are valid. Invalid dimensions, nonfinite coordinates, reversed bounds and
|
|
287
228
|
* overflowing extents throw `INVALID_ARGUMENT` GeometryError. Use `toData()` for plain records.
|
|
288
229
|
* Size construction centers on the origin unless `center` is false. Size and extrema are exclusive.
|
|
289
|
-
* Compiled Generator packages passing these values to host recipes or
|
|
290
|
-
*
|
|
230
|
+
* Compiled Generator packages passing these values to host recipes or memo data require
|
|
231
|
+
* the current Modeling runtime.
|
|
232
|
+
*
|
|
233
|
+
* @param input - Ordered extrema, nonnegative size, or an existing XYZ bounds value to snapshot.
|
|
291
234
|
*/
|
|
292
235
|
export declare function bounds3(input: Bounds3Options | Bounds3): Bounds3;
|
|
293
236
|
|
|
@@ -363,7 +306,9 @@ export declare function boundsSize(bounds: Bounds2Data): Vector2Data;
|
|
|
363
306
|
/** Inclusive XYZ dimensions in millimetres; zero extents are retained. */
|
|
364
307
|
export declare function boundsSize(bounds: Bounds3Data): Vector3Data;
|
|
365
308
|
|
|
366
|
-
/**
|
|
309
|
+
/**
|
|
310
|
+
* Creates an outward face-center anchor using the same local origin convention as box().
|
|
311
|
+
*
|
|
367
312
|
* @remarks origin applies an explicit translation. For rotated components, transform the
|
|
368
313
|
* resulting anchor frame explicitly; no anchor is inherited from a Boolean result.
|
|
369
314
|
*/
|
|
@@ -385,69 +330,7 @@ export declare interface BoxAnchorOptions {
|
|
|
385
330
|
readonly origin?: Vector3Input;
|
|
386
331
|
}
|
|
387
332
|
|
|
388
|
-
/**
|
|
389
|
-
export declare type BoxEdge =
|
|
390
|
-
| "top-front"
|
|
391
|
-
| "top-back"
|
|
392
|
-
| "top-left"
|
|
393
|
-
| "top-right"
|
|
394
|
-
| "bottom-front"
|
|
395
|
-
| "bottom-back"
|
|
396
|
-
| "bottom-left"
|
|
397
|
-
| "bottom-right"
|
|
398
|
-
| "front-left"
|
|
399
|
-
| "front-right"
|
|
400
|
-
| "back-left"
|
|
401
|
-
| "back-right";
|
|
402
|
-
|
|
403
|
-
/** Named individual edges or top/bottom rims and all four vertical edges. */
|
|
404
|
-
export declare type BoxEdgeSelection = BoxEdge | "top" | "bottom" | "vertical";
|
|
405
|
-
|
|
406
|
-
/** Independent treatments for disjoint named edge selections; overlapping selections fail. */
|
|
407
|
-
export declare type BoxEdgeTreatments = Readonly<
|
|
408
|
-
Partial<Record<BoxEdgeSelection, EdgeTreatment>>
|
|
409
|
-
>;
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Dimensions, placement, and uniform or independently selected finishing for an axis-aligned box.
|
|
413
|
-
*/
|
|
414
|
-
export declare interface BoxOptions extends PrimitiveAttachment {
|
|
415
|
-
/** Explicit sampling ceilings for edge treatments, bounded by the host policy. */
|
|
416
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
417
|
-
/**
|
|
418
|
-
* Centers the box on the XYZ origin when `true`; otherwise its minimum corner is at the origin.
|
|
419
|
-
* @defaultValue `true`
|
|
420
|
-
*/
|
|
421
|
-
readonly center?: boolean;
|
|
422
|
-
/** Positive uniform size or explicit `[X, Y, Z]` extents in millimetres. */
|
|
423
|
-
readonly size: number | Vector3Input;
|
|
424
|
-
/** Uniform treatment or independent disjoint nominal edge/group treatments. */
|
|
425
|
-
readonly treatment?: EdgeTreatment | BoxEdgeTreatments;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
/** Axial side carrying the near-normal pressure flank of a buttress thread. */
|
|
429
|
-
export declare type ButtressPressureFlankSide = "negative" | "positive";
|
|
430
|
-
|
|
431
|
-
/** Asymmetric printable buttress profile with 7/45-degree flanks. */
|
|
432
|
-
export declare interface ButtressThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
433
|
-
/** Selects the asymmetric printable buttress profile family. */
|
|
434
|
-
readonly kind: "buttress";
|
|
435
|
-
/**
|
|
436
|
-
* Radial depth in millimetres.
|
|
437
|
-
* @defaultValue `0.66271 * pitch`
|
|
438
|
-
*/
|
|
439
|
-
readonly depth?: number;
|
|
440
|
-
/**
|
|
441
|
-
* Axial side of each tooth carrying the 7-degree pressure flank. The opposite side uses the
|
|
442
|
-
* 45-degree clearance flank.
|
|
443
|
-
* @defaultValue `"positive"`
|
|
444
|
-
*/
|
|
445
|
-
readonly pressureFlankSide?: ButtressPressureFlankSide;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* A planar edge or corner chamfer with equal or independent surface setbacks.
|
|
450
|
-
*/
|
|
333
|
+
/** A straight transverse edge or corner bevel with equal or independent surface setbacks. */
|
|
451
334
|
export declare interface ChamferedEdgeTreatment {
|
|
452
335
|
/** Selects a straight bevel between adjoining surfaces. */
|
|
453
336
|
readonly kind: "chamfer";
|
|
@@ -483,9 +366,7 @@ export declare type CircleContourOptions = CircularPrimitiveOptions &
|
|
|
483
366
|
}
|
|
484
367
|
);
|
|
485
368
|
|
|
486
|
-
/**
|
|
487
|
-
* Tessellation controls shared by circular primitives across Geometry entry points.
|
|
488
|
-
*/
|
|
369
|
+
/** Tessellation controls shared by circular primitives across Geometry entry points. */
|
|
489
370
|
export declare interface CircularPrimitiveOptions {
|
|
490
371
|
/** Explicit sampling ceilings; bound modeling operations may only lower the host policy. */
|
|
491
372
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
@@ -519,19 +400,6 @@ export declare interface CircularSampling {
|
|
|
519
400
|
/** Nominal circle size and explicit physical sampling; supply exactly one radius or diameter. */
|
|
520
401
|
export declare type CircularSamplingOptions = CircleContourOptions;
|
|
521
402
|
|
|
522
|
-
/** Close, normal, and loose metric clearance-hole diameters in millimetres. */
|
|
523
|
-
export declare interface ClearanceHoleDimensions {
|
|
524
|
-
/** Close-fit clearance-hole diameter. */
|
|
525
|
-
readonly close: number;
|
|
526
|
-
/** Loose-fit clearance-hole diameter. */
|
|
527
|
-
readonly loose: number;
|
|
528
|
-
/** Normal-fit clearance-hole diameter. */
|
|
529
|
-
readonly normal: number;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
/** Common clearance-hole fit categories, ordered from smallest to largest. */
|
|
533
|
-
export declare type ClearanceHoleFit = "close" | "normal" | "loose";
|
|
534
|
-
|
|
535
403
|
/**
|
|
536
404
|
* Closes an open, strictly upward [radius, height] side outline to the radius-zero axis.
|
|
537
405
|
*
|
|
@@ -539,89 +407,26 @@ export declare type ClearanceHoleFit = "close" | "normal" | "loose";
|
|
|
539
407
|
* Returns a counterclockwise filled-boundary contour without a repeated seam vertex.
|
|
540
408
|
* Radii must be nonnegative; the result must enclose nonzero area without touching itself.
|
|
541
409
|
* This is a solid-body closure, not a hollow-wall or mounting-bore construction.
|
|
410
|
+
*
|
|
411
|
+
* @param side - [radius, height] points in millimetres, with increasing heights.
|
|
412
|
+
* @param limits - Point limits, including any added axis endpoints.
|
|
542
413
|
*/
|
|
543
414
|
export declare function closeToAxis(
|
|
544
415
|
side: readonly Vector2Data[],
|
|
545
416
|
limits?: Partial<GeometrySamplingLimits>,
|
|
546
417
|
): Contour;
|
|
547
418
|
|
|
548
|
-
/** Compensated major/minor envelopes and the policy values used. */
|
|
549
|
-
export declare interface CompensatedThreadDiameters {
|
|
550
|
-
/** Axial backlash from the selected policy. */
|
|
551
|
-
readonly axialBacklash: number;
|
|
552
|
-
/** Compensated major diameter in millimetres. */
|
|
553
|
-
readonly majorDiameter: number;
|
|
554
|
-
/** Compensated minor diameter in millimetres. */
|
|
555
|
-
readonly minorDiameter: number;
|
|
556
|
-
/** Signed radial shift: negative for male inset, positive for female outset. */
|
|
557
|
-
readonly radialShift: number;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* Applies role-specific radial compensation while preserving thread depth.
|
|
562
|
-
*
|
|
563
|
-
* Male envelopes move inward by the policy inset; female envelopes move
|
|
564
|
-
* outward by the policy outset. Combining both parts produces the sum of those
|
|
565
|
-
* allowances as radial mating clearance.
|
|
566
|
-
*/
|
|
567
|
-
export declare function compensateThreadDiameters(
|
|
568
|
-
options: ThreadCompensationOptions,
|
|
569
|
-
): CompensatedThreadDiameters;
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* Applies axial fit allowance to a validated periodic profile.
|
|
573
|
-
*
|
|
574
|
-
* Male crests/ridges narrow by the requested backlash; female cutter ridges
|
|
575
|
-
* widen by it. Periodic root endpoints remain fixed so pitch and lead do not
|
|
576
|
-
* change. The returned profile is a new deeply immutable value.
|
|
577
|
-
*/
|
|
578
|
-
export declare function compensateThreadProfileAxially(
|
|
579
|
-
profile: ThreadProfile,
|
|
580
|
-
axialBacklash: number,
|
|
581
|
-
role: "female" | "male",
|
|
582
|
-
): ThreadProfile;
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* Applies printable axial fit plus the conservative phase allowance required by circular facets.
|
|
586
|
-
*
|
|
587
|
-
* One triangulated facet spans `pitch * starts / circularSegments` axially. A directed zipper
|
|
588
|
-
* triangle can expose either end of that complete span when independently faceted parts rotate.
|
|
589
|
-
* This helper distributes the full conservative flank clearance between the male crest and female
|
|
590
|
-
* root according to their available flat widths, and rejects a resolution that cannot represent
|
|
591
|
-
* it exactly.
|
|
592
|
-
*/
|
|
593
|
-
export declare function compensateThreadProfileForFaceting(
|
|
594
|
-
profile: ThreadProfile,
|
|
595
|
-
axialBacklash: number,
|
|
596
|
-
role: "female" | "male",
|
|
597
|
-
starts: number,
|
|
598
|
-
circularSegments: number,
|
|
599
|
-
): ThreadProfile;
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* Composes two affine transforms without mutating either matrix.
|
|
603
|
-
*
|
|
604
|
-
* `composeTransform3(after, before)` applies `before` first and `after` second.
|
|
605
|
-
*
|
|
606
|
-
* @param after - Transform applied second.
|
|
607
|
-
* @param before - Transform applied first.
|
|
608
|
-
* @returns A new frozen transform equal to `after * before`.
|
|
609
|
-
*/
|
|
610
|
-
export declare function composeTransform3(
|
|
611
|
-
after: Transform3Data,
|
|
612
|
-
before: Transform3Data,
|
|
613
|
-
): Transform3Data;
|
|
614
|
-
|
|
615
419
|
/**
|
|
616
420
|
* Builds rotation-minimizing frames for a non-duplicated closed path.
|
|
617
421
|
*
|
|
618
422
|
* Centered cyclic tangents are parallel-transported around the loop. Transporting the last
|
|
619
423
|
* normal back to the first tangent measures seam holonomy; distributing that residual rotation
|
|
620
424
|
* uniformly over all path intervals avoids a visible seam or accumulated frame flip.
|
|
621
|
-
* The maxPathPoints ceiling (default 100000) bounds path points and frames.
|
|
622
|
-
* Requires closed path values; raw tuples are interpreted as closed and must omit their seam point.
|
|
623
|
-
* Invalid paths throw GeometryError.
|
|
624
425
|
* Nonfinite initial normals reject; finite parallel preferences select a canonical fallback.
|
|
426
|
+
*
|
|
427
|
+
* @param input - Closed XYZ path or points in millimetres, with no repeated seam.
|
|
428
|
+
* @param initialNormal - Preferred profile X direction at the seam.
|
|
429
|
+
* @param limits - Limits on input points and output frames.
|
|
625
430
|
*/
|
|
626
431
|
export declare const computeClosedParallelTransportFrames: (
|
|
627
432
|
input: Path3Input,
|
|
@@ -633,9 +438,13 @@ export declare const computeClosedParallelTransportFrames: (
|
|
|
633
438
|
* Builds rotation-minimizing frames by parallel-transporting the previous normal.
|
|
634
439
|
*
|
|
635
440
|
* This avoids the sudden profile flips produced by picking a fresh up-vector per ring.
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
441
|
+
* Nonfinite guides and unusable path tangents throw GeometryError. A finite initial guide
|
|
442
|
+
* parallel to the tangent selects a canonical fallback.
|
|
443
|
+
*
|
|
444
|
+
* @param input - Open XYZ path or points in millimetres; at least two points.
|
|
445
|
+
* @param initialNormal - Preferred starting X direction; the first normalGuide result wins.
|
|
446
|
+
* @param normalGuide - Profile X guide at each point; its sign follows the transported normal.
|
|
447
|
+
* @param limits - Point limits, checked before creating frames or calling guides.
|
|
639
448
|
*/
|
|
640
449
|
export declare const computeParallelTransportFrames: (
|
|
641
450
|
input: Path3Input,
|
|
@@ -647,16 +456,21 @@ export declare const computeParallelTransportFrames: (
|
|
|
647
456
|
/**
|
|
648
457
|
* A sampled closed two-dimensional boundary whose first point is not repeated at the end.
|
|
649
458
|
*
|
|
650
|
-
* Polygon exteriors are
|
|
459
|
+
* Polygon exteriors are counterclockwise and holes are clockwise. Algorithms
|
|
651
460
|
* may reject duplicate adjacent points or fewer than three effective vertices.
|
|
652
461
|
* Use PolygonData to assign an exterior and its holes, or ProfileContour2 for identified curve spans.
|
|
653
462
|
*
|
|
654
|
-
* @see
|
|
463
|
+
* @see [PolygonData](/docs/reference/geometry/PolygonData)
|
|
655
464
|
* @see [ProfileContour2](/docs/reference/geometry/ProfileContour2)
|
|
656
465
|
*/
|
|
657
466
|
export declare type Contour = readonly Vector2Data[];
|
|
658
467
|
|
|
659
|
-
/**
|
|
468
|
+
/**
|
|
469
|
+
* Returns true when a point lies inside or on the boundary of a loop.
|
|
470
|
+
*
|
|
471
|
+
* @param loop - Simple XY loop with either winding.
|
|
472
|
+
* @param point - Query in the loop's coordinate system.
|
|
473
|
+
*/
|
|
660
474
|
export declare function contourContainsPoint(
|
|
661
475
|
loop: Contour,
|
|
662
476
|
point: Vector2Data,
|
|
@@ -723,24 +537,12 @@ export declare interface CorrespondingProfile {
|
|
|
723
537
|
readonly components: readonly CorrespondingComponent[];
|
|
724
538
|
}
|
|
725
539
|
|
|
726
|
-
/** One already matched profile at
|
|
540
|
+
/** One already matched profile at a horizontal height or explicit affine transform. */
|
|
727
541
|
export declare type CorrespondingProfileStation = LoftPlacement & {
|
|
728
542
|
/** Already corresponding filled contours with authoritative landmark slots. */
|
|
729
543
|
readonly profile: CorrespondingProfile;
|
|
730
544
|
};
|
|
731
545
|
|
|
732
|
-
/** Returns the signed scalar cross product; positive means `b` is counter-clockwise from `a`. */
|
|
733
|
-
export declare const cross2: (a: Vector2Data, b: Vector2Data) => number;
|
|
734
|
-
|
|
735
|
-
/**
|
|
736
|
-
* Returns the right-handed cross product.
|
|
737
|
-
* @example
|
|
738
|
-
* ```ts
|
|
739
|
-
* cross3([1, 0, 0], [0, 1, 0]); // [0, 0, 1]
|
|
740
|
-
* ```
|
|
741
|
-
*/
|
|
742
|
-
export declare const cross3: (a: Vector3Data, b: Vector3Data) => Vector3Data;
|
|
743
|
-
|
|
744
546
|
/** Planar cubic Bézier with explicit endpoint and control coordinates. */
|
|
745
547
|
export declare interface CubicBezierCurve2 {
|
|
746
548
|
/** Selects a cubic Bézier through two endpoints and two controls. */
|
|
@@ -755,9 +557,7 @@ export declare interface CubicBezierCurve2 {
|
|
|
755
557
|
readonly end: Vector2Data;
|
|
756
558
|
}
|
|
757
559
|
|
|
758
|
-
/**
|
|
759
|
-
* Spatial cubic Bézier with explicit endpoint and control coordinates.
|
|
760
|
-
*/
|
|
560
|
+
/** Spatial cubic Bézier with explicit endpoint and control coordinates. */
|
|
761
561
|
export declare interface CubicBezierCurve3 {
|
|
762
562
|
/** Selects a cubic Bézier through two endpoints and two controls. */
|
|
763
563
|
readonly kind: "cubic";
|
|
@@ -774,14 +574,10 @@ export declare interface CubicBezierCurve3 {
|
|
|
774
574
|
/** Reusable planar curve definition. */
|
|
775
575
|
export declare type Curve2 = LineCurve2 | ArcCurve2 | CubicBezierCurve2;
|
|
776
576
|
|
|
777
|
-
/**
|
|
778
|
-
* Reusable spatial curve definition.
|
|
779
|
-
*/
|
|
577
|
+
/** Reusable spatial curve definition. */
|
|
780
578
|
export declare type Curve3 = LineCurve3 | ArcCurve3 | CubicBezierCurve3;
|
|
781
579
|
|
|
782
|
-
/**
|
|
783
|
-
* Explicit physical sampling and allocation policy for reusable curves.
|
|
784
|
-
*/
|
|
580
|
+
/** Explicit physical sampling and allocation policy for reusable curves. */
|
|
785
581
|
export declare interface CurveSamplingOptions {
|
|
786
582
|
/** Exact segment count overrides physical criteria; curve parameters are spaced uniformly. */
|
|
787
583
|
readonly segments?: number;
|
|
@@ -793,19 +589,10 @@ export declare interface CurveSamplingOptions {
|
|
|
793
589
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
794
590
|
}
|
|
795
591
|
|
|
796
|
-
/**
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
/**
|
|
801
|
-
* Open path spanning exactly `[-pitch/2, pitch/2]`, with both endpoints on the minor envelope,
|
|
802
|
-
* one connected ridge, one contiguous crest, and radial zero at the major envelope.
|
|
803
|
-
*/
|
|
804
|
-
readonly points: readonly Vector2Data[];
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
/** Creates a cap-center or radial-side anchor using cylinder()'s construction origin.
|
|
808
|
-
* @remarks Both centered and noncentered cylinders extend along +Z. Side angle uses degrees;
|
|
592
|
+
/**
|
|
593
|
+
* Creates a cap-center or radial-side anchor using cylinder()'s construction origin.
|
|
594
|
+
*
|
|
595
|
+
* @remarks Cylinders use the local Z axis. Side angle uses degrees;
|
|
809
596
|
* origin applies an explicit translation, and arbitrary component transforms remain explicit.
|
|
810
597
|
*/
|
|
811
598
|
export declare function cylinderAnchor3(
|
|
@@ -823,7 +610,7 @@ export declare interface CylinderAnchorOptions {
|
|
|
823
610
|
readonly height: number;
|
|
824
611
|
/** Named outward face; side anchors lie halfway up the cylinder. */
|
|
825
612
|
readonly face: CylinderAnchorFace;
|
|
826
|
-
/** Side angle
|
|
613
|
+
/** Side angle counterclockwise from +X, in degrees; defaults to zero. */
|
|
827
614
|
readonly angle?: number;
|
|
828
615
|
/** Centers the cylinder along Z; defaults to true, matching cylinder(). */
|
|
829
616
|
readonly center?: boolean;
|
|
@@ -831,166 +618,6 @@ export declare interface CylinderAnchorOptions {
|
|
|
831
618
|
readonly origin?: Vector3Input;
|
|
832
619
|
}
|
|
833
620
|
|
|
834
|
-
/**
|
|
835
|
-
* Dimensions, placement, independent end finishing, and tessellation for a Z-axis cylinder or frustum.
|
|
836
|
-
*/
|
|
837
|
-
export declare type CylinderOptions = CircularPrimitiveOptions &
|
|
838
|
-
RadialSizingOptions &
|
|
839
|
-
PrimitiveAttachment & {
|
|
840
|
-
/**
|
|
841
|
-
* Centers the solid on the Z origin when `true`; otherwise its bottom is at `Z = 0`.
|
|
842
|
-
* @defaultValue `true`
|
|
843
|
-
*/
|
|
844
|
-
readonly center?: boolean;
|
|
845
|
-
/** Independent end treatments; first setback is cap inset and second follows the sloped side. */
|
|
846
|
-
readonly ends?: EndTreatments;
|
|
847
|
-
/** Total height along +Z in millimetres. */
|
|
848
|
-
readonly height: number;
|
|
849
|
-
} & (
|
|
850
|
-
| {
|
|
851
|
-
/** Positive uniform radius or nonnegative `[bottom, top]` radii in millimetres; one must be positive. */
|
|
852
|
-
readonly radius: number | readonly [bottom: number, top: number];
|
|
853
|
-
/** Full diameter is unavailable when radius is supplied. */
|
|
854
|
-
readonly diameter?: never;
|
|
855
|
-
}
|
|
856
|
-
| {
|
|
857
|
-
/** Positive uniform diameter or nonnegative `[bottom, top]` diameters in millimetres; one must be positive. */
|
|
858
|
-
readonly diameter: number | readonly [bottom: number, top: number];
|
|
859
|
-
/** Radius is unavailable when diameter is supplied. */
|
|
860
|
-
readonly radius?: never;
|
|
861
|
-
}
|
|
862
|
-
);
|
|
863
|
-
|
|
864
|
-
/**
|
|
865
|
-
* Resolved transverse pitch-plane dimensions for one cylindrical gear.
|
|
866
|
-
*/
|
|
867
|
-
export declare interface CylindricalGearDimensions {
|
|
868
|
-
/** Addendum above the pitch circle, in millimetres. */
|
|
869
|
-
readonly addendum: number;
|
|
870
|
-
/** Angular pitch between adjacent teeth, in radians. */
|
|
871
|
-
readonly angularPitchRadians: number;
|
|
872
|
-
/** Tangential backlash applied to this gear, in millimetres. */
|
|
873
|
-
readonly backlash: number;
|
|
874
|
-
/** Base-circle radius used by the involute, in millimetres. */
|
|
875
|
-
readonly baseRadius: number;
|
|
876
|
-
/** Dedendum below the pitch circle, in millimetres. */
|
|
877
|
-
readonly dedendum: number;
|
|
878
|
-
/** Signed helix angle, in radians. */
|
|
879
|
-
readonly helixAngleRadians: number;
|
|
880
|
-
/** Caller-supplied normal module, in millimetres. */
|
|
881
|
-
readonly module: number;
|
|
882
|
-
/** Minimum physical tooth count for this unshifted full-depth external profile. */
|
|
883
|
-
readonly minimumToothCountWithoutUndercut: number;
|
|
884
|
-
/** Outside radius at the tooth tips, in millimetres. */
|
|
885
|
-
readonly outsideRadius: number;
|
|
886
|
-
/** Pitch-circle radius, in millimetres. */
|
|
887
|
-
readonly pitchRadius: number;
|
|
888
|
-
/** Normal pressure angle, in radians. */
|
|
889
|
-
readonly pressureAngleRadians: number;
|
|
890
|
-
/** Root radius at the bottom lands, in millimetres. */
|
|
891
|
-
readonly rootRadius: number;
|
|
892
|
-
/** Integer number of teeth. */
|
|
893
|
-
readonly toothCount: number;
|
|
894
|
-
/** Tangential tooth thickness at the pitch circle, in millimetres. */
|
|
895
|
-
readonly toothThicknessAtPitch: number;
|
|
896
|
-
/** Module measured in the transverse pitch plane, in millimetres. */
|
|
897
|
-
readonly transverseModule: number;
|
|
898
|
-
/** Pressure angle measured in the transverse pitch plane, in radians. */
|
|
899
|
-
readonly transversePressureAngleRadians: number;
|
|
900
|
-
/** Helical equivalent spur tooth count, `toothCount / cos³(helixAngle)`. */
|
|
901
|
-
readonly virtualToothCount: number;
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
/**
|
|
905
|
-
* Whether two cylindrical gears mesh on their outside teeth or as a pinion inside a ring.
|
|
906
|
-
*/
|
|
907
|
-
export declare type CylindricalGearMeshKind = "external" | "internal";
|
|
908
|
-
|
|
909
|
-
/** Sampling controls for a complete non-duplicated gear outline. */
|
|
910
|
-
export declare interface CylindricalGearOutlineOptions {
|
|
911
|
-
/** Exact samples per involute flank, at least two, within the aggregate profile ceiling. */
|
|
912
|
-
readonly flankSamples?: number;
|
|
913
|
-
/** Exact samples along each bottom land, at least one, within selected circular/profile ceilings. */
|
|
914
|
-
readonly rootArcSamples?: number;
|
|
915
|
-
/** Explicit profile and circular allocation ceilings. */
|
|
916
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
917
|
-
/** Explicit physical sampling policy for adaptive defaults. */
|
|
918
|
-
readonly resolution?: GeometryResolution;
|
|
919
|
-
/** Exact samples along each tooth tip, at least one, within selected circular/profile ceilings. */
|
|
920
|
-
readonly tipArcSamples?: number;
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* Pitch solution for a coordinated cylindrical gear pair.
|
|
925
|
-
*/
|
|
926
|
-
export declare interface CylindricalGearPairDimensions {
|
|
927
|
-
/** Nominal distance between the two +Z gear axes, in millimetres. */
|
|
928
|
-
readonly centerDistance: number;
|
|
929
|
-
/** Resolved driver dimensions. */
|
|
930
|
-
readonly driver: CylindricalGearDimensions;
|
|
931
|
-
/** `-1` for opposite external rotation and `1` for same-direction internal rotation. */
|
|
932
|
-
readonly drivenDirection: -1 | 1;
|
|
933
|
-
/** Resolved driven dimensions. */
|
|
934
|
-
readonly driven: CylindricalGearDimensions;
|
|
935
|
-
/** Absolute driven-to-driver tooth-count ratio. */
|
|
936
|
-
readonly ratio: number;
|
|
937
|
-
/** Helix angle required on the driven member for conjugate teeth, in degrees. */
|
|
938
|
-
readonly requiredDrivenHelixAngle: number;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
/** Sampling controls for one coupled internal-gear tooth cycle. */
|
|
942
|
-
export declare interface CylindricalGearPairMotionOptions {
|
|
943
|
-
/** Optional deterministic outline sampling overrides. */
|
|
944
|
-
readonly outline?: CylindricalGearOutlineOptions;
|
|
945
|
-
/** Coupled poses sampled over one driver tooth pitch. Defaults to 24. */
|
|
946
|
-
readonly samples?: number;
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
/** Maximum sampled planar overlap for an external pinion inside an internal ring. */
|
|
950
|
-
export declare interface CylindricalGearPairMotionReport {
|
|
951
|
-
/** Driver phase at the maximum overlap, in radians. */
|
|
952
|
-
readonly driverPhaseRadians: number;
|
|
953
|
-
/** Maximum pinion area lying inside ring material, in square millimetres. */
|
|
954
|
-
readonly maximumOverlapArea: number;
|
|
955
|
-
/** Number of evenly spaced coupled poses inspected. */
|
|
956
|
-
readonly samples: number;
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
/**
|
|
960
|
-
* Inputs for resolving a coordinated cylindrical gear pair.
|
|
961
|
-
*/
|
|
962
|
-
export declare interface CylindricalGearPairSpec {
|
|
963
|
-
/** Driving gear or pinion. */
|
|
964
|
-
readonly driver: CylindricalGearSpec;
|
|
965
|
-
/** Driven external gear or internal ring gear. */
|
|
966
|
-
readonly driven: CylindricalGearSpec;
|
|
967
|
-
/** External/external or external/internal mesh. */
|
|
968
|
-
readonly mesh: CylindricalGearMeshKind;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
/**
|
|
972
|
-
* Nominal dimensions for a standard full-depth cylindrical involute gear.
|
|
973
|
-
*
|
|
974
|
-
* Lengths use millimetres. `module` and `pressureAngle` are measured in
|
|
975
|
-
* the normal plane; a non-zero signed helix angle is converted to transverse
|
|
976
|
-
* pitch-plane dimensions. Positive and negative helix angles identify
|
|
977
|
-
* opposite hands but produce the same 2D pitch geometry.
|
|
978
|
-
*/
|
|
979
|
-
export declare interface CylindricalGearSpec {
|
|
980
|
-
/** Tangential tooth-thickness reduction at the pitch circle, in millimetres. */
|
|
981
|
-
readonly backlash?: number;
|
|
982
|
-
/** Dedendum clearance as a multiple of normal module; defaults to `0.25`. */
|
|
983
|
-
readonly clearanceFactor?: number;
|
|
984
|
-
/** Signed helix angle in degrees; zero creates a spur pitch system. */
|
|
985
|
-
readonly helixAngle?: number;
|
|
986
|
-
/** Normal module in millimetres per tooth. */
|
|
987
|
-
readonly module: number;
|
|
988
|
-
/** Normal pressure angle in degrees; defaults to 20 degrees. */
|
|
989
|
-
readonly pressureAngle?: number;
|
|
990
|
-
/** Integer tooth count from 6 through 1,000; external profiles also enforce the no-undercut limit. */
|
|
991
|
-
readonly toothCount: number;
|
|
992
|
-
}
|
|
993
|
-
|
|
994
621
|
/** Default absolute, relative, and angular tolerances for millimetre-scale models. */
|
|
995
622
|
export declare const DEFAULT_GEOMETRY_TOLERANCE: Readonly<{
|
|
996
623
|
/** Default absolute distance floor in model units. */
|
|
@@ -1004,44 +631,26 @@ export declare const DEFAULT_GEOMETRY_TOLERANCE: Readonly<{
|
|
|
1004
631
|
/** Conservative defaults; trusted callers can supply larger explicit ceilings. */
|
|
1005
632
|
export declare const defaultGeometrySamplingLimits: GeometrySamplingLimits;
|
|
1006
633
|
|
|
1007
|
-
/** Returns Euclidean point distance without allocating an intermediate difference vector. */
|
|
1008
|
-
export declare const distance2: (a: Vector2Data, b: Vector2Data) => number;
|
|
1009
|
-
|
|
1010
|
-
/** Returns Euclidean point distance without allocating an intermediate difference vector. */
|
|
1011
|
-
export declare const distance3: (a: Vector3Data, b: Vector3Data) => number;
|
|
1012
|
-
|
|
1013
634
|
/**
|
|
1014
|
-
* Places an exact item count at equal arc-length intervals along a sampled path.
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1019
|
-
*
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
635
|
+
* Places an exact item count at equal arc-length intervals along a sampled XYZ path.
|
|
636
|
+
*
|
|
637
|
+
* Open paths retain both endpoints when count exceeds one; closed paths omit the seam endpoint.
|
|
638
|
+
* Zero-length edges are skipped. Invalid counts, repeated closed seams, nonfinite lengths,
|
|
639
|
+
* zero-length paths, and exhausted budgets throw GeometryError.
|
|
640
|
+
*
|
|
641
|
+
* @param input - XYZ path or points in millimetres.
|
|
642
|
+
* @param count - Positive placement count; one selects the path start.
|
|
643
|
+
* @param closed - Raw-point closure, false by default; must match a path value.
|
|
644
|
+
* @param limits - Limits on input points and output placements.
|
|
1022
645
|
*/
|
|
1023
|
-
export declare
|
|
646
|
+
export declare function distributeAlongPath(
|
|
1024
647
|
input: Path3Input,
|
|
1025
648
|
count: number,
|
|
1026
649
|
closed?: boolean,
|
|
1027
650
|
limits?: Partial<GeometrySamplingLimits>,
|
|
1028
|
-
)
|
|
1029
|
-
|
|
1030
|
-
/** Returns the scalar dot product. */
|
|
1031
|
-
export declare const dot2: (a: Vector2Data, b: Vector2Data) => number;
|
|
1032
|
-
|
|
1033
|
-
/**
|
|
1034
|
-
* Returns the scalar dot product.
|
|
1035
|
-
* @example
|
|
1036
|
-
* ```ts
|
|
1037
|
-
* dot3([1, 0, 0], [0, 1, 0]); // 0
|
|
1038
|
-
* ```
|
|
1039
|
-
*/
|
|
1040
|
-
export declare const dot3: (a: Vector3Data, b: Vector3Data) => number;
|
|
651
|
+
): readonly PathPlacement[];
|
|
1041
652
|
|
|
1042
|
-
/**
|
|
1043
|
-
* Uniform finishing vocabulary shared by applicable solid edges and profile corners.
|
|
1044
|
-
*/
|
|
653
|
+
/** Uniform finishing vocabulary shared by applicable solid edges and profile corners. */
|
|
1045
654
|
export declare type EdgeTreatment =
|
|
1046
655
|
| ChamferedEdgeTreatment
|
|
1047
656
|
| RoundedEdgeTreatment
|
|
@@ -1058,9 +667,7 @@ export declare type EdgeTreatment =
|
|
|
1058
667
|
*/
|
|
1059
668
|
export declare function ellipseContour(options: EllipseContourOptions): Contour;
|
|
1060
669
|
|
|
1061
|
-
/**
|
|
1062
|
-
* Ellipse dimensions with exactly one XY radii or full-size tuple and explicit sampling.
|
|
1063
|
-
*/
|
|
670
|
+
/** Ellipse dimensions with exactly one XY radii or full-size tuple and explicit sampling. */
|
|
1064
671
|
export declare type EllipseContourOptions = CircularPrimitiveOptions &
|
|
1065
672
|
(
|
|
1066
673
|
| {
|
|
@@ -1077,69 +684,38 @@ export declare type EllipseContourOptions = CircularPrimitiveOptions &
|
|
|
1077
684
|
}
|
|
1078
685
|
);
|
|
1079
686
|
|
|
1080
|
-
/**
|
|
1081
|
-
* Independent inward finishing on primitive or straight convex extrusion ends.
|
|
1082
|
-
* Zero amounts leave the end untreated, including when all ends are disabled.
|
|
1083
|
-
*/
|
|
1084
|
-
export declare interface EndTreatments {
|
|
1085
|
-
/** Bottom cap and adjoining side; omitted leaves the end untreated. */
|
|
1086
|
-
readonly bottom?: EdgeTreatment;
|
|
1087
|
-
/** Top cap and adjoining side; omitted leaves the end untreated. */
|
|
1088
|
-
readonly top?: EdgeTreatment;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* Creates an immutable right-handed XYZ Euler rotation transform.
|
|
1093
|
-
*
|
|
1094
|
-
* Rotations are applied about global X first, then Y, then Z. This matches the
|
|
1095
|
-
* degree-based Euler convention used by the Manifold adapters.
|
|
1096
|
-
*
|
|
1097
|
-
* @param rotationDegrees - Finite `[x, y, z]` rotation angles in degrees.
|
|
1098
|
-
* @returns A frozen row-major transform.
|
|
1099
|
-
* @throws {@link GeometryError} When an angle is non-finite.
|
|
1100
|
-
*/
|
|
1101
|
-
export declare function eulerTransform3(
|
|
1102
|
-
rotationDegrees: Vector3Data,
|
|
1103
|
-
): Transform3Data;
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* Dimensions and sampling for pure +Z mesh extrusion, without end treatments.
|
|
1107
|
-
*/
|
|
1108
|
-
export declare interface ExtrudeMeshOptions extends ExtrusionSamplingOptions {
|
|
1109
|
-
/** Positive extrusion height in millimetres. */
|
|
1110
|
-
readonly height: number;
|
|
1111
|
-
/** Center the extrusion on Z; otherwise its bottom is at zero. Defaults to false. */
|
|
1112
|
-
readonly center?: boolean;
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
/** Native +Z extrusion with optional inward end treatments. */
|
|
1116
|
-
export declare interface ExtrudeOptions extends ExtrudeMeshOptions {
|
|
1117
|
-
/** Independent inward end treatments on straight convex single-contour extrusions. */
|
|
1118
|
-
readonly ends?: EndTreatments;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
687
|
/** Shared sampling controls for a twisted or scaled linear extrusion. */
|
|
1122
688
|
export declare interface ExtrusionSamplingOptions {
|
|
1123
|
-
/**
|
|
1124
|
-
readonly
|
|
689
|
+
/** Positive longitudinal interval count; n slices create n + 1 profile layers. Overrides ordinary extrusion's physical sampling. */
|
|
690
|
+
readonly slices?: number;
|
|
1125
691
|
/** Explicit output and sampling allocation ceilings. */
|
|
1126
692
|
readonly limits?: Partial<ModelingLimits>;
|
|
1127
693
|
/** Operation-level physical policy over the nearest model scope. */
|
|
1128
694
|
readonly resolution?: GeometryResolution;
|
|
1129
|
-
/**
|
|
1130
|
-
readonly
|
|
695
|
+
/** Final profile-local uniform or XY scale, interpolated from one before twisting. Both components must be positive or both zero for an apex of one simple boundary. Defaults to one. */
|
|
696
|
+
readonly scale?: number | Vector2Input;
|
|
1131
697
|
/** Finite rotation of the top profile about +Z, in degrees; defaults to zero. */
|
|
1132
698
|
readonly twist?: number;
|
|
1133
699
|
}
|
|
1134
700
|
|
|
1135
|
-
/**
|
|
701
|
+
/**
|
|
702
|
+
* Fits XY bounds uniformly and centers them in the target; zero source axes do not constrain scale.
|
|
703
|
+
*
|
|
704
|
+
* @param source - Source bounds in millimetres, with at least one positive extent.
|
|
705
|
+
* @param target - Target bounds in the same dimension and coordinate system.
|
|
706
|
+
*/
|
|
1136
707
|
export declare function fitBounds(
|
|
1137
708
|
source: Bounds2Data,
|
|
1138
709
|
target: Bounds2Data,
|
|
1139
710
|
options?: BoundsFitOptions,
|
|
1140
711
|
): BoundsFit2;
|
|
1141
712
|
|
|
1142
|
-
/**
|
|
713
|
+
/**
|
|
714
|
+
* Fits XYZ bounds uniformly and centers them in the target; zero source axes do not constrain scale.
|
|
715
|
+
*
|
|
716
|
+
* @param source - Source bounds in millimetres, with at least one positive extent.
|
|
717
|
+
* @param target - Target bounds in the same dimension and coordinate system.
|
|
718
|
+
*/
|
|
1143
719
|
export declare function fitBounds(
|
|
1144
720
|
source: Bounds3Data,
|
|
1145
721
|
target: Bounds3Data,
|
|
@@ -1170,7 +746,7 @@ export declare interface FittedTextLayout extends VectorTextLayout {
|
|
|
1170
746
|
*/
|
|
1171
747
|
export declare function fitTextLayout(
|
|
1172
748
|
layout: VectorTextLayout,
|
|
1173
|
-
target:
|
|
749
|
+
target: Bounds2Input,
|
|
1174
750
|
options?: BoundsFitOptions,
|
|
1175
751
|
): FittedTextLayout;
|
|
1176
752
|
|
|
@@ -1187,17 +763,35 @@ export declare interface Frame3 {
|
|
|
1187
763
|
}
|
|
1188
764
|
|
|
1189
765
|
/**
|
|
1190
|
-
*
|
|
766
|
+
* Creates a copied, deeply frozen plain coordinate frame in world space.
|
|
767
|
+
* Axes must be right-handed, unit length, and mutually orthogonal. Only accepted numerical
|
|
768
|
+
* roundoff is normalized; scale, shear, reflection, and materially invalid bases reject.
|
|
769
|
+
* Frames are placement inputs; use transform3(frame) when affine methods are needed.
|
|
1191
770
|
*
|
|
1192
|
-
* @
|
|
1193
|
-
*
|
|
1194
|
-
*
|
|
1195
|
-
*
|
|
771
|
+
* @example Place an XY profile using an analytic radial frame
|
|
772
|
+
* ```ts
|
|
773
|
+
* const radial = frame3({
|
|
774
|
+
* origin: [20, 0, 5],
|
|
775
|
+
* xAxis: [0, 1, 0],
|
|
776
|
+
* yAxis: [0, 0, 1],
|
|
777
|
+
* zAxis: [1, 0, 0],
|
|
778
|
+
* });
|
|
779
|
+
* const placed = transform3(radial).applyPoint([2, 3, 0]).toData(); // [20, 2, 8]
|
|
780
|
+
* ```
|
|
1196
781
|
*/
|
|
1197
|
-
export declare function
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
782
|
+
export declare function frame3(options: Frame3Options): Frame3;
|
|
783
|
+
|
|
784
|
+
/** An origin in millimetres and a right-handed orthonormal basis in world coordinates. */
|
|
785
|
+
export declare interface Frame3Options {
|
|
786
|
+
/** World-space origin of the local coordinate system, in millimetres. */
|
|
787
|
+
readonly origin: Vector3Input;
|
|
788
|
+
/** Unit vector defining local +X. */
|
|
789
|
+
readonly xAxis: Vector3Input;
|
|
790
|
+
/** Unit vector defining local +Y. */
|
|
791
|
+
readonly yAxis: Vector3Input;
|
|
792
|
+
/** Unit vector defining local +Z. */
|
|
793
|
+
readonly zAxis: Vector3Input;
|
|
794
|
+
}
|
|
1201
795
|
|
|
1202
796
|
/**
|
|
1203
797
|
* Error raised when a geometry precondition or invariant is not satisfied.
|
|
@@ -1253,9 +847,7 @@ export declare interface GeometryErrorContext {
|
|
|
1253
847
|
readonly operation: string;
|
|
1254
848
|
}
|
|
1255
849
|
|
|
1256
|
-
/**
|
|
1257
|
-
* Tessellation policy for sampled geometry measured in millimetres.
|
|
1258
|
-
*/
|
|
850
|
+
/** Tessellation policy for sampled geometry measured in millimetres. */
|
|
1259
851
|
export declare interface GeometryResolution {
|
|
1260
852
|
/** Optional exact full-circle segment count, of at least three, bounded by the selected circular ceiling. */
|
|
1261
853
|
readonly circularSegments?: number;
|
|
@@ -1287,21 +879,10 @@ export declare interface GeometryToleranceOptions {
|
|
|
1287
879
|
readonly absolute?: number;
|
|
1288
880
|
/** Angular comparison threshold in radians. Must be finite and greater than zero. */
|
|
1289
881
|
readonly angular?: number;
|
|
1290
|
-
/** Dimensionless scale multiplier. Must be finite and
|
|
882
|
+
/** Dimensionless scale multiplier. Must be finite and nonnegative. */
|
|
1291
883
|
readonly relative?: number;
|
|
1292
884
|
}
|
|
1293
885
|
|
|
1294
|
-
/** Returns one recommended metric clearance-hole diameter in millimetres. */
|
|
1295
|
-
export declare function getMetricClearanceHoleDiameter(
|
|
1296
|
-
size: MetricFastenerSize,
|
|
1297
|
-
fit?: ClearanceHoleFit,
|
|
1298
|
-
): number;
|
|
1299
|
-
|
|
1300
|
-
/** Returns the immutable standards record for one supported metric size. */
|
|
1301
|
-
export declare function getMetricFastenerStandard(
|
|
1302
|
-
size: MetricFastenerSize,
|
|
1303
|
-
): MetricFastenerStandard;
|
|
1304
|
-
|
|
1305
886
|
/**
|
|
1306
887
|
* XY or XYZ grid with X varying fastest. The first item starts at the local origin.
|
|
1307
888
|
* Dimension 2 restricts counts and spacing to XY; any frame must preserve the XY plane.
|
|
@@ -1316,94 +897,22 @@ export declare type GridPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
|
1316
897
|
/** Positive integer counts on X and Y. */
|
|
1317
898
|
readonly count: Vector2Data;
|
|
1318
899
|
/** Signed millimetres between adjacent copies on X and Y. */
|
|
1319
|
-
readonly spacing:
|
|
900
|
+
readonly spacing: Vector2Input;
|
|
1320
901
|
}
|
|
1321
902
|
| (Dimension extends 3
|
|
1322
903
|
? {
|
|
1323
904
|
/** Positive integer counts on X, Y and Z. */
|
|
1324
905
|
readonly count: Vector3Data;
|
|
1325
906
|
/** Signed millimetres between adjacent copies on X, Y and Z. */
|
|
1326
|
-
readonly spacing:
|
|
907
|
+
readonly spacing: Vector3Input;
|
|
1327
908
|
}
|
|
1328
909
|
: never)
|
|
1329
910
|
);
|
|
1330
911
|
|
|
1331
|
-
/**
|
|
912
|
+
/** Immutable XYZ placements for an XY or XYZ grid, in X-fastest order. */
|
|
1332
913
|
export declare function gridPatternTransforms(
|
|
1333
914
|
options: GridPatternOptions,
|
|
1334
|
-
): readonly
|
|
1335
|
-
|
|
1336
|
-
/** Trusted output ceilings for pure construction; omitted fields use engine defaults. */
|
|
1337
|
-
export declare type HeightfieldMeshLimits = Partial<
|
|
1338
|
-
Pick<ModelingLimits, "maxVertices" | "maxTriangles" | "maxBytes">
|
|
1339
|
-
>;
|
|
1340
|
-
|
|
1341
|
-
/**
|
|
1342
|
-
* A closed rectilinear heightfield above a flat base, with uniform or explicit XY samples in millimetres.
|
|
1343
|
-
*
|
|
1344
|
-
* Uniform sampling requires positive `size: [width, depth]` and positive integer `segments: [x, y]`.
|
|
1345
|
-
* Optional `origin` sets the lower-left XY corner; omitting it centres the footprint on XY.
|
|
1346
|
-
* Alternatively, supply `coordinates: { x, y }` with at least two strictly increasing finite
|
|
1347
|
-
* absolute samples per axis, distinct in Float32. This infers the footprint and interval counts;
|
|
1348
|
-
* `size`, `segments`, and `origin` cannot be combined with explicit coordinates.
|
|
1349
|
-
*/
|
|
1350
|
-
export declare type HeightfieldOptions = {
|
|
1351
|
-
/** Absolute top Z at the supplied XY point. Every sample must be above baseZ. */
|
|
1352
|
-
readonly height: (point: Vector2Data) => number;
|
|
1353
|
-
/** Flat bottom Z. Defaults to zero. */
|
|
1354
|
-
readonly baseZ?: number;
|
|
1355
|
-
/**
|
|
1356
|
-
* Top-cell diagonal policy. Defaults to fixed (lower-left to upper-right).
|
|
1357
|
-
* min-edge selects the shorter 3D diagonal; center-error selects the diagonal whose endpoint
|
|
1358
|
-
* average is closest to one extra height sample at the physical cell centre. Ties use fixed.
|
|
1359
|
-
* All policies retain two triangles per cell; neither estimates error elsewhere in the cell.
|
|
1360
|
-
*/
|
|
1361
|
-
readonly triangulation?: "fixed" | "min-edge" | "center-error";
|
|
1362
|
-
} & (
|
|
1363
|
-
| {
|
|
1364
|
-
/** Positive XY footprint for uniform sampling. */
|
|
1365
|
-
readonly size: Vector2Input;
|
|
1366
|
-
/** Exact positive integer X/Y interval counts. */
|
|
1367
|
-
readonly segments: readonly [x: number, y: number];
|
|
1368
|
-
/** Lower-left footprint XY. Omitted centers the footprint on XY. */
|
|
1369
|
-
readonly origin?: Vector2Input;
|
|
1370
|
-
/** Explicit coordinates cannot be combined with uniform sampling. */
|
|
1371
|
-
readonly coordinates?: never;
|
|
1372
|
-
}
|
|
1373
|
-
| {
|
|
1374
|
-
/**
|
|
1375
|
-
* Absolute XY coordinates, each with at least two strictly increasing finite values that
|
|
1376
|
-
* remain distinct in Float32. Uneven spacing permits caller-owned local refinement.
|
|
1377
|
-
*/
|
|
1378
|
-
readonly coordinates: {
|
|
1379
|
-
/** Absolute X samples in ascending order. */
|
|
1380
|
-
readonly x: readonly number[];
|
|
1381
|
-
/** Absolute Y samples in ascending order. */
|
|
1382
|
-
readonly y: readonly number[];
|
|
1383
|
-
};
|
|
1384
|
-
/** The footprint is inferred from explicit coordinates. */
|
|
1385
|
-
readonly size?: never;
|
|
1386
|
-
/** Interval counts are inferred from explicit coordinates. */
|
|
1387
|
-
readonly segments?: never;
|
|
1388
|
-
/** Explicit coordinates already include their origin. */
|
|
1389
|
-
readonly origin?: never;
|
|
1390
|
-
}
|
|
1391
|
-
);
|
|
1392
|
-
|
|
1393
|
-
/** Exact grid and mesh buffer allocation counts resolved without evaluating the height callback. */
|
|
1394
|
-
export declare interface HeightfieldPreflight {
|
|
1395
|
-
/** Number of top grid points; excludes the extra per-cell height evaluations for center-error. */
|
|
1396
|
-
readonly sampleCount: number;
|
|
1397
|
-
/** Number of allocated XYZ vertices. */
|
|
1398
|
-
readonly vertexCount: number;
|
|
1399
|
-
/** Number of allocated indexed triangles. */
|
|
1400
|
-
readonly triangleCount: number;
|
|
1401
|
-
/** Total bytes of Float32 positions and Uint32 indices, excluding temporary storage. */
|
|
1402
|
-
readonly byteCount: number;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
/** Identity transform, safe to share because it is frozen. */
|
|
1406
|
-
export declare const IDENTITY_TRANSFORM3: Transform3Data;
|
|
915
|
+
): readonly Transform3[];
|
|
1407
916
|
|
|
1408
917
|
/** Owned immutable numeric data. Iterate without copying; use copy() for mutable storage. */
|
|
1409
918
|
export declare interface ImmutableBuffer<
|
|
@@ -1423,9 +932,12 @@ export declare interface ImmutableBuffer<
|
|
|
1423
932
|
|
|
1424
933
|
/**
|
|
1425
934
|
* Copies numeric data once into private storage. This pure helper needs no active generation.
|
|
935
|
+
*
|
|
936
|
+
* @param source - Caller-owned numeric data; copied into private storage.
|
|
937
|
+
*
|
|
1426
938
|
* @example
|
|
1427
939
|
* ```ts
|
|
1428
|
-
* import { immutableBuffer } from "@metamesh/modeling";
|
|
940
|
+
* import { immutableBuffer } from "@metamesh/modeling/geometry";
|
|
1429
941
|
* const heights = immutableBuffer(new Float32Array([2, 4, 6]));
|
|
1430
942
|
* const count = heights.length;
|
|
1431
943
|
* const first = heights.at(0);
|
|
@@ -1440,33 +952,6 @@ export declare function immutableBuffer<T extends NumericArray>(
|
|
|
1440
952
|
|
|
1441
953
|
declare const immutableBufferBrand: unique symbol;
|
|
1442
954
|
|
|
1443
|
-
/** Immutable local XYZ positions and triangle indices, suitable for a computed value or part. */
|
|
1444
|
-
export declare interface ImmutableTriangleMesh {
|
|
1445
|
-
/** Packed XYZ coordinates in millimetres. */
|
|
1446
|
-
readonly positions: ImmutableBuffer<Float32Array>;
|
|
1447
|
-
/** Zero-based vertex indices, three per triangle. */
|
|
1448
|
-
readonly indices: ImmutableBuffer<Uint32Array>;
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
/** Options for a compensated internal-thread subtraction tool along +Z. */
|
|
1452
|
-
export declare interface InternalThreadCutterOptions
|
|
1453
|
-
extends Omit<ThreadRidgeOptions, "majorDiameter">, ThreadBevelOptions {
|
|
1454
|
-
/** Printable fit or caller-calibrated allowances. Default: `normal`. */
|
|
1455
|
-
readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
|
|
1456
|
-
/** Nominal major diameter before female compensation and faceting correction. */
|
|
1457
|
-
readonly nominalMajorDiameter: number;
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
/**
|
|
1461
|
-
* Inverts a finite, non-singular affine transform.
|
|
1462
|
-
*
|
|
1463
|
-
* @param transform - Transform to invert.
|
|
1464
|
-
* @returns A new frozen transform whose composition with the input is identity.
|
|
1465
|
-
*/
|
|
1466
|
-
export declare function inverseTransform3(
|
|
1467
|
-
transform: Transform3Data,
|
|
1468
|
-
): Transform3Data;
|
|
1469
|
-
|
|
1470
955
|
/**
|
|
1471
956
|
* Recognizes structured geometry errors from separately bundled Modeling copies in the same realm.
|
|
1472
957
|
*
|
|
@@ -1475,129 +960,19 @@ export declare function inverseTransform3(
|
|
|
1475
960
|
*/
|
|
1476
961
|
export declare function isGeometryError(value: unknown): value is GeometryError;
|
|
1477
962
|
|
|
1478
|
-
/** Shared knuckle-joint dimensions in millimetres, independent of mounting geometry. */
|
|
1479
|
-
export declare interface KnuckleHingeBaseSpec {
|
|
1480
|
-
/** Total extent along the +X pin axis, centered at the origin. */
|
|
1481
|
-
readonly length: number;
|
|
1482
|
-
/** Number of equal alternating intervals, starting with half A. */
|
|
1483
|
-
readonly knuckleCount: number;
|
|
1484
|
-
/** Outside vertex-sized barrel diameter. */
|
|
1485
|
-
readonly barrelDiameter: number;
|
|
1486
|
-
/** Vertex-sized shaft diameter, including an externally supplied shaft. */
|
|
1487
|
-
readonly pinDiameter: number;
|
|
1488
|
-
/** Nonnegative per-side radial allowance; bores circumscribe this running envelope. */
|
|
1489
|
-
readonly radialClearance: number;
|
|
1490
|
-
/** Nonnegative total air gap between each neighboring pair of knuckle ends. */
|
|
1491
|
-
readonly axialGap: number;
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
/** Immutable joint layout and conservative faceted envelopes; no engine initialization. */
|
|
1495
|
-
export declare interface KnuckleHingeDimensions {
|
|
1496
|
-
/** Validated, copied nominal inputs. */
|
|
1497
|
-
readonly spec: KnuckleHingeSpec;
|
|
1498
|
-
/** Nominal outside barrel radius. */
|
|
1499
|
-
readonly barrelRadius: number;
|
|
1500
|
-
/** Maximum shaft radius under any rotation. */
|
|
1501
|
-
readonly pinRadius: number;
|
|
1502
|
-
/** Minimum face-sized bore radius, including radial clearance. */
|
|
1503
|
-
readonly boreRadius: number;
|
|
1504
|
-
/** Maximum radius at the faceted bore vertices. */
|
|
1505
|
-
readonly boreOuterRadius: number;
|
|
1506
|
-
/** Conservative radial wall before outer end chamfers, accounting for both polygons. */
|
|
1507
|
-
readonly minimumBarrelWall: number;
|
|
1508
|
-
/** Equal length of every interval. */
|
|
1509
|
-
readonly knuckleLength: number;
|
|
1510
|
-
/** Common exact full-circle segment count. */
|
|
1511
|
-
readonly segments: number;
|
|
1512
|
-
/** Alternating schedule ordered from negative to positive X. */
|
|
1513
|
-
readonly knuckles: readonly KnuckleHingeInterval[];
|
|
1514
|
-
/** Integral pin interval; null when the consumer supplies an inserted pin. */
|
|
1515
|
-
readonly pin: Readonly<{
|
|
1516
|
-
/** Start coordinate along X, in millimetres. */
|
|
1517
|
-
start: number;
|
|
1518
|
-
/** Total integral shaft length, including material inside A. */
|
|
1519
|
-
length: number;
|
|
1520
|
-
}> | null;
|
|
1521
|
-
/** Origin at the joint center, direction +X, roll guide +Z. */
|
|
1522
|
-
readonly axis: Anchor3;
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
/** One equal-length barrel interval in the shared pin-centered frame. */
|
|
1526
|
-
export declare interface KnuckleHingeInterval {
|
|
1527
|
-
/** Alternating owner, beginning with A at the negative end of X. */
|
|
1528
|
-
readonly side: "a" | "b";
|
|
1529
|
-
/** Start along X, in millimetres. */
|
|
1530
|
-
readonly start: number;
|
|
1531
|
-
/** Axial length, excluding the neighboring gaps. */
|
|
1532
|
-
readonly length: number;
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
/** Shared circular sampling for barrels, shafts, and bores. */
|
|
1536
|
-
export declare interface KnuckleHingeSamplingOptions {
|
|
1537
|
-
/** Exact full-circle count, divisible by four and at least four; overrides adaptive sampling. */
|
|
1538
|
-
readonly segments?: number;
|
|
1539
|
-
/** Physical tessellation policy. Exact circular counts must also be divisible by four. */
|
|
1540
|
-
readonly resolution?: GeometryResolution;
|
|
1541
|
-
/** Explicit allocation ceilings; defaults to the pure geometry sampling limits. */
|
|
1542
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
/**
|
|
1546
|
-
* Knuckle-joint construction modes and interval ownership.
|
|
1547
|
-
*
|
|
1548
|
-
* Print-in-place requires an odd count of at least three: A owns both
|
|
1549
|
-
* end anchors and the entire shaft. Inserted-pin bores both halves and supplies no shaft.
|
|
1550
|
-
* Lift-off requires exactly two intervals; A's integral pin enters B without a far anchor.
|
|
1551
|
-
*/
|
|
1552
|
-
export declare type KnuckleHingeSpec = KnuckleHingeBaseSpec &
|
|
1553
|
-
(
|
|
1554
|
-
| {
|
|
1555
|
-
/** Captive integral shaft or bores for an externally supplied pin. */
|
|
1556
|
-
readonly mode: "print-in-place" | "inserted-pin";
|
|
1557
|
-
/** Engagement applies only to lift-off construction. */
|
|
1558
|
-
readonly pinEngagement?: never;
|
|
1559
|
-
}
|
|
1560
|
-
| {
|
|
1561
|
-
/** Detachable socket on a finite integral pin. */
|
|
1562
|
-
readonly mode: "lift-off";
|
|
1563
|
-
/** Lift-off has one fixed interval and one removable interval. */
|
|
1564
|
-
readonly knuckleCount: 2;
|
|
1565
|
-
/** Positive axial engagement into B, no greater than its knuckle length. */
|
|
1566
|
-
readonly pinEngagement: number;
|
|
1567
|
-
}
|
|
1568
|
-
);
|
|
1569
|
-
|
|
1570
963
|
/**
|
|
1571
964
|
* Returns immutable translations for a +X row of finite XYZ bounds with a nonnegative gap.
|
|
1572
965
|
*
|
|
1573
966
|
* Each minimum Y/Z becomes zero, and the first minimum X becomes zero. Supply bounds after
|
|
1574
967
|
* any intended part rotation; translations apply to those bounds. An empty input returns [].
|
|
968
|
+
*
|
|
969
|
+
* @param bounds - XYZ bounds in row order, after any part rotation.
|
|
1575
970
|
*/
|
|
1576
971
|
export declare function layoutRow(
|
|
1577
972
|
bounds: readonly Bounds3Data[],
|
|
1578
973
|
options?: RowLayoutOptions,
|
|
1579
974
|
): readonly Vector3Data[];
|
|
1580
975
|
|
|
1581
|
-
/** Returns Euclidean vector length in the vector's coordinate units. */
|
|
1582
|
-
export declare const length2: (vector: Vector2Data) => number;
|
|
1583
|
-
|
|
1584
|
-
/** Returns Euclidean vector length in the vector's coordinate units. */
|
|
1585
|
-
export declare const length3: (vector: Vector3Data) => number;
|
|
1586
|
-
|
|
1587
|
-
/** Linearly interpolates two vectors; `t` is dimensionless and may extrapolate. */
|
|
1588
|
-
export declare const lerp2: (
|
|
1589
|
-
a: Vector2Data,
|
|
1590
|
-
b: Vector2Data,
|
|
1591
|
-
t: number,
|
|
1592
|
-
) => Vector2Data;
|
|
1593
|
-
|
|
1594
|
-
/** Linearly interpolates two vectors; `t` is dimensionless and may extrapolate. */
|
|
1595
|
-
export declare const lerp3: (
|
|
1596
|
-
a: Vector3Data,
|
|
1597
|
-
b: Vector3Data,
|
|
1598
|
-
t: number,
|
|
1599
|
-
) => Vector3Data;
|
|
1600
|
-
|
|
1601
976
|
/**
|
|
1602
977
|
* Equal linear intervals determined by exactly two of count, spacing and total length.
|
|
1603
978
|
* Dimension defaults to 3; Section patterns use 2 and accept XY vector directions.
|
|
@@ -1632,10 +1007,10 @@ export declare type LinearPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
|
1632
1007
|
}
|
|
1633
1008
|
);
|
|
1634
1009
|
|
|
1635
|
-
/**
|
|
1010
|
+
/** Immutable XYZ placements in millimetres, including the original at the origin. */
|
|
1636
1011
|
export declare function linearPatternTransforms(
|
|
1637
1012
|
options: LinearPatternOptions,
|
|
1638
|
-
): readonly
|
|
1013
|
+
): readonly Transform3[];
|
|
1639
1014
|
|
|
1640
1015
|
/** Straight planar curve in millimetres. */
|
|
1641
1016
|
export declare interface LineCurve2 {
|
|
@@ -1657,60 +1032,18 @@ export declare interface LineCurve3 {
|
|
|
1657
1032
|
readonly end: Vector3Data;
|
|
1658
1033
|
}
|
|
1659
1034
|
|
|
1660
|
-
/**
|
|
1661
|
-
* Associates ordered loft contours without inferring component identities or repairing topology.
|
|
1662
|
-
*
|
|
1663
|
-
* - `direct` preserves seams and subdivides edges to a common count without dropping vertices.
|
|
1664
|
-
* - `reindex` applies direct subdivision, then selects the next contour's cyclic phase with the
|
|
1665
|
-
* least total world-space connection length.
|
|
1666
|
-
* - `fast-distance` preserves supplied seams and minimizes connection length over ordered closed
|
|
1667
|
-
* vertex associations, repeating vertices for triangular fans.
|
|
1668
|
-
* - `distance` runs the same ordered optimization over every cyclic phase of the next contour.
|
|
1669
|
-
*
|
|
1670
|
-
* Components and holes are paired by their existing order. Use identified profiles when semantic
|
|
1671
|
-
* correspondence must remain authoritative.
|
|
1672
|
-
*/
|
|
1673
|
-
export declare type LoftCorrespondence =
|
|
1674
|
-
"direct" | "reindex" | "fast-distance" | "distance";
|
|
1675
|
-
|
|
1676
|
-
/** One point-data profile at a height or explicit right-handed spatial frame. */
|
|
1677
|
-
export declare type LoftMeshStation = LoftPlacement & {
|
|
1678
|
-
/** Closed Path2 or ordered finite XY boundary points with an implicit closing edge. */
|
|
1679
|
-
readonly profile: Path2Input;
|
|
1680
|
-
};
|
|
1681
|
-
|
|
1682
|
-
/**
|
|
1683
|
-
* Shared controls for native and pure lofts. Point data and arbitrary Sections default to direct correspondence.
|
|
1684
|
-
*/
|
|
1685
|
-
export declare interface LoftOptions {
|
|
1686
|
-
/** One method or one per consecutive station gap. Omitted preserves known primitive landmarks, including circle/ellipse-to-rectangle corners, and otherwise uses direct correspondence with the supplied seams. */
|
|
1687
|
-
readonly correspondence?: LoftCorrespondence | readonly LoftCorrespondence[];
|
|
1688
|
-
/** Extra points follow edge length or distribute equally across existing segments. Defaults to perimeter for direct/reindex, or segments when any distance method is selected; distance methods require segments. */
|
|
1689
|
-
readonly distribution?: "perimeter" | "segments";
|
|
1690
|
-
/** Positive integer point-density multiplier, uniformly or per input profile. Original vertices are retained. Defaults to one. */
|
|
1691
|
-
readonly refine?: number | readonly number[];
|
|
1692
|
-
/** Nonnegative count of world-linearly interpolated profiles, uniformly or per gap. Defaults to zero. */
|
|
1693
|
-
readonly slices?: number | readonly number[];
|
|
1694
|
-
/** Physical curve policy for retained primitives, and maximum edge length for point data. Exact primitive curve counts take precedence. */
|
|
1695
|
-
readonly resolution?: GeometryResolution;
|
|
1696
|
-
/** Explicit output and sampling budgets; native operations may only lower host ceilings. */
|
|
1697
|
-
readonly limits?: Partial<ModelingLimits>;
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
/**
|
|
1701
|
-
* A horizontal XY station height, or an explicit right-handed spatial frame, never both.
|
|
1702
|
-
*/
|
|
1035
|
+
/** A horizontal XY station height, or an explicit affine transform, never both. */
|
|
1703
1036
|
export declare type LoftPlacement =
|
|
1704
1037
|
| {
|
|
1705
1038
|
/** Horizontal XY station height in millimetres. */
|
|
1706
1039
|
readonly z: number;
|
|
1707
1040
|
/** Excluded when a horizontal height is supplied. */
|
|
1708
|
-
readonly
|
|
1041
|
+
readonly transform?: never;
|
|
1709
1042
|
}
|
|
1710
1043
|
| {
|
|
1711
|
-
/**
|
|
1712
|
-
readonly
|
|
1713
|
-
/** Excluded when an explicit
|
|
1044
|
+
/** Non-singular affine placement of the profile's XY plane in world coordinates. */
|
|
1045
|
+
readonly transform: Transform3Input;
|
|
1046
|
+
/** Excluded when an explicit transform is supplied. */
|
|
1714
1047
|
readonly z?: never;
|
|
1715
1048
|
};
|
|
1716
1049
|
|
|
@@ -1722,6 +1055,8 @@ export declare type LoftPlacement =
|
|
|
1722
1055
|
* Input order and winding are preserved. Collapsed spans retain repeated logical slots, which
|
|
1723
1056
|
* the engine maps to shared physical vertices while omitting degenerate faces.
|
|
1724
1057
|
*
|
|
1058
|
+
* @param profiles - 1–1000 profiles with matching component, contour, and span IDs, in order.
|
|
1059
|
+
*
|
|
1725
1060
|
* @example Match named rectangle landmarks
|
|
1726
1061
|
* ```ts
|
|
1727
1062
|
* matchProfiles([
|
|
@@ -1743,95 +1078,6 @@ export declare interface MatchProfilesOptions {
|
|
|
1743
1078
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1744
1079
|
}
|
|
1745
1080
|
|
|
1746
|
-
/**
|
|
1747
|
-
* Measures sampled kinematic interference over one tooth cycle of an internal gear pair.
|
|
1748
|
-
*
|
|
1749
|
-
* The driver and ring start with half-tooth offsets for odd tooth counts, then rotate in the
|
|
1750
|
-
* same direction at their resolved tooth-count ratio. Each
|
|
1751
|
-
* sampled pinion outline is subtracted from the ring's center-and-space opening; remaining area is
|
|
1752
|
-
* solid overlap. This catches involute, tip, and trimming interference that a single assembled pose
|
|
1753
|
-
* misses. It is a deterministic model check, not a certified gear-rating calculation.
|
|
1754
|
-
*/
|
|
1755
|
-
export declare function measureInternalCylindricalGearPairMotion(
|
|
1756
|
-
spec: CylindricalGearPairSpec,
|
|
1757
|
-
options?: CylindricalGearPairMotionOptions,
|
|
1758
|
-
): CylindricalGearPairMotionReport;
|
|
1759
|
-
|
|
1760
|
-
/**
|
|
1761
|
-
* Curated metric modeling dimensions for clearance holes, regular hex nuts,
|
|
1762
|
-
* and socket-head cap screws.
|
|
1763
|
-
*
|
|
1764
|
-
* Values are nominal reference dimensions intended for parametric envelopes.
|
|
1765
|
-
* Manufacturing tolerances, coatings, and printer compensation remain caller
|
|
1766
|
-
* responsibilities.
|
|
1767
|
-
*/
|
|
1768
|
-
export declare const METRIC_FASTENER_STANDARDS: Readonly<{
|
|
1769
|
-
/** Nominal M2 coarse-thread modeling dimensions. */
|
|
1770
|
-
M2: MetricFastenerStandard;
|
|
1771
|
-
/** Nominal M2.5 coarse-thread modeling dimensions. */
|
|
1772
|
-
"M2.5": MetricFastenerStandard;
|
|
1773
|
-
/** Nominal M3 coarse-thread modeling dimensions. */
|
|
1774
|
-
M3: MetricFastenerStandard;
|
|
1775
|
-
/** Nominal M4 coarse-thread modeling dimensions. */
|
|
1776
|
-
M4: MetricFastenerStandard;
|
|
1777
|
-
/** Nominal M5 coarse-thread modeling dimensions. */
|
|
1778
|
-
M5: MetricFastenerStandard;
|
|
1779
|
-
/** Nominal M6 coarse-thread modeling dimensions. */
|
|
1780
|
-
M6: MetricFastenerStandard;
|
|
1781
|
-
/** Nominal M8 coarse-thread modeling dimensions. */
|
|
1782
|
-
M8: MetricFastenerStandard;
|
|
1783
|
-
/** Nominal M10 coarse-thread modeling dimensions. */
|
|
1784
|
-
M10: MetricFastenerStandard;
|
|
1785
|
-
/** Nominal M12 coarse-thread modeling dimensions. */
|
|
1786
|
-
M12: MetricFastenerStandard;
|
|
1787
|
-
}>;
|
|
1788
|
-
|
|
1789
|
-
/** Supported metric fastener sizes. */
|
|
1790
|
-
export declare type MetricFastenerSize =
|
|
1791
|
-
"M2" | "M2.5" | "M3" | "M4" | "M5" | "M6" | "M8" | "M10" | "M12";
|
|
1792
|
-
|
|
1793
|
-
/** Small immutable metric fastener record for modeling common mating features. */
|
|
1794
|
-
export declare interface MetricFastenerStandard {
|
|
1795
|
-
/** Coarse thread pitch in millimetres. */
|
|
1796
|
-
readonly coarsePitch: number;
|
|
1797
|
-
/** Recommended clearance-hole diameters. */
|
|
1798
|
-
readonly clearanceHoles: ClearanceHoleDimensions;
|
|
1799
|
-
/** Regular hex-nut envelope. */
|
|
1800
|
-
readonly hexNut: MetricHexNutDimensions;
|
|
1801
|
-
/** Nominal fastener diameter in millimetres. */
|
|
1802
|
-
readonly nominalDiameter: number;
|
|
1803
|
-
/** Socket-head cap screw envelope and drive size. */
|
|
1804
|
-
readonly socketCapHead: MetricSocketCapHeadDimensions;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
/** Regular hex-nut envelope dimensions in millimetres. */
|
|
1808
|
-
export declare interface MetricHexNutDimensions {
|
|
1809
|
-
/** Nominal wrench size across flats. */
|
|
1810
|
-
readonly acrossFlats: number;
|
|
1811
|
-
/** Nominal full-nut thickness. */
|
|
1812
|
-
readonly thickness: number;
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1815
|
-
/** Socket-head cap screw head and drive dimensions in millimetres. */
|
|
1816
|
-
export declare interface MetricSocketCapHeadDimensions {
|
|
1817
|
-
/** Nominal cylindrical head diameter. */
|
|
1818
|
-
readonly diameter: number;
|
|
1819
|
-
/** Nominal head height. */
|
|
1820
|
-
readonly height: number;
|
|
1821
|
-
/** Nominal internal hex key size across flats. */
|
|
1822
|
-
readonly hexKey: number;
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
/**
|
|
1826
|
-
* Returns the smallest unshifted full-depth external tooth count that avoids rack-cutter undercut.
|
|
1827
|
-
*
|
|
1828
|
-
* The normal-plane limit is `2 / sin²(alpha_n)`. Helical gears use the standard virtual tooth
|
|
1829
|
-
* count `z_v = z / cos³(beta)`, so increasing helix angle can reduce the physical tooth count.
|
|
1830
|
-
*/
|
|
1831
|
-
export declare function minimumCylindricalGearToothCountWithoutUndercut(
|
|
1832
|
-
spec?: Readonly<Pick<CylindricalGearSpec, "helixAngle" | "pressureAngle">>,
|
|
1833
|
-
): number;
|
|
1834
|
-
|
|
1835
1081
|
/** Aggregate manufacturing output ceilings selected by a trusted host. */
|
|
1836
1082
|
export declare interface ModelingLimits extends GeometrySamplingLimits {
|
|
1837
1083
|
/** Maximum number of named finalized parts. */
|
|
@@ -1844,35 +1090,16 @@ export declare interface ModelingLimits extends GeometrySamplingLimits {
|
|
|
1844
1090
|
readonly maxBytes: number;
|
|
1845
1091
|
}
|
|
1846
1092
|
|
|
1847
|
-
/**
|
|
1848
|
-
* Returns a unit vector; `epsilon` is a finite, non-negative length threshold (default `1e-12`).
|
|
1849
|
-
*
|
|
1850
|
-
* Rejects invalid thresholds, nonfinite lengths, and lengths at or below the threshold with
|
|
1851
|
-
* `INVALID_TOLERANCE`, `NON_FINITE_VALUE`, and `DEGENERATE_GEOMETRY` respectively.
|
|
1852
|
-
*/
|
|
1853
|
-
export declare const normalize2: (
|
|
1854
|
-
vector: Vector2Data,
|
|
1855
|
-
epsilon?: number,
|
|
1856
|
-
) => Vector2Data;
|
|
1857
|
-
|
|
1858
|
-
/**
|
|
1859
|
-
* Returns a unit vector; `epsilon` is a finite, non-negative length threshold (default `1e-12`).
|
|
1860
|
-
*
|
|
1861
|
-
* Rejects invalid thresholds, nonfinite lengths, and lengths at or below the threshold with
|
|
1862
|
-
* `INVALID_TOLERANCE`, `NON_FINITE_VALUE`, and `DEGENERATE_GEOMETRY` respectively.
|
|
1863
|
-
*/
|
|
1864
|
-
export declare const normalize3: (
|
|
1865
|
-
vector: Vector3Data,
|
|
1866
|
-
epsilon?: number,
|
|
1867
|
-
) => Vector3Data;
|
|
1868
|
-
|
|
1869
1093
|
/**
|
|
1870
1094
|
* Cleans and validates one closed loop.
|
|
1871
1095
|
*
|
|
1872
1096
|
* Adjacent duplicates and a repeated seam point are removed. Coordinates must
|
|
1873
1097
|
* be finite, the effective loop must contain at least three points, and the
|
|
1874
|
-
* result must be simple and have
|
|
1098
|
+
* result must be simple and have nonzero area. Previously validated immutable results may be
|
|
1875
1099
|
* returned unchanged when their winding and tolerance policy match.
|
|
1100
|
+
*
|
|
1101
|
+
* @param input - XY loop in millimetres; caller data is preserved.
|
|
1102
|
+
* @param counterClockwise - true for an exterior, false for a hole.
|
|
1876
1103
|
*/
|
|
1877
1104
|
export declare function normalizeContour(
|
|
1878
1105
|
input: readonly Vector2Data[],
|
|
@@ -1886,6 +1113,8 @@ export declare function normalizeContour(
|
|
|
1886
1113
|
* Exteriors become CCW and holes clockwise. Every hole must lie strictly
|
|
1887
1114
|
* within its exterior and boundaries may not intersect. Previously validated immutable results
|
|
1888
1115
|
* may be returned unchanged under the same tolerance policy.
|
|
1116
|
+
*
|
|
1117
|
+
* @param polygon - Millimetre exterior and holes; boundaries must be disjoint.
|
|
1889
1118
|
*/
|
|
1890
1119
|
export declare function normalizePolygon(
|
|
1891
1120
|
polygon: PolygonData,
|
|
@@ -1895,6 +1124,8 @@ export declare function normalizePolygon(
|
|
|
1895
1124
|
/**
|
|
1896
1125
|
* Validates a disjoint explicit region and returns immutable normalized data.
|
|
1897
1126
|
* Previously validated immutable results may be returned unchanged under the same tolerance policy.
|
|
1127
|
+
*
|
|
1128
|
+
* @param region - Disjoint millimetre polygons; empty input is valid.
|
|
1898
1129
|
*/
|
|
1899
1130
|
export declare function normalizeRegion(
|
|
1900
1131
|
region: RegionData,
|
|
@@ -1919,6 +1150,23 @@ export declare interface Path2 {
|
|
|
1919
1150
|
bounds(): Bounds2 | undefined;
|
|
1920
1151
|
/** Finds the nearest edge location; requires at least two vertices. */
|
|
1921
1152
|
closestPoint(point: Vector2Input): PathLocation<Vector2>;
|
|
1153
|
+
/** Queries a finite distance in [0, length()]. Skips zero-length edges; closed length() selects the outgoing seam. Rejects zero-length paths. */
|
|
1154
|
+
atDistance(distance: number): PathStation<Vector2>;
|
|
1155
|
+
/** Queries finite whole-path progress in [0, 1] using arc length, with the same edge rules as atDistance(). */
|
|
1156
|
+
atFraction(fraction: number): PathStation<Vector2>;
|
|
1157
|
+
/** Splits strictly inside one traversal into two open paths. Original interior vertices survive; limits bound each input/output path. */
|
|
1158
|
+
splitAt(
|
|
1159
|
+
distance: number,
|
|
1160
|
+
limits?: Partial<GeometrySamplingLimits>,
|
|
1161
|
+
): readonly [Path2, Path2];
|
|
1162
|
+
/** Extracts increasing distances in [0, length()] as an open path, retaining original interior vertices. Closed paths use their authored seam. */
|
|
1163
|
+
trim(
|
|
1164
|
+
startDistance: number,
|
|
1165
|
+
endDistance: number,
|
|
1166
|
+
limits?: Partial<GeometrySamplingLimits>,
|
|
1167
|
+
): Path2;
|
|
1168
|
+
/** Refines each edge independently without bridging corners or removing original vertices. Closure and repeated adjacent vertices survive. */
|
|
1169
|
+
subdivide(options: PathSubdivisionOptions): Path2;
|
|
1922
1170
|
/** Applies an XY placement without reordering traversal, including after reflection. */
|
|
1923
1171
|
transform(placement: Transform2Input): Path2;
|
|
1924
1172
|
/** Reverses vertex order and traversal; neither the source nor its coordinates are mutated. */
|
|
@@ -1937,6 +1185,9 @@ export declare interface Path2 {
|
|
|
1937
1185
|
* A path input retains its closure. Limits bound construction only; resampling takes its own limits.
|
|
1938
1186
|
*
|
|
1939
1187
|
* Use `toData()` for a frozen record that restores coordinates, closure, and dimension together.
|
|
1188
|
+
*
|
|
1189
|
+
* @param input - XY path or finite millimetre coordinates to copy.
|
|
1190
|
+
* @param options - Closure for raw points and construction limits.
|
|
1940
1191
|
*/
|
|
1941
1192
|
export declare function path2(input: Path2Input, options?: PathOptions): Path2;
|
|
1942
1193
|
|
|
@@ -1967,6 +1218,23 @@ export declare interface Path3 {
|
|
|
1967
1218
|
bounds(): Bounds3 | undefined;
|
|
1968
1219
|
/** Finds the nearest edge location; requires at least two vertices. */
|
|
1969
1220
|
closestPoint(point: Vector3Input): PathLocation<Vector3>;
|
|
1221
|
+
/** Queries a finite distance in [0, length()]. Skips zero-length edges; closed length() selects the outgoing seam. Rejects zero-length paths. */
|
|
1222
|
+
atDistance(distance: number): PathStation<Vector3>;
|
|
1223
|
+
/** Queries finite whole-path progress in [0, 1] using arc length, with the same edge rules as atDistance(). */
|
|
1224
|
+
atFraction(fraction: number): PathStation<Vector3>;
|
|
1225
|
+
/** Splits strictly inside one traversal into two open paths. Original interior vertices survive; limits bound each input/output path. */
|
|
1226
|
+
splitAt(
|
|
1227
|
+
distance: number,
|
|
1228
|
+
limits?: Partial<GeometrySamplingLimits>,
|
|
1229
|
+
): readonly [Path3, Path3];
|
|
1230
|
+
/** Extracts increasing distances in [0, length()] as an open path, retaining original interior vertices. Closed paths use their authored seam. */
|
|
1231
|
+
trim(
|
|
1232
|
+
startDistance: number,
|
|
1233
|
+
endDistance: number,
|
|
1234
|
+
limits?: Partial<GeometrySamplingLimits>,
|
|
1235
|
+
): Path3;
|
|
1236
|
+
/** Refines each edge independently without bridging corners or removing original vertices. Closure and repeated adjacent vertices survive. */
|
|
1237
|
+
subdivide(options: PathSubdivisionOptions): Path3;
|
|
1970
1238
|
/** Applies an XYZ placement without changing traversal order or closure. */
|
|
1971
1239
|
transform(placement: Transform3Input): Path3;
|
|
1972
1240
|
/** Reverses vertex order and traversal without mutating the source. */
|
|
@@ -1981,6 +1249,9 @@ export declare interface Path3 {
|
|
|
1981
1249
|
*
|
|
1982
1250
|
* Use `toData()` for a frozen record that restores coordinates, closure, and dimension together.
|
|
1983
1251
|
*
|
|
1252
|
+
* @param input - XYZ path or finite millimetre coordinates to copy.
|
|
1253
|
+
* @param options - Closure for raw points and construction limits.
|
|
1254
|
+
*
|
|
1984
1255
|
* @see {@link path2} for shared construction rules.
|
|
1985
1256
|
*/
|
|
1986
1257
|
export declare function path3(input: Path3Input, options?: PathOptions): Path3;
|
|
@@ -2023,7 +1294,7 @@ export declare interface PathLocation<Point extends Vector2 | Vector3> {
|
|
|
2023
1294
|
/**
|
|
2024
1295
|
* Supplies a profile-X orientation guide for each original normalized sweep station.
|
|
2025
1296
|
*
|
|
2026
|
-
* @param point - Current XYZ path point in
|
|
1297
|
+
* @param point - Current XYZ path point in millimetres.
|
|
2027
1298
|
* @param index - Zero-based index of `point` in the normalized authored sweep path.
|
|
2028
1299
|
* @returns A finite guide vector that is not parallel to the local path tangent.
|
|
2029
1300
|
*/
|
|
@@ -2046,28 +1317,31 @@ export declare interface PathPatternOptions {
|
|
|
2046
1317
|
readonly count: number;
|
|
2047
1318
|
/** Raw point closure defaults to false; a path value supplies closure and rejects conflicts. */
|
|
2048
1319
|
readonly closed?: boolean;
|
|
2049
|
-
/** Preserve orientation, or align local +X for Sections / +Z for Solids to the tangent. Defaults to fixed. */
|
|
1320
|
+
/** Preserve orientation, or align local +X for Sections / +Z for Solids to the outgoing edge tangent. An open final endpoint uses its incoming edge. Defaults to fixed. */
|
|
2050
1321
|
readonly orientation?: "fixed" | "tangent";
|
|
2051
1322
|
}
|
|
2052
1323
|
|
|
2053
1324
|
/**
|
|
2054
1325
|
* Equal physical arc-length placements along a sampled XYZ path.
|
|
2055
1326
|
*
|
|
2056
|
-
* Tangent orientation maps +Z
|
|
2057
|
-
*
|
|
1327
|
+
* Tangent orientation maps +Z onto the local path tangent; fixed orientation only translates.
|
|
1328
|
+
* Closed paths omit a repeated seam.
|
|
2058
1329
|
* Explicit sampling ceilings bound both input points and output placements.
|
|
1330
|
+
*
|
|
1331
|
+
* @param path - XYZ path or points in millimetres; path values supply closure.
|
|
1332
|
+
* @param limits - Limits on input points and output placements.
|
|
2059
1333
|
*/
|
|
2060
1334
|
export declare function pathPatternTransforms(
|
|
2061
1335
|
path: Path3Input,
|
|
2062
1336
|
options: PathPatternOptions,
|
|
2063
1337
|
limits?: Partial<GeometrySamplingLimits>,
|
|
2064
|
-
): readonly
|
|
1338
|
+
): readonly Transform3[];
|
|
2065
1339
|
|
|
2066
|
-
/** Position and unit tangent for one path-distributed item. */
|
|
1340
|
+
/** Position and directed unit edge tangent for one path-distributed item. */
|
|
2067
1341
|
export declare interface PathPlacement {
|
|
2068
1342
|
/** Interpolated point on the sampled path. */
|
|
2069
1343
|
readonly position: Vector3Data;
|
|
2070
|
-
/**
|
|
1344
|
+
/** Outgoing unit tangent at vertices; an open final endpoint uses its incoming edge. */
|
|
2071
1345
|
readonly tangent: Vector3Data;
|
|
2072
1346
|
}
|
|
2073
1347
|
|
|
@@ -2077,6 +1351,28 @@ export declare interface PathResamplingOptions extends CurveSamplingOptions {
|
|
|
2077
1351
|
readonly segments?: number;
|
|
2078
1352
|
}
|
|
2079
1353
|
|
|
1354
|
+
/** Directed location at an arc-length offset along a sampled path. */
|
|
1355
|
+
export declare interface PathStation<Point extends Vector2 | Vector3> {
|
|
1356
|
+
/** Immutable position on the sampled boundary. */
|
|
1357
|
+
readonly point: Point;
|
|
1358
|
+
/** Unit outgoing edge tangent; an open final endpoint uses its incoming edge. */
|
|
1359
|
+
readonly tangent: Point;
|
|
1360
|
+
/** Distance from the path's first vertex in model units, including a closing edge when closed. */
|
|
1361
|
+
readonly offset: number;
|
|
1362
|
+
/** Original starting vertex of the selected nonzero edge. */
|
|
1363
|
+
readonly edgeIndex: number;
|
|
1364
|
+
/** Fraction within that edge, independent of normalized whole-path progress. */
|
|
1365
|
+
readonly fraction: number;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
/** Corner-preserving edge refinement; the original vertices remain in traversal order. */
|
|
1369
|
+
export declare interface PathSubdivisionOptions {
|
|
1370
|
+
/** Positive maximum output edge length in model units; each source edge is divided independently. */
|
|
1371
|
+
readonly maxSegmentLength: number;
|
|
1372
|
+
/** Input and output point ceilings; omitted values use package defaults. */
|
|
1373
|
+
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
2080
1376
|
/** A fixed XY point in world coordinates; omitted pivots use the coordinate origin. */
|
|
2081
1377
|
export declare interface Pivot2Options {
|
|
2082
1378
|
/** World-space point left fixed by rotation or scaling. */
|
|
@@ -2089,99 +1385,10 @@ export declare interface Pivot3Options {
|
|
|
2089
1385
|
readonly pivot?: Vector3Input;
|
|
2090
1386
|
}
|
|
2091
1387
|
|
|
2092
|
-
/** Stable reason why planar optimization returned the original mesh unchanged. */
|
|
2093
|
-
export declare type PlanarMeshOptimizationFallbackReason =
|
|
2094
|
-
| "candidate-boundary-changed"
|
|
2095
|
-
| "candidate-measurements-changed"
|
|
2096
|
-
| "candidate-not-closed-oriented-manifold"
|
|
2097
|
-
| "candidate-quality-regressed"
|
|
2098
|
-
| "input-not-closed-oriented-manifold";
|
|
2099
|
-
|
|
2100
|
-
/** Options controlling bounded, connectivity-only optimization of planar triangle patches. */
|
|
2101
|
-
export declare interface PlanarMeshOptimizationOptions extends TriangleMeshQualityOptions {
|
|
2102
|
-
/**
|
|
2103
|
-
* Maximum attempted edge evaluations. By default this is twenty times the initial candidate
|
|
2104
|
-
* edge count, capped at `1000000`.
|
|
2105
|
-
*/
|
|
2106
|
-
readonly maxFlipAttempts?: number;
|
|
2107
|
-
/** Maximum times one edge may be reconsidered after neighbouring flips. Defaults to `12`. */
|
|
2108
|
-
readonly maxEdgeRevisits?: number;
|
|
2109
|
-
/** Maximum triangles allowed in one selected patch. Defaults to `50000`. */
|
|
2110
|
-
readonly maxPatchTriangles?: number;
|
|
2111
|
-
/** Maximum cumulative triangles across selected patches. Defaults to `200000`. */
|
|
2112
|
-
readonly maxProcessedTriangles?: number;
|
|
2113
|
-
/** Minimum triangles required before a planar patch is eligible. Defaults to `8`. */
|
|
2114
|
-
readonly minPatchTriangles?: number;
|
|
2115
|
-
/** Select patches whose worst normalized aspect ratio exceeds this value. Defaults to `12`. */
|
|
2116
|
-
readonly triggerMaxAspectRatio?: number;
|
|
2117
|
-
/** Select patches whose largest per-vertex triangle share exceeds this ratio. Defaults to `0.2`. */
|
|
2118
|
-
readonly triggerMaxFanRatio?: number;
|
|
2119
|
-
/** Select patches whose largest vertex triangle incidence exceeds this value. Defaults to `16`. */
|
|
2120
|
-
readonly triggerMaxVertexTriangleIncidence?: number;
|
|
2121
|
-
/** Select patches whose smallest interior angle is below this many degrees. Defaults to `8`. */
|
|
2122
|
-
readonly triggerMinAngleDegrees?: number;
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
/** Outcome of bounded planar-patch optimization, including before/after diagnostics. */
|
|
2126
|
-
export declare interface PlanarMeshOptimizationResult {
|
|
2127
|
-
/** Quality report for the returned mesh; equal to `before` on unchanged or fallback results. */
|
|
2128
|
-
readonly after: TriangleMeshQualityReport;
|
|
2129
|
-
/** Quality report for the supplied mesh. */
|
|
2130
|
-
readonly before: TriangleMeshQualityReport;
|
|
2131
|
-
/** Whether a work bound stopped evaluation while eligible work remained. */
|
|
2132
|
-
readonly budgetExhausted: boolean;
|
|
2133
|
-
/** Whether the returned mesh has different triangle connectivity. */
|
|
2134
|
-
readonly changed: boolean;
|
|
2135
|
-
/** Safety reason when candidate validation rejected optimization or input topology was unsupported. */
|
|
2136
|
-
readonly fallbackReason?: PlanarMeshOptimizationFallbackReason;
|
|
2137
|
-
/** Number of accepted legal diagonal flips. */
|
|
2138
|
-
readonly flipCount: number;
|
|
2139
|
-
/** Returned mesh; unchanged results preserve the exact input object. */
|
|
2140
|
-
readonly mesh: TriangleMesh;
|
|
2141
|
-
/** Number of planar patches in which at least one edge was flipped. */
|
|
2142
|
-
readonly optimizedPatchCount: number;
|
|
2143
|
-
/** Number of triggered patches omitted because a configured triangle bound would be exceeded. */
|
|
2144
|
-
readonly skippedPatchCount: number;
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
/** Quality measurements for one edge-connected coplanar triangle patch. */
|
|
2148
|
-
export declare interface PlanarPatchQuality {
|
|
2149
|
-
/** Number of edges separating this patch from another plane or the mesh boundary. */
|
|
2150
|
-
readonly boundaryEdgeCount: number;
|
|
2151
|
-
/** Number of connected boundary loops; holes contribute additional loops. */
|
|
2152
|
-
readonly boundaryLoopCount: number;
|
|
2153
|
-
/** Maximum ratio of one vertex's incident patch triangles to the patch triangle count. */
|
|
2154
|
-
readonly fanRatio: number;
|
|
2155
|
-
/** Lowest source triangle index in this deterministic patch. */
|
|
2156
|
-
readonly firstTriangleIndex: number;
|
|
2157
|
-
/** Stable zero-based patch identifier in first-triangle order. */
|
|
2158
|
-
readonly id: number;
|
|
2159
|
-
/** Number of edges shared by two triangles within this patch. */
|
|
2160
|
-
readonly internalEdgeCount: number;
|
|
2161
|
-
/** Largest normalized triangle aspect ratio; an equilateral triangle has ratio `1`. */
|
|
2162
|
-
readonly maximumTriangleAspectRatio: number;
|
|
2163
|
-
/** Largest number of patch triangles incident to one vertex. */
|
|
2164
|
-
readonly maximumVertexTriangleIncidence: number;
|
|
2165
|
-
/** Largest number of distinct patch neighbours connected to one vertex. */
|
|
2166
|
-
readonly maximumVertexValence: number;
|
|
2167
|
-
/** Smallest interior triangle angle in degrees. */
|
|
2168
|
-
readonly minimumTriangleAngleDegrees: number;
|
|
2169
|
-
/** Consistently wound unit normal for the patch plane. */
|
|
2170
|
-
readonly normal: Vector3Data;
|
|
2171
|
-
/** Plane offset in `dot(normal, position) = planeOffset` form, in model units. */
|
|
2172
|
-
readonly planeOffset: number;
|
|
2173
|
-
/** Total patch area in squared model units. */
|
|
2174
|
-
readonly surfaceArea: number;
|
|
2175
|
-
/** Number of triangles in this patch. */
|
|
2176
|
-
readonly triangleCount: number;
|
|
2177
|
-
/** Number of distinct indexed vertices referenced by this patch. */
|
|
2178
|
-
readonly vertexCount: number;
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
1388
|
/**
|
|
2182
1389
|
* One filled two-dimensional polygon with an exterior and optional holes.
|
|
2183
1390
|
*
|
|
2184
|
-
* `outer` is
|
|
1391
|
+
* `outer` is counterclockwise and each hole is clockwise. Boundary arrays omit
|
|
2185
1392
|
* their duplicated closing point. Holes must lie inside `outer` and must not
|
|
2186
1393
|
* intersect each other or the exterior.
|
|
2187
1394
|
*
|
|
@@ -2195,9 +1402,7 @@ export declare interface PolygonData {
|
|
|
2195
1402
|
readonly outer: Contour;
|
|
2196
1403
|
}
|
|
2197
1404
|
|
|
2198
|
-
/**
|
|
2199
|
-
* Equal arc-length sampling of an open path or an implicitly closed loop.
|
|
2200
|
-
*/
|
|
1405
|
+
/** Equal arc-length sampling of an open path or an implicitly closed loop. */
|
|
2201
1406
|
export declare interface PolylineResamplingOptions extends CurveSamplingOptions {
|
|
2202
1407
|
/** Exact equal arc-length intervals; closed paths require at least three. */
|
|
2203
1408
|
readonly segments?: number;
|
|
@@ -2205,21 +1410,6 @@ export declare interface PolylineResamplingOptions extends CurveSamplingOptions
|
|
|
2205
1410
|
readonly closed?: boolean;
|
|
2206
1411
|
}
|
|
2207
1412
|
|
|
2208
|
-
/**
|
|
2209
|
-
* Resolves compensated cutter dimensions and checks extended mesh estimates against output limits.
|
|
2210
|
-
*
|
|
2211
|
-
* This pure operation uses explicit resolution and limits or package defaults, without an active
|
|
2212
|
-
* host execution. It includes the cutter's one-pitch extension beyond each requested face and
|
|
2213
|
-
* creates planning data without mesh buffers or native objects. Row and triangle counts are
|
|
2214
|
-
* estimates; mesh validity and native construction are checked later.
|
|
2215
|
-
*
|
|
2216
|
-
* See `mesh.preflightThreadSolid` for standalone mesh estimates.
|
|
2217
|
-
* See `mesh.threadSolid` for standalone mesh construction.
|
|
2218
|
-
*/
|
|
2219
|
-
export declare function preflightInternalThreadCutter(
|
|
2220
|
-
options: InternalThreadCutterOptions,
|
|
2221
|
-
): ThreadSolidPreflight;
|
|
2222
|
-
|
|
2223
1413
|
/**
|
|
2224
1414
|
* Parses and validates bounded SVG input, constructing its normalized sampled region and diagnostics.
|
|
2225
1415
|
*
|
|
@@ -2232,7 +1422,7 @@ export declare function preflightInternalThreadCutter(
|
|
|
2232
1422
|
* manufacturability or later solid validity.
|
|
2233
1423
|
*
|
|
2234
1424
|
* @param svg - Complete SVG XML source, limited to 256 KiB of UTF-8.
|
|
2235
|
-
* @param options - Physical
|
|
1425
|
+
* @param options - Physical sampling, viewport origin, and optional fitting to millimetre bounds.
|
|
2236
1426
|
* @returns The canonical normalized region plus bounded source, topology, and safe-repair facts.
|
|
2237
1427
|
* @throws {@link GeometryError} When XML, supported-feature, geometry, or complexity checks fail.
|
|
2238
1428
|
*/
|
|
@@ -2241,90 +1431,12 @@ export declare function preflightSvgRegion(
|
|
|
2241
1431
|
options?: SvgImportOptions,
|
|
2242
1432
|
): SvgRegionPreflight;
|
|
2243
1433
|
|
|
2244
|
-
/**
|
|
2245
|
-
* Checks nut dimensions, chamfers, end-face wall, and the extended compensated cutter's allocation plan.
|
|
2246
|
-
*
|
|
2247
|
-
* This pure operation uses explicit resolution and limits or package defaults, without an active
|
|
2248
|
-
* host execution. It resolves body/cutter dimensions without mesh buffers or native objects.
|
|
2249
|
-
* `thread` contains conservative cutter estimates, excluding the body and Boolean result.
|
|
2250
|
-
* Successful preflight leaves mesh validity, native construction, and manufacturing fit to later checks.
|
|
2251
|
-
*
|
|
2252
|
-
* See `mesh.preflightThreadSolid` for standalone mesh estimates.
|
|
2253
|
-
*/
|
|
2254
|
-
export declare function preflightThreadedNut(
|
|
2255
|
-
options: ThreadedNutOptions,
|
|
2256
|
-
): ThreadedNutPreflight;
|
|
2257
|
-
|
|
2258
|
-
/**
|
|
2259
|
-
* Resolves compensated rod dimensions and checks conservative mesh estimates against output limits.
|
|
2260
|
-
*
|
|
2261
|
-
* This pure operation uses explicit resolution and limits or package defaults, without an active
|
|
2262
|
-
* host execution. It creates planning data without mesh buffers or native objects; returned row
|
|
2263
|
-
* and triangle counts are estimates. Mesh validity and native construction are checked later.
|
|
2264
|
-
*
|
|
2265
|
-
* See `mesh.preflightThreadSolid` for standalone mesh estimates.
|
|
2266
|
-
* See `mesh.threadSolid` for standalone mesh construction.
|
|
2267
|
-
*/
|
|
2268
|
-
export declare function preflightThreadedRod(
|
|
2269
|
-
options: ThreadedRodOptions,
|
|
2270
|
-
): ThreadSolidPreflight;
|
|
2271
|
-
|
|
2272
|
-
/** Anchor attachment shared by solid and filled-section factories. */
|
|
2273
|
-
export declare interface PrimitiveAttachment {
|
|
2274
|
-
/** Applied after local construction; Section attachment must preserve the XY plane. */
|
|
2275
|
-
readonly attachment?: PrimitiveAttachmentOptions;
|
|
2276
|
-
}
|
|
2277
|
-
|
|
2278
|
-
/** Maps an explicit or named shape-local attachment anchor onto a world-space anchor. */
|
|
2279
|
-
export declare interface PrimitiveAttachmentOptions extends AttachOptions {
|
|
2280
|
-
/** Shape-local source frame or a named primitive anchor such as bottom. */
|
|
2281
|
-
readonly source: Anchor3 | string;
|
|
2282
|
-
/** World-space target frame in millimetres. */
|
|
2283
|
-
readonly target: Anchor3;
|
|
2284
|
-
}
|
|
2285
|
-
|
|
2286
|
-
/**
|
|
2287
|
-
* Conservative baseline print-fit policies in millimetres.
|
|
2288
|
-
*
|
|
2289
|
-
* These are modeling defaults, not manufacturing guarantees. A caller should
|
|
2290
|
-
* calibrate them for its printer, material, layer height, and thread scale.
|
|
2291
|
-
*/
|
|
2292
|
-
export declare const PRINTABLE_THREAD_FIT_POLICIES: Readonly<{
|
|
2293
|
-
/** Small baseline clearance for calibrated, accurate printers. */
|
|
2294
|
-
tight: PrintableThreadFitPolicy;
|
|
2295
|
-
/** General-purpose baseline clearance. */
|
|
2296
|
-
normal: PrintableThreadFitPolicy;
|
|
2297
|
-
/** Generous baseline clearance for rougher prints or easy assembly. */
|
|
2298
|
-
loose: PrintableThreadFitPolicy;
|
|
2299
|
-
}>;
|
|
2300
|
-
|
|
2301
|
-
/**
|
|
2302
|
-
* Named baseline fit policies for calibrated FDM-style printed threads.
|
|
2303
|
-
*/
|
|
2304
|
-
export declare type PrintableThreadFit = "tight" | "normal" | "loose";
|
|
2305
|
-
|
|
2306
|
-
/**
|
|
2307
|
-
* Explicit radial and axial allowances for a mating printed thread pair.
|
|
2308
|
-
*
|
|
2309
|
-
* Male and female radial values are applied independently, so their sum is the
|
|
2310
|
-
* assembled radial clearance. Values are millimetres and intentionally do not
|
|
2311
|
-
* encode printer, material, or process calibration.
|
|
2312
|
-
*/
|
|
2313
|
-
export declare interface PrintableThreadFitPolicy {
|
|
2314
|
-
/** Nominal axial backlash available between opposing flanks. */
|
|
2315
|
-
readonly axialBacklash: number;
|
|
2316
|
-
/** Radial increase applied to an internal thread envelope. */
|
|
2317
|
-
readonly femaleRadialOutset: number;
|
|
2318
|
-
/** Radial reduction applied to an external thread envelope. */
|
|
2319
|
-
readonly maleRadialInset: number;
|
|
2320
|
-
}
|
|
2321
|
-
|
|
2322
1434
|
/**
|
|
2323
1435
|
* An explicit component/contour/span topology, before shared family sampling with matchProfiles.
|
|
2324
1436
|
* Component, contour and span identities establish correspondence across a loft or sweep family.
|
|
2325
1437
|
*
|
|
2326
1438
|
* @see {@link CorrespondingProfile}
|
|
2327
|
-
* @see
|
|
1439
|
+
* @see [matchProfiles](/docs/reference/geometry/matchProfiles)
|
|
2328
1440
|
*/
|
|
2329
1441
|
export declare interface Profile {
|
|
2330
1442
|
/** Ordered components with explicit contour identities. */
|
|
@@ -2361,8 +1473,9 @@ export declare interface ProfiledEdgeTreatment {
|
|
|
2361
1473
|
readonly kind: "profile";
|
|
2362
1474
|
/**
|
|
2363
1475
|
* Millimetre setbacks on adjoining surfaces, from [positive, 0] to [0, positive].
|
|
2364
|
-
* First coordinates decrease and second coordinates increase. Cylinder/extrusion ends
|
|
2365
|
-
* cap inset
|
|
1476
|
+
* First coordinates decrease and second coordinates increase. Cylinder/tube/extrusion ends
|
|
1477
|
+
* use cap inset then side setback; hole openings use mouth expansion then axial depth.
|
|
1478
|
+
* Planar corners and edge cutters use the first then second adjoining surface direction.
|
|
2366
1479
|
*/
|
|
2367
1480
|
readonly profile: readonly Vector2Data[];
|
|
2368
1481
|
}
|
|
@@ -2410,53 +1523,7 @@ export declare type ProfileSpan2 = {
|
|
|
2410
1523
|
}
|
|
2411
1524
|
);
|
|
2412
1525
|
|
|
2413
|
-
/**
|
|
2414
|
-
export declare const projectOntoPlane3: (
|
|
2415
|
-
vector: Vector3Data,
|
|
2416
|
-
normal: Vector3Data,
|
|
2417
|
-
) => Vector3Data;
|
|
2418
|
-
|
|
2419
|
-
/** Resolved pitch-line dimensions for a finite rack segment. */
|
|
2420
|
-
export declare interface RackPitchDimensions {
|
|
2421
|
-
/** Tooth height above the pitch line, in millimetres. */
|
|
2422
|
-
readonly addendum: number;
|
|
2423
|
-
/** Tooth root depth below the pitch line, in millimetres. */
|
|
2424
|
-
readonly dedendum: number;
|
|
2425
|
-
/** Signed helix angle, in radians. */
|
|
2426
|
-
readonly helixAngleRadians: number;
|
|
2427
|
-
/** Total pitch-line length for the requested tooth count, in millimetres. */
|
|
2428
|
-
readonly length: number;
|
|
2429
|
-
/** Transverse linear pitch between teeth, in millimetres. */
|
|
2430
|
-
readonly pitch: number;
|
|
2431
|
-
/** Transverse pressure angle, in radians. */
|
|
2432
|
-
readonly pressureAngleRadians: number;
|
|
2433
|
-
/** Tangential tooth thickness at the pitch line, in millimetres. */
|
|
2434
|
-
readonly toothThicknessAtPitch: number;
|
|
2435
|
-
/** Number of complete teeth represented by the segment. */
|
|
2436
|
-
readonly toothCount: number;
|
|
2437
|
-
/** Normal module supplied by the caller, in millimetres. */
|
|
2438
|
-
readonly module: number;
|
|
2439
|
-
}
|
|
2440
|
-
|
|
2441
|
-
/** Normal-plane inputs for a finite rack pitch segment. */
|
|
2442
|
-
export declare interface RackPitchSpec {
|
|
2443
|
-
/** Tangential tooth-thickness reduction at the pitch line, in millimetres. */
|
|
2444
|
-
readonly backlash?: number;
|
|
2445
|
-
/** Dedendum clearance as a multiple of normal module; defaults to `0.25`. */
|
|
2446
|
-
readonly clearanceFactor?: number;
|
|
2447
|
-
/** Signed helix angle in degrees; zero creates a straight rack. */
|
|
2448
|
-
readonly helixAngle?: number;
|
|
2449
|
-
/** Normal module in millimetres per tooth. */
|
|
2450
|
-
readonly module: number;
|
|
2451
|
-
/** Normal pressure angle in degrees; defaults to 20 degrees. */
|
|
2452
|
-
readonly pressureAngle?: number;
|
|
2453
|
-
/** Number of complete rack teeth represented by the segment. */
|
|
2454
|
-
readonly toothCount: number;
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
|
-
/**
|
|
2458
|
-
* Degree rotations about a fixed world-space pivot; XY patterns use the implicit +Z axis.
|
|
2459
|
-
*/
|
|
1526
|
+
/** Degree rotations about a fixed world-space pivot; XY patterns use the implicit +Z axis. */
|
|
2460
1527
|
export declare type RadialPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
2461
1528
|
/** Number of shapes to return, including the original. */
|
|
2462
1529
|
readonly count: number;
|
|
@@ -2477,14 +1544,12 @@ export declare type RadialPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
|
2477
1544
|
/** Rotations about an explicit axis; angles use degrees and the first placement is identity. */
|
|
2478
1545
|
export declare function radialPatternTransforms(
|
|
2479
1546
|
options: RadialPatternOptions,
|
|
2480
|
-
): readonly
|
|
1547
|
+
): readonly Transform3[];
|
|
2481
1548
|
|
|
2482
1549
|
/** Radial dimensions refer to polygon vertices or compensate faceting to meet polygon faces. */
|
|
2483
1550
|
export declare type RadialSizing = "vertex" | "face";
|
|
2484
1551
|
|
|
2485
|
-
/**
|
|
2486
|
-
* Nominal radial sizing shared by circular and regular polygon construction.
|
|
2487
|
-
*/
|
|
1552
|
+
/** Nominal radial sizing shared by circular and regular polygon construction. */
|
|
2488
1553
|
export declare interface RadialSizingOptions {
|
|
2489
1554
|
/** Explicit sampling ceilings; bound modeling operations may only lower the host policy. */
|
|
2490
1555
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
@@ -2512,9 +1577,7 @@ export declare function rectangleContour(
|
|
|
2512
1577
|
options: RectangleContourOptions,
|
|
2513
1578
|
): Contour;
|
|
2514
1579
|
|
|
2515
|
-
/**
|
|
2516
|
-
* Shared rectangle dimensions, origin and uniform or per-corner treatment.
|
|
2517
|
-
*/
|
|
1580
|
+
/** Shared rectangle dimensions, origin and uniform or per-corner treatment. */
|
|
2518
1581
|
export declare interface RectangleContourOptions {
|
|
2519
1582
|
/** Positive uniform size or explicit XY extents in millimetres. */
|
|
2520
1583
|
readonly size: number | Vector2Input;
|
|
@@ -2547,7 +1610,7 @@ export declare type RectangleCornerTreatments = readonly [
|
|
|
2547
1610
|
*
|
|
2548
1611
|
* Use [rectangle](/docs/reference/model/rectangle) for a filled Section.
|
|
2549
1612
|
*
|
|
2550
|
-
* @see
|
|
1613
|
+
* @see [matchProfiles](/docs/reference/geometry/matchProfiles) to sample a family with shared landmark correspondence.
|
|
2551
1614
|
* @see {@link rectangleContour} for sampled boundary coordinates.
|
|
2552
1615
|
*
|
|
2553
1616
|
* @example Retain rectangle landmarks
|
|
@@ -2577,14 +1640,18 @@ export declare interface RectangleProfileOptions extends RectangleContourOptions
|
|
|
2577
1640
|
*/
|
|
2578
1641
|
export declare function regionArea(region: RegionData): number;
|
|
2579
1642
|
|
|
2580
|
-
/**
|
|
1643
|
+
/**
|
|
1644
|
+
* Returns finite axis-aligned bounds for a nonempty region.
|
|
1645
|
+
*
|
|
1646
|
+
* @param region - Nonempty region with finite millimetre exterior coordinates.
|
|
1647
|
+
*/
|
|
2581
1648
|
export declare function regionBounds(region: RegionData): Bounds2Data;
|
|
2582
1649
|
|
|
2583
1650
|
/**
|
|
2584
1651
|
* A two-dimensional region represented by disjoint filled polygons.
|
|
2585
1652
|
* Each PolygonData owns one exterior and its holes; an empty region contains no material.
|
|
2586
1653
|
*
|
|
2587
|
-
* @see
|
|
1654
|
+
* @see [PolygonData](/docs/reference/geometry/PolygonData)
|
|
2588
1655
|
*/
|
|
2589
1656
|
export declare type RegionData = readonly PolygonData[];
|
|
2590
1657
|
|
|
@@ -2610,7 +1677,12 @@ export declare interface RegularPolygonContourOptions extends RadialSizingOption
|
|
|
2610
1677
|
readonly rotation?: number;
|
|
2611
1678
|
}
|
|
2612
1679
|
|
|
2613
|
-
/**
|
|
1680
|
+
/**
|
|
1681
|
+
* Resamples a planar polyline with the same point, tangent, seam and budget guarantees as 3D.
|
|
1682
|
+
*
|
|
1683
|
+
* @param path - XY points in millimetres; duplicate neighbors are removed.
|
|
1684
|
+
* @param options - Closure and exact intervals or physical edge spacing.
|
|
1685
|
+
*
|
|
2614
1686
|
* @remarks Only final 2D output vectors are copied and frozen. No immutable 3D intermediate is built.
|
|
2615
1687
|
* @example
|
|
2616
1688
|
* ```ts
|
|
@@ -2624,6 +1696,10 @@ export declare function resamplePolyline2(
|
|
|
2624
1696
|
|
|
2625
1697
|
/**
|
|
2626
1698
|
* Resamples a spatial polyline at equal arc lengths with directed outgoing tangents.
|
|
1699
|
+
*
|
|
1700
|
+
* @param path - XYZ points in millimetres; duplicate neighbors are removed.
|
|
1701
|
+
* @param options - Closure and exact intervals or physical edge spacing.
|
|
1702
|
+
*
|
|
2627
1703
|
* @remarks Open paths retain both endpoints; closed paths include the closing edge and omit the
|
|
2628
1704
|
* repeated seam. Repeated adjacent inputs and explicit closing duplicates are removed. Physical
|
|
2629
1705
|
* maxSegmentLength bounds arc-length intervals; exact counts override that policy. Output edges
|
|
@@ -2641,7 +1717,7 @@ export declare function resamplePolyline3(
|
|
|
2641
1717
|
/**
|
|
2642
1718
|
* Resolves a deterministic full-circle count aligned to reusable topology factors.
|
|
2643
1719
|
*
|
|
2644
|
-
* `alignTo` must be
|
|
1720
|
+
* `alignTo` must be nonempty and contain only positive safe integers. Its checked least common
|
|
2645
1721
|
* multiple defines the alignment grid. An exact `segments` value wins over
|
|
2646
1722
|
* `resolution.circularSegments` and adaptive sampling, but is never rounded: it must already be
|
|
2647
1723
|
* aligned and meet `minSegments`. Adaptive counts are rounded upward and fail with
|
|
@@ -2667,12 +1743,13 @@ export declare function resolveAlignedCircularSegments(
|
|
|
2667
1743
|
/**
|
|
2668
1744
|
* Resolves the number of segments needed for a circular arc.
|
|
2669
1745
|
*
|
|
2670
|
-
* Full-circle limits and exact circular counts are scaled to the requested angular span,
|
|
2671
|
-
*
|
|
1746
|
+
* Full-circle limits and exact circular counts are scaled to the requested angular span,
|
|
1747
|
+
* retaining at least one segment.
|
|
2672
1748
|
*
|
|
2673
1749
|
* @param radius - Arc radius in millimetres.
|
|
2674
|
-
* @param angle -
|
|
2675
|
-
* @param policy -
|
|
1750
|
+
* @param angle - Nonzero signed sweep angle no greater than 360 degrees in magnitude.
|
|
1751
|
+
* @param policy - Explicit physical sampling policy; omitted fields use package defaults.
|
|
1752
|
+
* @param limits - Full-circle segment limit, applied before scaling to the arc.
|
|
2676
1753
|
* @returns Segment count for the requested arc span.
|
|
2677
1754
|
* @throws {@link GeometryError} when radius, angle, or resolution policy is invalid, or the
|
|
2678
1755
|
* corresponding full-circle tolerance exceeds the configured safety limit.
|
|
@@ -2718,7 +1795,8 @@ export declare function resolveCircularSampling(
|
|
|
2718
1795
|
* `COMPLEXITY_LIMIT` rather than silently reducing quality.
|
|
2719
1796
|
*
|
|
2720
1797
|
* @param radius - Circle radius in millimetres.
|
|
2721
|
-
* @param policy - Optional operation-level policy under explicit sampling
|
|
1798
|
+
* @param policy - Optional operation-level policy under explicit sampling limits.
|
|
1799
|
+
* @param limits - Full-circle segment limits; omitted fields use defaults.
|
|
2722
1800
|
* @returns Full-circle segment count.
|
|
2723
1801
|
* @throws {@link GeometryError} when radius or policy is invalid, or the requested tolerance
|
|
2724
1802
|
* exceeds the configured segment safety limit.
|
|
@@ -2736,27 +1814,19 @@ export declare function resolveCircularSegments(
|
|
|
2736
1814
|
limits?: Partial<GeometrySamplingLimits>,
|
|
2737
1815
|
): number;
|
|
2738
1816
|
|
|
2739
|
-
/**
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
*/
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
*
|
|
2753
|
-
* Both gears must use the same normal module, pressure angle, and helix-angle
|
|
2754
|
-
* magnitude. An external pair uses opposite helix hands; an internal pair uses
|
|
2755
|
-
* the same hand. The function validates those conjugate pitch invariants.
|
|
2756
|
-
*/
|
|
2757
|
-
export declare function resolveCylindricalGearPair(
|
|
2758
|
-
spec: CylindricalGearPairSpec,
|
|
2759
|
-
): CylindricalGearPairDimensions;
|
|
1817
|
+
/** Fully populated physical tessellation policy used by adaptive samplers. */
|
|
1818
|
+
export declare interface ResolvedGeometryResolution {
|
|
1819
|
+
/** Optional exact full-circle segment count; overrides adaptive sampling. */
|
|
1820
|
+
readonly circularSegments?: number;
|
|
1821
|
+
/** Maximum physical chord error in millimetres. */
|
|
1822
|
+
readonly maxChordError: number;
|
|
1823
|
+
/** Optional maximum physical sampled edge length in millimetres. */
|
|
1824
|
+
readonly maxSegmentLength?: number;
|
|
1825
|
+
/** Maximum allowed full-circle segment count within the selected allocation ceiling. */
|
|
1826
|
+
readonly maxSegments: number;
|
|
1827
|
+
/** Minimum full-circle segment count used by adaptive sampling. */
|
|
1828
|
+
readonly minSegments: number;
|
|
1829
|
+
}
|
|
2760
1830
|
|
|
2761
1831
|
/** Fully resolved tolerances for one operation and model scale. */
|
|
2762
1832
|
export declare interface ResolvedGeometryTolerance {
|
|
@@ -2773,26 +1843,31 @@ export declare interface ResolvedGeometryTolerance {
|
|
|
2773
1843
|
}
|
|
2774
1844
|
|
|
2775
1845
|
/**
|
|
2776
|
-
* Resolves
|
|
1846
|
+
* Resolves longitudinal intervals for ordinary linear extrusion from physical curve resolution.
|
|
2777
1847
|
*
|
|
2778
1848
|
* Accepts one XY loop or a filled XY region, including every hole and disconnected component.
|
|
2779
|
-
*
|
|
1849
|
+
* End treatments are unsupported; native finishing inserts its own treatment stations.
|
|
1850
|
+
* Explicit positive `slices` override physical sampling. Otherwise chord error bounds
|
|
2780
1851
|
* the triangulated side surface, including rotation across each profile edge. Optional segment
|
|
2781
|
-
* length bounds station travel including Z. Straight extrusions
|
|
1852
|
+
* length bounds station travel including Z. Straight extrusions use one interval by default.
|
|
2782
1853
|
* Exceeding the selected maxPathPoints ceiling raises `COMPLEXITY_LIMIT` instead of reducing fidelity.
|
|
2783
1854
|
*
|
|
2784
1855
|
* @param profile - Ordered XY millimetre contours with implicit closing edges.
|
|
2785
1856
|
* @param height - Positive extrusion height in millimetres.
|
|
2786
|
-
* @param options - Twist, scale, exact
|
|
2787
|
-
* @returns
|
|
1857
|
+
* @param options - Twist, scale, exact slices, and physical resolution controls.
|
|
1858
|
+
* @returns Positive interval count, creating one more profile layer than intervals.
|
|
2788
1859
|
*/
|
|
2789
|
-
export declare function
|
|
1860
|
+
export declare function resolveExtrusionSlices(
|
|
2790
1861
|
profile: Contour | RegionData,
|
|
2791
1862
|
height: number,
|
|
2792
1863
|
options?: ExtrusionSamplingOptions,
|
|
2793
1864
|
): number;
|
|
2794
1865
|
|
|
2795
|
-
/**
|
|
1866
|
+
/**
|
|
1867
|
+
* Resolves finite positive safe-integer allocation ceilings without ambient state.
|
|
1868
|
+
*
|
|
1869
|
+
* @param overrides - Trusted overrides that may raise defaults; omitted fields keep them.
|
|
1870
|
+
*/
|
|
2796
1871
|
export declare function resolveGeometrySamplingLimits(
|
|
2797
1872
|
overrides?: Partial<GeometrySamplingLimits>,
|
|
2798
1873
|
): GeometrySamplingLimits;
|
|
@@ -2814,83 +1889,6 @@ export declare function resolveGeometryTolerance(
|
|
|
2814
1889
|
options?: GeometryToleranceOptions,
|
|
2815
1890
|
): ResolvedGeometryTolerance;
|
|
2816
1891
|
|
|
2817
|
-
/**
|
|
2818
|
-
* Resolves equal alternating knuckles along +X, centered at the origin, in millimetres.
|
|
2819
|
-
*
|
|
2820
|
-
* Both faces of each running pair use a common polygon count; face-sized bores contain the
|
|
2821
|
-
* shaft's complete rotational envelope. Adaptive sampling satisfies both face and vertex error
|
|
2822
|
-
* bounds; an insufficient ceiling rejects instead of reducing quality. Exact counts are intentional
|
|
2823
|
-
* facets. Zero allowances describe ideal contact, not a printable running fit.
|
|
2824
|
-
*
|
|
2825
|
-
* Rejects nonfinite or nonpositive dimensions, invalid mode/count combinations, exhausted axial
|
|
2826
|
-
* length, missing/excessive lift-off engagement, and nonpositive conservative faceted barrel walls.
|
|
2827
|
-
* Manufacturing minima, strength, mounting, retention, handedness, and motion remain caller policy.
|
|
2828
|
-
*/
|
|
2829
|
-
export declare function resolveKnuckleHinge(
|
|
2830
|
-
spec: KnuckleHingeSpec,
|
|
2831
|
-
options?: KnuckleHingeSamplingOptions,
|
|
2832
|
-
): KnuckleHingeDimensions;
|
|
2833
|
-
|
|
2834
|
-
/** Resolves and validates a named or caller-defined print-fit policy. */
|
|
2835
|
-
export declare function resolvePrintableThreadFitPolicy(
|
|
2836
|
-
fit?: PrintableThreadFit | PrintableThreadFitPolicy,
|
|
2837
|
-
): PrintableThreadFitPolicy;
|
|
2838
|
-
|
|
2839
|
-
/** Resolves a rack segment that is conjugate with the same normal cylindrical pitch system. */
|
|
2840
|
-
export declare function resolveRackPitch(
|
|
2841
|
-
spec: RackPitchSpec,
|
|
2842
|
-
): RackPitchDimensions;
|
|
2843
|
-
|
|
2844
|
-
/**
|
|
2845
|
-
* Resolves a role-independent, start-aligned facet count from the larger female mating envelope.
|
|
2846
|
-
*
|
|
2847
|
-
* An exact `circularSegments` value must already be divisible by `starts`; it is never silently
|
|
2848
|
-
* raised. Adaptive policies align upward and fail if that would exceed `maxSegments`.
|
|
2849
|
-
*/
|
|
2850
|
-
export declare function resolveThreadCircularSegments(
|
|
2851
|
-
options: ThreadCircularSegmentsOptions,
|
|
2852
|
-
): number;
|
|
2853
|
-
|
|
2854
|
-
/**
|
|
2855
|
-
* Circumferential sampling and degree sweep shared by pure and filled revolution.
|
|
2856
|
-
*/
|
|
2857
|
-
export declare interface RevolveOptions extends CircularPrimitiveOptions {
|
|
2858
|
-
/**
|
|
2859
|
-
* Positive sweep in degrees, no greater than 360. Defaults to a full revolution;
|
|
2860
|
-
* smaller sweeps form partial revolutions with end caps.
|
|
2861
|
-
* Segment counts describe a complete circle and scale to this angular span. Native filled
|
|
2862
|
-
* revolutions require at least three sweep intervals: adaptive sampling refines to that floor,
|
|
2863
|
-
* while exact counts that imply fewer intervals reject. Pure mesh.revolve supports one interval.
|
|
2864
|
-
* @defaultValue `360`
|
|
2865
|
-
*/
|
|
2866
|
-
readonly degrees?: number;
|
|
2867
|
-
/** Explicit output and sampling allocation ceilings. */
|
|
2868
|
-
readonly limits?: Partial<ModelingLimits>;
|
|
2869
|
-
}
|
|
2870
|
-
|
|
2871
|
-
/**
|
|
2872
|
-
* Rotates a finite vector counter-clockwise in XY by `degrees` about the origin.
|
|
2873
|
-
* Throws `NON_FINITE_VALUE` for nonfinite coordinates, angles, or derived coordinates.
|
|
2874
|
-
*/
|
|
2875
|
-
export declare const rotate2: (
|
|
2876
|
-
vector: Vector2Data,
|
|
2877
|
-
degrees: number,
|
|
2878
|
-
) => Vector2Data;
|
|
2879
|
-
|
|
2880
|
-
/**
|
|
2881
|
-
* Creates a right-handed axis-angle rotation transform.
|
|
2882
|
-
*
|
|
2883
|
-
* @param axis - Rotation axis; normalization is performed internally.
|
|
2884
|
-
* @param angle - Finite right-handed angle with exactly one explicit unit.
|
|
2885
|
-
* @param tolerance - Optional zero-length comparison overrides.
|
|
2886
|
-
* @returns A frozen row-major transform.
|
|
2887
|
-
*/
|
|
2888
|
-
export declare function rotationTransform3(
|
|
2889
|
-
axis: Vector3Data,
|
|
2890
|
-
angle: AxisAngleRotation3,
|
|
2891
|
-
tolerance?: GeometryToleranceOptions,
|
|
2892
|
-
): Transform3Data;
|
|
2893
|
-
|
|
2894
1892
|
/**
|
|
2895
1893
|
* Replaces each vertex of a non-duplicated closed polyline with a sampled
|
|
2896
1894
|
* quadratic corner in the same coordinate system as the input.
|
|
@@ -2898,8 +1896,12 @@ export declare function rotationTransform3(
|
|
|
2898
1896
|
* `radius` is the desired tangent distance for a right angle and is capped to
|
|
2899
1897
|
* 45% of adjacent segment lengths to prevent neighboring corners from crossing.
|
|
2900
1898
|
* The returned path does not duplicate its closing point.
|
|
2901
|
-
*
|
|
2902
|
-
*
|
|
1899
|
+
* Invalid coordinates, topology, dimensions, or exhausted budgets throw GeometryError.
|
|
1900
|
+
*
|
|
1901
|
+
* @param input - Closed XYZ path or points in millimetres, without a repeated seam.
|
|
1902
|
+
* @param radius - Positive right-angle tangent distance in millimetres.
|
|
1903
|
+
* @param segmentsPerCorner - Quadratic intervals per corner; a positive integer.
|
|
1904
|
+
* @param limits - Limits on input and rounded path points.
|
|
2903
1905
|
*/
|
|
2904
1906
|
export declare const roundClosedPolylinePath: (
|
|
2905
1907
|
input: Path3Input,
|
|
@@ -2908,9 +1910,7 @@ export declare const roundClosedPolylinePath: (
|
|
|
2908
1910
|
limits?: Partial<GeometrySamplingLimits>,
|
|
2909
1911
|
) => readonly Vector3Data[];
|
|
2910
1912
|
|
|
2911
|
-
/**
|
|
2912
|
-
* A circular edge or corner roundover with explicit physical sampling.
|
|
2913
|
-
*/
|
|
1913
|
+
/** A circular edge or corner roundover with explicit physical sampling. */
|
|
2914
1914
|
export declare interface RoundedEdgeTreatment extends CircularPrimitiveOptions {
|
|
2915
1915
|
/** Selects circular corners or spherical all-edge roundovers. */
|
|
2916
1916
|
readonly kind: "round";
|
|
@@ -2933,8 +1933,8 @@ export declare interface RowLayoutOptions {
|
|
|
2933
1933
|
* `normalizeContour`; this is a single contour without holes. No editor modes or normalized
|
|
2934
1934
|
* coordinate range are required. No native engine, SDK, or ambient resolution is used.
|
|
2935
1935
|
*
|
|
2936
|
-
* @param curve - Closed contour in millimetres
|
|
2937
|
-
* @param options -
|
|
1936
|
+
* @param curve - Closed contour in millimetres, or coordinates converted by the selected scales.
|
|
1937
|
+
* @param options - Coordinate scales, physical sampling, and vertex limits.
|
|
2938
1938
|
* @returns Frozen counterclockwise loop in millimetres, without a repeated seam endpoint.
|
|
2939
1939
|
* @throws {@link GeometryError} for invalid data, topology, scale, or exceeded sampling budgets.
|
|
2940
1940
|
*
|
|
@@ -2969,7 +1969,12 @@ export declare interface SampleContourOptions {
|
|
|
2969
1969
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
2970
1970
|
}
|
|
2971
1971
|
|
|
2972
|
-
/**
|
|
1972
|
+
/**
|
|
1973
|
+
* Samples a planar curve with the same guarantees and policy as spatial sampling.
|
|
1974
|
+
*
|
|
1975
|
+
* @param curve - XY curve in millimetres; arc angles use degrees.
|
|
1976
|
+
* @param options - Physical sampling or an exact interval count, within vertex limits.
|
|
1977
|
+
*
|
|
2973
1978
|
* @remarks Returned planar points and tangents are copied and frozen. At stationary tangents, outgoing secants are preferred and endpoints use a backward fallback.
|
|
2974
1979
|
* @example
|
|
2975
1980
|
* ```ts
|
|
@@ -2983,6 +1988,10 @@ export declare function sampleCurve2(
|
|
|
2983
1988
|
|
|
2984
1989
|
/**
|
|
2985
1990
|
* Samples a spatial curve, preserving endpoints and directed unit tangents.
|
|
1991
|
+
*
|
|
1992
|
+
* @param curve - XYZ curve in millimetres; arc angles use degrees.
|
|
1993
|
+
* @param options - Physical sampling or an exact interval count, within vertex limits.
|
|
1994
|
+
*
|
|
2986
1995
|
* @remarks Exact counts use uniform curve parameters, not equal physical distances. Adaptive cubics
|
|
2987
1996
|
* bound the full control hull. Full-circle arcs repeat their endpoint; closed polylines do not.
|
|
2988
1997
|
* @example
|
|
@@ -2995,18 +2004,6 @@ export declare function sampleCurve3(
|
|
|
2995
2004
|
options?: CurveSamplingOptions,
|
|
2996
2005
|
): SampledCurve3;
|
|
2997
2006
|
|
|
2998
|
-
/**
|
|
2999
|
-
* Samples a complete external involute gear boundary in the XY plane.
|
|
3000
|
-
*
|
|
3001
|
-
* The returned loop is counter-clockwise, closed implicitly without a repeated
|
|
3002
|
-
* seam point, and contains no holes. Its center is the origin and its axis is
|
|
3003
|
-
* +Z. Bore, hub, keyway, twist, and face-width choices remain generator-owned.
|
|
3004
|
-
*/
|
|
3005
|
-
export declare function sampleCylindricalGearOutline(
|
|
3006
|
-
spec: CylindricalGearSpec,
|
|
3007
|
-
options?: CylindricalGearOutlineOptions,
|
|
3008
|
-
): Contour;
|
|
3009
|
-
|
|
3010
2007
|
/** Immutable planar points and corresponding directed unit tangents. */
|
|
3011
2008
|
export declare interface SampledCurve2 {
|
|
3012
2009
|
/** Curves retain both endpoints, including full-circle seams; closed resampling omits its seam. */
|
|
@@ -3015,9 +2012,7 @@ export declare interface SampledCurve2 {
|
|
|
3015
2012
|
readonly tangents: readonly Vector2Data[];
|
|
3016
2013
|
}
|
|
3017
2014
|
|
|
3018
|
-
/**
|
|
3019
|
-
* Immutable spatial points and corresponding directed unit tangents.
|
|
3020
|
-
*/
|
|
2015
|
+
/** Immutable spatial points and corresponding directed unit tangents. */
|
|
3021
2016
|
export declare interface SampledCurve3 {
|
|
3022
2017
|
/** Curves retain both endpoints, including full-circle seams; closed resampling omits its seam. */
|
|
3023
2018
|
readonly points: readonly Vector3Data[];
|
|
@@ -3025,18 +2020,6 @@ export declare interface SampledCurve3 {
|
|
|
3025
2020
|
readonly tangents: readonly Vector3Data[];
|
|
3026
2021
|
}
|
|
3027
2022
|
|
|
3028
|
-
/** Sampled paths plus conventional pitch and lead measurements. */
|
|
3029
|
-
export declare interface SampledThreadHelices {
|
|
3030
|
-
/** Axial advance over one revolution, equal to `pitch * starts`. */
|
|
3031
|
-
readonly lead: number;
|
|
3032
|
-
/** One immutable sampled path for each thread start. */
|
|
3033
|
-
readonly paths: readonly (readonly Vector3Data[])[];
|
|
3034
|
-
/** Adjacent axial thread spacing in millimetres. */
|
|
3035
|
-
readonly pitch: number;
|
|
3036
|
-
/** Number of revolutions represented by each path. */
|
|
3037
|
-
readonly turns: number;
|
|
3038
|
-
}
|
|
3039
|
-
|
|
3040
2023
|
/**
|
|
3041
2024
|
* Creates `segments + 1` points including exact helix endpoints from finite positive dimensions.
|
|
3042
2025
|
*
|
|
@@ -3072,32 +2055,6 @@ export declare interface SampleHelixOptions {
|
|
|
3072
2055
|
readonly axialWeight?: (t: number) => number;
|
|
3073
2056
|
}
|
|
3074
2057
|
|
|
3075
|
-
/**
|
|
3076
|
-
* Samples the center opening and tooth spaces used to subtract an internal ring gear.
|
|
3077
|
-
*
|
|
3078
|
-
* Internal tooth tips lie one addendum below the pitch radius and their roots lie one
|
|
3079
|
-
* dedendum above it. At the pitch circle, positive backlash widens each sampled space
|
|
3080
|
-
* tangentially. The returned CCW loop encloses the center and is intended to be reversed
|
|
3081
|
-
* when used as a region hole.
|
|
3082
|
-
*/
|
|
3083
|
-
export declare function sampleInternalCylindricalGearSpaceOutline(
|
|
3084
|
-
spec: CylindricalGearSpec,
|
|
3085
|
-
options?: CylindricalGearOutlineOptions,
|
|
3086
|
-
): Contour;
|
|
3087
|
-
|
|
3088
|
-
/**
|
|
3089
|
-
* Samples the open top boundary of a finite rack in its XY pitch plane.
|
|
3090
|
-
*
|
|
3091
|
-
* X follows rack travel, Y is tooth height, and the pitch line is `Y = 0`.
|
|
3092
|
-
* The path begins and ends on the root line, omits duplicate adjacent points,
|
|
3093
|
-
* and leaves base thickness, mounting features, extrusion, and helical sweep to
|
|
3094
|
-
* the owning generator.
|
|
3095
|
-
*/
|
|
3096
|
-
export declare function sampleRackToothPath(
|
|
3097
|
-
spec: RackPitchSpec,
|
|
3098
|
-
limits?: Partial<GeometrySamplingLimits>,
|
|
3099
|
-
): readonly Vector2Data[];
|
|
3100
|
-
|
|
3101
2058
|
/**
|
|
3102
2059
|
* Samples 1–31 line/cubic segments into a deeply immutable open [radius,height] polyline.
|
|
3103
2060
|
*
|
|
@@ -3107,8 +2064,8 @@ export declare function sampleRackToothPath(
|
|
|
3107
2064
|
* Neither normalized coordinates nor editor metadata are required. Endpoints are retained once;
|
|
3108
2065
|
* no axis closure, winding normalization, or manufacturing repair is performed.
|
|
3109
2066
|
*
|
|
3110
|
-
* @param curve - Open outline in millimetres
|
|
3111
|
-
* @param options -
|
|
2067
|
+
* @param curve - Open outline in millimetres, or coordinates converted by the selected scales.
|
|
2068
|
+
* @param options - Coordinate scales, physical sampling, and vertex limits.
|
|
3112
2069
|
* @returns Frozen open polyline in millimetres, ordered from lowest to highest anchor.
|
|
3113
2070
|
* @throws {@link GeometryError} for invalid coordinates, order, scale, or exceeded subdivision budget.
|
|
3114
2071
|
*
|
|
@@ -3144,7 +2101,7 @@ export declare interface SampleSideProfileOptions {
|
|
|
3144
2101
|
*
|
|
3145
2102
|
* @param layout - Immutable millimetre paths and measurements retained from text preparation.
|
|
3146
2103
|
* @param resolution - Explicit curve sampling policy; omitted uses the pure default policy.
|
|
3147
|
-
* @param limits -
|
|
2104
|
+
* @param limits - Profile-point and circle-segment limits.
|
|
3148
2105
|
* @returns Frozen contours with original glyph winding and no repeated closing vertex.
|
|
3149
2106
|
* @throws GeometryError for empty outlines, invalid paths or policies, over 1000 paths or selected sampling ceilings.
|
|
3150
2107
|
*/
|
|
@@ -3154,43 +2111,6 @@ export declare function sampleTextContours(
|
|
|
3154
2111
|
limits?: Partial<GeometrySamplingLimits>,
|
|
3155
2112
|
): readonly Contour[];
|
|
3156
2113
|
|
|
3157
|
-
/**
|
|
3158
|
-
* Samples evenly phased thread helices with finite `lead = pitch * starts`.
|
|
3159
|
-
* All starts together respect maxPathPoints (default 100000); excessive counts fail before allocation.
|
|
3160
|
-
*/
|
|
3161
|
-
export declare function sampleThreadHelices(
|
|
3162
|
-
options: ThreadHelixOptions,
|
|
3163
|
-
): SampledThreadHelices;
|
|
3164
|
-
|
|
3165
|
-
/** Multiplies a vector by a dimensionless scalar. */
|
|
3166
|
-
export declare const scale2: (
|
|
3167
|
-
vector: Vector2Data,
|
|
3168
|
-
scale: number,
|
|
3169
|
-
) => Vector2Data;
|
|
3170
|
-
|
|
3171
|
-
/**
|
|
3172
|
-
* Multiplies a vector by a dimensionless scalar.
|
|
3173
|
-
* @example
|
|
3174
|
-
* ```ts
|
|
3175
|
-
* scale3([1, 2, 3], 2); // [2, 4, 6]
|
|
3176
|
-
* ```
|
|
3177
|
-
*/
|
|
3178
|
-
export declare const scale3: (
|
|
3179
|
-
vector: Vector3Data,
|
|
3180
|
-
scale: number,
|
|
3181
|
-
) => Vector3Data;
|
|
3182
|
-
|
|
3183
|
-
/**
|
|
3184
|
-
* Creates an immutable axis-aligned scale transform.
|
|
3185
|
-
*
|
|
3186
|
-
* Negative components are reflections. Zero components are rejected because
|
|
3187
|
-
* they collapse volume and cannot be inverted.
|
|
3188
|
-
*
|
|
3189
|
-
* @param factors - Finite, non-zero XYZ scale factors.
|
|
3190
|
-
* @returns A frozen row-major transform.
|
|
3191
|
-
*/
|
|
3192
|
-
export declare function scaleTransform3(factors: Vector3Data): Transform3Data;
|
|
3193
|
-
|
|
3194
2114
|
/** An open radius/height outline; consumers own closure, mounting geometry, and wall policy. */
|
|
3195
2115
|
export declare interface SideProfileCurve {
|
|
3196
2116
|
/** Initial radius/height anchor. */
|
|
@@ -3226,7 +2146,11 @@ export declare type SideProfileSegment =
|
|
|
3226
2146
|
readonly end: SideProfilePoint;
|
|
3227
2147
|
};
|
|
3228
2148
|
|
|
3229
|
-
/**
|
|
2149
|
+
/**
|
|
2150
|
+
* Returns the signed area of a non-duplicated loop; positive means CCW.
|
|
2151
|
+
*
|
|
2152
|
+
* @param loop - XY loop in millimetres, with implicit closure; not validated.
|
|
2153
|
+
*/
|
|
3230
2154
|
export declare function signedContourArea(loop: Contour): number;
|
|
3231
2155
|
|
|
3232
2156
|
/** A cubic corner transition with zero curvature at its straight tangent joins. */
|
|
@@ -3243,43 +2167,45 @@ export declare interface SmoothEdgeTreatment {
|
|
|
3243
2167
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
3244
2168
|
}
|
|
3245
2169
|
|
|
3246
|
-
/**
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
2170
|
+
/**
|
|
2171
|
+
* Samples an immutable XY centripetal Catmull–Rom path through every waypoint in traversal order.
|
|
2172
|
+
* Open endpoints use one-sided secants; closed paths are periodic and omit their repeated seam.
|
|
2173
|
+
* Adjacent duplicate waypoints reject. The default physical policy bounds each cubic control hull;
|
|
2174
|
+
* segmentsPerSpan instead selects exact uniform parameters per span. Sampling never coarsens to fit
|
|
2175
|
+
* maxPathPoints. Invalid topology, nonfinite arithmetic, and exhausted budgets throw GeometryError.
|
|
2176
|
+
*
|
|
2177
|
+
* @param input - XY waypoints in millimetres; path values retain closure.
|
|
2178
|
+
*
|
|
2179
|
+
* @example
|
|
2180
|
+
* ```ts
|
|
2181
|
+
* const route = spline2([[0, 0], [10, 8], [25, 0]], { resolution: { maxChordError: 0.02 } });
|
|
2182
|
+
* ```
|
|
2183
|
+
*/
|
|
2184
|
+
export declare function spline2(
|
|
2185
|
+
input: Path2Input,
|
|
2186
|
+
options?: SplineOptions,
|
|
2187
|
+
): Path2;
|
|
3253
2188
|
|
|
3254
2189
|
/**
|
|
3255
|
-
*
|
|
2190
|
+
* Samples an immutable XYZ centripetal Catmull–Rom path with the same interpolation, seam, sampling, and ceiling rules as spline2.
|
|
2191
|
+
*
|
|
2192
|
+
* @param input - XYZ waypoints in millimetres; path values retain closure.
|
|
3256
2193
|
*/
|
|
3257
|
-
export declare
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
/** Positive radius in millimetres; mutually exclusive with diameter. */
|
|
3262
|
-
readonly radius: number;
|
|
3263
|
-
/** Full diameter is unavailable when radius is supplied. */
|
|
3264
|
-
readonly diameter?: never;
|
|
3265
|
-
}
|
|
3266
|
-
| {
|
|
3267
|
-
/** Positive full diameter in millimetres; mutually exclusive with radius. */
|
|
3268
|
-
readonly diameter: number;
|
|
3269
|
-
/** Radius is unavailable when diameter is supplied. */
|
|
3270
|
-
readonly radius?: never;
|
|
3271
|
-
}
|
|
3272
|
-
);
|
|
2194
|
+
export declare function spline3(
|
|
2195
|
+
input: Path3Input,
|
|
2196
|
+
options?: SplineOptions,
|
|
2197
|
+
): Path3;
|
|
3273
2198
|
|
|
3274
|
-
/**
|
|
3275
|
-
export declare interface
|
|
3276
|
-
/**
|
|
3277
|
-
readonly
|
|
3278
|
-
/**
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
2199
|
+
/** Physical or exact sampling of a centripetal Catmull–Rom spline through authored waypoints. */
|
|
2200
|
+
export declare interface SplineOptions {
|
|
2201
|
+
/** Closure defaults to path metadata or false for tuples. Closed inputs omit the repeated seam. */
|
|
2202
|
+
readonly closed?: boolean;
|
|
2203
|
+
/** Exact parameter intervals per waypoint span; overrides physical sampling. Must be a positive safe integer. */
|
|
2204
|
+
readonly segmentsPerSpan?: number;
|
|
2205
|
+
/** Millimetre chord-error and maximum-segment-length policy, applied to every cubic control hull. */
|
|
2206
|
+
readonly resolution?: GeometryResolution;
|
|
2207
|
+
/** Input and aggregate output ceilings; maxPathPoints defaults to 100000. */
|
|
2208
|
+
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
3283
2209
|
}
|
|
3284
2210
|
|
|
3285
2211
|
/**
|
|
@@ -3324,7 +2250,7 @@ export declare interface StrokeOptions {
|
|
|
3324
2250
|
readonly cap?: StrokeCap;
|
|
3325
2251
|
/** Corner treatment; miters exceeding SVG's default limit of 4 become bevels. Default: `miter`. */
|
|
3326
2252
|
readonly join?: StrokeJoin;
|
|
3327
|
-
/** Physical tessellation
|
|
2253
|
+
/** Physical tessellation for round features; caps use tangent-aligned 180-degree arcs. */
|
|
3328
2254
|
readonly resolution?: GeometryResolution;
|
|
3329
2255
|
/** Positive total stroke width in millimetres, centered on the sampled path. */
|
|
3330
2256
|
readonly width: number;
|
|
@@ -3335,26 +2261,17 @@ export declare interface StrokeOptions {
|
|
|
3335
2261
|
*
|
|
3336
2262
|
* Closed paths omit a duplicated seam point. Zero-length sampled segments are ignored, while the
|
|
3337
2263
|
* effective path must still contain visible length. Round caps and joins use deterministic physical
|
|
3338
|
-
* resolution.
|
|
3339
|
-
*
|
|
2264
|
+
* resolution. Caps are tangent-aligned semicircles with `ceil(circularSegments / 2)` intervals,
|
|
2265
|
+
* following {@link resolveArcSegments}. Bevels fill the outer corner triangle; miters extend the
|
|
2266
|
+
* outer edges to their intersection, falling back to bevels above SVG's default miter limit of 4.
|
|
2267
|
+
*
|
|
2268
|
+
* @param path - Sampled XY path in millimetres; path values supply closure.
|
|
3340
2269
|
*/
|
|
3341
2270
|
export declare function strokeRegionData(
|
|
3342
2271
|
path: Path2Input,
|
|
3343
2272
|
options: StrokeOptions,
|
|
3344
2273
|
): RegionData;
|
|
3345
2274
|
|
|
3346
|
-
/** Subtracts `b` from `a` component-wise. */
|
|
3347
|
-
export declare const subtract2: (a: Vector2Data, b: Vector2Data) => Vector2Data;
|
|
3348
|
-
|
|
3349
|
-
/**
|
|
3350
|
-
* Subtracts `b` from `a`.
|
|
3351
|
-
* @example
|
|
3352
|
-
* ```ts
|
|
3353
|
-
* subtract3([4, 5, 6], [1, 2, 3]); // [3, 3, 3]
|
|
3354
|
-
* ```
|
|
3355
|
-
*/
|
|
3356
|
-
export declare const subtract3: (a: Vector3Data, b: Vector3Data) => Vector3Data;
|
|
3357
|
-
|
|
3358
2275
|
/** Sampling controls for deterministic SVG-to-region conversion. */
|
|
3359
2276
|
export declare interface SvgImportOptions {
|
|
3360
2277
|
/**
|
|
@@ -3365,9 +2282,9 @@ export declare interface SvgImportOptions {
|
|
|
3365
2282
|
readonly fit?: Bounds2Input;
|
|
3366
2283
|
/** Explicit profile and circular allocation ceilings; bounded SVG source/work limits remain fixed. */
|
|
3367
2284
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
3368
|
-
/** Exact
|
|
2285
|
+
/** Exact full-circle sampling count; semicircular stroke caps use `ceil(count / 2)` intervals. */
|
|
3369
2286
|
readonly circularSegments?: number;
|
|
3370
|
-
/**
|
|
2287
|
+
/** Explicit physical tessellation policy; omitted fields use package defaults. */
|
|
3371
2288
|
readonly resolution?: GeometryResolution;
|
|
3372
2289
|
/**
|
|
3373
2290
|
* `"center"` places the viewport center at the origin. `"document"` places its converted
|
|
@@ -3442,350 +2359,6 @@ export declare interface SvgRegionPreflightSourceMetrics {
|
|
|
3442
2359
|
readonly parsedVertexCount: number;
|
|
3443
2360
|
}
|
|
3444
2361
|
|
|
3445
|
-
/**
|
|
3446
|
-
* Controls shared by pure mesh construction and filled modeling sweeps.
|
|
3447
|
-
*/
|
|
3448
|
-
export declare interface SweepOptions {
|
|
3449
|
-
/** Raw point closure defaults to false; a Path3 supplies its closure and rejects conflicts. */
|
|
3450
|
-
readonly closed?: boolean;
|
|
3451
|
-
/** Explicit output and sampling allocation ceilings. */
|
|
3452
|
-
readonly limits?: Partial<ModelingLimits>;
|
|
3453
|
-
/** Explicit frame policy; default transport minimizes rotations, initially projecting +X then +Y then +Z. */
|
|
3454
|
-
readonly orientation?: SweepOrientation;
|
|
3455
|
-
/** Physical sampling of nonzero twist; inserted stations retain authored station controls. */
|
|
3456
|
-
readonly resolution?: GeometryResolution;
|
|
3457
|
-
/** Total additional profile rotation in degrees, with progression selected by twistBy. */
|
|
3458
|
-
readonly twist?: number;
|
|
3459
|
-
/** Twist advances by physical path length (default), or normalized authored station position, including a closed seam gap. */
|
|
3460
|
-
readonly twistBy?: "length" | "stations";
|
|
3461
|
-
/** Positive uniform/XY scale, or one XY pair per path station. Defaults to one. */
|
|
3462
|
-
readonly scale?: number | Vector2Input | readonly Vector2Input[];
|
|
3463
|
-
/** Corresponding point-index advance at a rotationally equivalent closed seam. */
|
|
3464
|
-
readonly seamProfileOffset?: number;
|
|
3465
|
-
}
|
|
3466
|
-
|
|
3467
|
-
/**
|
|
3468
|
-
* Explicit profile-X frame policy; all normals are directed, and selected singular policies reject.
|
|
3469
|
-
*/
|
|
3470
|
-
export declare type SweepOrientation =
|
|
3471
|
-
| {
|
|
3472
|
-
/** Minimizes frame rotation by parallel transport. */
|
|
3473
|
-
readonly kind: "transport";
|
|
3474
|
-
/** Initial profile +X guide, projected perpendicular to the first tangent. */
|
|
3475
|
-
readonly initialNormal?: Vector3Input;
|
|
3476
|
-
}
|
|
3477
|
-
| {
|
|
3478
|
-
/** Projects one fixed world-space normal at every path station. */
|
|
3479
|
-
readonly kind: "fixed-normal";
|
|
3480
|
-
/** Directed profile +X guide; must not be parallel to any local tangent. */
|
|
3481
|
-
readonly normal: Vector3Input;
|
|
3482
|
-
}
|
|
3483
|
-
| {
|
|
3484
|
-
/** Uses an explicitly directed normal callback at each original normalized station. */
|
|
3485
|
-
readonly kind: "guide";
|
|
3486
|
-
/** Finite profile +X guide callback, evaluated once per original path station. */
|
|
3487
|
-
readonly normal: PathNormalGuide;
|
|
3488
|
-
}
|
|
3489
|
-
| {
|
|
3490
|
-
/** Uses sampled curvature normals; zero-curvature stations reject. */
|
|
3491
|
-
readonly kind: "frenet";
|
|
3492
|
-
};
|
|
3493
|
-
|
|
3494
|
-
/** 45-degree end bevels for compensated rods and cutters. */
|
|
3495
|
-
export declare interface ThreadBevelOptions {
|
|
3496
|
-
/** Bottom/top sizes in millimetres. Omitted disables both. Auto uses profile depth for standard/tapered ends,
|
|
3497
|
-
* or one sixth of the compensated male minor/female major radius for blunt ends. */
|
|
3498
|
-
readonly bevel?: Bevel;
|
|
3499
|
-
}
|
|
3500
|
-
|
|
3501
|
-
/** Inputs for resolving one shared circular facet count for a mating thread pair. */
|
|
3502
|
-
export declare interface ThreadCircularSegmentsOptions {
|
|
3503
|
-
/** Explicit circular allocation ceiling for the shared mating grid. */
|
|
3504
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
3505
|
-
/** Printable fit whose larger compensated female envelope governs tessellation. */
|
|
3506
|
-
readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
|
|
3507
|
-
/** Nominal major diameter before role-specific compensation. */
|
|
3508
|
-
readonly nominalMajorDiameter: number;
|
|
3509
|
-
/**
|
|
3510
|
-
* Maximum active female face outset beyond the compensated major envelope, in millimetres.
|
|
3511
|
-
* This keeps a compensated male/female pair on one role-independent grid when an internal
|
|
3512
|
-
* cutter has an enlarged entrance bevel. Default: `0`.
|
|
3513
|
-
*/
|
|
3514
|
-
readonly maxRadialOutset?: number;
|
|
3515
|
-
/** Validated mating profile whose pitch and flank capacities govern tessellation. */
|
|
3516
|
-
readonly profile: ThreadProfile;
|
|
3517
|
-
/** Physical or exact circular resolution policy. */
|
|
3518
|
-
readonly resolution?: GeometryResolution;
|
|
3519
|
-
/** Number of phased starts. Default: `1`. */
|
|
3520
|
-
readonly starts?: number;
|
|
3521
|
-
}
|
|
3522
|
-
|
|
3523
|
-
/** Options for compensating nominal male or female thread diameters. */
|
|
3524
|
-
export declare interface ThreadCompensationOptions {
|
|
3525
|
-
/** Named policy or explicit caller-calibrated allowances. */
|
|
3526
|
-
readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
|
|
3527
|
-
/** Nominal sharp or truncated major diameter in millimetres. */
|
|
3528
|
-
readonly nominalMajorDiameter: number;
|
|
3529
|
-
/** Male or female geometry being compensated. */
|
|
3530
|
-
readonly role: ThreadRole;
|
|
3531
|
-
/** Radial depth from major to minor envelope in millimetres. */
|
|
3532
|
-
readonly threadDepth: number;
|
|
3533
|
-
/** Optional numerical tolerance overrides. */
|
|
3534
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
3535
|
-
}
|
|
3536
|
-
|
|
3537
|
-
/**
|
|
3538
|
-
* Options for a compensated nut with an internal thread.
|
|
3539
|
-
*/
|
|
3540
|
-
export declare interface ThreadedNutOptions extends Omit<
|
|
3541
|
-
InternalThreadCutterOptions,
|
|
3542
|
-
"bevel" | "length"
|
|
3543
|
-
> {
|
|
3544
|
-
/** Opening bevels in [bottom, top] order. Omitted or auto uses min(profile.depth, thickness/4); zero disables. */
|
|
3545
|
-
readonly innerBevel?: Bevel;
|
|
3546
|
-
/** Body bevels in [bottom, top] order. Omitted or auto uses min(profile.depth, thickness/4).
|
|
3547
|
-
* Use [0, "auto"] to keep the outside bottom flat without disabling its inner opening bevel. */
|
|
3548
|
-
readonly outerBevel?: Bevel;
|
|
3549
|
-
/** Optional physical policy for a round body, independent of the thread's matched facet grid. */
|
|
3550
|
-
readonly bodyResolution?: GeometryResolution;
|
|
3551
|
-
/** Nut body shape. */
|
|
3552
|
-
readonly shape: ThreadedNutShape;
|
|
3553
|
-
/** Nut thickness along +Z in millimetres. */
|
|
3554
|
-
readonly thickness: number;
|
|
3555
|
-
/** Across-flats width for hex/square or diameter for round, in millimetres. */
|
|
3556
|
-
readonly width: number;
|
|
3557
|
-
}
|
|
3558
|
-
|
|
3559
|
-
/** Resolved body and end-face dimensions plus conservative allocation estimates for the thread cutter. */
|
|
3560
|
-
export declare interface ThreadedNutPreflight {
|
|
3561
|
-
/** Polygon segment count used by the nut body. */
|
|
3562
|
-
readonly bodySegments: number;
|
|
3563
|
-
/** Resolved opening bevel sizes in millimetres, [bottom, top]. */
|
|
3564
|
-
readonly innerBevel: readonly [bottom: number, top: number];
|
|
3565
|
-
/** Resolved body bevel sizes in millimetres, [bottom, top]. */
|
|
3566
|
-
readonly outerBevel: readonly [bottom: number, top: number];
|
|
3567
|
-
/** Maximum compensated cutter radius at either requested face. */
|
|
3568
|
-
readonly cutterFaceRadius: number;
|
|
3569
|
-
/** Minimum nut-body inradius across the requested top and bottom faces. */
|
|
3570
|
-
readonly minimumBodyFaceInradius: number;
|
|
3571
|
-
/** Smallest radial wall left between the body and cutter at either requested face. */
|
|
3572
|
-
readonly minimumFaceWall: number;
|
|
3573
|
-
/** Conservative allocation estimates for the extended cutter; excludes the body and Boolean result. */
|
|
3574
|
-
readonly thread: ThreadSolidPreflight;
|
|
3575
|
-
/** Start-aligned circular facet count used by the compensated thread cutter. */
|
|
3576
|
-
readonly threadCircularSegments: number;
|
|
3577
|
-
}
|
|
3578
|
-
|
|
3579
|
-
/**
|
|
3580
|
-
* Supported printable nut body shapes.
|
|
3581
|
-
*/
|
|
3582
|
-
export declare type ThreadedNutShape = "hex" | "round" | "square";
|
|
3583
|
-
|
|
3584
|
-
/**
|
|
3585
|
-
* Options for a compensated external threaded rod along +Z.
|
|
3586
|
-
*/
|
|
3587
|
-
export declare interface ThreadedRodOptions
|
|
3588
|
-
extends Omit<ThreadRidgeOptions, "majorDiameter">, ThreadBevelOptions {
|
|
3589
|
-
/** Printable fit or caller-calibrated allowances. Default: `normal`. */
|
|
3590
|
-
readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
|
|
3591
|
-
/** Nominal major diameter before male compensation. */
|
|
3592
|
-
readonly nominalMajorDiameter: number;
|
|
3593
|
-
}
|
|
3594
|
-
|
|
3595
|
-
/** End shape of a generated helical ridge. */
|
|
3596
|
-
export declare type ThreadEndStyle = "blunt" | "standard" | "tapered";
|
|
3597
|
-
|
|
3598
|
-
/** Axial end controls for a generated ridge. */
|
|
3599
|
-
export declare interface ThreadEndTreatmentOptions {
|
|
3600
|
-
/**
|
|
3601
|
-
* Ridge shape at the lower working boundary. `blunt` ends at full profile height, `standard`
|
|
3602
|
-
* clips the periodic profile at the face, and `tapered` ramps out from the minor envelope.
|
|
3603
|
-
* @defaultValue `"blunt"`
|
|
3604
|
-
*/
|
|
3605
|
-
readonly bottom?: ThreadEndStyle;
|
|
3606
|
-
/**
|
|
3607
|
-
* Non-negative unthreaded envelope length reserved at each non-standard end, in millimetres.
|
|
3608
|
-
* Active blunt bevels may raise this reservation to the effective bevel size.
|
|
3609
|
-
* @defaultValue `0`
|
|
3610
|
-
*/
|
|
3611
|
-
readonly endLength?: number;
|
|
3612
|
-
/**
|
|
3613
|
-
* Radial envelope toward which a blunt lead-in collapses.
|
|
3614
|
-
* @defaultValue `"minor"`
|
|
3615
|
-
*/
|
|
3616
|
-
readonly leadInEnvelope?: ThreadLeadInEnvelope;
|
|
3617
|
-
/**
|
|
3618
|
-
* Physical circumferential lead-in length in millimetres.
|
|
3619
|
-
* @defaultValue The profile depth.
|
|
3620
|
-
*/
|
|
3621
|
-
readonly leadInLength?: number;
|
|
3622
|
-
/**
|
|
3623
|
-
* Cross-section scaling curve used by blunt ends. `cut` switches abruptly to the full profile.
|
|
3624
|
-
* @defaultValue `"cut"`
|
|
3625
|
-
*/
|
|
3626
|
-
readonly leadInShape?: ThreadLeadInShape;
|
|
3627
|
-
/**
|
|
3628
|
-
* Ridge shape at the upper working boundary. `blunt` ends at full profile height, `standard`
|
|
3629
|
-
* clips the periodic profile at the face, and `tapered` ramps into the minor envelope.
|
|
3630
|
-
* @defaultValue `"blunt"`
|
|
3631
|
-
*/
|
|
3632
|
-
readonly top?: ThreadEndStyle;
|
|
3633
|
-
}
|
|
3634
|
-
|
|
3635
|
-
/**
|
|
3636
|
-
* Direction in which a conventional helical thread advances around +Z.
|
|
3637
|
-
*/
|
|
3638
|
-
export declare type ThreadHandedness = "left" | "right";
|
|
3639
|
-
|
|
3640
|
-
/** Conventional helix options: `pitch` is adjacent spacing and lead is `pitch * starts`. */
|
|
3641
|
-
export declare interface ThreadHelixOptions {
|
|
3642
|
-
/** Helix direction. Default: `right`. */
|
|
3643
|
-
readonly handedness?: ThreadHandedness;
|
|
3644
|
-
/** Explicit aggregate path allocation ceilings across all starts. */
|
|
3645
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
3646
|
-
/** Total sampled axial length in millimetres. */
|
|
3647
|
-
readonly length: number;
|
|
3648
|
-
/** Angular offset of the first start in degrees. Default: `0`. */
|
|
3649
|
-
readonly phase?: number;
|
|
3650
|
-
/** Adjacent axial thread spacing in millimetres. */
|
|
3651
|
-
readonly pitch: number;
|
|
3652
|
-
/** Radial distance from the +Z axis in millimetres. */
|
|
3653
|
-
readonly radius: number;
|
|
3654
|
-
/** Angular sampling density for each revolution. Default: `32`. */
|
|
3655
|
-
readonly segmentsPerTurn?: number;
|
|
3656
|
-
/** Number of evenly phased helices. Default: `1`. */
|
|
3657
|
-
readonly starts?: number;
|
|
3658
|
-
/** Optional numerical tolerance overrides. */
|
|
3659
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
3660
|
-
}
|
|
3661
|
-
|
|
3662
|
-
/** Radial envelope toward which a blunt lead-in collapses. */
|
|
3663
|
-
export declare type ThreadLeadInEnvelope = "major" | "minor";
|
|
3664
|
-
|
|
3665
|
-
/** BOSL2-compatible cross-section scaling curve for a blunt thread lead-in. */
|
|
3666
|
-
export declare type ThreadLeadInShape = "cut" | "linear" | "smooth" | "sqrt";
|
|
3667
|
-
|
|
3668
|
-
/**
|
|
3669
|
-
* A validated immutable periodic thread profile in `[axial, radial]` millimetres.
|
|
3670
|
-
*/
|
|
3671
|
-
export declare interface ThreadProfile {
|
|
3672
|
-
/** Axial width of the flat at the major envelope. */
|
|
3673
|
-
readonly crestFlatWidth: number;
|
|
3674
|
-
/** Radial distance from the major envelope to the root. */
|
|
3675
|
-
readonly depth: number;
|
|
3676
|
-
/** Profile family that produced this validated profile. */
|
|
3677
|
-
readonly kind: ThreadProfileSpec["kind"];
|
|
3678
|
-
/** Adjacent axial thread spacing in millimetres. */
|
|
3679
|
-
readonly pitch: number;
|
|
3680
|
-
/** Immutable open `[axial, radial]` path spanning one pitch. */
|
|
3681
|
-
readonly points: readonly Vector2Data[];
|
|
3682
|
-
/** Axial width of the flat at the minor envelope. */
|
|
3683
|
-
readonly rootFlatWidth: number;
|
|
3684
|
-
}
|
|
3685
|
-
|
|
3686
|
-
/**
|
|
3687
|
-
* Creates a periodic thread profile for the shaft-locked helical mesher.
|
|
3688
|
-
*
|
|
3689
|
-
* The open path spans one pitch. Radial zero is the major envelope; negative
|
|
3690
|
-
* values point toward the shaft. Custom paths must be finite, axially
|
|
3691
|
-
* non-decreasing, periodic at their endpoints, and reach radial zero.
|
|
3692
|
-
*
|
|
3693
|
-
* @example Printable triangular thread profile
|
|
3694
|
-
* ```ts
|
|
3695
|
-
* threadProfile({ kind: "triangular", pitch: 1.75 });
|
|
3696
|
-
* ```
|
|
3697
|
-
*/
|
|
3698
|
-
export declare function threadProfile(spec: ThreadProfileSpec): ThreadProfile;
|
|
3699
|
-
|
|
3700
|
-
/** Fields shared by all thread profile specifications. */
|
|
3701
|
-
export declare interface ThreadProfileBaseSpec {
|
|
3702
|
-
/** Adjacent axial thread spacing in millimetres. */
|
|
3703
|
-
readonly pitch: number;
|
|
3704
|
-
/** Optional numerical tolerance overrides. */
|
|
3705
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
3706
|
-
}
|
|
3707
|
-
|
|
3708
|
-
/**
|
|
3709
|
-
* Supported built-in and caller-defined thread profiles.
|
|
3710
|
-
*/
|
|
3711
|
-
export declare type ThreadProfileSpec =
|
|
3712
|
-
| AcmeThreadProfileSpec
|
|
3713
|
-
| ButtressThreadProfileSpec
|
|
3714
|
-
| CustomThreadProfileSpec
|
|
3715
|
-
| SquareThreadProfileSpec
|
|
3716
|
-
| TrapezoidalThreadProfileSpec
|
|
3717
|
-
| TriangularThreadProfileSpec;
|
|
3718
|
-
|
|
3719
|
-
/** Runtime-neutral options for the dedicated helical ridge mesher. */
|
|
3720
|
-
export declare interface ThreadRidgeOptions {
|
|
3721
|
-
/**
|
|
3722
|
-
* Optional bottom/top ridge-end treatments. Standalone ridges honor the requested boundaries;
|
|
3723
|
-
* BOSL2-style non-cut lead-in scaling is available on complete thread solids.
|
|
3724
|
-
*/
|
|
3725
|
-
readonly ends?: ThreadEndTreatmentOptions;
|
|
3726
|
-
/** Helix direction. Default: `right`. */
|
|
3727
|
-
readonly handedness?: ThreadHandedness;
|
|
3728
|
-
/** Total threaded axial length in millimetres. */
|
|
3729
|
-
readonly length: number;
|
|
3730
|
-
/** Explicit output and circular allocation ceilings. */
|
|
3731
|
-
readonly limits?: Partial<ModelingLimits>;
|
|
3732
|
-
/** Nominal major diameter before any caller-owned fit compensation. */
|
|
3733
|
-
readonly majorDiameter: number;
|
|
3734
|
-
/** Angular offset of the first start in degrees. Default: `0`. */
|
|
3735
|
-
readonly phase?: number;
|
|
3736
|
-
/** Validated periodic profile repeated around the shaft. */
|
|
3737
|
-
readonly profile: ThreadProfile;
|
|
3738
|
-
/** Optional circular-resolution policy. */
|
|
3739
|
-
readonly resolution?: GeometryResolution;
|
|
3740
|
-
/** Number of evenly phased starts. Default: `1`. */
|
|
3741
|
-
readonly starts?: number;
|
|
3742
|
-
/** Optional numerical tolerance overrides. */
|
|
3743
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
3744
|
-
}
|
|
3745
|
-
|
|
3746
|
-
/** Whether compensation is being applied to an external or internal thread. */
|
|
3747
|
-
export declare type ThreadRole = "male" | "female";
|
|
3748
|
-
|
|
3749
|
-
/** Options for a complete threaded-cylinder mesh; base semantics match the ridge builder. */
|
|
3750
|
-
export declare interface ThreadSolidOptions extends ThreadRidgeOptions {
|
|
3751
|
-
/** Independent 45-degree bottom/top bevels; omitted disables both. Auto uses profile depth. */
|
|
3752
|
-
readonly bevel?: Bevel;
|
|
3753
|
-
/** Distance of each bevel target face inward from the corresponding mesh end. */
|
|
3754
|
-
readonly bevelOffset?: number;
|
|
3755
|
-
/** `inset` trims an external rod; `outset` expands an internal cutter. */
|
|
3756
|
-
readonly bevelMode?: "inset" | "outset";
|
|
3757
|
-
}
|
|
3758
|
-
|
|
3759
|
-
/** Selected sampling counts and conservative allocation estimates, before thread mesh construction. */
|
|
3760
|
-
export declare interface ThreadSolidPreflight {
|
|
3761
|
-
/** Uniform axial intervals required only by a requested physical segment-length limit. */
|
|
3762
|
-
readonly axialIntervals: number;
|
|
3763
|
-
/** Start-aligned full-circle segment count used by the surface mesh. */
|
|
3764
|
-
readonly circularSegments: number;
|
|
3765
|
-
/** Conservative surface-row count across profile breaks, ends, and bevel stations. */
|
|
3766
|
-
readonly estimatedRows: number;
|
|
3767
|
-
/** Conservative triangle count used by the selected output allocation policy. */
|
|
3768
|
-
readonly estimatedTriangles: number;
|
|
3769
|
-
}
|
|
3770
|
-
|
|
3771
|
-
/**
|
|
3772
|
-
* Dimensions and independent ring/profile tessellation for a torus around the Z axis.
|
|
3773
|
-
*/
|
|
3774
|
-
export declare interface TorusOptions extends PrimitiveAttachment {
|
|
3775
|
-
/** Explicit sampling ceilings, bounded by the host policy. */
|
|
3776
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
3777
|
-
/** Radius from the Z axis to the profile center, in millimetres; greater than `minorRadius`. */
|
|
3778
|
-
readonly majorRadius: number;
|
|
3779
|
-
/** Exact segment count around the Z axis; omitted uses adaptive resolution. */
|
|
3780
|
-
readonly majorSegments?: number;
|
|
3781
|
-
/** Radius of the swept circular profile in millimetres. */
|
|
3782
|
-
readonly minorRadius: number;
|
|
3783
|
-
/** Exact segment count around the swept profile; omitted uses adaptive resolution. */
|
|
3784
|
-
readonly minorSegments?: number;
|
|
3785
|
-
/** Operation-level physical tessellation policy over the active model-wide policy. */
|
|
3786
|
-
readonly resolution?: GeometryResolution;
|
|
3787
|
-
}
|
|
3788
|
-
|
|
3789
2362
|
/** Immutable reusable XY placement. Methods apply in written order; angles are degrees. */
|
|
3790
2363
|
export declare interface Transform2 {
|
|
3791
2364
|
/** Applies a translation in model units after this placement. */
|
|
@@ -3819,6 +2392,8 @@ export declare interface Transform2 {
|
|
|
3819
2392
|
*
|
|
3820
2393
|
* Use `toData()` for frozen matrix interchange.
|
|
3821
2394
|
*
|
|
2395
|
+
* @param input - XY affine value or row-major 3x3 matrix; copied. Defaults to identity.
|
|
2396
|
+
*
|
|
3822
2397
|
* @example
|
|
3823
2398
|
* ```ts
|
|
3824
2399
|
* const placement = transform2().rotate(90).translate([10, 0]);
|
|
@@ -3860,7 +2435,7 @@ export declare interface Transform3 {
|
|
|
3860
2435
|
): Transform3;
|
|
3861
2436
|
/** Scales about an optional world-space pivot; finite nonzero factors may reflect. */
|
|
3862
2437
|
scale(factors: number | Vector3Input, options?: Pivot3Options): Transform3;
|
|
3863
|
-
/** Applies this placement first, then `next`; equivalent to
|
|
2438
|
+
/** Applies this placement first, then `next`; equivalent to multiplyTransform3(next, current). */
|
|
3864
2439
|
andThen(next: Transform3Input): Transform3;
|
|
3865
2440
|
/** Returns the inverse; singular and numerically unstable transforms throw GeometryError. */
|
|
3866
2441
|
inverse(): Transform3;
|
|
@@ -3879,19 +2454,35 @@ export declare interface Transform3 {
|
|
|
3879
2454
|
/**
|
|
3880
2455
|
* Creates an immutable XYZ transform, identity by default.
|
|
3881
2456
|
*
|
|
3882
|
-
* Values and
|
|
2457
|
+
* Values, matrices, and frames are copied and validated.
|
|
3883
2458
|
* Calls apply in written order; rotations use degrees and pivots use current world coordinates.
|
|
3884
2459
|
* Zero scales, singular matrices, nonfinite inputs and zero rotation axes throw GeometryError.
|
|
3885
|
-
*
|
|
2460
|
+
* A frame supplies its origin in millimetres and right-handed orthonormal axes as local-to-world
|
|
2461
|
+
* columns. Invalid axes reject; unit-length roundoff is normalized within geometry tolerance.
|
|
3886
2462
|
*
|
|
3887
2463
|
* Use `toData()` for frozen matrix interchange.
|
|
3888
|
-
* [
|
|
2464
|
+
* [multiplyTransform3](/docs/reference/math/multiplyTransform3) multiplies left and right matrices;
|
|
2465
|
+
* the right factor acts first on column vectors.
|
|
2466
|
+
*
|
|
2467
|
+
* @param input - XYZ affine value, row-major 4x4 matrix, or frame; copied. Defaults to identity.
|
|
3889
2468
|
*
|
|
3890
2469
|
* @example
|
|
3891
2470
|
* ```ts
|
|
3892
2471
|
* const placement = transform3().rotate([0, 0, 90]).translate([10, 0, 0]);
|
|
3893
2472
|
* placement.applyPoint([1, 0, 0]).toData(); // approximately [10, 1, 0]
|
|
3894
2473
|
* ```
|
|
2474
|
+
*
|
|
2475
|
+
* @example Convert a coordinate frame to an affine value
|
|
2476
|
+
* ```ts
|
|
2477
|
+
* const local = frame3({
|
|
2478
|
+
* origin: [10, 0, 0],
|
|
2479
|
+
* xAxis: [0, 1, 0],
|
|
2480
|
+
* yAxis: [-1, 0, 0],
|
|
2481
|
+
* zAxis: [0, 0, 1],
|
|
2482
|
+
* });
|
|
2483
|
+
* const placement = transform3(local);
|
|
2484
|
+
* placement.applyPoint([2, 0, 0]).toData(); // [10, 2, 0]
|
|
2485
|
+
* ```
|
|
3895
2486
|
*/
|
|
3896
2487
|
export declare function transform3(input?: Transform3Input): Transform3;
|
|
3897
2488
|
|
|
@@ -3920,24 +2511,15 @@ export declare type Transform3Data = readonly [
|
|
|
3920
2511
|
m33: number,
|
|
3921
2512
|
];
|
|
3922
2513
|
|
|
3923
|
-
/** An immutable XYZ transform
|
|
3924
|
-
export declare type Transform3Input = Transform3 | Transform3Data;
|
|
3925
|
-
|
|
3926
|
-
/**
|
|
3927
|
-
* Returns the determinant of a transform's linear 3x3 component.
|
|
3928
|
-
*
|
|
3929
|
-
* A negative result identifies a reflection; zero is rejected as singular.
|
|
3930
|
-
*
|
|
3931
|
-
* @param transform - Valid affine transform.
|
|
3932
|
-
* @returns Signed linear determinant.
|
|
3933
|
-
*/
|
|
3934
|
-
export declare function transformDeterminant3(
|
|
3935
|
-
transform: Transform3Data,
|
|
3936
|
-
): number;
|
|
2514
|
+
/** An immutable XYZ transform, canonical row-major matrix, or right-handed orthonormal frame. */
|
|
2515
|
+
export declare type Transform3Input = Transform3 | Transform3Data | Frame3;
|
|
3937
2516
|
|
|
3938
2517
|
/**
|
|
3939
2518
|
* Transforms serialized polygon data with reflection-safe winding, without an engine.
|
|
3940
2519
|
* Use Section.transform(placement) when authoring filled geometry; this utility serves pure data preparation.
|
|
2520
|
+
*
|
|
2521
|
+
* @param region - Millimetre polygons whose boundaries are normalized before placement.
|
|
2522
|
+
* @param transform - Planar affine placement; reflections preserve winding.
|
|
3941
2523
|
*/
|
|
3942
2524
|
export declare function transformRegionData(
|
|
3943
2525
|
region: RegionData,
|
|
@@ -3946,260 +2528,12 @@ export declare function transformRegionData(
|
|
|
3946
2528
|
): RegionData;
|
|
3947
2529
|
|
|
3948
2530
|
/**
|
|
3949
|
-
*
|
|
2531
|
+
* Triangulates one simple loop into indices of its normalized CCW vertex order.
|
|
3950
2532
|
*
|
|
3951
|
-
* @param
|
|
3952
|
-
* @returns A frozen row-major transform.
|
|
3953
|
-
*/
|
|
3954
|
-
export declare function translationTransform3(
|
|
3955
|
-
offset: Vector3Data,
|
|
3956
|
-
): Transform3Data;
|
|
3957
|
-
|
|
3958
|
-
/** Trapezoidal thread profile with a configurable included angle. */
|
|
3959
|
-
export declare interface TrapezoidalThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
3960
|
-
/** Selects the trapezoidal profile family. */
|
|
3961
|
-
readonly kind: "trapezoidal";
|
|
3962
|
-
/**
|
|
3963
|
-
* Radial depth in millimetres.
|
|
3964
|
-
* @defaultValue `pitch / 2`
|
|
3965
|
-
*/
|
|
3966
|
-
readonly depth?: number;
|
|
3967
|
-
/**
|
|
3968
|
-
* Full angle between the flanks in degrees, from `0` inclusive to `180` exclusive.
|
|
3969
|
-
* Each flank uses half this angle from the radial direction; `90` gives 45-degree slopes.
|
|
3970
|
-
* @defaultValue `30`
|
|
3971
|
-
*/
|
|
3972
|
-
readonly includedAngle?: number;
|
|
3973
|
-
}
|
|
3974
|
-
|
|
3975
|
-
/** A topology-preserving indexed triangle mesh with mutable owned XYZ buffers. */
|
|
3976
|
-
export declare interface TriangleMesh {
|
|
3977
|
-
/** Three unsigned vertex indices per triangle. */
|
|
3978
|
-
readonly indices: Uint32Array;
|
|
3979
|
-
/** Flat XYZ coordinates in millimetres. */
|
|
3980
|
-
readonly positions: Float32Array;
|
|
3981
|
-
}
|
|
3982
|
-
|
|
3983
|
-
/**
|
|
3984
|
-
* Measurements and optional edge-connected topology from one validated mesh traversal.
|
|
3985
|
-
*/
|
|
3986
|
-
export declare interface TriangleMeshAnalysis extends TriangleMeshMeasurements {
|
|
3987
|
-
/** Number of surface shells connected by shared indexed edges when includeTopology is requested.
|
|
3988
|
-
* Cavities count separately; shells may be open unless requireClosed is enabled. Coordinates are not welded. */
|
|
3989
|
-
readonly shellCount?: number;
|
|
3990
|
-
/** Number of distinct indexed undirected edges when `includeTopology` is requested. */
|
|
3991
|
-
readonly edgeCount?: number;
|
|
3992
|
-
}
|
|
3993
|
-
|
|
3994
|
-
/**
|
|
3995
|
-
* Validation and optional connectivity controls for a shared mesh analysis.
|
|
2533
|
+
* @param loop - Boundary to normalize; indices address its cleaned CCW order.
|
|
3996
2534
|
*/
|
|
3997
|
-
export declare interface TriangleMeshAnalysisOptions extends TriangleMeshValidationOptions {
|
|
3998
|
-
/** Compute indexed edge/shell counts and reject unreferenced vertices; defaults to false. */
|
|
3999
|
-
readonly includeTopology?: boolean;
|
|
4000
|
-
}
|
|
4001
|
-
|
|
4002
|
-
/** Raw construction buffers or immutable captured geometry accepted by mesh utilities. */
|
|
4003
|
-
export declare type TriangleMeshInput = TriangleMesh | ImmutableTriangleMesh;
|
|
4004
|
-
|
|
4005
|
-
/**
|
|
4006
|
-
* Geometric measurements derived from a validated, non-empty triangle mesh.
|
|
4007
|
-
*/
|
|
4008
|
-
export declare interface TriangleMeshMeasurements {
|
|
4009
|
-
/** Axis-aligned bounds. */
|
|
4010
|
-
readonly bounds: Bounds3Data;
|
|
4011
|
-
/** Signed enclosed volume; positive values correspond to outward winding. */
|
|
4012
|
-
readonly signedVolume: number;
|
|
4013
|
-
/** Sum of all triangle areas in squared model units. */
|
|
4014
|
-
readonly surfaceArea: number;
|
|
4015
|
-
/** Number of indexed triangles. */
|
|
4016
|
-
readonly triangleCount: number;
|
|
4017
|
-
/** Number of distinct entries in the position buffer. */
|
|
4018
|
-
readonly vertexCount: number;
|
|
4019
|
-
}
|
|
4020
|
-
|
|
4021
|
-
/** Options controlling bounded triangle-mesh quality analysis. */
|
|
4022
|
-
export declare interface TriangleMeshQualityOptions {
|
|
4023
|
-
/** Maximum number of triangles inspected. Defaults to `200000`. */
|
|
4024
|
-
readonly maxTriangles?: number;
|
|
4025
|
-
/** Numeric comparison overrides; model coordinates are interpreted in their existing units. */
|
|
4026
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
4027
|
-
}
|
|
4028
|
-
|
|
4029
|
-
/** Structural, topological, and planar-patch measurements for one indexed triangle mesh. */
|
|
4030
|
-
export declare interface TriangleMeshQualityReport {
|
|
4031
|
-
/** Number of duplicate triangles beyond their first unordered occurrence. */
|
|
4032
|
-
readonly duplicateTriangleCount: number;
|
|
4033
|
-
/** Number of two-face edges whose incident triangles use the same direction. */
|
|
4034
|
-
readonly inconsistentWindingEdgeCount: number;
|
|
4035
|
-
/** Whether the mesh has valid faces and exactly two oppositely wound faces at every edge. */
|
|
4036
|
-
readonly isClosedOrientedManifold: boolean;
|
|
4037
|
-
/** Largest normalized triangle aspect ratio; an equilateral triangle has ratio `1`. */
|
|
4038
|
-
readonly maximumTriangleAspectRatio: number;
|
|
4039
|
-
/** Largest number of triangles incident to one indexed vertex. */
|
|
4040
|
-
readonly maximumVertexTriangleIncidence: number;
|
|
4041
|
-
/** Largest number of distinct neighbours connected to one indexed vertex. */
|
|
4042
|
-
readonly maximumVertexValence: number;
|
|
4043
|
-
/** Smallest interior triangle angle in degrees. */
|
|
4044
|
-
readonly minimumTriangleAngleDegrees: number;
|
|
4045
|
-
/** Number of triangles at or below the scale-aware zero-area threshold. */
|
|
4046
|
-
readonly nearZeroAreaTriangleCount: number;
|
|
4047
|
-
/** Number of edges with more than two incident triangles. */
|
|
4048
|
-
readonly nonManifoldEdgeCount: number;
|
|
4049
|
-
/** Number of edges with exactly one incident triangle. */
|
|
4050
|
-
readonly openEdgeCount: number;
|
|
4051
|
-
/** Edge-connected coplanar patches in deterministic first-triangle order. */
|
|
4052
|
-
readonly planarPatches: readonly PlanarPatchQuality[];
|
|
4053
|
-
/** Signed enclosed volume in cubic model units; positive values indicate outward winding. */
|
|
4054
|
-
readonly signedVolume: number;
|
|
4055
|
-
/** Total triangle area in squared model units. */
|
|
4056
|
-
readonly surfaceArea: number;
|
|
4057
|
-
/** Number of indexed triangles. */
|
|
4058
|
-
readonly triangleCount: number;
|
|
4059
|
-
/** Number of entries in the position buffer. */
|
|
4060
|
-
readonly vertexCount: number;
|
|
4061
|
-
}
|
|
4062
|
-
|
|
4063
|
-
/** Immutable deterministic measurements for a closed, oriented triangle mesh. */
|
|
4064
|
-
export declare interface TriangleMeshSignature {
|
|
4065
|
-
/** Axis-aligned bounds quantized by `tolerances.position`. */
|
|
4066
|
-
readonly bounds: Bounds3Data;
|
|
4067
|
-
/** Number of edge-connected closed boundary shells; cavities count separately. */
|
|
4068
|
-
readonly shellCount: number;
|
|
4069
|
-
/** Total orientable genus across all connected components. */
|
|
4070
|
-
readonly genus: number;
|
|
4071
|
-
/** Order-independent hash of quantized vertices and oriented triangles. */
|
|
4072
|
-
readonly fingerprint: string;
|
|
4073
|
-
/** Signed enclosed volume quantized by `tolerances.signedVolume`. */
|
|
4074
|
-
readonly signedVolume: number;
|
|
4075
|
-
/** Quantization used to make the signature stable across insignificant numeric drift. */
|
|
4076
|
-
readonly tolerances: TriangleMeshSignatureTolerances;
|
|
4077
|
-
/** Number of indexed triangles. */
|
|
4078
|
-
readonly triangleCount: number;
|
|
4079
|
-
/** Number of referenced position-buffer vertices. */
|
|
4080
|
-
readonly vertexCount: number;
|
|
4081
|
-
}
|
|
4082
|
-
|
|
4083
|
-
/** Options controlling deterministic triangle-mesh regression signatures. */
|
|
4084
|
-
export declare interface TriangleMeshSignatureOptions {
|
|
4085
|
-
/** Maximum accepted triangle count. Defaults to 200,000. */
|
|
4086
|
-
readonly maxTriangles?: number;
|
|
4087
|
-
/** Position and bounds quantization in model units. Defaults to `1e-5`. */
|
|
4088
|
-
readonly positionTolerance?: number;
|
|
4089
|
-
/** Signed-volume quantization in cubic model units. Defaults to `1e-4`. */
|
|
4090
|
-
readonly volumeTolerance?: number;
|
|
4091
|
-
}
|
|
4092
|
-
|
|
4093
|
-
/** Absolute tolerances recorded in a triangle-mesh regression signature. */
|
|
4094
|
-
export declare interface TriangleMeshSignatureTolerances {
|
|
4095
|
-
/** Position and bounds quantization in model units. */
|
|
4096
|
-
readonly position: number;
|
|
4097
|
-
/** Signed-volume quantization in cubic model units. */
|
|
4098
|
-
readonly signedVolume: number;
|
|
4099
|
-
}
|
|
4100
|
-
|
|
4101
|
-
/** Mesh measurements with the indexed surface-shell and edge counts requested by includeTopology. */
|
|
4102
|
-
export declare interface TriangleMeshTopologyAnalysis extends TriangleMeshAnalysis {
|
|
4103
|
-
/** Number of surface shells connected by shared indexed edges; cavities count separately. */
|
|
4104
|
-
readonly shellCount: number;
|
|
4105
|
-
/** Number of distinct indexed undirected edges. */
|
|
4106
|
-
readonly edgeCount: number;
|
|
4107
|
-
}
|
|
4108
|
-
|
|
4109
|
-
/** Options controlling structural and manufacturing validation of a mesh. */
|
|
4110
|
-
export declare interface TriangleMeshValidationOptions {
|
|
4111
|
-
/** Permit an empty position and index buffer. Defaults to `false`. */
|
|
4112
|
-
readonly allowEmpty?: boolean;
|
|
4113
|
-
/** Require two oppositely wound faces per edge; geometric self-intersections are not detected. */
|
|
4114
|
-
readonly requireClosed?: boolean;
|
|
4115
|
-
/** Numeric comparison overrides used for zero-area triangle detection. */
|
|
4116
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
4117
|
-
}
|
|
4118
|
-
|
|
4119
|
-
/**
|
|
4120
|
-
* ISO/UTS-like 60-degree truncated triangular profile.
|
|
4121
|
-
*/
|
|
4122
|
-
export declare interface TriangularThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
4123
|
-
/** Selects the 60-degree triangular profile family. */
|
|
4124
|
-
readonly kind: "triangular";
|
|
4125
|
-
/**
|
|
4126
|
-
* Crest width divided by pitch.
|
|
4127
|
-
* @defaultValue `1 / 8`
|
|
4128
|
-
*/
|
|
4129
|
-
readonly crestFlatRatio?: number;
|
|
4130
|
-
/**
|
|
4131
|
-
* Root width divided by pitch.
|
|
4132
|
-
* @defaultValue `1 / 4`
|
|
4133
|
-
*/
|
|
4134
|
-
readonly rootFlatRatio?: number;
|
|
4135
|
-
}
|
|
4136
|
-
|
|
4137
|
-
/** Ear-clips one normalized simple CCW loop into stable local vertex indices. */
|
|
4138
2535
|
export declare function triangulateContour(loop: Contour): Uint32Array;
|
|
4139
2536
|
|
|
4140
|
-
/**
|
|
4141
|
-
* Dimensions, placement, and tessellation for a hollow Z-axis tube.
|
|
4142
|
-
*/
|
|
4143
|
-
export declare type TubeOptions = CircularPrimitiveOptions &
|
|
4144
|
-
PrimitiveAttachment & {
|
|
4145
|
-
/**
|
|
4146
|
-
* Centers the tube on the Z origin when `true`; otherwise its bottom is at `Z = 0`.
|
|
4147
|
-
* @defaultValue `true`
|
|
4148
|
-
*/
|
|
4149
|
-
readonly center?: boolean;
|
|
4150
|
-
/** Total height along Z in millimetres. */
|
|
4151
|
-
readonly height: number;
|
|
4152
|
-
/** Inner nominal dimension meets polygon vertices or faces; defaults to vertex. */
|
|
4153
|
-
readonly innerSizing?: RadialSizing;
|
|
4154
|
-
/** Outer nominal dimension meets polygon vertices or faces; defaults to vertex. */
|
|
4155
|
-
readonly outerSizing?: RadialSizing;
|
|
4156
|
-
} & (
|
|
4157
|
-
| {
|
|
4158
|
-
/** Positive nominal inner radius in millimetres. */
|
|
4159
|
-
readonly innerRadius: number;
|
|
4160
|
-
/** Nominal outer radius in millimetres, greater than innerRadius. */
|
|
4161
|
-
readonly outerRadius: number;
|
|
4162
|
-
/** Diameter dimensions cannot be combined with radius dimensions. */
|
|
4163
|
-
readonly innerDiameter?: never;
|
|
4164
|
-
/** Diameter dimensions cannot be combined with radius dimensions. */
|
|
4165
|
-
readonly outerDiameter?: never;
|
|
4166
|
-
}
|
|
4167
|
-
| {
|
|
4168
|
-
/** Positive nominal inner diameter in millimetres. */
|
|
4169
|
-
readonly innerDiameter: number;
|
|
4170
|
-
/** Nominal outer diameter in millimetres, greater than innerDiameter. */
|
|
4171
|
-
readonly outerDiameter: number;
|
|
4172
|
-
/** Radius dimensions cannot be combined with diameter dimensions. */
|
|
4173
|
-
readonly innerRadius?: never;
|
|
4174
|
-
/** Radius dimensions cannot be combined with diameter dimensions. */
|
|
4175
|
-
readonly outerRadius?: never;
|
|
4176
|
-
}
|
|
4177
|
-
);
|
|
4178
|
-
|
|
4179
|
-
/**
|
|
4180
|
-
* Validates a proper rigid transform: finite translation and a right-handed orthonormal rotation.
|
|
4181
|
-
* Scale, shear, reflection, and perspective are rejected within the default angular tolerance.
|
|
4182
|
-
* Returns the original row-major 4x4 matrix without copying or normalizing it.
|
|
4183
|
-
*
|
|
4184
|
-
* @throws {@link GeometryError} For a malformed, non-finite, or non-rigid matrix.
|
|
4185
|
-
*/
|
|
4186
|
-
export declare function validateRigidTransform3(
|
|
4187
|
-
transform: Transform3Data,
|
|
4188
|
-
): Transform3Data;
|
|
4189
|
-
|
|
4190
|
-
/**
|
|
4191
|
-
* Validates that a transform is finite, affine, and non-singular.
|
|
4192
|
-
*
|
|
4193
|
-
* @param transform - Row-major matrix to validate.
|
|
4194
|
-
* @param tolerance - Optional comparison overrides.
|
|
4195
|
-
* @returns The original transform after successful validation.
|
|
4196
|
-
* @throws {@link GeometryError} For non-finite, non-affine, or singular matrices.
|
|
4197
|
-
*/
|
|
4198
|
-
export declare function validateTransform3(
|
|
4199
|
-
transform: Transform3Data,
|
|
4200
|
-
tolerance?: GeometryToleranceOptions,
|
|
4201
|
-
): Transform3Data;
|
|
4202
|
-
|
|
4203
2537
|
/** Immutable XY arithmetic; vector operations return new values and measurements return numbers. */
|
|
4204
2538
|
export declare interface Vector2 {
|
|
4205
2539
|
/** X coordinate in the vector's coordinate units. */
|
|
@@ -4236,7 +2570,9 @@ export declare interface Vector2 {
|
|
|
4236
2570
|
* Use transform2().applyDirection(value) for rotations and nonuniform scaling.
|
|
4237
2571
|
*
|
|
4238
2572
|
* Use `toData()` for frozen tuple interchange, or
|
|
4239
|
-
* [normalize2](/docs/reference/
|
|
2573
|
+
* [normalize2](/docs/reference/math/normalize2) for tuple-based normalization in numerical loops.
|
|
2574
|
+
*
|
|
2575
|
+
* @param input - Finite XY tuple or vector; coordinates are copied without changing their units.
|
|
4240
2576
|
*/
|
|
4241
2577
|
export declare function vector2(input: Vector2Input): Vector2;
|
|
4242
2578
|
|
|
@@ -4268,6 +2604,8 @@ export declare interface Vector3 {
|
|
|
4268
2604
|
dot(other: Vector3Input): number;
|
|
4269
2605
|
/** Returns the right-handed cross product as a new vector. */
|
|
4270
2606
|
cross(other: Vector3Input): Vector3;
|
|
2607
|
+
/** Projects onto the plane through the origin; finite nonzero normals are normalized first. */
|
|
2608
|
+
projectOntoPlane(normal: Vector3Input): Vector3;
|
|
4271
2609
|
/** Returns Euclidean length in the vector's coordinate units. */
|
|
4272
2610
|
length(): number;
|
|
4273
2611
|
/** Returns Euclidean distance to another vector in the same coordinate units. */
|
|
@@ -4284,10 +2622,14 @@ export declare interface Vector3 {
|
|
|
4284
2622
|
* Use transform3().applyDirection(value) for rotations and nonuniform scaling.
|
|
4285
2623
|
*
|
|
4286
2624
|
* Use `toData()` for frozen tuple interchange, or
|
|
4287
|
-
* [normalize3](/docs/reference/
|
|
2625
|
+
* [normalize3](/docs/reference/math/normalize3) for tuple-based normalization in numerical loops.
|
|
2626
|
+
*
|
|
2627
|
+
* @param input - Finite XYZ tuple or vector; coordinates are copied without changing their units.
|
|
4288
2628
|
*
|
|
4289
2629
|
* @example
|
|
4290
2630
|
* ```ts
|
|
2631
|
+
* import { vector3 } from "@metamesh/modeling/geometry";
|
|
2632
|
+
*
|
|
4291
2633
|
* const direction = vector3([1, 2, 3]).add([4, 0, 0]).normalize().scale(10);
|
|
4292
2634
|
* const alignment = direction.dot([0, 0, 1]);
|
|
4293
2635
|
* ```
|
|
@@ -4300,21 +2642,7 @@ export declare type Vector3Data = readonly [x: number, y: number, z: number];
|
|
|
4300
2642
|
/** An XYZ tuple or immutable fluent vector accepted by vector operations. */
|
|
4301
2643
|
export declare type Vector3Input = Vector3Data | Vector3;
|
|
4302
2644
|
|
|
4303
|
-
/**
|
|
4304
|
-
export declare interface VectorTextArcBaseline {
|
|
4305
|
-
/** Selects a circular baseline; glyph outlines rotate without bending or stretching. */
|
|
4306
|
-
readonly kind: "arc";
|
|
4307
|
-
/** Baseline radius in millimetres, greater than zero and at most 10000. */
|
|
4308
|
-
readonly radius: number;
|
|
4309
|
-
/** Alignment datum in degrees counterclockwise from +X; defaults to 90. */
|
|
4310
|
-
readonly centerAngle?: number;
|
|
4311
|
-
/** Reading direction around the circle; defaults to clockwise. */
|
|
4312
|
-
readonly direction?: "clockwise" | "counterclockwise";
|
|
4313
|
-
}
|
|
4314
|
-
|
|
4315
|
-
/**
|
|
4316
|
-
* Immutable vector layout with no browser, font parser, or kernel ownership.
|
|
4317
|
-
*/
|
|
2645
|
+
/** Immutable vector layout with no browser, font parser, or kernel ownership. */
|
|
4318
2646
|
export declare interface VectorTextLayout {
|
|
4319
2647
|
/** Nonzero-filled path data in millimetres, positive Y upward; empty for text with no ink. */
|
|
4320
2648
|
readonly paths: readonly string[];
|
|
@@ -4322,20 +2650,6 @@ export declare interface VectorTextLayout {
|
|
|
4322
2650
|
readonly metrics: VectorTextMetrics;
|
|
4323
2651
|
}
|
|
4324
2652
|
|
|
4325
|
-
/**
|
|
4326
|
-
* Text bounded to 512 UTF-16 units: horizontal lines or one circular line without wrapping.
|
|
4327
|
-
*/
|
|
4328
|
-
export declare interface VectorTextLayoutOptions extends VectorTextOptions {
|
|
4329
|
-
/** Place the advance's start, midpoint or end at the datum; defaults to center on arcs, otherwise left. */
|
|
4330
|
-
readonly align?: "left" | "center" | "right";
|
|
4331
|
-
/** Omitted uses horizontal lines. Arcs require one line and baseline vertical alignment. */
|
|
4332
|
-
readonly baseline?: VectorTextArcBaseline;
|
|
4333
|
-
/** Baseline spacing in ems, 0.5–5; omitted uses the selected face's natural vertical metrics. */
|
|
4334
|
-
readonly lineHeight?: number;
|
|
4335
|
-
/** Place the first baseline or complete ink bounds at Y=0; arcs only accept baseline. */
|
|
4336
|
-
readonly verticalAlign?: "baseline" | "top" | "center" | "bottom";
|
|
4337
|
-
}
|
|
4338
|
-
|
|
4339
2653
|
/** Text measurements from the same immutable layout that supplies geometry and SVG outlines. */
|
|
4340
2654
|
export declare interface VectorTextMetrics {
|
|
4341
2655
|
/** Visible curve bounds after alignment, or null when the text has no ink. */
|
|
@@ -4346,7 +2660,7 @@ export declare interface VectorTextMetrics {
|
|
|
4346
2660
|
readonly logicalWidth: number;
|
|
4347
2661
|
/** Selected font's ascender distance above a baseline in millimetres, independent of the text. */
|
|
4348
2662
|
readonly ascent: number;
|
|
4349
|
-
/** Selected font's descender distance below a baseline in millimetres, a
|
|
2663
|
+
/** Selected font's descender distance below a baseline in millimetres, a nonnegative value. */
|
|
4350
2664
|
readonly descent: number;
|
|
4351
2665
|
/** Actual distance between baselines in millimetres. */
|
|
4352
2666
|
readonly lineHeight: number;
|
|
@@ -4354,14 +2668,4 @@ export declare interface VectorTextMetrics {
|
|
|
4354
2668
|
readonly lineCount: number;
|
|
4355
2669
|
}
|
|
4356
2670
|
|
|
4357
|
-
/** Shaping controls for a prepared exact font face; all lengths are in millimetres. */
|
|
4358
|
-
export declare interface VectorTextOptions {
|
|
4359
|
-
/** Em size in millimetres, greater than zero and at most 10000; not the visible glyph height. */
|
|
4360
|
-
readonly fontSize: number;
|
|
4361
|
-
/** Actual static or variable weight, 1–1000; defaults to the prepared face's static weight. */
|
|
4362
|
-
readonly fontWeight?: number;
|
|
4363
|
-
/** Tracking between glyph clusters in millimetres, -100–100; defaults to zero. */
|
|
4364
|
-
readonly letterSpacing?: number;
|
|
4365
|
-
}
|
|
4366
|
-
|
|
4367
2671
|
export {};
|