@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/index.d.ts
CHANGED
|
@@ -1,173 +1,115 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
AcmeThreadProfileSpec,
|
|
3
|
+
Bevel,
|
|
4
|
+
BevelSize,
|
|
5
|
+
ButtressPressureFlankSide,
|
|
6
|
+
ButtressThreadProfileSpec,
|
|
7
|
+
CustomThreadProfileSpec,
|
|
8
|
+
InternalThreadCutterOptions as InternalThreadCutterSolidOptions,
|
|
9
|
+
KnuckleHingeBaseSpec,
|
|
10
|
+
KnuckleHingeSamplingOptions,
|
|
11
|
+
KnuckleHingeSpec,
|
|
12
|
+
PrintableThreadFit,
|
|
13
|
+
PrintableThreadFitPolicy,
|
|
14
|
+
SquareThreadProfileSpec,
|
|
15
|
+
ThreadBevelOptions,
|
|
16
|
+
ThreadEndStyle,
|
|
17
|
+
ThreadEndTreatmentOptions,
|
|
18
|
+
ThreadHandedness,
|
|
19
|
+
ThreadLeadInEnvelope,
|
|
20
|
+
ThreadLeadInShape,
|
|
21
|
+
ThreadProfile,
|
|
22
|
+
ThreadProfileBaseSpec,
|
|
23
|
+
ThreadProfileSpec,
|
|
24
|
+
ThreadRidgeOptions,
|
|
25
|
+
ThreadedNutOptions as ThreadedNutSolidOptions,
|
|
26
|
+
ThreadedNutShape,
|
|
27
|
+
ThreadedRodOptions as ThreadedRodSolidOptions,
|
|
28
|
+
TrapezoidalThreadProfileSpec,
|
|
29
|
+
TriangularThreadProfileSpec,
|
|
30
|
+
} from "@metamesh/modeling/geometry/mechanical";
|
|
31
|
+
import type {
|
|
32
|
+
Anchor3,
|
|
33
|
+
AttachOptions,
|
|
34
|
+
Bounds2,
|
|
35
|
+
Bounds2Data,
|
|
36
|
+
Bounds2Input,
|
|
37
|
+
Bounds3,
|
|
38
|
+
Bounds3Data,
|
|
39
|
+
Bounds3Input,
|
|
40
|
+
ChamferedEdgeTreatment,
|
|
41
|
+
CircleContourOptions,
|
|
42
|
+
CircularPrimitiveOptions,
|
|
43
|
+
Contour,
|
|
44
|
+
CorrespondingComponent,
|
|
45
|
+
CorrespondingContour,
|
|
46
|
+
CorrespondingProfile,
|
|
47
|
+
CorrespondingProfileStation,
|
|
48
|
+
CurveSamplingOptions,
|
|
49
|
+
EdgeTreatment,
|
|
50
|
+
EllipseContourOptions,
|
|
51
|
+
ExtrusionSamplingOptions,
|
|
52
|
+
Frame3,
|
|
53
|
+
GeometryResolution,
|
|
54
|
+
GeometrySamplingLimits,
|
|
55
|
+
GeometryToleranceOptions,
|
|
56
|
+
GridPatternOptions,
|
|
2
57
|
ImmutableBuffer,
|
|
3
|
-
|
|
58
|
+
LinearPatternOptions,
|
|
59
|
+
LoftPlacement,
|
|
60
|
+
ModelingLimits,
|
|
4
61
|
NumericArray,
|
|
62
|
+
Path2,
|
|
63
|
+
Path2Data,
|
|
64
|
+
Path2Input,
|
|
65
|
+
Path3,
|
|
66
|
+
Path3Data,
|
|
67
|
+
Path3Input,
|
|
68
|
+
PathLocation,
|
|
69
|
+
PathNormalGuide,
|
|
70
|
+
PathPatternOptions,
|
|
71
|
+
PathResamplingOptions,
|
|
72
|
+
PathStation,
|
|
73
|
+
PathSubdivisionOptions,
|
|
74
|
+
Pivot2Options,
|
|
75
|
+
Pivot3Options,
|
|
76
|
+
PolygonData,
|
|
77
|
+
ProfiledEdgeTreatment,
|
|
78
|
+
RadialPatternOptions,
|
|
79
|
+
RadialSizing,
|
|
80
|
+
RadialSizingOptions,
|
|
81
|
+
RectangleContourOptions,
|
|
82
|
+
RectangleCornerTreatment,
|
|
83
|
+
RectangleCornerTreatments,
|
|
84
|
+
RegionData,
|
|
85
|
+
RegularPolygonContourOptions,
|
|
86
|
+
ResolvedGeometryResolution,
|
|
87
|
+
RoundedEdgeTreatment,
|
|
88
|
+
SmoothEdgeTreatment,
|
|
89
|
+
StarContourOptions,
|
|
90
|
+
StrokeCap,
|
|
91
|
+
StrokeJoin,
|
|
92
|
+
StrokeOptions,
|
|
93
|
+
Transform2,
|
|
94
|
+
Transform2Data,
|
|
95
|
+
Transform2Input,
|
|
96
|
+
Transform3,
|
|
97
|
+
Transform3Data,
|
|
98
|
+
Transform3Input,
|
|
99
|
+
Vector2,
|
|
100
|
+
Vector2Data,
|
|
101
|
+
Vector2Input,
|
|
102
|
+
Vector3,
|
|
103
|
+
Vector3Data,
|
|
104
|
+
Vector3Input,
|
|
105
|
+
VectorTextLayout,
|
|
106
|
+
VectorTextMetrics,
|
|
5
107
|
} from "@metamesh/modeling/geometry";
|
|
6
|
-
|
|
7
|
-
|
|
108
|
+
import type {
|
|
109
|
+
ExtrudeMeshOptions,
|
|
8
110
|
ImmutableTriangleMesh,
|
|
9
|
-
|
|
10
|
-
} from "@metamesh/modeling/geometry";
|
|
11
|
-
/** Immutable modeling recipes and math values; the host owns geometry evaluation. @packageDocumentation */
|
|
12
|
-
|
|
13
|
-
/** ACME 29-degree included-angle profile. */
|
|
14
|
-
export declare interface AcmeThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
15
|
-
/** Selects the 29-degree ACME profile family. */
|
|
16
|
-
readonly kind: "acme";
|
|
17
|
-
/**
|
|
18
|
-
* Radial depth in millimetres.
|
|
19
|
-
* @defaultValue `pitch / 2`
|
|
20
|
-
*/
|
|
21
|
-
readonly depth?: number;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* An attachment pose on a solid or assembly.
|
|
26
|
-
*
|
|
27
|
-
* `direction` is the outward attachment normal. `up` controls roll and must not
|
|
28
|
-
* be parallel to `direction`; anchor construction projects and normalizes it.
|
|
29
|
-
*/
|
|
30
|
-
export declare interface Anchor3 {
|
|
31
|
-
/** Unit outward normal used as the anchor's local +Z direction. */
|
|
32
|
-
readonly direction: Vector3Data;
|
|
33
|
-
/** World-space attachment position. */
|
|
34
|
-
readonly position: Vector3Data;
|
|
35
|
-
/** Roll guide projected into the plane perpendicular to `direction`. */
|
|
36
|
-
readonly up: Vector3Data;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/** Options controlling how one anchor is attached to another. */
|
|
40
|
-
export declare interface AttachOptions {
|
|
41
|
-
/** Align outward directions face-to-face (`opposed`) or in parallel (`same`). */
|
|
42
|
-
readonly alignment?: "opposed" | "same";
|
|
43
|
-
/** Separation along the target anchor's outward direction in model units. */
|
|
44
|
-
readonly gap?: number;
|
|
45
|
-
/** Additional right-handed roll about the attached direction, in degrees. */
|
|
46
|
-
readonly spin?: number;
|
|
47
|
-
/** Optional numeric comparison overrides. */
|
|
48
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/** One size for both ends, or independent sizes in bottom/top order. Zero disables an end. */
|
|
52
|
-
export declare type Bevel =
|
|
53
|
-
BevelSize | readonly [bottom: BevelSize, top: BevelSize];
|
|
54
|
-
|
|
55
|
-
/** Nonnegative 45-degree axial/radial bevel size in millimetres, or factory automatic sizing. */
|
|
56
|
-
export declare type BevelSize = number | "auto";
|
|
57
|
-
|
|
58
|
-
/** Immutable finite XY bounds in millimetres, with tuple coordinates for data interoperability. */
|
|
59
|
-
export declare interface Bounds2 extends Bounds2Data {
|
|
60
|
-
/** Returns nonnegative X/Y dimensions in millimetres, including zero extents. */
|
|
61
|
-
size(): Vector2;
|
|
62
|
-
/** Returns the midpoint in millimetres. */
|
|
63
|
-
center(): Vector2;
|
|
64
|
-
/** Tests positioned XY containment, including touching boundaries. */
|
|
65
|
-
containsBounds(other: Bounds2Input): boolean;
|
|
66
|
-
/** Returns this value's frozen plain record; repeated calls do not allocate. */
|
|
67
|
-
toData(): Bounds2Data;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Constructs immutable finite XY bounds from ordered extrema or nonnegative size in millimetres.
|
|
72
|
-
*
|
|
73
|
-
* Zero extents are valid. Invalid dimensions, nonfinite coordinates, reversed bounds and
|
|
74
|
-
* overflowing extents throw `INVALID_ARGUMENT` GeometryError. Use `toData()` for plain records.
|
|
75
|
-
* Size construction centers on the origin unless `center` is false. Size and extrema are exclusive.
|
|
76
|
-
* Compiled Generator packages passing these values to host recipes or computed data require
|
|
77
|
-
* runtime 10.0.0 or newer in major 10.
|
|
78
|
-
*/
|
|
79
|
-
export declare function bounds2(input: Bounds2Options | Bounds2): Bounds2;
|
|
80
|
-
|
|
81
|
-
/** Plain axis-aligned XY bounds for interchange; use bounds2 for immutable measurement methods. */
|
|
82
|
-
export declare interface Bounds2Data {
|
|
83
|
-
/** Inclusive maximum X/Y coordinates. */
|
|
84
|
-
readonly max: Vector2Data;
|
|
85
|
-
/** Inclusive minimum X/Y coordinates. */
|
|
86
|
-
readonly min: Vector2Data;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/** An immutable XY bounds value or its plain min/max representation. */
|
|
90
|
-
export declare type Bounds2Input = Bounds2 | Bounds2Data;
|
|
91
|
-
|
|
92
|
-
/** XY bounds construction from existing extrema or nonnegative dimensions, never both. */
|
|
93
|
-
export declare type Bounds2Options =
|
|
94
|
-
| {
|
|
95
|
-
/** Inclusive minimum XY coordinates in millimetres. */
|
|
96
|
-
readonly min: Vector2Input;
|
|
97
|
-
/** Inclusive maximum XY coordinates in millimetres. */
|
|
98
|
-
readonly max: Vector2Input;
|
|
99
|
-
/** Size construction cannot be combined with extrema. */
|
|
100
|
-
readonly size?: never;
|
|
101
|
-
/** Center applies only to size construction. */
|
|
102
|
-
readonly center?: never;
|
|
103
|
-
}
|
|
104
|
-
| {
|
|
105
|
-
/** Nonnegative XY dimensions in millimetres. */
|
|
106
|
-
readonly size: Vector2Input;
|
|
107
|
-
/** Center on the origin; false starts at the origin. Defaults to true. */
|
|
108
|
-
readonly center?: boolean;
|
|
109
|
-
/** Minimum coordinates are unavailable when size is supplied. */
|
|
110
|
-
readonly min?: never;
|
|
111
|
-
/** Maximum coordinates are unavailable when size is supplied. */
|
|
112
|
-
readonly max?: never;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
/** Immutable finite XYZ bounds in millimetres, with tuple coordinates for data interoperability. */
|
|
116
|
-
export declare interface Bounds3 extends Bounds3Data {
|
|
117
|
-
/** Returns nonnegative X/Y/Z dimensions in millimetres, including zero extents. */
|
|
118
|
-
size(): Vector3;
|
|
119
|
-
/** Returns the midpoint in millimetres. */
|
|
120
|
-
center(): Vector3;
|
|
121
|
-
/** Tests positioned XYZ containment, including touching boundaries. */
|
|
122
|
-
containsBounds(other: Bounds3Input): boolean;
|
|
123
|
-
/** Returns this value's frozen plain record; repeated calls do not allocate. */
|
|
124
|
-
toData(): Bounds3Data;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Constructs immutable finite XYZ bounds from ordered extrema or nonnegative size in millimetres.
|
|
129
|
-
*
|
|
130
|
-
* Zero extents are valid. Invalid dimensions, nonfinite coordinates, reversed bounds and
|
|
131
|
-
* overflowing extents throw `INVALID_ARGUMENT` GeometryError. Use `toData()` for plain records.
|
|
132
|
-
* Size construction centers on the origin unless `center` is false. Size and extrema are exclusive.
|
|
133
|
-
* Compiled Generator packages passing these values to host recipes or computed data require
|
|
134
|
-
* runtime 10.0.0 or newer in major 10.
|
|
135
|
-
*/
|
|
136
|
-
export declare function bounds3(input: Bounds3Options | Bounds3): Bounds3;
|
|
137
|
-
|
|
138
|
-
/** Plain axis-aligned XYZ bounds for interchange; use bounds3 for immutable measurement methods. */
|
|
139
|
-
export declare interface Bounds3Data {
|
|
140
|
-
/** Inclusive maximum X/Y/Z coordinates. */
|
|
141
|
-
readonly max: Vector3Data;
|
|
142
|
-
/** Inclusive minimum X/Y/Z coordinates. */
|
|
143
|
-
readonly min: Vector3Data;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/** An immutable XYZ bounds value or its plain min/max representation. */
|
|
147
|
-
export declare type Bounds3Input = Bounds3 | Bounds3Data;
|
|
148
|
-
|
|
149
|
-
/** XYZ bounds construction from existing extrema or nonnegative dimensions, never both. */
|
|
150
|
-
export declare type Bounds3Options =
|
|
151
|
-
| {
|
|
152
|
-
/** Inclusive minimum XYZ coordinates in millimetres. */
|
|
153
|
-
readonly min: Vector3Input;
|
|
154
|
-
/** Inclusive maximum XYZ coordinates in millimetres. */
|
|
155
|
-
readonly max: Vector3Input;
|
|
156
|
-
/** Size construction cannot be combined with extrema. */
|
|
157
|
-
readonly size?: never;
|
|
158
|
-
/** Center applies only to size construction. */
|
|
159
|
-
readonly center?: never;
|
|
160
|
-
}
|
|
161
|
-
| {
|
|
162
|
-
/** Nonnegative XYZ dimensions in millimetres. */
|
|
163
|
-
readonly size: Vector3Input;
|
|
164
|
-
/** Center on the origin; false starts at the origin. Defaults to true. */
|
|
165
|
-
readonly center?: boolean;
|
|
166
|
-
/** Minimum coordinates are unavailable when size is supplied. */
|
|
167
|
-
readonly min?: never;
|
|
168
|
-
/** Maximum coordinates are unavailable when size is supplied. */
|
|
169
|
-
readonly max?: never;
|
|
170
|
-
};
|
|
111
|
+
TriangleMesh,
|
|
112
|
+
} from "@metamesh/modeling/geometry/mesh";
|
|
171
113
|
|
|
172
114
|
/**
|
|
173
115
|
* Axis-aligned box with uniform or disjoint named edge/group treatments.
|
|
@@ -219,166 +161,79 @@ export declare interface BoxOptions extends PrimitiveAttachment {
|
|
|
219
161
|
readonly treatment?: EdgeTreatment | BoxEdgeTreatments;
|
|
220
162
|
}
|
|
221
163
|
|
|
222
|
-
/** Axial side carrying the near-normal pressure flank of a buttress thread. */
|
|
223
|
-
export declare type ButtressPressureFlankSide = "negative" | "positive";
|
|
224
|
-
|
|
225
|
-
/** Asymmetric printable buttress profile with 7/45-degree flanks. */
|
|
226
|
-
export declare interface ButtressThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
227
|
-
/** Selects the asymmetric printable buttress profile family. */
|
|
228
|
-
readonly kind: "buttress";
|
|
229
|
-
/**
|
|
230
|
-
* Radial depth in millimetres.
|
|
231
|
-
* @defaultValue `0.66271 * pitch`
|
|
232
|
-
*/
|
|
233
|
-
readonly depth?: number;
|
|
234
|
-
/**
|
|
235
|
-
* Axial side of each tooth carrying the 7-degree pressure flank. The opposite side uses the
|
|
236
|
-
* 45-degree clearance flank.
|
|
237
|
-
* @defaultValue `"positive"`
|
|
238
|
-
*/
|
|
239
|
-
readonly pressureFlankSide?: ButtressPressureFlankSide;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* A planar edge or corner chamfer with equal or independent surface setbacks.
|
|
244
|
-
*/
|
|
245
|
-
export declare interface ChamferedEdgeTreatment {
|
|
246
|
-
/** Selects a straight bevel between adjoining surfaces. */
|
|
247
|
-
readonly kind: "chamfer";
|
|
248
|
-
/** Millimetre setbacks, equal or [first surface, second surface]. Zero or [0, 0] leaves the edge untreated; otherwise both must be positive and fit without overlap. */
|
|
249
|
-
readonly distance: number | readonly [first: number, second: number];
|
|
250
|
-
}
|
|
251
|
-
|
|
252
164
|
/**
|
|
253
165
|
* Centered circular section.
|
|
254
166
|
*
|
|
255
167
|
* @example Size to polygon faces
|
|
256
168
|
* ```ts
|
|
257
|
-
* circle({ diameter: 12, sizing: "face" });
|
|
169
|
+
* circle({ diameter: 12, sizing: "face" }).extrude({ height: 3 });
|
|
258
170
|
* ```
|
|
259
171
|
*/
|
|
260
172
|
export declare function circle(options: CircleOptions): Section;
|
|
261
173
|
|
|
262
|
-
/** Circular
|
|
263
|
-
export declare type CircleContourOptions = CircularPrimitiveOptions &
|
|
264
|
-
RadialSizingOptions &
|
|
265
|
-
(
|
|
266
|
-
| {
|
|
267
|
-
/** Positive nominal radius in millimetres. */
|
|
268
|
-
readonly radius: number;
|
|
269
|
-
/** Diameter is unavailable when radius is supplied. */
|
|
270
|
-
readonly diameter?: never;
|
|
271
|
-
}
|
|
272
|
-
| {
|
|
273
|
-
/** Positive nominal diameter in millimetres. */
|
|
274
|
-
readonly diameter: number;
|
|
275
|
-
/** Radius is unavailable when diameter is supplied. */
|
|
276
|
-
readonly radius?: never;
|
|
277
|
-
}
|
|
278
|
-
);
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Circular dimensions with exactly one nominal radius or diameter.
|
|
282
|
-
*/
|
|
174
|
+
/** Circular dimensions with exactly one nominal radius or diameter. */
|
|
283
175
|
export declare type CircleOptions = CircleContourOptions & PrimitiveAttachment;
|
|
284
176
|
|
|
285
177
|
/**
|
|
286
|
-
*
|
|
287
|
-
|
|
288
|
-
export declare interface CircularPrimitiveOptions {
|
|
289
|
-
/** Explicit sampling ceilings; bound modeling operations may only lower the host policy. */
|
|
290
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
291
|
-
/**
|
|
292
|
-
* Exact circumferential segment count from three through the configured safety limit.
|
|
293
|
-
*
|
|
294
|
-
* This local topology override takes precedence over {@link CircularPrimitiveOptions.resolution}
|
|
295
|
-
* and any active model-wide resolution policy.
|
|
296
|
-
*/
|
|
297
|
-
readonly segments?: number;
|
|
298
|
-
/** Operation-level physical tessellation policy over the active model-wide policy. */
|
|
299
|
-
readonly resolution?: GeometryResolution;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/** A lazy session-owned reader. Calling it tracks its output in the current computation. */
|
|
303
|
-
export declare interface Computed<T> {
|
|
304
|
-
/** Compile-time ownership brand; readers are created by the engine's context helper. */
|
|
305
|
-
readonly [computedBrand]: "Computed";
|
|
306
|
-
/** Reads immutable data or a deferred recipe; evaluation is synchronous and cached. */
|
|
307
|
-
(): ImmutableValue<T>;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
declare const computedBrand: unique symbol;
|
|
311
|
-
|
|
312
|
-
/** A value supplied immediately or by a lazy computed reader. */
|
|
313
|
-
export declare type ComputedValue<T> = T | Computed<T>;
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* A sampled closed two-dimensional boundary whose first point is not repeated at the end.
|
|
317
|
-
*
|
|
318
|
-
* Polygon exteriors are counter-clockwise and holes are clockwise. Algorithms
|
|
319
|
-
* may reject duplicate adjacent points or fewer than three effective vertices.
|
|
320
|
-
* Use PolygonData to assign an exterior and its holes, or ProfileContour2 for identified curve spans.
|
|
178
|
+
* Creates a round or chamfer cutter at the origin for three perpendicular positive-axis faces.
|
|
179
|
+
* Complements matching edge cutters; construction, placement, and subtraction remain explicit.
|
|
321
180
|
*
|
|
322
|
-
* @
|
|
323
|
-
*
|
|
181
|
+
* @example Amber corner cutter · Blue three-edge junction
|
|
182
|
+
* ```ts
|
|
183
|
+
* import { box, cornerCutter, edgeCutter, generate } from "@metamesh/modeling";
|
|
184
|
+
* import { transform3 } from "@metamesh/modeling/geometry";
|
|
185
|
+
*
|
|
186
|
+
* const treatment = { kind: "round", radius: 5 } as const;
|
|
187
|
+
* const cutter = cornerCutter({ treatment, excess: 0 });
|
|
188
|
+
* const edge = edgeCutter({ length: 12, treatment, excess: 0 });
|
|
189
|
+
* const result = box({ size: 12, center: false }).subtract([
|
|
190
|
+
* edge,
|
|
191
|
+
* edge.rotate([0, -90, 0]).translate([12, 0, 0]),
|
|
192
|
+
* edge.rotate([90, 0, 0]).translate([0, 12, 0]),
|
|
193
|
+
* cutter,
|
|
194
|
+
* ]);
|
|
195
|
+
* // Display the concave mask and completed upper junction from opposite sides.
|
|
196
|
+
* const view = (shape: typeof result, center: number, height: number) =>
|
|
197
|
+
* shape.translate([-center, -center, 0]).mirror([0, 0, 1]).translate([0, 0, height]).rotate([0, 0, 90]);
|
|
198
|
+
* export default generate(({ part }) => [
|
|
199
|
+
* part("cutter", { geometry: cutter.translate([-2.5, -2.5, 0]).rotate([0, 0, -90]), color: "#f6ad55", transform: transform3().translate([-8, -8, 0]) }),
|
|
200
|
+
* part("result", { geometry: view(result, 6, 12), color: "#4f83a6", transform: transform3().translate([8, 8, 0]) }),
|
|
201
|
+
* ]);
|
|
202
|
+
* ```
|
|
324
203
|
*/
|
|
325
|
-
export declare
|
|
326
|
-
|
|
327
|
-
/** One sampled component retaining contour identities and logical point correspondence. */
|
|
328
|
-
export declare interface CorrespondingComponent {
|
|
329
|
-
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
330
|
-
readonly id: string;
|
|
331
|
-
/** Counterclockwise outer contour. */
|
|
332
|
-
readonly outer: CorrespondingContour;
|
|
333
|
-
/** Clockwise hole contours belonging to this component. */
|
|
334
|
-
readonly holes: readonly CorrespondingContour[];
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/** A sampled contour retaining logical slots, including intentionally collapsed spans. */
|
|
338
|
-
export declare interface CorrespondingContour {
|
|
339
|
-
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
340
|
-
readonly id: string;
|
|
341
|
-
/** Ordered sampled points in millimetres; closing vertices are implicit. */
|
|
342
|
-
readonly points: Contour;
|
|
343
|
-
/** One span identity per point; indices correspond between every matched family member. */
|
|
344
|
-
readonly spans: readonly string[];
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/** Shared logical contour sampling suitable for a loft or hollow sweep. */
|
|
348
|
-
export declare interface CorrespondingProfile {
|
|
349
|
-
/** Ordered components with explicit contour identities. */
|
|
350
|
-
readonly components: readonly CorrespondingComponent[];
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/** One already matched profile at an explicit height or right-handed spatial frame. */
|
|
354
|
-
export declare type CorrespondingProfileStation = LoftPlacement & {
|
|
355
|
-
/** Already corresponding filled contours with authoritative landmark slots. */
|
|
356
|
-
readonly profile: CorrespondingProfile;
|
|
357
|
-
};
|
|
204
|
+
export declare function cornerCutter(options: CornerCutterOptions): Solid;
|
|
358
205
|
|
|
359
206
|
/**
|
|
360
|
-
*
|
|
207
|
+
* A subtractive corner transition for material occupying the positive XYZ octant.
|
|
208
|
+
* Round treatments share their lattice with right-angle edge cutters; full-circle segment requests round up to a multiple of four.
|
|
361
209
|
*/
|
|
362
|
-
export declare interface
|
|
363
|
-
/**
|
|
364
|
-
readonly
|
|
365
|
-
/**
|
|
210
|
+
export declare interface CornerCutterOptions extends PrimitiveAttachment {
|
|
211
|
+
/** Round sphere or triangular chamfer meeting three equal perpendicular edge treatments. */
|
|
212
|
+
readonly treatment: CornerCutterTreatment;
|
|
213
|
+
/** Numerical extension outside the three material faces, in millimetres; defaults to 0.05. */
|
|
214
|
+
readonly excess?: number;
|
|
215
|
+
/** Physical sphere sampling; explicit round-treatment sampling takes precedence. */
|
|
366
216
|
readonly resolution?: GeometryResolution;
|
|
367
|
-
/**
|
|
368
|
-
readonly
|
|
369
|
-
/** Explicit sampling ceilings; omitted values use package defaults without ambient state. */
|
|
370
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
217
|
+
/** Local allocation ceilings may only lower the evaluating host's limits. */
|
|
218
|
+
readonly limits?: Partial<ModelingLimits>;
|
|
371
219
|
}
|
|
372
220
|
|
|
373
|
-
/**
|
|
374
|
-
export declare
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
221
|
+
/** Symmetric trihedral treatments that meet three matching perpendicular edge treatments. */
|
|
222
|
+
export declare type CornerCutterTreatment =
|
|
223
|
+
| RoundedEdgeTreatment
|
|
224
|
+
| {
|
|
225
|
+
/** Selects a flat triangular corner transition. */
|
|
226
|
+
readonly kind: "chamfer";
|
|
227
|
+
/** Equal adjoining edge setbacks in millimetres; zero disables the cutter. */
|
|
228
|
+
readonly distance: number;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
/** Numerical cutter extension outside its nominal +Z interval, in millimetres. */
|
|
232
|
+
export declare interface CutterOverrun {
|
|
233
|
+
/** Nonnegative extension below Z=0; defaults to zero. */
|
|
234
|
+
readonly bottom?: number;
|
|
235
|
+
/** Nonnegative extension above the nominal height or length; defaults to zero. */
|
|
236
|
+
readonly top?: number;
|
|
382
237
|
}
|
|
383
238
|
|
|
384
239
|
/**
|
|
@@ -438,51 +293,62 @@ export declare interface DiagnosticOptions<P> {
|
|
|
438
293
|
}
|
|
439
294
|
|
|
440
295
|
/**
|
|
441
|
-
*
|
|
296
|
+
* Creates a cutter for one straight convex edge along +Z, with its sharp reference at XY=0.
|
|
297
|
+
* Position it explicitly before subtraction; the included material angle defaults to 90 degrees.
|
|
298
|
+
*
|
|
299
|
+
* @example Amber cutter · Blue rounded edge
|
|
300
|
+
* ```ts
|
|
301
|
+
* import { box, edgeCutter, generate } from "@metamesh/modeling";
|
|
302
|
+
* import { transform3 } from "@metamesh/modeling/geometry";
|
|
303
|
+
*
|
|
304
|
+
* const cutter = edgeCutter({ length: 18, treatment: { kind: "round", radius: 6 }, excess: 0 });
|
|
305
|
+
* const result = box({ size: 18, center: false }).subtract(cutter);
|
|
306
|
+
* // Turn the concave mask and convex result toward the viewer independently.
|
|
307
|
+
* export default generate(({ part }) => [
|
|
308
|
+
* part("cutter", { geometry: cutter.translate([-3, -3, 0]).rotate([0, 0, -90]), color: "#f6ad55", transform: transform3().translate([-11, -11, 0]) }),
|
|
309
|
+
* part("result", { geometry: result.translate([-9, -9, 0]).rotate([0, 0, 90]), color: "#4f83a6", transform: transform3().translate([11, 11, 0]) }),
|
|
310
|
+
* ]);
|
|
311
|
+
* ```
|
|
442
312
|
*/
|
|
443
|
-
export declare
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
313
|
+
export declare function edgeCutter(options: EdgeCutterOptions): Solid;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* A subtractive treatment along one explicitly positioned straight convex edge.
|
|
317
|
+
* Right-angle rounds share the corner sphere's sampling lattice; full-circle segment requests round up to a multiple of four.
|
|
318
|
+
*/
|
|
319
|
+
export declare interface EdgeCutterOptions extends PrimitiveAttachment {
|
|
320
|
+
/** Positive nominal edge length along +Z from Z=0, in millimetres. */
|
|
321
|
+
readonly length: number;
|
|
322
|
+
/** Material angle counterclockwise from +X toward +Y, strictly between 0° and 180°; defaults to 90°. */
|
|
323
|
+
readonly angle?: number;
|
|
324
|
+
/** Profile from the first material face to the second; uses the shared surface-setback vocabulary. */
|
|
325
|
+
readonly treatment: EdgeTreatment;
|
|
326
|
+
/** Numerical extension outside the two material faces, in millimetres; defaults to 0.05. Does not change the treatment. */
|
|
327
|
+
readonly excess?: number;
|
|
328
|
+
/** Numerical longitudinal extension; both ends default to zero. */
|
|
329
|
+
readonly overrun?: CutterOverrun;
|
|
330
|
+
/** Physical curve sampling; explicit treatment sampling overrides these defaults. */
|
|
331
|
+
readonly resolution?: GeometryResolution;
|
|
332
|
+
/** Local allocation ceilings may only lower the evaluating host's limits. */
|
|
333
|
+
readonly limits?: Partial<ModelingLimits>;
|
|
334
|
+
}
|
|
448
335
|
|
|
449
336
|
/**
|
|
450
337
|
* Centered elliptical section.
|
|
451
338
|
*
|
|
452
339
|
* @example Ellipse by full dimensions
|
|
453
340
|
* ```ts
|
|
454
|
-
* ellipse({ size: [30, 20] });
|
|
341
|
+
* ellipse({ size: [30, 20] }).extrude({ height: 3 });
|
|
455
342
|
* ```
|
|
456
343
|
*/
|
|
457
344
|
export declare function ellipse(options: EllipseOptions): Section;
|
|
458
345
|
|
|
459
|
-
/**
|
|
460
|
-
* Ellipse dimensions with exactly one XY radii or full-size tuple and explicit sampling.
|
|
461
|
-
*/
|
|
462
|
-
export declare type EllipseContourOptions = CircularPrimitiveOptions &
|
|
463
|
-
(
|
|
464
|
-
| {
|
|
465
|
-
/** Positive XY radii in millimetres; mutually exclusive with size. */
|
|
466
|
-
readonly radius: Vector2Input;
|
|
467
|
-
/** Full XY extents are unavailable when radius is supplied. */
|
|
468
|
-
readonly size?: never;
|
|
469
|
-
}
|
|
470
|
-
| {
|
|
471
|
-
/** Positive full XY extents in millimetres; mutually exclusive with radius. */
|
|
472
|
-
readonly size: Vector2Input;
|
|
473
|
-
/** XY radii are unavailable when size is supplied. */
|
|
474
|
-
readonly radius?: never;
|
|
475
|
-
}
|
|
476
|
-
);
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Ellipse dimensions in local XY, with exactly one radii or full-size tuple.
|
|
480
|
-
*/
|
|
346
|
+
/** Ellipse dimensions in local XY, with exactly one radii or full-size tuple. */
|
|
481
347
|
export declare type EllipseOptions = EllipseContourOptions &
|
|
482
348
|
PrimitiveAttachment;
|
|
483
349
|
|
|
484
350
|
/**
|
|
485
|
-
* Independent inward finishing on primitive or
|
|
351
|
+
* Independent inward finishing on primitive or source-corresponding extrusion ends.
|
|
486
352
|
* Zero amounts leave the end untreated, including when all ends are disabled.
|
|
487
353
|
*/
|
|
488
354
|
export declare interface EndTreatments {
|
|
@@ -496,10 +362,12 @@ export declare interface EndTreatments {
|
|
|
496
362
|
* Extrudes a filled Section or explicit corresponding contours along +Z with degree twist and top scaling.
|
|
497
363
|
* Use `section.extrude(options)` in fluent sequences, or this function for generic profile inputs.
|
|
498
364
|
*
|
|
365
|
+
* @param shape - Filled XY profile in millimetres.
|
|
366
|
+
*
|
|
499
367
|
* @example Extrude
|
|
500
368
|
* ```ts
|
|
501
|
-
* import { extrude
|
|
502
|
-
* import { rectangleProfile } from "@metamesh/modeling/geometry";
|
|
369
|
+
* import { extrude } from "@metamesh/modeling";
|
|
370
|
+
* import { matchProfiles, rectangleProfile } from "@metamesh/modeling/geometry";
|
|
503
371
|
*
|
|
504
372
|
* const [profile] = matchProfiles([rectangleProfile({ size: [30, 20] })]);
|
|
505
373
|
* extrude(profile!, { height: 8 });
|
|
@@ -510,52 +378,18 @@ export declare function extrude(
|
|
|
510
378
|
options: ExtrudeOptions,
|
|
511
379
|
): Solid;
|
|
512
380
|
|
|
513
|
-
/**
|
|
514
|
-
* Dimensions and sampling for pure +Z mesh extrusion, without end treatments.
|
|
515
|
-
*/
|
|
516
|
-
export declare interface ExtrudeMeshOptions extends ExtrusionSamplingOptions {
|
|
517
|
-
/** Positive extrusion height in millimetres. */
|
|
518
|
-
readonly height: number;
|
|
519
|
-
/** Center the extrusion on Z; otherwise its bottom is at zero. Defaults to false. */
|
|
520
|
-
readonly center?: boolean;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
381
|
/** Native +Z extrusion with optional inward end treatments. */
|
|
524
382
|
export declare interface ExtrudeOptions extends ExtrudeMeshOptions {
|
|
525
|
-
/** Independent inward
|
|
383
|
+
/** Independent inward treatments on every material rim. Twisted extrusions admit chamfers with cap and normal-section wall setbacks; other treatments require zero twist. Enabled treatments require unit scale and preserve boundary topology. The base slices grid is retained, with additional treatment/refinement rings where necessary. */
|
|
526
384
|
readonly ends?: EndTreatments;
|
|
527
385
|
}
|
|
528
386
|
|
|
529
|
-
/** Shared sampling controls for a twisted or scaled linear extrusion. */
|
|
530
|
-
export declare interface ExtrusionSamplingOptions {
|
|
531
|
-
/** Exact number of intermediate profiles, nonnegative; overrides physical sampling. */
|
|
532
|
-
readonly divisions?: number;
|
|
533
|
-
/** Explicit output and sampling allocation ceilings. */
|
|
534
|
-
readonly limits?: Partial<ModelingLimits>;
|
|
535
|
-
/** Operation-level physical policy over the nearest model scope. */
|
|
536
|
-
readonly resolution?: GeometryResolution;
|
|
537
|
-
/** Finite uniform or XY scale of the top profile; defaults to one. */
|
|
538
|
-
readonly scaleTop?: number | Vector2Input;
|
|
539
|
-
/** Finite rotation of the top profile about +Z, in degrees; defaults to zero. */
|
|
540
|
-
readonly twist?: number;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
/** A right-handed orthonormal coordinate frame expressed in world coordinates. */
|
|
544
|
-
export declare interface Frame3 {
|
|
545
|
-
/** World-space origin of the local frame. */
|
|
546
|
-
readonly origin: Vector3Data;
|
|
547
|
-
/** Unit vector defining the local +X axis. */
|
|
548
|
-
readonly xAxis: Vector3Data;
|
|
549
|
-
/** Unit vector defining the local +Y axis. */
|
|
550
|
-
readonly yAxis: Vector3Data;
|
|
551
|
-
/** Unit vector defining the local +Z axis. */
|
|
552
|
-
readonly zAxis: Vector3Data;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
387
|
/**
|
|
556
388
|
* Defines a typed model without executing it. Parameters are an object map of capturable data;
|
|
557
389
|
* runtime capture rejects arrays at the root, ordinary class instances, mutable buffers, and functions.
|
|
558
|
-
* Supply live capabilities through services. Use `
|
|
390
|
+
* Supply live capabilities through services. Use `memo` only for work worth reusing.
|
|
391
|
+
*
|
|
392
|
+
* @param callback - Synchronous callback returning one part or a readonly part array.
|
|
559
393
|
*
|
|
560
394
|
* @example A simple model
|
|
561
395
|
* ```ts
|
|
@@ -577,7 +411,7 @@ export declare type GenerateCallback<
|
|
|
577
411
|
context: GenerateContext<P, S>,
|
|
578
412
|
) => PartDeclaration | readonly PartDeclaration[];
|
|
579
413
|
|
|
580
|
-
/**
|
|
414
|
+
/** Synchronous authoring context with immutable parameters and host-prepared services. */
|
|
581
415
|
export declare interface GenerateContext<
|
|
582
416
|
P extends object,
|
|
583
417
|
S = Record<never, never>,
|
|
@@ -586,20 +420,16 @@ export declare interface GenerateContext<
|
|
|
586
420
|
readonly params: ImmutableValue<P>;
|
|
587
421
|
/** Host-prepared readonly synchronous capabilities, fixed for the session. */
|
|
588
422
|
readonly services: Readonly<S>;
|
|
589
|
-
/**
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
readonly
|
|
595
|
-
id: string,
|
|
596
|
-
callback: () => T,
|
|
597
|
-
dependencies?: readonly unknown[],
|
|
598
|
-
) => Computed<T>;
|
|
423
|
+
/** Effective immutable sampling defaults, fixed for this session; pass explicitly to pure geometry operations. */
|
|
424
|
+
readonly resolution: Readonly<ResolvedGeometryResolution>;
|
|
425
|
+
/** Effective immutable resource limits after host ceilings and session overrides are applied. */
|
|
426
|
+
readonly limits: Readonly<ModelingLimits>;
|
|
427
|
+
/** Reuses a pure synchronous function; pass changing inputs as arguments and keep helpers stable. */
|
|
428
|
+
readonly memo: Memo;
|
|
599
429
|
/** Declares a semantic part with identity placement, or explicit placement and appearance. */
|
|
600
430
|
readonly part: (
|
|
601
431
|
id: string,
|
|
602
|
-
input:
|
|
432
|
+
input: PartGeometry | PartOptions,
|
|
603
433
|
) => PartDeclaration;
|
|
604
434
|
/** Immediately aborts on false; geometry observations in the condition run first.
|
|
605
435
|
* This diagnostic helper does not narrow TypeScript types; use an explicit conditional guard when needed.
|
|
@@ -624,7 +454,7 @@ export declare interface GenerationDiagnostic {
|
|
|
624
454
|
readonly path?: readonly (string | number)[] | undefined;
|
|
625
455
|
}
|
|
626
456
|
|
|
627
|
-
/** A user-correctable assertion failure. Successful
|
|
457
|
+
/** A user-correctable assertion failure. Successful memo caches never retain failures. */
|
|
628
458
|
export declare class GenerationError extends Error {
|
|
629
459
|
/** Issues reached in normal JavaScript order, ending with the first failed assertion. */
|
|
630
460
|
readonly diagnostics: readonly GenerationDiagnostic[];
|
|
@@ -632,101 +462,11 @@ export declare class GenerationError extends Error {
|
|
|
632
462
|
constructor(diagnostics: readonly GenerationDiagnostic[]);
|
|
633
463
|
}
|
|
634
464
|
|
|
635
|
-
/**
|
|
636
|
-
* Error raised when a geometry precondition or invariant is not satisfied.
|
|
637
|
-
*
|
|
638
|
-
* Callers may use `code` for coarse recovery decisions. Human-facing details
|
|
639
|
-
* remain in `message`; messages are descriptive but are not a stable API.
|
|
640
|
-
*
|
|
641
|
-
* @example
|
|
642
|
-
* ```ts
|
|
643
|
-
* const error = new GeometryError("INVALID_ARGUMENT", "Radius must be positive.", {
|
|
644
|
-
* operation: "example",
|
|
645
|
-
* details: { radius: 0 },
|
|
646
|
-
* });
|
|
647
|
-
* ```
|
|
648
|
-
*/
|
|
649
|
-
export declare class GeometryError extends Error {
|
|
650
|
-
/** Machine-readable failure category. */
|
|
651
|
-
readonly code: GeometryErrorCode;
|
|
652
|
-
/** Operation and scalar facts associated with the failure. */
|
|
653
|
-
readonly context: GeometryErrorContext;
|
|
654
|
-
/**
|
|
655
|
-
* Creates a geometry error with a stable category, operation, and descriptive message.
|
|
656
|
-
*
|
|
657
|
-
* @param code - Machine-readable failure category.
|
|
658
|
-
* @param message - Human-readable diagnostic message.
|
|
659
|
-
* @param context - Operation and optional scalar facts. Defaults to `{ operation: "geometry" }`.
|
|
660
|
-
*/
|
|
661
|
-
constructor(
|
|
662
|
-
code: GeometryErrorCode,
|
|
663
|
-
message: string,
|
|
664
|
-
context?: GeometryErrorContext,
|
|
665
|
-
);
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
/** Stable categories for invalid inputs, topology, allocation, and runtime failures. */
|
|
669
|
-
export declare type GeometryErrorCode =
|
|
670
|
-
| "COMPLEXITY_LIMIT"
|
|
671
|
-
| "DEGENERATE_GEOMETRY"
|
|
672
|
-
| "INVALID_ARGUMENT"
|
|
673
|
-
| "INVALID_MESH"
|
|
674
|
-
| "INVALID_TOPOLOGY"
|
|
675
|
-
| "INVALID_TOLERANCE"
|
|
676
|
-
| "NON_FINITE_VALUE"
|
|
677
|
-
| "SELF_INTERSECTION"
|
|
678
|
-
| "SINGULAR_TRANSFORM"
|
|
679
|
-
| "UNSUPPORTED_RUNTIME";
|
|
680
|
-
|
|
681
|
-
/** Serializable context attached to a geometry failure. */
|
|
682
|
-
export declare interface GeometryErrorContext {
|
|
683
|
-
/** Optional scalar facts useful for diagnostics without parsing the message. */
|
|
684
|
-
readonly details?: Readonly<Record<string, boolean | number | string>>;
|
|
685
|
-
/** Stable operation name, such as `normalizeContour` or `extrude`. */
|
|
686
|
-
readonly operation: string;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* Tessellation policy for sampled geometry measured in millimetres.
|
|
691
|
-
*/
|
|
692
|
-
export declare interface GeometryResolution {
|
|
693
|
-
/** Optional exact full-circle segment count, of at least three, bounded by the selected circular ceiling. */
|
|
694
|
-
readonly circularSegments?: number;
|
|
695
|
-
/** Maximum radial chord error in millimetres; defaults to 0.05. */
|
|
696
|
-
readonly maxChordError?: number;
|
|
697
|
-
/** Optional maximum sampled edge length in millimetres. */
|
|
698
|
-
readonly maxSegmentLength?: number;
|
|
699
|
-
/** Upper safety bound for a full circle; defaults to the selected maxCircularSegments (512 by default). */
|
|
700
|
-
readonly maxSegments?: number;
|
|
701
|
-
/** Lower full-circle segment count; defaults to 16 or a lower selected circular ceiling. */
|
|
702
|
-
readonly minSegments?: number;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
/** Explicit allocation ceilings for pure sampling and host-owned modeling operations. */
|
|
706
|
-
export declare interface GeometrySamplingLimits {
|
|
707
|
-
/** Maximum points in one sampled path or placement/frame result. */
|
|
708
|
-
readonly maxPathPoints: number;
|
|
709
|
-
/** Maximum aggregate points in one sampled profile or Section. */
|
|
710
|
-
readonly maxProfilePoints: number;
|
|
711
|
-
/** Maximum points in one profile swept along a path. */
|
|
712
|
-
readonly maxSweepProfilePoints: number;
|
|
713
|
-
/** Maximum segments around one complete circle. */
|
|
714
|
-
readonly maxCircularSegments: number;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
/** Optional overrides for MetaMesh's geometry comparison policy. */
|
|
718
|
-
export declare interface GeometryToleranceOptions {
|
|
719
|
-
/** Absolute distance floor in model units. Must be finite and greater than zero. */
|
|
720
|
-
readonly absolute?: number;
|
|
721
|
-
/** Angular comparison threshold in radians. Must be finite and greater than zero. */
|
|
722
|
-
readonly angular?: number;
|
|
723
|
-
/** Dimensionless scale multiplier. Must be finite and non-negative. */
|
|
724
|
-
readonly relative?: number;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
465
|
/**
|
|
728
466
|
* XY or XYZ copies, optionally centered or placed in an explicit frame.
|
|
729
467
|
*
|
|
468
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
469
|
+
*
|
|
730
470
|
* @example Centered XY grid
|
|
731
471
|
* ```ts
|
|
732
472
|
* gridPattern(box({ size: 4 }), { count: [3, 2], spacing: [10, 10], center: true });
|
|
@@ -737,38 +477,16 @@ export declare function gridPattern(
|
|
|
737
477
|
options: GridPatternOptions,
|
|
738
478
|
): readonly Solid[];
|
|
739
479
|
|
|
740
|
-
/**
|
|
480
|
+
/**
|
|
481
|
+
* Repeats a filled Section on an XY grid; any explicit frame must preserve the XY plane.
|
|
482
|
+
*
|
|
483
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
484
|
+
*/
|
|
741
485
|
export declare function gridPattern(
|
|
742
486
|
source: PatternSource<Section>,
|
|
743
487
|
options: GridPatternOptions<2>,
|
|
744
488
|
): readonly Section[];
|
|
745
489
|
|
|
746
|
-
/**
|
|
747
|
-
* XY or XYZ grid with X varying fastest. The first item starts at the local origin.
|
|
748
|
-
* Dimension 2 restricts counts and spacing to XY; any frame must preserve the XY plane.
|
|
749
|
-
*/
|
|
750
|
-
export declare type GridPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
751
|
-
/** Center the complete distribution around its local origin; defaults to false. */
|
|
752
|
-
readonly center?: boolean;
|
|
753
|
-
/** Optional right-handed local axes and origin for the grid. */
|
|
754
|
-
readonly frame?: Frame3;
|
|
755
|
-
} & (
|
|
756
|
-
| {
|
|
757
|
-
/** Positive integer counts on X and Y. */
|
|
758
|
-
readonly count: Vector2Data;
|
|
759
|
-
/** Signed millimetres between adjacent copies on X and Y. */
|
|
760
|
-
readonly spacing: Vector2Data;
|
|
761
|
-
}
|
|
762
|
-
| (Dimension extends 3
|
|
763
|
-
? {
|
|
764
|
-
/** Positive integer counts on X, Y and Z. */
|
|
765
|
-
readonly count: Vector3Data;
|
|
766
|
-
/** Signed millimetres between adjacent copies on X, Y and Z. */
|
|
767
|
-
readonly spacing: Vector3Data;
|
|
768
|
-
}
|
|
769
|
-
: never)
|
|
770
|
-
);
|
|
771
|
-
|
|
772
490
|
/**
|
|
773
491
|
* Closed rectilinear top above a flat base, with uniform or explicit XY coordinates.
|
|
774
492
|
*
|
|
@@ -838,40 +556,58 @@ export declare type HeightfieldOptions = {
|
|
|
838
556
|
);
|
|
839
557
|
|
|
840
558
|
/**
|
|
841
|
-
* Declares a +Z hole or blind-pocket cutter with
|
|
559
|
+
* Declares a +Z hole or blind-pocket cutter with independent opening treatments.
|
|
842
560
|
*
|
|
843
561
|
* @remarks
|
|
844
|
-
* Choose exactly one circular diameter or existing Section.
|
|
845
|
-
*
|
|
846
|
-
*
|
|
847
|
-
*
|
|
848
|
-
*
|
|
562
|
+
* Choose exactly one circular diameter or existing Section. Finished profiles require one
|
|
563
|
+
* strictly convex contour without holes; plain profiles may have any topology. Opening treatments
|
|
564
|
+
* widen the mouth while retaining a positive nominal throat. Circular openings also admit
|
|
565
|
+
* counterbores and countersinks. An omitted opening leaves that end unchanged.
|
|
566
|
+
* Overrun extends each terminal cross section outside Z=0..height; both ends default to zero,
|
|
567
|
+
* preserving blind-pocket floors. It is independent of manufacturing clearance.
|
|
849
568
|
* Existing Section samples are authoritative; limits and unspecified circular sampling belong
|
|
850
569
|
* to the evaluating host.
|
|
851
570
|
*
|
|
852
|
-
* @example
|
|
571
|
+
* @example Amber cutter · Blue blind hex pocket
|
|
853
572
|
* ```ts
|
|
854
|
-
* holeCutter
|
|
855
|
-
*
|
|
856
|
-
*
|
|
573
|
+
* import { box, generate, holeCutter, regularPolygon } from "@metamesh/modeling";
|
|
574
|
+
* import { transform3 } from "@metamesh/modeling/geometry";
|
|
575
|
+
*
|
|
576
|
+
* const cutter = holeCutter({
|
|
577
|
+
* profile: regularPolygon({ sides: 6, radius: 5, sizing: "face", rotation: 30 }),
|
|
578
|
+
* height: 5,
|
|
579
|
+
* openings: { top: { kind: "chamfer", distance: 1.5 } },
|
|
580
|
+
* overrun: { top: 0.05 },
|
|
857
581
|
* });
|
|
582
|
+
* // A 3 mm floor remains beneath the pocket. Display the cutter separately on the left.
|
|
583
|
+
* const stock = box({ size: [22, 20, 8] }).translate([0, 0, 4]);
|
|
584
|
+
* const result = stock.subtract(cutter.translate([0, 0, 3]));
|
|
585
|
+
* export default generate(({ part }) => [
|
|
586
|
+
* part("cutter", { geometry: cutter, color: "#f6ad55", transform: transform3().translate([-12, -12, 0]) }),
|
|
587
|
+
* part("result", { geometry: result, color: "#4f83a6", transform: transform3().translate([12, 12, 0]) }),
|
|
588
|
+
* ]);
|
|
858
589
|
* ```
|
|
859
590
|
*/
|
|
860
591
|
export declare function holeCutter(options: HoleCutterOptions): Solid;
|
|
861
592
|
|
|
593
|
+
/**
|
|
594
|
+
* A finished circular opening: outward edge treatment or screw seat, one per end.
|
|
595
|
+
* Treatment setbacks measure radial expansion first and axial depth second. A round radius is
|
|
596
|
+
* circular in that radial/axial section. Profile points run from [mouth expansion, 0] to [0, depth].
|
|
597
|
+
*/
|
|
598
|
+
export declare type HoleCutterOpening = EdgeTreatment | HoleCutterRecess;
|
|
599
|
+
|
|
862
600
|
/**
|
|
863
601
|
* A deferred +Z hole or pocket cutter, with exactly one circular diameter or existing Section.
|
|
864
|
-
*
|
|
865
|
-
*
|
|
866
|
-
*
|
|
602
|
+
* Openings widen nominal ends without changing the untreated bore. Both depths together must
|
|
603
|
+
* leave a positive untreated interval. Overrun extends the terminal mouth unchanged; omitted
|
|
604
|
+
* ends and overrun preserve blind-pocket floors. No support surface or printer fit is inferred.
|
|
867
605
|
*/
|
|
868
606
|
export declare type HoleCutterOptions = {
|
|
869
|
-
/** Positive nominal depth along +Z, starting exactly at Z=0. */
|
|
607
|
+
/** Positive nominal depth in millimetres along +Z, starting exactly at Z=0. */
|
|
870
608
|
readonly height: number;
|
|
871
|
-
/** Opening carrying the recess or entry chamfer; defaults to top. */
|
|
872
|
-
readonly face?: "bottom" | "top";
|
|
873
609
|
/** Extra length outside each nominal face; both ends default to zero. */
|
|
874
|
-
readonly overrun?:
|
|
610
|
+
readonly overrun?: CutterOverrun;
|
|
875
611
|
/** Operation-level physical sampling; an existing Section retains its sampled boundary. */
|
|
876
612
|
readonly resolution?: GeometryResolution;
|
|
877
613
|
/** Local allocation ceilings may only lower the evaluating host's limits. */
|
|
@@ -883,44 +619,36 @@ export declare type HoleCutterOptions = {
|
|
|
883
619
|
readonly diameter: number;
|
|
884
620
|
/** Unavailable in this input form. */
|
|
885
621
|
readonly profile?: never;
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
/** Circular head seating; mutually exclusive with entryChamfer. */
|
|
895
|
-
readonly recess: HoleCutterRecess;
|
|
896
|
-
/** Unavailable in this input form. */
|
|
897
|
-
readonly entryChamfer?: never;
|
|
898
|
-
}
|
|
899
|
-
))
|
|
622
|
+
/** Independent nominal mouths at Z=0 and Z=height; omitted ends remain plain. */
|
|
623
|
+
readonly openings?: {
|
|
624
|
+
/** Opening at Z=0, expanding outward while its treatment reaches toward +Z. */
|
|
625
|
+
readonly bottom?: HoleCutterOpening;
|
|
626
|
+
/** Opening at Z=height, expanding outward while its treatment reaches toward -Z. */
|
|
627
|
+
readonly top?: HoleCutterOpening;
|
|
628
|
+
};
|
|
629
|
+
})
|
|
900
630
|
| {
|
|
901
631
|
/** Local XY material to remove, retaining its position, orientation and physical sampling. */
|
|
902
632
|
readonly profile: Section;
|
|
903
633
|
/** Unavailable in this input form. */
|
|
904
634
|
readonly diameter?: never;
|
|
905
635
|
/** Unavailable in this input form. */
|
|
906
|
-
readonly recess?: never;
|
|
907
|
-
/** Unavailable in this input form. */
|
|
908
636
|
readonly segments?: never;
|
|
909
637
|
/** Unavailable in this input form. */
|
|
910
638
|
readonly sizing?: never;
|
|
911
|
-
/**
|
|
912
|
-
|
|
639
|
+
/**
|
|
640
|
+
* Parallel-edge opening offsets on one strictly convex contour without holes.
|
|
641
|
+
* Plain or zero-treated profiles accept any Section topology. Existing samples remain authoritative.
|
|
642
|
+
*/
|
|
643
|
+
readonly openings?: {
|
|
644
|
+
/** Opening at Z=0; first setback expands the contour and second reaches toward +Z. */
|
|
645
|
+
readonly bottom?: EdgeTreatment;
|
|
646
|
+
/** Opening at Z=height; first setback expands the contour and second reaches toward -Z. */
|
|
647
|
+
readonly top?: EdgeTreatment;
|
|
648
|
+
};
|
|
913
649
|
}
|
|
914
650
|
);
|
|
915
651
|
|
|
916
|
-
/** Explicit extra cutter length outside the nominal Z=0..height interval, in millimetres. */
|
|
917
|
-
export declare interface HoleCutterOverrun {
|
|
918
|
-
/** Extension below Z=0. Omitted means zero, preserving a blind pocket's floor. */
|
|
919
|
-
readonly bottom?: number;
|
|
920
|
-
/** Extension above Z=height. Omitted means zero. */
|
|
921
|
-
readonly top?: number;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
652
|
/** Circular screw seating dimensions in millimetres; allowances belong to the caller. */
|
|
925
653
|
export declare type HoleCutterRecess =
|
|
926
654
|
| {
|
|
@@ -928,7 +656,7 @@ export declare type HoleCutterRecess =
|
|
|
928
656
|
readonly kind: "counterbore";
|
|
929
657
|
/** Positive seat diameter greater than the bore, in millimetres. */
|
|
930
658
|
readonly diameter: number;
|
|
931
|
-
/** Positive seat depth
|
|
659
|
+
/** Positive seat depth in millimetres; both openings must leave an untreated bore interval. */
|
|
932
660
|
readonly depth: number;
|
|
933
661
|
}
|
|
934
662
|
| {
|
|
@@ -936,7 +664,7 @@ export declare type HoleCutterRecess =
|
|
|
936
664
|
readonly kind: "countersink";
|
|
937
665
|
/** Positive mouth diameter greater than the bore, in millimetres. */
|
|
938
666
|
readonly diameter: number;
|
|
939
|
-
/** Full included angle strictly between zero and 180 degrees; derived depth must fit
|
|
667
|
+
/** Full included angle strictly between zero and 180 degrees; derived depth must fit. */
|
|
940
668
|
readonly includedAngle: number;
|
|
941
669
|
};
|
|
942
670
|
|
|
@@ -970,22 +698,7 @@ export declare type HullOptions =
|
|
|
970
698
|
readonly points?: never;
|
|
971
699
|
};
|
|
972
700
|
|
|
973
|
-
|
|
974
|
-
* Copies numeric data once into private storage. This pure helper needs no active generation.
|
|
975
|
-
* @example
|
|
976
|
-
* ```ts
|
|
977
|
-
* import { immutableBuffer } from "@metamesh/modeling";
|
|
978
|
-
* const heights = immutableBuffer(new Float32Array([2, 4, 6]));
|
|
979
|
-
* const count = heights.length;
|
|
980
|
-
* const first = heights.at(0);
|
|
981
|
-
* const doubled = Array.from(heights, (height) => height * 2);
|
|
982
|
-
* const editable = heights.copy();
|
|
983
|
-
* editable[0] = 8; // heights still contains 2, 4, 6.
|
|
984
|
-
* ```
|
|
985
|
-
*/
|
|
986
|
-
export declare function immutableBuffer<T extends NumericArray>(
|
|
987
|
-
source: T,
|
|
988
|
-
): ImmutableBuffer<T>;
|
|
701
|
+
declare const immutableBufferBrand: unique symbol;
|
|
989
702
|
|
|
990
703
|
/**
|
|
991
704
|
* Deeply readonly view of captured generation data, including nested arrays and tuples.
|
|
@@ -1008,7 +721,7 @@ export declare function implicit(options: ImplicitOptions): Solid;
|
|
|
1008
721
|
|
|
1009
722
|
/** Positive-inside sampling, bounded to 4M native BCC grid slots and 8M field calls. */
|
|
1010
723
|
export declare interface ImplicitOptions {
|
|
1011
|
-
/** Positive-inside scalar field evaluated at finite XYZ points. */
|
|
724
|
+
/** Positive-inside scalar field evaluated at finite XYZ points in millimetres. */
|
|
1012
725
|
readonly field: (point: Vector3Data) => number;
|
|
1013
726
|
/** Axis-aligned XYZ bounds in millimetres. */
|
|
1014
727
|
readonly bounds: Bounds3Data;
|
|
@@ -1023,32 +736,33 @@ export declare interface ImplicitOptions {
|
|
|
1023
736
|
/**
|
|
1024
737
|
* Compensated internal threaded cutter.
|
|
1025
738
|
*
|
|
1026
|
-
* @example
|
|
739
|
+
* @example Amber thread cutter · Blue cutaway result
|
|
1027
740
|
* ```ts
|
|
1028
|
-
* import { cylinder, internalThreadCutter } from "@metamesh/modeling";
|
|
1029
|
-
* import {
|
|
741
|
+
* import { box, cylinder, generate, internalThreadCutter } from "@metamesh/modeling";
|
|
742
|
+
* import { transform3 } from "@metamesh/modeling/geometry";
|
|
743
|
+
* import { threadProfile } from "@metamesh/modeling/geometry/mechanical";
|
|
744
|
+
*
|
|
1030
745
|
* const profile = threadProfile({ kind: "triangular", pitch: 1.75 });
|
|
1031
746
|
* const body = cylinder({ diameter: 20, height: 12, center: false });
|
|
1032
747
|
* const cutter = internalThreadCutter({ nominalMajorDiameter: 12, length: 12, profile });
|
|
1033
|
-
*
|
|
748
|
+
* // Remove the front quarter of the stock to expose the actual internal thread.
|
|
749
|
+
* const cutaway = box({ size: [11, 11, 14], center: false }).translate([0, -11, -1]);
|
|
750
|
+
* const result = body.subtract([cutter, cutaway]);
|
|
751
|
+
* export default generate(({ part }) => [
|
|
752
|
+
* part("cutter", { geometry: cutter, color: "#f6ad55", transform: transform3().translate([-12, -12, 0]) }),
|
|
753
|
+
* part("result", { geometry: result, color: "#4f83a6", transform: transform3().translate([12, 12, 0]) }),
|
|
754
|
+
* ]);
|
|
1034
755
|
* ```
|
|
1035
756
|
*/
|
|
1036
757
|
export declare function internalThreadCutter(
|
|
1037
|
-
options:
|
|
758
|
+
options: InternalThreadCutterSolidOptions,
|
|
1038
759
|
): Solid;
|
|
1039
760
|
|
|
1040
|
-
/** Options for a compensated internal-thread subtraction tool along +Z. */
|
|
1041
|
-
export declare interface InternalThreadCutterOptions
|
|
1042
|
-
extends Omit<ThreadRidgeOptions, "majorDiameter">, ThreadBevelOptions {
|
|
1043
|
-
/** Printable fit or caller-calibrated allowances. Default: `normal`. */
|
|
1044
|
-
readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
|
|
1045
|
-
/** Nominal major diameter before female compensation and faceting correction. */
|
|
1046
|
-
readonly nominalMajorDiameter: number;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
761
|
/**
|
|
1050
762
|
* Robust intersection of one or more shapes; empty input rejects during declaration.
|
|
1051
763
|
*
|
|
764
|
+
* @param solids - Operands in shared modeling coordinates.
|
|
765
|
+
*
|
|
1052
766
|
* @example Intersect
|
|
1053
767
|
* ```ts
|
|
1054
768
|
* intersect([box({ size: 20 }), sphere({ radius: 12 })]);
|
|
@@ -1056,16 +770,65 @@ export declare interface InternalThreadCutterOptions
|
|
|
1056
770
|
*/
|
|
1057
771
|
export declare function intersect(solids: readonly Solid[]): Solid;
|
|
1058
772
|
|
|
1059
|
-
/**
|
|
773
|
+
/**
|
|
774
|
+
* Filled Section intersection; dimensions cannot be mixed.
|
|
775
|
+
*
|
|
776
|
+
* @param sections - Operands in shared XY coordinates.
|
|
777
|
+
*/
|
|
1060
778
|
export declare function intersect(sections: readonly Section[]): Section;
|
|
1061
779
|
|
|
1062
780
|
/**
|
|
1063
|
-
*
|
|
781
|
+
* Fuses two positioned solids with a dimensioned transition at the feature's source datum.
|
|
782
|
+
*
|
|
783
|
+
* Requires a local straight feature collar and a continuous support patch single-valued along
|
|
784
|
+
* that collar's axis. Angled and curved sampled supports are admitted when those proofs hold.
|
|
785
|
+
* Width is a parallel-edge offset; height is axial rise above local contact, both in millimetres.
|
|
786
|
+
* The default smooth profile matches tangents; kind "straight" gives a linear bevel profile.
|
|
787
|
+
* Neither operand moves, loses material, or changes sampling. The result has no inherited anchors.
|
|
788
|
+
* This operation promises neither a circular radius, a constant bevel angle, nor global curvature continuity.
|
|
1064
789
|
*
|
|
1065
|
-
*
|
|
1066
|
-
*
|
|
790
|
+
* @param base - Support solid in shared modeling coordinates.
|
|
791
|
+
* @param feature - Positioned feature that owns the source datum.
|
|
792
|
+
*
|
|
793
|
+
* @example Join a mounting boss
|
|
794
|
+
* ```ts
|
|
795
|
+
* const base = box({ size: [50, 40, 6] });
|
|
796
|
+
* const feature = cylinder({ diameter: 12, height: 14, center: false }).translate([0, 0, 2]);
|
|
797
|
+
* base.join(feature, { source: "bottom", transition: { width: 2, height: 3 } });
|
|
798
|
+
* ```
|
|
1067
799
|
*/
|
|
1068
|
-
export declare function
|
|
800
|
+
export declare function join(
|
|
801
|
+
base: Solid,
|
|
802
|
+
feature: Solid,
|
|
803
|
+
options: JoinOptions,
|
|
804
|
+
): Solid;
|
|
805
|
+
|
|
806
|
+
/** Options for joining two positioned solids through a validated local straight feature collar. */
|
|
807
|
+
export declare interface JoinOptions {
|
|
808
|
+
/**
|
|
809
|
+
* Outward feature-root datum, pointing toward the base. Names resolve lazily on the feature;
|
|
810
|
+
* explicit anchors use the operands' shared modeling coordinates. The collar grows opposite
|
|
811
|
+
* this direction, with its roll fixed by the anchor's up vector. Every collar section cut
|
|
812
|
+
* by the source plane participates, including disconnected roots.
|
|
813
|
+
*/
|
|
814
|
+
readonly source: string | Anchor3;
|
|
815
|
+
/** Both dimensions must be positive, or both zero to validate contact and fuse without a blend. */
|
|
816
|
+
readonly transition: JoinTransition;
|
|
817
|
+
/** Physical connection sampling. Input solids retain their own captured sampling. */
|
|
818
|
+
readonly resolution?: GeometryResolution;
|
|
819
|
+
/** Local allocation ceilings may only lower the evaluating host's limits. */
|
|
820
|
+
readonly limits?: Partial<ModelingLimits>;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/** Connection profile and setbacks, independent of feature construction. */
|
|
824
|
+
export declare interface JoinTransition {
|
|
825
|
+
/** Tangent-matching cubic or linear profile. Defaults to "smooth"; neither specifies a radius. */
|
|
826
|
+
readonly kind?: "smooth" | "straight";
|
|
827
|
+
/** Nonnegative parallel-edge normal offset in millimetres perpendicular to the feature collar axis. */
|
|
828
|
+
readonly width: number;
|
|
829
|
+
/** Nonnegative axial rise in millimetres above the local support contact. */
|
|
830
|
+
readonly height: number;
|
|
831
|
+
}
|
|
1069
832
|
|
|
1070
833
|
/** Portable local geometry; consumers own plates, holes, part declarations, and final placement. */
|
|
1071
834
|
export declare interface KnuckleHinge {
|
|
@@ -1087,7 +850,6 @@ export declare interface KnuckleHinge {
|
|
|
1087
850
|
* Each half's `chamfer` bevels its barrel outer rims and all web edges. Consumers own plates, screw holes,
|
|
1088
851
|
* pin retention, fit policy, and part placement. Added mounting material must preserve the bores.
|
|
1089
852
|
* No opening range or collision freedom is implied for arbitrary caller attachments.
|
|
1090
|
-
* Compiled Generator packages using this operation require runtime 10.0.0 or newer in major 10.
|
|
1091
853
|
*
|
|
1092
854
|
* @example Integral-pin hinge with two mounting webs
|
|
1093
855
|
* ```ts
|
|
@@ -1103,22 +865,6 @@ export declare function knuckleHinge(
|
|
|
1103
865
|
options: KnuckleHingeOptions,
|
|
1104
866
|
): KnuckleHinge;
|
|
1105
867
|
|
|
1106
|
-
/** Shared knuckle-joint dimensions in millimetres, independent of mounting geometry. */
|
|
1107
|
-
export declare interface KnuckleHingeBaseSpec {
|
|
1108
|
-
/** Total extent along the +X pin axis, centered at the origin. */
|
|
1109
|
-
readonly length: number;
|
|
1110
|
-
/** Number of equal alternating intervals, starting with half A. */
|
|
1111
|
-
readonly knuckleCount: number;
|
|
1112
|
-
/** Outside vertex-sized barrel diameter. */
|
|
1113
|
-
readonly barrelDiameter: number;
|
|
1114
|
-
/** Vertex-sized shaft diameter, including an externally supplied shaft. */
|
|
1115
|
-
readonly pinDiameter: number;
|
|
1116
|
-
/** Nonnegative per-side radial allowance; bores circumscribe this running envelope. */
|
|
1117
|
-
readonly radialClearance: number;
|
|
1118
|
-
/** Nonnegative total air gap between each neighboring pair of knuckle ends. */
|
|
1119
|
-
readonly axialGap: number;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
868
|
/** Optional mounting and edge treatment for one knuckle owner. */
|
|
1123
869
|
export declare interface KnuckleHingeHalfOptions {
|
|
1124
870
|
/** Omit for barrels only. Each interval receives one web; disconnected intervals need caller geometry. */
|
|
@@ -1142,41 +888,6 @@ export declare type KnuckleHingeOptions = KnuckleHingeSpec &
|
|
|
1142
888
|
readonly halfB?: KnuckleHingeHalfOptions;
|
|
1143
889
|
};
|
|
1144
890
|
|
|
1145
|
-
/** Shared circular sampling for barrels, shafts, and bores. */
|
|
1146
|
-
export declare interface KnuckleHingeSamplingOptions {
|
|
1147
|
-
/** Exact full-circle count, divisible by four and at least four; overrides adaptive sampling. */
|
|
1148
|
-
readonly segments?: number;
|
|
1149
|
-
/** Physical tessellation policy. Exact circular counts must also be divisible by four. */
|
|
1150
|
-
readonly resolution?: GeometryResolution;
|
|
1151
|
-
/** Explicit allocation ceilings; defaults to the pure geometry sampling limits. */
|
|
1152
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
/**
|
|
1156
|
-
* Knuckle-joint construction modes and interval ownership.
|
|
1157
|
-
*
|
|
1158
|
-
* Print-in-place requires an odd count of at least three: A owns both
|
|
1159
|
-
* end anchors and the entire shaft. Inserted-pin bores both halves and supplies no shaft.
|
|
1160
|
-
* Lift-off requires exactly two intervals; A's integral pin enters B without a far anchor.
|
|
1161
|
-
*/
|
|
1162
|
-
export declare type KnuckleHingeSpec = KnuckleHingeBaseSpec &
|
|
1163
|
-
(
|
|
1164
|
-
| {
|
|
1165
|
-
/** Captive integral shaft or bores for an externally supplied pin. */
|
|
1166
|
-
readonly mode: "print-in-place" | "inserted-pin";
|
|
1167
|
-
/** Engagement applies only to lift-off construction. */
|
|
1168
|
-
readonly pinEngagement?: never;
|
|
1169
|
-
}
|
|
1170
|
-
| {
|
|
1171
|
-
/** Detachable socket on a finite integral pin. */
|
|
1172
|
-
readonly mode: "lift-off";
|
|
1173
|
-
/** Lift-off has one fixed interval and one removable interval. */
|
|
1174
|
-
readonly knuckleCount: 2;
|
|
1175
|
-
/** Positive axial engagement into B, no greater than its knuckle length. */
|
|
1176
|
-
readonly pinEngagement: number;
|
|
1177
|
-
}
|
|
1178
|
-
);
|
|
1179
|
-
|
|
1180
891
|
/** Rectangular connection from the axis into a caller-owned mounting body, in millimetres. */
|
|
1181
892
|
export declare interface KnuckleHingeWeb {
|
|
1182
893
|
/** Direction from the pin axis; independently chosen for each half. */
|
|
@@ -1192,6 +903,8 @@ export declare interface KnuckleHingeWeb {
|
|
|
1192
903
|
/**
|
|
1193
904
|
* Repeats one solid along a normalized direction.
|
|
1194
905
|
*
|
|
906
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
907
|
+
*
|
|
1195
908
|
* @example Three copies along X
|
|
1196
909
|
* ```ts
|
|
1197
910
|
* linearPattern(box({ size: 4 }), { count: 3, spacing: 10 });
|
|
@@ -1202,50 +915,22 @@ export declare function linearPattern(
|
|
|
1202
915
|
options: LinearPatternOptions,
|
|
1203
916
|
): readonly Solid[];
|
|
1204
917
|
|
|
1205
|
-
/**
|
|
918
|
+
/**
|
|
919
|
+
* Repeats a filled Section along an XY direction, defaulting to +X.
|
|
920
|
+
*
|
|
921
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
922
|
+
*/
|
|
1206
923
|
export declare function linearPattern(
|
|
1207
924
|
source: PatternSource<Section>,
|
|
1208
925
|
options: LinearPatternOptions<2>,
|
|
1209
926
|
): readonly Section[];
|
|
1210
927
|
|
|
1211
928
|
/**
|
|
1212
|
-
*
|
|
1213
|
-
* Dimension defaults to 3; Section patterns use 2 and accept XY vector directions.
|
|
1214
|
-
*/
|
|
1215
|
-
export declare type LinearPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
1216
|
-
/** Direction of repetition; magnitude is ignored. Defaults to +X. */
|
|
1217
|
-
readonly direction?: Dimension extends 2 ? Vector2Input : Vector3Input;
|
|
1218
|
-
} & (
|
|
1219
|
-
| {
|
|
1220
|
-
/** Positive copy count, including the original. */
|
|
1221
|
-
readonly count: number;
|
|
1222
|
-
/** Signed nonzero millimetres between adjacent copies. */
|
|
1223
|
-
readonly spacing: number;
|
|
1224
|
-
/** Determined by count and spacing. */
|
|
1225
|
-
readonly length?: never;
|
|
1226
|
-
}
|
|
1227
|
-
| {
|
|
1228
|
-
/** Positive copy count, including the original. */
|
|
1229
|
-
readonly count: number;
|
|
1230
|
-
/** Signed millimetres from first to last copy; zero only for one copy. */
|
|
1231
|
-
readonly length: number;
|
|
1232
|
-
/** Determined by count and length. */
|
|
1233
|
-
readonly spacing?: never;
|
|
1234
|
-
}
|
|
1235
|
-
| {
|
|
1236
|
-
/** Signed nonzero millimetres between adjacent copies. */
|
|
1237
|
-
readonly spacing: number;
|
|
1238
|
-
/** Signed first-to-last millimetres; a nonnegative whole multiple of spacing. */
|
|
1239
|
-
readonly length: number;
|
|
1240
|
-
/** Determined by spacing and length. */
|
|
1241
|
-
readonly count?: never;
|
|
1242
|
-
}
|
|
1243
|
-
);
|
|
1244
|
-
|
|
1245
|
-
/**
|
|
1246
|
-
* Lofts Sections and point loops at z heights or frames. Known primitive landmarks are retained;
|
|
929
|
+
* Lofts Sections and point contours at z heights or affine transforms. Known primitive landmarks are retained;
|
|
1247
930
|
* other profiles default to direct correspondence, preserving their supplied seams.
|
|
1248
931
|
*
|
|
932
|
+
* @param stations - Ordered profiles at millimetre Z heights or affine placements.
|
|
933
|
+
*
|
|
1249
934
|
* @example Loft
|
|
1250
935
|
* ```ts
|
|
1251
936
|
* loft([
|
|
@@ -1259,7 +944,11 @@ export declare function loft(
|
|
|
1259
944
|
options?: LoftOptions,
|
|
1260
945
|
): Solid;
|
|
1261
946
|
|
|
1262
|
-
/**
|
|
947
|
+
/**
|
|
948
|
+
* Lofts explicit corresponding contours, including holes and collapsed logical slots.
|
|
949
|
+
*
|
|
950
|
+
* @param stations - Ordered profiles at millimetre Z heights or affine placements.
|
|
951
|
+
*/
|
|
1263
952
|
export declare function loft(
|
|
1264
953
|
stations: readonly CorrespondingProfileStation[],
|
|
1265
954
|
options?: LoftOptions,
|
|
@@ -1291,7 +980,7 @@ export declare interface LoftOptions {
|
|
|
1291
980
|
readonly distribution?: "perimeter" | "segments";
|
|
1292
981
|
/** Positive integer point-density multiplier, uniformly or per input profile. Original vertices are retained. Defaults to one. */
|
|
1293
982
|
readonly refine?: number | readonly number[];
|
|
1294
|
-
/**
|
|
983
|
+
/** Positive longitudinal interval count, uniformly or per supplied station gap. Each gap with n slices has n - 1 inserted profiles. Defaults to one; placed world vertices interpolate linearly. */
|
|
1295
984
|
readonly slices?: number | readonly number[];
|
|
1296
985
|
/** Physical curve policy for retained primitives, and maximum edge length for point data. Exact primitive curve counts take precedence. */
|
|
1297
986
|
readonly resolution?: GeometryResolution;
|
|
@@ -1299,63 +988,29 @@ export declare interface LoftOptions {
|
|
|
1299
988
|
readonly limits?: Partial<ModelingLimits>;
|
|
1300
989
|
}
|
|
1301
990
|
|
|
1302
|
-
/**
|
|
1303
|
-
* A horizontal XY station height, or an explicit right-handed spatial frame, never both.
|
|
1304
|
-
*/
|
|
1305
|
-
export declare type LoftPlacement =
|
|
1306
|
-
| {
|
|
1307
|
-
/** Horizontal XY station height in millimetres. */
|
|
1308
|
-
readonly z: number;
|
|
1309
|
-
/** Excluded when a horizontal height is supplied. */
|
|
1310
|
-
readonly frame?: never;
|
|
1311
|
-
}
|
|
1312
|
-
| {
|
|
1313
|
-
/** Right-handed orthonormal station frame in world coordinates. */
|
|
1314
|
-
readonly frame: Frame3;
|
|
1315
|
-
/** Excluded when an explicit spatial frame is supplied. */
|
|
1316
|
-
readonly z?: never;
|
|
1317
|
-
};
|
|
1318
|
-
|
|
1319
|
-
/**
|
|
1320
|
-
* A Section or point loop at an explicit height or frame.
|
|
1321
|
-
*/
|
|
991
|
+
/** A Section or point loop at a horizontal height or explicit affine transform. */
|
|
1322
992
|
export declare type LoftStation = LoftPlacement & {
|
|
1323
993
|
/** Filled Section recipe or ordered XY boundary point data. */
|
|
1324
994
|
readonly profile: Section | Path2Input;
|
|
1325
995
|
};
|
|
1326
996
|
|
|
1327
|
-
/**
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
readonly resolution?: GeometryResolution;
|
|
1340
|
-
/** Explicit per-profile and circular ceilings; the family also has a one-million-slot work bound. */
|
|
1341
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
997
|
+
/** Eagerly reuses pure synchronous functions by function identity and immutable arguments. */
|
|
998
|
+
export declare interface Memo {
|
|
999
|
+
/**
|
|
1000
|
+
* Invokes fn(...args) and returns captured immutable data. Stable helpers reuse work across runs.
|
|
1001
|
+
* Arguments compare with Object.is and must be deeply immutable; the exact current params or
|
|
1002
|
+
* generation context instead tracks parameter fields read by the function. Functions must be
|
|
1003
|
+
* pure: supply changing inputs explicitly, and do not read changing globals or ambient state.
|
|
1004
|
+
*/
|
|
1005
|
+
<Args extends readonly unknown[], Result>(
|
|
1006
|
+
fn: (...args: Args) => Result,
|
|
1007
|
+
...args: Args
|
|
1008
|
+
): ImmutableValue<Result>;
|
|
1342
1009
|
}
|
|
1343
1010
|
|
|
1344
|
-
/**
|
|
1011
|
+
/** Declares the three-dimensional Minkowski sum of two Solid recipes. */
|
|
1345
1012
|
export declare function minkowskiSum(a: Solid, b: Solid): Solid;
|
|
1346
1013
|
|
|
1347
|
-
/** Aggregate manufacturing output ceilings selected by a trusted host. */
|
|
1348
|
-
export declare interface ModelingLimits extends GeometrySamplingLimits {
|
|
1349
|
-
/** Maximum number of named finalized parts. */
|
|
1350
|
-
readonly maxParts: number;
|
|
1351
|
-
/** Maximum aggregate output vertex count. */
|
|
1352
|
-
readonly maxVertices: number;
|
|
1353
|
-
/** Maximum aggregate output triangle count. */
|
|
1354
|
-
readonly maxTriangles: number;
|
|
1355
|
-
/** Maximum unique transferable output backing-buffer bytes. */
|
|
1356
|
-
readonly maxBytes: number;
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
1014
|
/** Stateless portable program descriptor. Execution and caches belong to an engine session. */
|
|
1360
1015
|
export declare interface ModelProgram<
|
|
1361
1016
|
P extends object,
|
|
@@ -1378,144 +1033,22 @@ export declare type PartGeometry = Solid | TriangleMesh | ImmutableTriangleMesh;
|
|
|
1378
1033
|
|
|
1379
1034
|
/** Appearance and rigid placement of a finished local manufacturing part. */
|
|
1380
1035
|
export declare interface PartOptions {
|
|
1381
|
-
/** Local geometry
|
|
1382
|
-
readonly geometry:
|
|
1036
|
+
/** Local manufacturing geometry; native objects never cross a revision. */
|
|
1037
|
+
readonly geometry: PartGeometry;
|
|
1383
1038
|
/** Rigid local-to-world transform; translation uses millimetres. Defaults to identity.
|
|
1384
|
-
* Accepts a fluent transform or row-major 4x4 matrix. Scale, shear, and reflection are invalid.
|
|
1039
|
+
* Accepts a Frame3, fluent transform, or row-major 4x4 matrix. Scale, shear, and reflection are invalid.
|
|
1385
1040
|
*/
|
|
1386
|
-
readonly transform?:
|
|
1387
|
-
/** Optional six-digit hexadecimal
|
|
1041
|
+
readonly transform?: Transform3Input;
|
|
1042
|
+
/** Optional six-digit hexadecimal display color. */
|
|
1388
1043
|
readonly color?: string;
|
|
1389
1044
|
}
|
|
1390
1045
|
|
|
1391
|
-
/** Immutable directed XY polyline. Closure is explicit and does not imply a filled Section. */
|
|
1392
|
-
export declare interface Path2 {
|
|
1393
|
-
/** Coordinate dimension; identifies planar paths even when empty. */
|
|
1394
|
-
readonly dimension: 2;
|
|
1395
|
-
/** Whether traversal includes the last-to-first edge. */
|
|
1396
|
-
readonly closed: boolean;
|
|
1397
|
-
/** Returns complete deeply frozen path data, including dimension and closure. Repeated calls do not allocate. */
|
|
1398
|
-
toData(): Path2Data;
|
|
1399
|
-
/** Total sampled edge length in model units, including the closing edge when closed. */
|
|
1400
|
-
length(): number;
|
|
1401
|
-
/** Immutable axis-aligned bounds, or undefined for an empty path. */
|
|
1402
|
-
bounds(): Bounds2 | undefined;
|
|
1403
|
-
/** Finds the nearest edge location; requires at least two vertices. */
|
|
1404
|
-
closestPoint(point: Vector2Input): PathLocation<Vector2>;
|
|
1405
|
-
/** Applies an XY placement without reordering traversal, including after reflection. */
|
|
1406
|
-
transform(placement: Transform2Input): Path2;
|
|
1407
|
-
/** Reverses vertex order and traversal; neither the source nor its coordinates are mutated. */
|
|
1408
|
-
reverse(): Path2;
|
|
1409
|
-
/** Returns a path sampled at equal arc lengths. Corners may be bridged; closure is preserved. */
|
|
1410
|
-
resample(options?: PathResamplingOptions): Path2;
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
/**
|
|
1414
|
-
* Snapshots finite XY coordinates as an immutable sampled path, independent of engine initialization.
|
|
1415
|
-
*
|
|
1416
|
-
* Open paths may be empty or have one point; closed paths need three vertices and omit a duplicated
|
|
1417
|
-
* seam. Repeated adjacent vertices are retained. No winding normalization or filling is performed.
|
|
1418
|
-
* Malformed dimensions or topology throw INVALID_ARGUMENT; nonfinite coordinates or measurement
|
|
1419
|
-
* overflow throw NON_FINITE_VALUE; exhausted allocation ceilings throw COMPLEXITY_LIMIT GeometryError.
|
|
1420
|
-
* A path input retains its closure. Limits bound construction only; resampling takes its own limits.
|
|
1421
|
-
*
|
|
1422
|
-
* Use `toData()` for a frozen record that restores coordinates, closure, and dimension together.
|
|
1423
|
-
*/
|
|
1424
|
-
export declare function path2(input: Path2Input, options?: PathOptions): Path2;
|
|
1425
|
-
|
|
1426
|
-
/** Complete plain XY path representation, including topology and empty-path dimensional identity. */
|
|
1427
|
-
export declare interface Path2Data {
|
|
1428
|
-
/** Coordinate dimension, retained even when points is empty. */
|
|
1429
|
-
readonly dimension: 2;
|
|
1430
|
-
/** Frozen or caller-owned XY coordinates; closed paths omit a duplicated seam. */
|
|
1431
|
-
readonly points: readonly Vector2Data[];
|
|
1432
|
-
/** Whether traversal includes the last-to-first edge. */
|
|
1433
|
-
readonly closed: boolean;
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
/** A matching path value, complete plain path data, or a collection of vectors. */
|
|
1437
|
-
export declare type Path2Input = Path2 | Path2Data | readonly Vector2Input[];
|
|
1438
|
-
|
|
1439
|
-
/** Immutable directed XYZ polyline; it represents sampled edges, not an analytic curve. */
|
|
1440
|
-
export declare interface Path3 {
|
|
1441
|
-
/** Coordinate dimension; identifies spatial paths even when empty. */
|
|
1442
|
-
readonly dimension: 3;
|
|
1443
|
-
/** Whether traversal includes the last-to-first edge. */
|
|
1444
|
-
readonly closed: boolean;
|
|
1445
|
-
/** Returns complete deeply frozen path data, including dimension and closure. Repeated calls do not allocate. */
|
|
1446
|
-
toData(): Path3Data;
|
|
1447
|
-
/** Total sampled edge length in model units, including the closing edge when closed. */
|
|
1448
|
-
length(): number;
|
|
1449
|
-
/** Immutable axis-aligned bounds, or undefined for an empty path. */
|
|
1450
|
-
bounds(): Bounds3 | undefined;
|
|
1451
|
-
/** Finds the nearest edge location; requires at least two vertices. */
|
|
1452
|
-
closestPoint(point: Vector3Input): PathLocation<Vector3>;
|
|
1453
|
-
/** Applies an XYZ placement without changing traversal order or closure. */
|
|
1454
|
-
transform(placement: Transform3Input): Path3;
|
|
1455
|
-
/** Reverses vertex order and traversal without mutating the source. */
|
|
1456
|
-
reverse(): Path3;
|
|
1457
|
-
/** Returns a path sampled at equal arc lengths. Corners may be bridged; closure is preserved. */
|
|
1458
|
-
resample(options?: PathResamplingOptions): Path3;
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
/**
|
|
1462
|
-
* Snapshots finite XYZ coordinates as an immutable sampled path with the same closure, seam,
|
|
1463
|
-
* allocation and error rules as path2. Analytic curves must be sampled explicitly first.
|
|
1464
|
-
*
|
|
1465
|
-
* Use `toData()` for a frozen record that restores coordinates, closure, and dimension together.
|
|
1466
|
-
*
|
|
1467
|
-
* @see {@link path2} for shared construction rules.
|
|
1468
|
-
*/
|
|
1469
|
-
export declare function path3(input: Path3Input, options?: PathOptions): Path3;
|
|
1470
|
-
|
|
1471
|
-
/** Complete plain XYZ path representation, including topology and empty-path dimensional identity. */
|
|
1472
|
-
export declare interface Path3Data {
|
|
1473
|
-
/** Coordinate dimension, retained even when points is empty. */
|
|
1474
|
-
readonly dimension: 3;
|
|
1475
|
-
/** Frozen or caller-owned XYZ coordinates; closed paths omit a duplicated seam. */
|
|
1476
|
-
readonly points: readonly Vector3Data[];
|
|
1477
|
-
/** Whether traversal includes the last-to-first edge. */
|
|
1478
|
-
readonly closed: boolean;
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
/** A matching path value, complete plain path data, or a collection of vectors. */
|
|
1482
|
-
export declare type Path3Input = Path3 | Path3Data | readonly Vector3Input[];
|
|
1483
|
-
|
|
1484
|
-
/** Nearest location on a sampled boundary, rather than inside a filled shape or on an analytic curve. */
|
|
1485
|
-
export declare interface PathLocation<Point extends Vector2 | Vector3> {
|
|
1486
|
-
/** Immutable position on the selected edge. */
|
|
1487
|
-
readonly point: Point;
|
|
1488
|
-
/** Euclidean distance from the query in model units. */
|
|
1489
|
-
readonly distance: number;
|
|
1490
|
-
/** Starting vertex of the selected edge; ties keep the first edge in traversal order. */
|
|
1491
|
-
readonly edgeIndex: number;
|
|
1492
|
-
/** Clamped fraction along that edge, not the whole path's normalized arc length. */
|
|
1493
|
-
readonly fraction: number;
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
/**
|
|
1497
|
-
* Supplies a profile-X orientation guide for each original normalized sweep station.
|
|
1498
|
-
*
|
|
1499
|
-
* @param point - Current XYZ path point in model units.
|
|
1500
|
-
* @param index - Zero-based index of `point` in the normalized authored sweep path.
|
|
1501
|
-
* @returns A finite guide vector that is not parallel to the local path tangent.
|
|
1502
|
-
*/
|
|
1503
|
-
export declare type PathNormalGuide = (
|
|
1504
|
-
point: Vector3Data,
|
|
1505
|
-
index: number,
|
|
1506
|
-
) => Vector3Input;
|
|
1507
|
-
|
|
1508
|
-
/** Topology and allocation ceiling for an immutable sampled path. */
|
|
1509
|
-
export declare interface PathOptions {
|
|
1510
|
-
/** Connects the last vertex to the first; closed paths omit the repeated seam. Defaults to false. */
|
|
1511
|
-
readonly closed?: boolean;
|
|
1512
|
-
/** Construction point ceiling; defaults to package sampling limits. Later sampling has its own options. */
|
|
1513
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
1046
|
/**
|
|
1517
1047
|
* Physical arc-length copies along a sampled path, with optional tangent orientation.
|
|
1518
1048
|
*
|
|
1049
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
1050
|
+
* @param path - Path in millimetres; spacing uses arc length.
|
|
1051
|
+
*
|
|
1519
1052
|
* @example Copies along a bent path
|
|
1520
1053
|
* ```ts
|
|
1521
1054
|
* pathPattern(box({ size: 4 }), [[0, 0, 0], [20, 0, 0], [20, 20, 0]], { count: 5 });
|
|
@@ -1530,6 +1063,9 @@ export declare function pathPattern(
|
|
|
1530
1063
|
/**
|
|
1531
1064
|
* Repeats a filled Section along a sampled XY path. Tangent orientation maps local +X
|
|
1532
1065
|
* to the path tangent counterclockwise, preserving the XY plane.
|
|
1066
|
+
*
|
|
1067
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
1068
|
+
* @param path - Path in millimetres; spacing uses arc length.
|
|
1533
1069
|
*/
|
|
1534
1070
|
export declare function pathPattern(
|
|
1535
1071
|
source: PatternSource<Section>,
|
|
@@ -1537,41 +1073,11 @@ export declare function pathPattern(
|
|
|
1537
1073
|
options: PathPatternOptions,
|
|
1538
1074
|
): readonly Section[];
|
|
1539
1075
|
|
|
1540
|
-
/**
|
|
1541
|
-
export declare interface PathPatternOptions {
|
|
1542
|
-
/** Positive number of copies; open paths include both endpoints when greater than one. */
|
|
1543
|
-
readonly count: number;
|
|
1544
|
-
/** Raw point closure defaults to false; a path value supplies closure and rejects conflicts. */
|
|
1545
|
-
readonly closed?: boolean;
|
|
1546
|
-
/** Preserve orientation, or align local +X for Sections / +Z for Solids to the tangent. Defaults to fixed. */
|
|
1547
|
-
readonly orientation?: "fixed" | "tangent";
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
/** Equal arc-length sampling; the path itself owns whether its closing edge is included. */
|
|
1551
|
-
export declare interface PathResamplingOptions extends CurveSamplingOptions {
|
|
1552
|
-
/** Exact arc-length intervals; closed paths need at least three. Otherwise physical resolution or the effective source edge count controls sampling. */
|
|
1553
|
-
readonly segments?: number;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
/**
|
|
1557
|
-
* One immutable shape, or a synchronous factory called once per copy in index order.
|
|
1558
|
-
*/
|
|
1076
|
+
/** One immutable shape, or a synchronous factory called once per copy in zero-based index order. */
|
|
1559
1077
|
export declare type PatternSource<T extends Solid | Section = Solid> =
|
|
1560
1078
|
T | ((index: number) => T);
|
|
1561
1079
|
|
|
1562
|
-
/** A
|
|
1563
|
-
export declare interface Pivot2Options {
|
|
1564
|
-
/** World-space point left fixed by rotation or scaling. */
|
|
1565
|
-
readonly pivot?: Vector2Input;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
/** A fixed XYZ point in world coordinates; omitted pivots use the coordinate origin. */
|
|
1569
|
-
export declare interface Pivot3Options {
|
|
1570
|
-
/** World-space point left fixed by rotation or scaling. */
|
|
1571
|
-
readonly pivot?: Vector3Input;
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
/** A world-space cutting plane, retaining the half-space in the normal's direction. */
|
|
1080
|
+
/** A world-space cutting plane defined by a normal and signed millimetre offset. */
|
|
1575
1081
|
export declare interface PlaneOptions {
|
|
1576
1082
|
/** Finite nonzero plane normal; magnitude does not affect the plane. */
|
|
1577
1083
|
readonly normal: Vector3Input;
|
|
@@ -1585,6 +1091,8 @@ export declare interface PlaneOptions {
|
|
|
1585
1091
|
* Closing edges are implicit. Compound contours use nonzero fill unless selected otherwise.
|
|
1586
1092
|
* Explicit topology must be simple and disjoint; compound winding may resolve overlaps.
|
|
1587
1093
|
*
|
|
1094
|
+
* @param input - XY outline in millimetres, or explicit or compound topology.
|
|
1095
|
+
*
|
|
1588
1096
|
* @example Extrude a triangular plate
|
|
1589
1097
|
* ```ts
|
|
1590
1098
|
* polygon([[0, 0], [20, 0], [10, 12]]).extrude({ height: 3 });
|
|
@@ -1592,23 +1100,6 @@ export declare interface PlaneOptions {
|
|
|
1592
1100
|
*/
|
|
1593
1101
|
export declare function polygon(input: Path2Input | PolygonOptions): Section;
|
|
1594
1102
|
|
|
1595
|
-
/**
|
|
1596
|
-
* One filled two-dimensional polygon with an exterior and optional holes.
|
|
1597
|
-
*
|
|
1598
|
-
* `outer` is counter-clockwise and each hole is clockwise. Boundary arrays omit
|
|
1599
|
-
* their duplicated closing point. Holes must lie inside `outer` and must not
|
|
1600
|
-
* intersect each other or the exterior.
|
|
1601
|
-
*
|
|
1602
|
-
* @see {@link Contour}
|
|
1603
|
-
* @see {@link RegionData}
|
|
1604
|
-
*/
|
|
1605
|
-
export declare interface PolygonData {
|
|
1606
|
-
/** Clockwise interior boundaries, each omitting its duplicated closing point. */
|
|
1607
|
-
readonly holes: readonly Contour[];
|
|
1608
|
-
/** Counter-clockwise exterior boundary, omitting its duplicated closing point. */
|
|
1609
|
-
readonly outer: Contour;
|
|
1610
|
-
}
|
|
1611
|
-
|
|
1612
1103
|
/** Explicit polygon topology or compound contours; all closing edges are implicit. */
|
|
1613
1104
|
export declare type PolygonOptions =
|
|
1614
1105
|
| {
|
|
@@ -1648,45 +1139,6 @@ export declare type PolygonOptions =
|
|
|
1648
1139
|
readonly fillRule?: never;
|
|
1649
1140
|
};
|
|
1650
1141
|
|
|
1651
|
-
/**
|
|
1652
|
-
* Checks compensated cutter dimensions and conservative mesh estimates against host output limits.
|
|
1653
|
-
*
|
|
1654
|
-
* Requires active synchronous model execution and uses its resolution and limits. Estimates include
|
|
1655
|
-
* the one-pitch extension beyond each requested face, without mesh buffers or native objects.
|
|
1656
|
-
* Mesh validity, native construction, and aggregate output limits are checked later.
|
|
1657
|
-
*
|
|
1658
|
-
* @see {@link internalThreadCutter}
|
|
1659
|
-
*/
|
|
1660
|
-
export declare function preflightInternalThreadCutter(
|
|
1661
|
-
options: InternalThreadCutterOptions,
|
|
1662
|
-
): ThreadSolidPreflight;
|
|
1663
|
-
|
|
1664
|
-
/**
|
|
1665
|
-
* Checks nut dimensions, chamfers, end-face wall, and the extended compensated cutter's allocation plan.
|
|
1666
|
-
*
|
|
1667
|
-
* Requires active synchronous model execution and uses its resolution and limits, without mesh
|
|
1668
|
-
* buffers or native objects. Returned thread estimates cover the cutter, excluding the body and
|
|
1669
|
-
* Boolean result. Mesh validity, native construction, and aggregate output limits are checked later.
|
|
1670
|
-
*
|
|
1671
|
-
* @see {@link threadedNut}
|
|
1672
|
-
*/
|
|
1673
|
-
export declare function preflightThreadedNut(
|
|
1674
|
-
options: ThreadedNutOptions,
|
|
1675
|
-
): ThreadedNutPreflight;
|
|
1676
|
-
|
|
1677
|
-
/**
|
|
1678
|
-
* Checks compensated rod dimensions and conservative mesh estimates against host output limits.
|
|
1679
|
-
*
|
|
1680
|
-
* Requires active synchronous model execution and uses its resolution and limits. Returns selected
|
|
1681
|
-
* sampling and conservative row/triangle estimates without mesh buffers or native objects.
|
|
1682
|
-
* Mesh validity, native construction, and aggregate output limits are checked later.
|
|
1683
|
-
*
|
|
1684
|
-
* @see {@link threadedRod}
|
|
1685
|
-
*/
|
|
1686
|
-
export declare function preflightThreadedRod(
|
|
1687
|
-
options: ThreadedRodOptions,
|
|
1688
|
-
): ThreadSolidPreflight;
|
|
1689
|
-
|
|
1690
1142
|
/** Anchor attachment shared by solid and filled-section factories. */
|
|
1691
1143
|
export declare interface PrimitiveAttachment {
|
|
1692
1144
|
/** Applied after local construction; Section attachment must preserve the XY plane. */
|
|
@@ -1695,127 +1147,17 @@ export declare interface PrimitiveAttachment {
|
|
|
1695
1147
|
|
|
1696
1148
|
/** Maps an explicit or named shape-local attachment anchor onto a world-space anchor. */
|
|
1697
1149
|
export declare interface PrimitiveAttachmentOptions extends AttachOptions {
|
|
1698
|
-
/** Shape-local source frame or a named primitive anchor such as bottom. */
|
|
1699
|
-
readonly source: Anchor3 | string;
|
|
1700
|
-
/** World-space target frame in millimetres. */
|
|
1701
|
-
readonly target: Anchor3;
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
/**
|
|
1705
|
-
* Named baseline fit policies for calibrated FDM-style printed threads.
|
|
1706
|
-
*/
|
|
1707
|
-
export declare type PrintableThreadFit = "tight" | "normal" | "loose";
|
|
1708
|
-
|
|
1709
|
-
/**
|
|
1710
|
-
* Explicit radial and axial allowances for a mating printed thread pair.
|
|
1711
|
-
*
|
|
1712
|
-
* Male and female radial values are applied independently, so their sum is the
|
|
1713
|
-
* assembled radial clearance. Values are millimetres and intentionally do not
|
|
1714
|
-
* encode printer, material, or process calibration.
|
|
1715
|
-
*/
|
|
1716
|
-
export declare interface PrintableThreadFitPolicy {
|
|
1717
|
-
/** Nominal axial backlash available between opposing flanks. */
|
|
1718
|
-
readonly axialBacklash: number;
|
|
1719
|
-
/** Radial increase applied to an internal thread envelope. */
|
|
1720
|
-
readonly femaleRadialOutset: number;
|
|
1721
|
-
/** Radial reduction applied to an external thread envelope. */
|
|
1722
|
-
readonly maleRadialInset: number;
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
/**
|
|
1726
|
-
* An explicit component/contour/span topology, before shared family sampling with matchProfiles.
|
|
1727
|
-
* Component, contour and span identities establish correspondence across a loft or sweep family.
|
|
1728
|
-
*
|
|
1729
|
-
* @see {@link CorrespondingProfile}
|
|
1730
|
-
* @see {@link matchProfiles}
|
|
1731
|
-
*/
|
|
1732
|
-
export declare interface Profile {
|
|
1733
|
-
/** Ordered components with explicit contour identities. */
|
|
1734
|
-
readonly components: readonly ProfileComponent2[];
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
/** One component and its explicitly identified holes. */
|
|
1738
|
-
export declare interface ProfileComponent2 {
|
|
1739
|
-
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
1740
|
-
readonly id: string;
|
|
1741
|
-
/** Counterclockwise outer contour. */
|
|
1742
|
-
readonly outer: ProfileContour2;
|
|
1743
|
-
/** Clockwise hole contours belonging to this component. */
|
|
1744
|
-
readonly holes: readonly ProfileContour2[];
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
/**
|
|
1748
|
-
* An identified closed boundary of curve spans, before shared family sampling.
|
|
1749
|
-
* Outer winding is CCW and hole winding is CW. matchProfiles retains span identities in sampled contours.
|
|
1750
|
-
*
|
|
1751
|
-
* @see {@link Contour} for sampled point coordinates.
|
|
1752
|
-
* @see {@link CorrespondingContour} for sampled coordinates with correspondence metadata.
|
|
1753
|
-
*/
|
|
1754
|
-
export declare interface ProfileContour2 {
|
|
1755
|
-
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
1756
|
-
readonly id: string;
|
|
1757
|
-
/** Ordered identified spans; the last endpoint meets the first start. */
|
|
1758
|
-
readonly spans: readonly ProfileSpan2[];
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
/** A deliberately sampled, inward-only corner profile with exact polyline geometry. */
|
|
1762
|
-
export declare interface ProfiledEdgeTreatment {
|
|
1763
|
-
/** Selects an explicit corner profile; no analytic curve is inferred from its samples. */
|
|
1764
|
-
readonly kind: "profile";
|
|
1765
|
-
/**
|
|
1766
|
-
* Millimetre setbacks on adjoining surfaces, from [positive, 0] to [0, positive].
|
|
1767
|
-
* First coordinates decrease and second coordinates increase. Cylinder/extrusion ends use
|
|
1768
|
-
* cap inset first, side setback second; planar corners use incoming then outgoing edges.
|
|
1769
|
-
*/
|
|
1770
|
-
readonly profile: readonly Vector2Data[];
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
/** An identified line, circular arc, or cubic Bézier between corresponding landmarks. */
|
|
1774
|
-
export declare type ProfileSpan2 = {
|
|
1775
|
-
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
1776
|
-
readonly id: string;
|
|
1777
|
-
/** Optional exact span interval count; the family uses the largest requested count. */
|
|
1778
|
-
readonly segments?: number;
|
|
1779
|
-
/** Optional span-local physical sampling over the family's resolution; exact intervals take precedence. */
|
|
1780
|
-
readonly resolution?: GeometryResolution;
|
|
1781
|
-
} & (
|
|
1782
|
-
| {
|
|
1783
|
-
/** Selects a straight span. */
|
|
1784
|
-
readonly kind: "line";
|
|
1785
|
-
/** Start point in millimetres. */
|
|
1786
|
-
readonly start: Vector2Data;
|
|
1787
|
-
/** End point in millimetres. */
|
|
1788
|
-
readonly end: Vector2Data;
|
|
1789
|
-
}
|
|
1790
|
-
| {
|
|
1791
|
-
/** Selects the geometric curve or span family. */
|
|
1792
|
-
readonly kind: "arc";
|
|
1793
|
-
/** Center point in millimetres. */
|
|
1794
|
-
readonly center: Vector2Data;
|
|
1795
|
-
/** Circular radius in millimetres. */
|
|
1796
|
-
readonly radius: number;
|
|
1797
|
-
/** Initial counterclockwise angle in degrees. */
|
|
1798
|
-
readonly startAngle: number;
|
|
1799
|
-
/** Signed counterclockwise angular sweep in degrees. */
|
|
1800
|
-
readonly sweepAngle: number;
|
|
1801
|
-
}
|
|
1802
|
-
| {
|
|
1803
|
-
/** Selects a cubic Bézier span with the same coordinates as CubicBezierCurve2. */
|
|
1804
|
-
readonly kind: "cubic";
|
|
1805
|
-
/** Start point in millimetres. */
|
|
1806
|
-
readonly start: Vector2Data;
|
|
1807
|
-
/** First control point in millimetres. */
|
|
1808
|
-
readonly control1: Vector2Data;
|
|
1809
|
-
/** Second control point in millimetres. */
|
|
1810
|
-
readonly control2: Vector2Data;
|
|
1811
|
-
/** End point in millimetres. */
|
|
1812
|
-
readonly end: Vector2Data;
|
|
1813
|
-
}
|
|
1814
|
-
);
|
|
1150
|
+
/** Shape-local source frame or a named primitive anchor such as bottom. */
|
|
1151
|
+
readonly source: Anchor3 | string;
|
|
1152
|
+
/** World-space target frame in millimetres. */
|
|
1153
|
+
readonly target: Anchor3;
|
|
1154
|
+
}
|
|
1815
1155
|
|
|
1816
1156
|
/**
|
|
1817
1157
|
* Repeats one solid about an axis.
|
|
1818
1158
|
*
|
|
1159
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
1160
|
+
*
|
|
1819
1161
|
* @example Six copies around Z
|
|
1820
1162
|
* ```ts
|
|
1821
1163
|
* const pin = cylinder({ height: 6, radius: 2 }).translate([12, 0, 0]);
|
|
@@ -1827,45 +1169,16 @@ export declare function radialPattern(
|
|
|
1827
1169
|
options: RadialPatternOptions,
|
|
1828
1170
|
): readonly Solid[];
|
|
1829
1171
|
|
|
1830
|
-
/**
|
|
1172
|
+
/**
|
|
1173
|
+
* Repeats a filled Section counterclockwise about a fixed XY pivot, using the implicit +Z axis.
|
|
1174
|
+
*
|
|
1175
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
1176
|
+
*/
|
|
1831
1177
|
export declare function radialPattern(
|
|
1832
1178
|
source: PatternSource<Section>,
|
|
1833
1179
|
options: RadialPatternOptions<2>,
|
|
1834
1180
|
): readonly Section[];
|
|
1835
1181
|
|
|
1836
|
-
/**
|
|
1837
|
-
* Degree rotations about a fixed world-space pivot; XY patterns use the implicit +Z axis.
|
|
1838
|
-
*/
|
|
1839
|
-
export declare type RadialPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
1840
|
-
/** Number of shapes to return, including the original. */
|
|
1841
|
-
readonly count: number;
|
|
1842
|
-
/** Signed rotation from one copy to the next, in degrees. */
|
|
1843
|
-
readonly angle: number;
|
|
1844
|
-
/** Fixed world-space rotation pivot; defaults to the coordinate origin. */
|
|
1845
|
-
readonly pivot?: Dimension extends 2 ? Vector2Input : Vector3Input;
|
|
1846
|
-
} & (Dimension extends 2
|
|
1847
|
-
? {
|
|
1848
|
-
/** XY rotation uses +Z; an explicit spatial axis is unavailable. */
|
|
1849
|
-
readonly axis?: never;
|
|
1850
|
-
}
|
|
1851
|
-
: {
|
|
1852
|
-
/** Axis of the right-handed rotation. Its nonzero magnitude is ignored. */
|
|
1853
|
-
readonly axis: Vector3Input;
|
|
1854
|
-
});
|
|
1855
|
-
|
|
1856
|
-
/** Radial dimensions refer to polygon vertices or compensate faceting to meet polygon faces. */
|
|
1857
|
-
export declare type RadialSizing = "vertex" | "face";
|
|
1858
|
-
|
|
1859
|
-
/**
|
|
1860
|
-
* Nominal radial sizing shared by circular and regular polygon construction.
|
|
1861
|
-
*/
|
|
1862
|
-
export declare interface RadialSizingOptions {
|
|
1863
|
-
/** Explicit sampling ceilings; bound modeling operations may only lower the host policy. */
|
|
1864
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1865
|
-
/** Vertex sizing is inscribed; face sizing circumscribes the nominal radius. Defaults to vertex. */
|
|
1866
|
-
readonly sizing?: RadialSizing;
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
1182
|
/**
|
|
1870
1183
|
* Filled rectangular section with uniform or independently treated corners.
|
|
1871
1184
|
*
|
|
@@ -1874,86 +1187,39 @@ export declare interface RadialSizingOptions {
|
|
|
1874
1187
|
*
|
|
1875
1188
|
* @example Round the corners
|
|
1876
1189
|
* ```ts
|
|
1877
|
-
* rectangle({ size: [30, 20], treatment: { kind: "round", radius: 3 } });
|
|
1190
|
+
* rectangle({ size: [30, 20], treatment: { kind: "round", radius: 3 } }).extrude({ height: 3 });
|
|
1878
1191
|
* ```
|
|
1879
1192
|
*/
|
|
1880
1193
|
export declare function rectangle(options: RectangleOptions): Section;
|
|
1881
1194
|
|
|
1882
|
-
/**
|
|
1883
|
-
* Shared rectangle dimensions, origin and uniform or per-corner treatment.
|
|
1884
|
-
*/
|
|
1885
|
-
export declare interface RectangleContourOptions {
|
|
1886
|
-
/** Positive uniform size or explicit XY extents in millimetres. */
|
|
1887
|
-
readonly size: number | Vector2Input;
|
|
1888
|
-
/** Center on XY; otherwise the minimum corner is the origin. Defaults to true. */
|
|
1889
|
-
readonly center?: boolean;
|
|
1890
|
-
/** Uniform treatment or four corner treatments. Exact round segments describe a complete circle and must divide by four. */
|
|
1891
|
-
readonly treatment?: EdgeTreatment | RectangleCornerTreatments;
|
|
1892
|
-
/** Explicit sampling ceiling for the complete output profile. */
|
|
1893
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
/** A rectangle corner, including an explicitly untreated corner in a treatment tuple. */
|
|
1897
|
-
export declare type RectangleCornerTreatment =
|
|
1898
|
-
| EdgeTreatment
|
|
1899
|
-
| {
|
|
1900
|
-
/** Leaves this corner untreated. */
|
|
1901
|
-
readonly kind: "square";
|
|
1902
|
-
};
|
|
1903
|
-
|
|
1904
|
-
/** Corner treatments ordered top-right, top-left, bottom-left, bottom-right. */
|
|
1905
|
-
export declare type RectangleCornerTreatments = readonly [
|
|
1906
|
-
topRight: RectangleCornerTreatment,
|
|
1907
|
-
topLeft: RectangleCornerTreatment,
|
|
1908
|
-
bottomLeft: RectangleCornerTreatment,
|
|
1909
|
-
bottomRight: RectangleCornerTreatment,
|
|
1910
|
-
];
|
|
1911
|
-
|
|
1912
|
-
/**
|
|
1913
|
-
* Rectangle dimensions, placement and uniform or per-corner treatment.
|
|
1914
|
-
*/
|
|
1195
|
+
/** Rectangle dimensions, placement and uniform or per-corner treatment. */
|
|
1915
1196
|
export declare interface RectangleOptions
|
|
1916
1197
|
extends RectangleContourOptions, PrimitiveAttachment {}
|
|
1917
1198
|
|
|
1918
|
-
/**
|
|
1919
|
-
* A two-dimensional region represented by disjoint filled polygons.
|
|
1920
|
-
* Each PolygonData owns one exterior and its holes; an empty region contains no material.
|
|
1921
|
-
*
|
|
1922
|
-
* @see {@link PolygonData}
|
|
1923
|
-
*/
|
|
1924
|
-
export declare type RegionData = readonly PolygonData[];
|
|
1925
|
-
|
|
1926
1199
|
/**
|
|
1927
1200
|
* Regular polygon with a vertex on +X.
|
|
1928
1201
|
*
|
|
1929
1202
|
* @example Hexagonal section
|
|
1930
1203
|
* ```ts
|
|
1931
|
-
* regularPolygon({ radius: 10, sides: 6, sizing: "face" });
|
|
1204
|
+
* regularPolygon({ radius: 10, sides: 6, sizing: "face" }).extrude({ height: 3 });
|
|
1932
1205
|
* ```
|
|
1933
1206
|
*/
|
|
1934
1207
|
export declare function regularPolygon(options: RegularPolygonOptions): Section;
|
|
1935
1208
|
|
|
1936
|
-
/**
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
export declare type RegularPolygonOptions = RadialSizingOptions &
|
|
1940
|
-
PrimitiveAttachment & {
|
|
1941
|
-
/** Positive nominal radius in millimetres, interpreted according to sizing. */
|
|
1942
|
-
readonly radius: number;
|
|
1943
|
-
/** Exact integer side count from three through 100000. */
|
|
1944
|
-
readonly sides: number;
|
|
1945
|
-
/** Counterclockwise rotation in degrees; defaults to zero with a vertex on +X. */
|
|
1946
|
-
readonly rotation?: number;
|
|
1947
|
-
};
|
|
1209
|
+
/** Regular polygon dimensions, radial convention and degree rotation. */
|
|
1210
|
+
export declare type RegularPolygonOptions = RegularPolygonContourOptions &
|
|
1211
|
+
PrimitiveAttachment;
|
|
1948
1212
|
|
|
1949
1213
|
/**
|
|
1950
1214
|
* Revolves a filled Section or explicit corresponding radial/Z contours around +Z, with caps for partial sweeps.
|
|
1951
1215
|
* Use `section.revolve(options)` in fluent sequences, or this function for generic profile inputs.
|
|
1952
1216
|
*
|
|
1217
|
+
* @param shape - Profile coordinates are [radius, Z] in millimetres.
|
|
1218
|
+
*
|
|
1953
1219
|
* @example Revolve
|
|
1954
1220
|
* ```ts
|
|
1955
|
-
* import {
|
|
1956
|
-
* import { rectangleProfile } from "@metamesh/modeling/geometry";
|
|
1221
|
+
* import { revolve } from "@metamesh/modeling";
|
|
1222
|
+
* import { matchProfiles, rectangleProfile } from "@metamesh/modeling/geometry";
|
|
1957
1223
|
*
|
|
1958
1224
|
* // Contour coordinates are [radius, Z].
|
|
1959
1225
|
* const [profile] = matchProfiles([rectangleProfile({ size: [4, 16], center: false })]);
|
|
@@ -1965,9 +1231,7 @@ export declare function revolve(
|
|
|
1965
1231
|
options?: RevolveOptions,
|
|
1966
1232
|
): Solid;
|
|
1967
1233
|
|
|
1968
|
-
/**
|
|
1969
|
-
* Circumferential sampling and degree sweep shared by pure and filled revolution.
|
|
1970
|
-
*/
|
|
1234
|
+
/** Circumferential sampling and degree sweep shared by pure and filled revolution. */
|
|
1971
1235
|
export declare interface RevolveOptions extends CircularPrimitiveOptions {
|
|
1972
1236
|
/**
|
|
1973
1237
|
* Positive sweep in degrees, no greater than 360. Defaults to a full revolution;
|
|
@@ -1982,16 +1246,6 @@ export declare interface RevolveOptions extends CircularPrimitiveOptions {
|
|
|
1982
1246
|
readonly limits?: Partial<ModelingLimits>;
|
|
1983
1247
|
}
|
|
1984
1248
|
|
|
1985
|
-
/**
|
|
1986
|
-
* A circular edge or corner roundover with explicit physical sampling.
|
|
1987
|
-
*/
|
|
1988
|
-
export declare interface RoundedEdgeTreatment extends CircularPrimitiveOptions {
|
|
1989
|
-
/** Selects circular corners or spherical all-edge roundovers. */
|
|
1990
|
-
readonly kind: "round";
|
|
1991
|
-
/** Nonnegative millimetre radius; zero leaves the edge or corner untreated. Positive values must fit adjoining dimensions. */
|
|
1992
|
-
readonly radius: number;
|
|
1993
|
-
}
|
|
1994
|
-
|
|
1995
1249
|
/**
|
|
1996
1250
|
* Immutable deferred filled XY section recipe.
|
|
1997
1251
|
*
|
|
@@ -2008,6 +1262,7 @@ export declare interface RoundedEdgeTreatment extends CircularPrimitiveOptions {
|
|
|
2008
1262
|
* .subtract(rectangle({ size: [16, 8] }))
|
|
2009
1263
|
* .offset(0.5)
|
|
2010
1264
|
* .extrude({ height: 4 });
|
|
1265
|
+
* body;
|
|
2011
1266
|
* ```
|
|
2012
1267
|
*/
|
|
2013
1268
|
export declare interface Section {
|
|
@@ -2029,7 +1284,11 @@ export declare interface Section {
|
|
|
2029
1284
|
factors: number | Vector2Input,
|
|
2030
1285
|
options?: Pivot2Options,
|
|
2031
1286
|
): Section;
|
|
2032
|
-
/**
|
|
1287
|
+
/**
|
|
1288
|
+
* Reflects across a line through the XY origin.
|
|
1289
|
+
*
|
|
1290
|
+
* @param normal - Nonzero XY line normal; length has no effect.
|
|
1291
|
+
*/
|
|
2033
1292
|
mirror(this: Section, normal: Vector2Input): Section;
|
|
2034
1293
|
/** Applies a reusable XY placement or canonical row-major matrix. */
|
|
2035
1294
|
transform(this: Section, placement: Transform2Input): Section;
|
|
@@ -2050,33 +1309,41 @@ export declare interface Section {
|
|
|
2050
1309
|
* than selecting a lower rendering quality; fine features may be removed.
|
|
2051
1310
|
*/
|
|
2052
1311
|
simplify(this: Section, tolerance: number): Section;
|
|
2053
|
-
/**
|
|
2054
|
-
* Returns a new recipe with copied named anchors; existing names may be replaced.
|
|
2055
|
-
*/
|
|
1312
|
+
/** Returns a new recipe with copied named anchors; existing names may be replaced. */
|
|
2056
1313
|
withAnchors(
|
|
2057
1314
|
this: Section,
|
|
2058
1315
|
anchors: Readonly<Record<string, Anchor3>>,
|
|
2059
1316
|
): Section;
|
|
2060
1317
|
/**
|
|
2061
1318
|
* Native millimetre offset preserving holes.
|
|
1319
|
+
*
|
|
1320
|
+
* @param distance - Millimetres: positive expands material; negative erodes it.
|
|
2062
1321
|
*/
|
|
2063
1322
|
offset(
|
|
2064
1323
|
this: Section,
|
|
2065
1324
|
distance: number,
|
|
2066
1325
|
options?: SectionOffsetOptions,
|
|
2067
1326
|
): Section;
|
|
2068
|
-
/**
|
|
2069
|
-
* Extrudes along +Z with degree twist and top scaling.
|
|
2070
|
-
*/
|
|
1327
|
+
/** Extrudes along +Z with degree twist and top scaling. */
|
|
2071
1328
|
extrude(this: Section, options: ExtrudeOptions): Solid;
|
|
2072
|
-
/**
|
|
2073
|
-
* Revolves a filled radial/Z shape around +Z, with caps for partial sweeps.
|
|
2074
|
-
*/
|
|
1329
|
+
/** Revolves a filled radial/Z shape around +Z, with caps for partial sweeps. */
|
|
2075
1330
|
revolve(this: Section, options?: RevolveOptions): Solid;
|
|
2076
1331
|
/**
|
|
2077
|
-
* Sweeps this filled section
|
|
1332
|
+
* Sweeps this filled section along a path or through explicit affine placements.
|
|
1333
|
+
*
|
|
1334
|
+
* @param path - XYZ path in millimetres.
|
|
2078
1335
|
*/
|
|
2079
1336
|
sweep(this: Section, path: Path3Input, options?: SweepOptions): Solid;
|
|
1337
|
+
/**
|
|
1338
|
+
* Connects this section through exactly the supplied affine placements.
|
|
1339
|
+
*
|
|
1340
|
+
* @param transforms - Ordered local-to-model placements.
|
|
1341
|
+
*/
|
|
1342
|
+
sweep(
|
|
1343
|
+
this: Section,
|
|
1344
|
+
transforms: readonly Transform3Input[],
|
|
1345
|
+
options?: SweepTransformOptions,
|
|
1346
|
+
): Solid;
|
|
2080
1347
|
/** Reads immutable bounds, filled area in mm², and component/contour/vertex counts.
|
|
2081
1348
|
* Requires active synchronous model execution; repeated reads share scoped native results.
|
|
2082
1349
|
*/
|
|
@@ -2143,20 +1410,6 @@ export declare interface SectionOffsetOptions {
|
|
|
2143
1410
|
readonly resolution?: GeometryResolution;
|
|
2144
1411
|
}
|
|
2145
1412
|
|
|
2146
|
-
/** A cubic corner transition with zero curvature at its straight tangent joins. */
|
|
2147
|
-
export declare interface SmoothEdgeTreatment {
|
|
2148
|
-
/** Selects continuous-curvature cubic rounding, rather than a circular radius. */
|
|
2149
|
-
readonly kind: "smooth";
|
|
2150
|
-
/** Millimetre setbacks, equal or [first, second]; zero or [0, 0] leaves the edge untreated, otherwise both must be positive. */
|
|
2151
|
-
readonly distance: number | readonly [first: number, second: number];
|
|
2152
|
-
/** Exact cubic interval count, positive; overrides physical sampling. */
|
|
2153
|
-
readonly segments?: number;
|
|
2154
|
-
/** Physical chord/edge-length sampling; circularSegments does not describe a cubic. */
|
|
2155
|
-
readonly resolution?: GeometryResolution;
|
|
2156
|
-
/** Explicit sampling ceilings, bounded by the host policy. */
|
|
2157
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
2158
|
-
}
|
|
2159
|
-
|
|
2160
1413
|
/**
|
|
2161
1414
|
* Immutable deferred solid recipe.
|
|
2162
1415
|
*
|
|
@@ -2172,14 +1425,13 @@ export declare interface SmoothEdgeTreatment {
|
|
|
2172
1425
|
* const body = box({ size: [30, 20, 6] })
|
|
2173
1426
|
* .subtract(cylinder({ height: 8, radius: 3 }))
|
|
2174
1427
|
* .rotate([0, 0, 45]);
|
|
1428
|
+
* body;
|
|
2175
1429
|
* ```
|
|
2176
1430
|
*/
|
|
2177
1431
|
export declare interface Solid {
|
|
2178
1432
|
/** Compile-time identity brand for an immutable solid recipe. */
|
|
2179
1433
|
readonly [solidBrand]: "Solid";
|
|
2180
|
-
/**
|
|
2181
|
-
* Translates XYZ coordinates in millimetres.
|
|
2182
|
-
*/
|
|
1434
|
+
/** Translates XYZ coordinates in millimetres. */
|
|
2183
1435
|
translate(this: Solid, offset: Vector3Input): Solid;
|
|
2184
1436
|
/**
|
|
2185
1437
|
* Rotates about global X, then Y, then Z in degrees.
|
|
@@ -2196,10 +1448,12 @@ export declare interface Solid {
|
|
|
2196
1448
|
options?: Pivot3Options,
|
|
2197
1449
|
): Solid;
|
|
2198
1450
|
/**
|
|
2199
|
-
*
|
|
1451
|
+
* Reflects across a plane through the origin.
|
|
1452
|
+
*
|
|
1453
|
+
* @param normal - Nonzero XYZ plane normal; length has no effect.
|
|
2200
1454
|
*/
|
|
2201
1455
|
mirror(this: Solid, normal: Vector3Input): Solid;
|
|
2202
|
-
/** Applies
|
|
1456
|
+
/** Applies an XYZ frame, transform value, or canonical row-major affine matrix. */
|
|
2203
1457
|
transform(this: Solid, placement: Transform3Input): Solid;
|
|
2204
1458
|
/** Copies indexed Float32 XYZ and Uint32 triangle buffers in millimetres for interchange.
|
|
2205
1459
|
* Requires an active synchronous model execution; the returned TriangleMesh is caller-owned.
|
|
@@ -2207,6 +1461,15 @@ export declare interface Solid {
|
|
|
2207
1461
|
toMesh(this: Solid): TriangleMesh;
|
|
2208
1462
|
/** Robust union with one or more solids; an empty operand array preserves this solid. */
|
|
2209
1463
|
union(this: Solid, operands: Solid | readonly Solid[]): Solid;
|
|
1464
|
+
/**
|
|
1465
|
+
* Fuses an already positioned feature with a smooth (default) or straight width/height transition.
|
|
1466
|
+
* The source datum belongs to the feature; neither input moves or loses material.
|
|
1467
|
+
* Requires a verified local straight collar and continuous sampled support patch.
|
|
1468
|
+
* The result has no inherited anchors. This is not a rolling-ball fillet.
|
|
1469
|
+
*
|
|
1470
|
+
* @param feature - Positioned feature that owns the source datum.
|
|
1471
|
+
*/
|
|
1472
|
+
join(this: Solid, feature: Solid, options: JoinOptions): Solid;
|
|
2210
1473
|
/** Robust intersection with every supplied solid; an empty operand array preserves this solid. */
|
|
2211
1474
|
intersect(this: Solid, operands: Solid | readonly Solid[]): Solid;
|
|
2212
1475
|
/**
|
|
@@ -2221,12 +1484,13 @@ export declare interface Solid {
|
|
|
2221
1484
|
* and the solid's existing native tolerance. Choose it from the detail you can afford to lose.
|
|
2222
1485
|
*/
|
|
2223
1486
|
simplify(this: Solid, tolerance: number): Solid;
|
|
2224
|
-
/**
|
|
2225
|
-
* Returns a new recipe with copied named anchors; existing names may be replaced.
|
|
2226
|
-
*/
|
|
1487
|
+
/** Returns a new recipe with copied named anchors; existing names may be replaced. */
|
|
2227
1488
|
withAnchors(this: Solid, anchors: Readonly<Record<string, Anchor3>>): Solid;
|
|
2228
1489
|
/**
|
|
2229
1490
|
* Places an explicit or named source anchor against an explicit target anchor.
|
|
1491
|
+
*
|
|
1492
|
+
* @param source - Anchor on this solid, supplied directly or by name.
|
|
1493
|
+
* @param target - Anchor in shared modeling coordinates.
|
|
2230
1494
|
*/
|
|
2231
1495
|
attach(
|
|
2232
1496
|
this: Solid,
|
|
@@ -2261,6 +1525,9 @@ export declare interface Solid {
|
|
|
2261
1525
|
distance(this: Solid, other: Solid): number;
|
|
2262
1526
|
/** Copies intersections along the finite directed origin-to-endpoint segment in millimetres.
|
|
2263
1527
|
* Requires active synchronous model execution.
|
|
1528
|
+
*
|
|
1529
|
+
* @param origin - Segment start in modeling coordinates.
|
|
1530
|
+
* @param endpoint - Segment end in modeling coordinates.
|
|
2264
1531
|
*/
|
|
2265
1532
|
castSegment(
|
|
2266
1533
|
this: Solid,
|
|
@@ -2283,6 +1550,8 @@ declare const solidBrand: unique symbol;
|
|
|
2283
1550
|
/**
|
|
2284
1551
|
* Imports a bounded closed indexed mesh.
|
|
2285
1552
|
*
|
|
1553
|
+
* @param mesh - Closed, oriented mesh in millimetres; ownership stays with the caller.
|
|
1554
|
+
*
|
|
2286
1555
|
* @example Mesh import
|
|
2287
1556
|
* ```ts
|
|
2288
1557
|
* import { solidFromMesh } from "@metamesh/modeling";
|
|
@@ -2329,7 +1598,8 @@ export declare interface SolidSegmentHit {
|
|
|
2329
1598
|
}
|
|
2330
1599
|
|
|
2331
1600
|
/**
|
|
2332
|
-
* Origin-centered sphere.
|
|
1601
|
+
* Origin-centered sphere with adaptive sampling that bounds spherical triangle error.
|
|
1602
|
+
* Explicit segment requests select octahedral refinement and round up to a multiple of four.
|
|
2333
1603
|
*
|
|
2334
1604
|
* @example Sphere
|
|
2335
1605
|
* ```ts
|
|
@@ -2338,9 +1608,7 @@ export declare interface SolidSegmentHit {
|
|
|
2338
1608
|
*/
|
|
2339
1609
|
export declare function sphere(options: SphereOptions): Solid;
|
|
2340
1610
|
|
|
2341
|
-
/**
|
|
2342
|
-
* Exactly one radius or diameter, placement, and tessellation for an origin-centered sphere.
|
|
2343
|
-
*/
|
|
1611
|
+
/** Exactly one radius or diameter, placement, and tessellation for an origin-centered sphere. */
|
|
2344
1612
|
export declare type SphereOptions = CircularPrimitiveOptions &
|
|
2345
1613
|
PrimitiveAttachment &
|
|
2346
1614
|
(
|
|
@@ -2358,54 +1626,29 @@ export declare type SphereOptions = CircularPrimitiveOptions &
|
|
|
2358
1626
|
}
|
|
2359
1627
|
);
|
|
2360
1628
|
|
|
2361
|
-
/** Square profile with equal crest and root widths. */
|
|
2362
|
-
export declare interface SquareThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
2363
|
-
/** Selects the square profile family. */
|
|
2364
|
-
readonly kind: "square";
|
|
2365
|
-
/**
|
|
2366
|
-
* Radial depth in millimetres.
|
|
2367
|
-
* @defaultValue `pitch / 2`
|
|
2368
|
-
*/
|
|
2369
|
-
readonly depth?: number;
|
|
2370
|
-
}
|
|
2371
|
-
|
|
2372
1629
|
/**
|
|
2373
1630
|
* Alternating outer/inner star vertices.
|
|
2374
1631
|
*
|
|
2375
1632
|
* @example Five-point section
|
|
2376
1633
|
* ```ts
|
|
2377
|
-
* star({ outerRadius: 12, innerRadius: 6, points: 5 });
|
|
1634
|
+
* star({ outerRadius: 12, innerRadius: 6, points: 5 }).extrude({ height: 3 });
|
|
2378
1635
|
* ```
|
|
2379
1636
|
*/
|
|
2380
1637
|
export declare function star(options: StarOptions): Section;
|
|
2381
1638
|
|
|
2382
|
-
/** Alternating
|
|
2383
|
-
export declare interface StarContourOptions {
|
|
2384
|
-
/** Positive outer vertex radius in millimetres. */
|
|
2385
|
-
readonly outerRadius: number;
|
|
2386
|
-
/** Positive inner vertex radius in millimetres, smaller than the outer radius. */
|
|
2387
|
-
readonly innerRadius: number;
|
|
2388
|
-
/** Integer outer point count, at least three; output contains twice as many vertices. */
|
|
2389
|
-
readonly points: number;
|
|
2390
|
-
/** Counterclockwise rotation in degrees; defaults to zero with an outer vertex on +X. */
|
|
2391
|
-
readonly rotation?: number;
|
|
2392
|
-
/** Explicit sampling ceilings, bounded by the host policy during modeling. */
|
|
2393
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
/**
|
|
2397
|
-
* Alternating outer and inner vertices, centered on the XY origin.
|
|
2398
|
-
*/
|
|
1639
|
+
/** Alternating outer and inner vertices, centered on the XY origin. */
|
|
2399
1640
|
export declare interface StarOptions
|
|
2400
1641
|
extends StarContourOptions, PrimitiveAttachment {}
|
|
2401
1642
|
|
|
2402
1643
|
/**
|
|
2403
|
-
*
|
|
1644
|
+
* Declares a centered-width Section recipe along a sampled XY path.
|
|
2404
1645
|
*
|
|
2405
|
-
* Shares caps, joins and physical sampling with Geometry's strokeRegionData.
|
|
2406
|
-
* resolves overlapping stroke primitives. Session resolution and resource ceilings apply;
|
|
1646
|
+
* Shares caps, joins and physical sampling with Geometry's strokeRegionData. During evaluation,
|
|
1647
|
+
* union resolves overlapping stroke primitives. Session resolution and resource ceilings apply;
|
|
2407
1648
|
* closed paths omit the duplicated seam. Returns an immutable deferred recipe.
|
|
2408
1649
|
*
|
|
1650
|
+
* @param path - XY path in millimetres.
|
|
1651
|
+
*
|
|
2409
1652
|
* @example Extrude a rounded track
|
|
2410
1653
|
* ```ts
|
|
2411
1654
|
* stroke([[0, 0], [20, 0], [20, 10]], { width: 3, join: "round", cap: "round" }).extrude({ height: 2 });
|
|
@@ -2416,37 +1659,17 @@ export declare function stroke(
|
|
|
2416
1659
|
options: StrokeOptions,
|
|
2417
1660
|
): Section;
|
|
2418
1661
|
|
|
2419
|
-
/** End-cap treatment for an open stroked path. */
|
|
2420
|
-
export declare type StrokeCap = "butt" | "round" | "square";
|
|
2421
|
-
|
|
2422
|
-
/** Join treatment where adjacent stroked path segments meet. */
|
|
2423
|
-
export declare type StrokeJoin = "bevel" | "miter" | "round";
|
|
2424
|
-
|
|
2425
|
-
/** Physical stroke and topology controls shared by pure regions and native Sections. */
|
|
2426
|
-
export declare interface StrokeOptions {
|
|
2427
|
-
/** Explicit path, circular and expanded-profile allocation ceilings. */
|
|
2428
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
2429
|
-
/** Raw point closure defaults to false; a Path2 supplies its closure and rejects conflicts. */
|
|
2430
|
-
readonly closed?: boolean;
|
|
2431
|
-
/** End-cap treatment for an open path. Ignored for closed paths. Default: `butt`. */
|
|
2432
|
-
readonly cap?: StrokeCap;
|
|
2433
|
-
/** Corner treatment; miters exceeding SVG's default limit of 4 become bevels. Default: `miter`. */
|
|
2434
|
-
readonly join?: StrokeJoin;
|
|
2435
|
-
/** Physical tessellation policy for round caps and joins. */
|
|
2436
|
-
readonly resolution?: GeometryResolution;
|
|
2437
|
-
/** Positive total stroke width in millimetres, centered on the sampled path. */
|
|
2438
|
-
readonly width: number;
|
|
2439
|
-
}
|
|
2440
|
-
|
|
2441
1662
|
/** Placement of painted SVG geometry after SVG Y-axis inversion. */
|
|
2442
1663
|
export declare type SvgOrigin = "center" | "document";
|
|
2443
1664
|
|
|
2444
1665
|
/**
|
|
2445
1666
|
* Imports bounded filled SVG path data.
|
|
2446
1667
|
*
|
|
1668
|
+
* @param path - SVG path data, at most 1 MiB of UTF-8; omit the XML wrapper.
|
|
1669
|
+
*
|
|
2447
1670
|
* @example Fill an SVG path in millimetres
|
|
2448
1671
|
* ```ts
|
|
2449
|
-
* svgPathSection("M0 0H20V12H0Z", { origin: "center", scale: 1 });
|
|
1672
|
+
* svgPathSection("M0 0H20V12H0Z", { origin: "center", scale: 1 }).extrude({ height: 3 });
|
|
2450
1673
|
* ```
|
|
2451
1674
|
*/
|
|
2452
1675
|
export declare function svgPathSection(
|
|
@@ -2462,7 +1685,7 @@ export declare interface SvgPathSectionOptions {
|
|
|
2462
1685
|
readonly fillRule?: "evenodd" | "nonzero";
|
|
2463
1686
|
/** Local physical sampling policy; exact interval counts take precedence. */
|
|
2464
1687
|
readonly resolution?: GeometryResolution;
|
|
2465
|
-
/** Center
|
|
1688
|
+
/** Center painted bounds (default), or preserve original path coordinates. */
|
|
2466
1689
|
readonly origin?: SvgOrigin;
|
|
2467
1690
|
/** Positive uniform factor converting SVG user units to millimetres; defaults to one. */
|
|
2468
1691
|
readonly scale?: number;
|
|
@@ -2471,12 +1694,14 @@ export declare interface SvgPathSectionOptions {
|
|
|
2471
1694
|
/**
|
|
2472
1695
|
* Imports bounded painted SVG document geometry.
|
|
2473
1696
|
*
|
|
1697
|
+
* @param svg - Complete SVG XML, at most 256 KiB of UTF-8.
|
|
1698
|
+
*
|
|
2474
1699
|
* @example Import a physical SVG rectangle
|
|
2475
1700
|
* ```ts
|
|
2476
1701
|
* svgSection(
|
|
2477
1702
|
* '<svg xmlns="http://www.w3.org/2000/svg" width="30mm" height="20mm" viewBox="0 0 30 20"><rect width="30" height="20"/></svg>',
|
|
2478
1703
|
* { origin: "center" },
|
|
2479
|
-
* );
|
|
1704
|
+
* ).extrude({ height: 3 });
|
|
2480
1705
|
* ```
|
|
2481
1706
|
*/
|
|
2482
1707
|
export declare function svgSection(
|
|
@@ -2484,9 +1709,7 @@ export declare function svgSection(
|
|
|
2484
1709
|
options?: SvgSectionOptions,
|
|
2485
1710
|
): Section;
|
|
2486
1711
|
|
|
2487
|
-
/**
|
|
2488
|
-
* Bounded SVG document sampling. Center origin uses the final painted bounds.
|
|
2489
|
-
*/
|
|
1712
|
+
/** Bounded SVG document sampling. Center origin uses the final painted bounds. */
|
|
2490
1713
|
export declare interface SvgSectionOptions {
|
|
2491
1714
|
/** Fit painted bounds uniformly inside positioned XY millimetre bounds; adaptive resolution applies at the fitted size. */
|
|
2492
1715
|
readonly fit?: Bounds2Input;
|
|
@@ -2496,18 +1719,21 @@ export declare interface SvgSectionOptions {
|
|
|
2496
1719
|
readonly circularSegments?: number;
|
|
2497
1720
|
/** Local physical sampling policy; exact interval counts take precedence. */
|
|
2498
1721
|
readonly resolution?: GeometryResolution;
|
|
2499
|
-
/**
|
|
1722
|
+
/** Center painted bounds (default), or preserve document coordinates. */
|
|
2500
1723
|
readonly origin?: SvgOrigin;
|
|
2501
1724
|
}
|
|
2502
1725
|
|
|
2503
1726
|
/**
|
|
2504
|
-
* Sweeps a filled Section or
|
|
1727
|
+
* Sweeps a filled Section or corresponding contours along a path or explicit affine placements.
|
|
2505
1728
|
* Use `section.sweep(path, options)` in fluent sequences, or this function for generic profile inputs.
|
|
2506
1729
|
*
|
|
1730
|
+
* @param shape - Profile in local XY millimetres.
|
|
1731
|
+
* @param path - XYZ path in millimetres.
|
|
1732
|
+
*
|
|
2507
1733
|
* @example Sweep
|
|
2508
1734
|
* ```ts
|
|
2509
|
-
* import {
|
|
2510
|
-
* import { rectangleProfile } from "@metamesh/modeling/geometry";
|
|
1735
|
+
* import { sweep } from "@metamesh/modeling";
|
|
1736
|
+
* import { matchProfiles, rectangleProfile } from "@metamesh/modeling/geometry";
|
|
2511
1737
|
*
|
|
2512
1738
|
* const [profile] = matchProfiles([rectangleProfile({ size: [6, 3] })]);
|
|
2513
1739
|
* sweep(profile!, [[0, 0, 0], [0, 0, 15], [10, 0, 25]], {
|
|
@@ -2522,25 +1748,33 @@ export declare function sweep(
|
|
|
2522
1748
|
): Solid;
|
|
2523
1749
|
|
|
2524
1750
|
/**
|
|
2525
|
-
*
|
|
1751
|
+
* Connects one profile through exactly the supplied affine placements.
|
|
1752
|
+
*
|
|
1753
|
+
* @param shape - Profile in local XY millimetres.
|
|
1754
|
+
* @param transforms - Ordered local-to-model placements.
|
|
2526
1755
|
*/
|
|
1756
|
+
export declare function sweep(
|
|
1757
|
+
shape: Section | CorrespondingProfile,
|
|
1758
|
+
transforms: readonly Transform3Input[],
|
|
1759
|
+
options?: SweepTransformOptions,
|
|
1760
|
+
): Solid;
|
|
1761
|
+
|
|
1762
|
+
/** Path-driven sweep orientation, deformation, and physical refinement controls. */
|
|
2527
1763
|
export declare interface SweepOptions {
|
|
2528
1764
|
/** Raw point closure defaults to false; a Path3 supplies its closure and rejects conflicts. */
|
|
2529
1765
|
readonly closed?: boolean;
|
|
2530
1766
|
/** Explicit output and sampling allocation ceilings. */
|
|
2531
1767
|
readonly limits?: Partial<ModelingLimits>;
|
|
2532
|
-
/**
|
|
1768
|
+
/** Default transport minimizes rotations, initially projecting +X then +Y then +Z. */
|
|
2533
1769
|
readonly orientation?: SweepOrientation;
|
|
2534
|
-
/** Physical sampling of
|
|
1770
|
+
/** Physical sampling of twist and varying scale, plus optional segment-length limits. Inserted stations retain authored controls. */
|
|
2535
1771
|
readonly resolution?: GeometryResolution;
|
|
2536
|
-
/** Total additional profile rotation in degrees
|
|
1772
|
+
/** Total additional profile rotation in degrees; compatible closed boundaries are aligned automatically. */
|
|
2537
1773
|
readonly twist?: number;
|
|
2538
1774
|
/** Twist advances by physical path length (default), or normalized authored station position, including a closed seam gap. */
|
|
2539
1775
|
readonly twistBy?: "length" | "stations";
|
|
2540
|
-
/** Positive uniform/XY scale,
|
|
1776
|
+
/** Positive final uniform/XY scale on open paths, interpolated from one by path length. Closed paths use a uniform scale. Explicit XY pairs set each original station; omitted is one. */
|
|
2541
1777
|
readonly scale?: number | Vector2Input | readonly Vector2Input[];
|
|
2542
|
-
/** Corresponding point-index advance at a rotationally equivalent closed seam. */
|
|
2543
|
-
readonly seamProfileOffset?: number;
|
|
2544
1778
|
}
|
|
2545
1779
|
|
|
2546
1780
|
/**
|
|
@@ -2570,11 +1804,34 @@ export declare type SweepOrientation =
|
|
|
2570
1804
|
readonly kind: "frenet";
|
|
2571
1805
|
};
|
|
2572
1806
|
|
|
1807
|
+
/** Explicit-transform sweeps connect exactly the supplied stations, with no inferred rotation or refinement. */
|
|
1808
|
+
export declare interface SweepTransformOptions {
|
|
1809
|
+
/** Connect the last supplied station to the first without caps. Defaults to false. */
|
|
1810
|
+
readonly closed?: boolean;
|
|
1811
|
+
/** Explicit output and station allocation ceilings. */
|
|
1812
|
+
readonly limits?: Partial<ModelingLimits>;
|
|
1813
|
+
/** Encoded by the explicit transforms. */
|
|
1814
|
+
readonly orientation?: never;
|
|
1815
|
+
/** Explicit stations are never refined. */
|
|
1816
|
+
readonly resolution?: never;
|
|
1817
|
+
/** Encoded by the explicit transforms. */
|
|
1818
|
+
readonly twist?: never;
|
|
1819
|
+
/** Encoded by the explicit transforms. */
|
|
1820
|
+
readonly twistBy?: never;
|
|
1821
|
+
/** Encoded by the explicit transforms. */
|
|
1822
|
+
readonly scale?: never;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
2573
1825
|
/**
|
|
2574
1826
|
* Consumes a previously prepared layout; never shapes or fetches a font.
|
|
2575
1827
|
*
|
|
1828
|
+
* @param layout - Prepared millimetre outlines; create the layout before generation.
|
|
1829
|
+
*
|
|
2576
1830
|
* @example Use a prepared text layout
|
|
2577
1831
|
* ```ts
|
|
1832
|
+
* import { textSection } from "@metamesh/modeling";
|
|
1833
|
+
* import type { VectorTextLayout } from "@metamesh/modeling/geometry";
|
|
1834
|
+
*
|
|
2578
1835
|
* // Prepare the exact font and layout before entering build.
|
|
2579
1836
|
* function labelSection(layout: VectorTextLayout) {
|
|
2580
1837
|
* return textSection(layout);
|
|
@@ -2586,9 +1843,7 @@ export declare function textSection(
|
|
|
2586
1843
|
options?: TextSectionOptions,
|
|
2587
1844
|
): Section;
|
|
2588
1845
|
|
|
2589
|
-
/**
|
|
2590
|
-
* Physical curve sampling applied to already prepared vector text.
|
|
2591
|
-
*/
|
|
1846
|
+
/** Physical curve sampling applied to already prepared vector text. */
|
|
2592
1847
|
export declare interface TextSectionOptions {
|
|
2593
1848
|
/** Local allocation ceilings may only lower the configured engine policy. */
|
|
2594
1849
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
@@ -2596,73 +1851,19 @@ export declare interface TextSectionOptions {
|
|
|
2596
1851
|
readonly resolution?: GeometryResolution;
|
|
2597
1852
|
}
|
|
2598
1853
|
|
|
2599
|
-
/** 45-degree end bevels for compensated rods and cutters. */
|
|
2600
|
-
export declare interface ThreadBevelOptions {
|
|
2601
|
-
/** Bottom/top sizes in millimetres. Omitted disables both. Auto uses profile depth for standard/tapered ends,
|
|
2602
|
-
* or one sixth of the compensated male minor/female major radius for blunt ends. */
|
|
2603
|
-
readonly bevel?: Bevel;
|
|
2604
|
-
}
|
|
2605
|
-
|
|
2606
1854
|
/**
|
|
2607
1855
|
* Compensated threaded nut.
|
|
2608
1856
|
*
|
|
2609
1857
|
* @example Threaded nut
|
|
2610
1858
|
* ```ts
|
|
2611
1859
|
* import { threadedNut } from "@metamesh/modeling";
|
|
2612
|
-
* import { threadProfile } from "@metamesh/modeling/geometry";
|
|
1860
|
+
* import { threadProfile } from "@metamesh/modeling/geometry/mechanical";
|
|
2613
1861
|
*
|
|
2614
1862
|
* const profile = threadProfile({ kind: "triangular", pitch: 1.75 });
|
|
2615
1863
|
* threadedNut({ nominalMajorDiameter: 12, thickness: 8, width: 20, shape: "hex", profile, fit: "normal" });
|
|
2616
1864
|
* ```
|
|
2617
1865
|
*/
|
|
2618
|
-
export declare function threadedNut(options:
|
|
2619
|
-
|
|
2620
|
-
/**
|
|
2621
|
-
* Options for a compensated nut with an internal thread.
|
|
2622
|
-
*/
|
|
2623
|
-
export declare interface ThreadedNutOptions extends Omit<
|
|
2624
|
-
InternalThreadCutterOptions,
|
|
2625
|
-
"bevel" | "length"
|
|
2626
|
-
> {
|
|
2627
|
-
/** Opening bevels in [bottom, top] order. Omitted or auto uses min(profile.depth, thickness/4); zero disables. */
|
|
2628
|
-
readonly innerBevel?: Bevel;
|
|
2629
|
-
/** Body bevels in [bottom, top] order. Omitted or auto uses min(profile.depth, thickness/4).
|
|
2630
|
-
* Use [0, "auto"] to keep the outside bottom flat without disabling its inner opening bevel. */
|
|
2631
|
-
readonly outerBevel?: Bevel;
|
|
2632
|
-
/** Optional physical policy for a round body, independent of the thread's matched facet grid. */
|
|
2633
|
-
readonly bodyResolution?: GeometryResolution;
|
|
2634
|
-
/** Nut body shape. */
|
|
2635
|
-
readonly shape: ThreadedNutShape;
|
|
2636
|
-
/** Nut thickness along +Z in millimetres. */
|
|
2637
|
-
readonly thickness: number;
|
|
2638
|
-
/** Across-flats width for hex/square or diameter for round, in millimetres. */
|
|
2639
|
-
readonly width: number;
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
/** Resolved body and end-face dimensions plus conservative allocation estimates for the thread cutter. */
|
|
2643
|
-
export declare interface ThreadedNutPreflight {
|
|
2644
|
-
/** Polygon segment count used by the nut body. */
|
|
2645
|
-
readonly bodySegments: number;
|
|
2646
|
-
/** Resolved opening bevel sizes in millimetres, [bottom, top]. */
|
|
2647
|
-
readonly innerBevel: readonly [bottom: number, top: number];
|
|
2648
|
-
/** Resolved body bevel sizes in millimetres, [bottom, top]. */
|
|
2649
|
-
readonly outerBevel: readonly [bottom: number, top: number];
|
|
2650
|
-
/** Maximum compensated cutter radius at either requested face. */
|
|
2651
|
-
readonly cutterFaceRadius: number;
|
|
2652
|
-
/** Minimum nut-body inradius across the requested top and bottom faces. */
|
|
2653
|
-
readonly minimumBodyFaceInradius: number;
|
|
2654
|
-
/** Smallest radial wall left between the body and cutter at either requested face. */
|
|
2655
|
-
readonly minimumFaceWall: number;
|
|
2656
|
-
/** Conservative allocation estimates for the extended cutter; excludes the body and Boolean result. */
|
|
2657
|
-
readonly thread: ThreadSolidPreflight;
|
|
2658
|
-
/** Start-aligned circular facet count used by the compensated thread cutter. */
|
|
2659
|
-
readonly threadCircularSegments: number;
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
/**
|
|
2663
|
-
* Supported printable nut body shapes.
|
|
2664
|
-
*/
|
|
2665
|
-
export declare type ThreadedNutShape = "hex" | "round" | "square";
|
|
1866
|
+
export declare function threadedNut(options: ThreadedNutSolidOptions): Solid;
|
|
2666
1867
|
|
|
2667
1868
|
/**
|
|
2668
1869
|
* Compensated external threaded rod.
|
|
@@ -2670,155 +1871,17 @@ export declare type ThreadedNutShape = "hex" | "round" | "square";
|
|
|
2670
1871
|
* @example Threaded rod
|
|
2671
1872
|
* ```ts
|
|
2672
1873
|
* import { threadedRod } from "@metamesh/modeling";
|
|
2673
|
-
* import { threadProfile } from "@metamesh/modeling/geometry";
|
|
1874
|
+
* import { threadProfile } from "@metamesh/modeling/geometry/mechanical";
|
|
2674
1875
|
*
|
|
2675
1876
|
* const profile = threadProfile({ kind: "triangular", pitch: 1.75 });
|
|
2676
1877
|
* threadedRod({ nominalMajorDiameter: 12, length: 24, profile, fit: "normal" });
|
|
2677
1878
|
* ```
|
|
2678
1879
|
*/
|
|
2679
|
-
export declare function threadedRod(options:
|
|
2680
|
-
|
|
2681
|
-
/**
|
|
2682
|
-
* Options for a compensated external threaded rod along +Z.
|
|
2683
|
-
*/
|
|
2684
|
-
export declare interface ThreadedRodOptions
|
|
2685
|
-
extends Omit<ThreadRidgeOptions, "majorDiameter">, ThreadBevelOptions {
|
|
2686
|
-
/** Printable fit or caller-calibrated allowances. Default: `normal`. */
|
|
2687
|
-
readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
|
|
2688
|
-
/** Nominal major diameter before male compensation. */
|
|
2689
|
-
readonly nominalMajorDiameter: number;
|
|
2690
|
-
}
|
|
2691
|
-
|
|
2692
|
-
/** End shape of a generated helical ridge. */
|
|
2693
|
-
export declare type ThreadEndStyle = "blunt" | "standard" | "tapered";
|
|
2694
|
-
|
|
2695
|
-
/** Axial end controls for a generated ridge. */
|
|
2696
|
-
export declare interface ThreadEndTreatmentOptions {
|
|
2697
|
-
/**
|
|
2698
|
-
* Ridge shape at the lower working boundary. `blunt` ends at full profile height, `standard`
|
|
2699
|
-
* clips the periodic profile at the face, and `tapered` ramps out from the minor envelope.
|
|
2700
|
-
* @defaultValue `"blunt"`
|
|
2701
|
-
*/
|
|
2702
|
-
readonly bottom?: ThreadEndStyle;
|
|
2703
|
-
/**
|
|
2704
|
-
* Non-negative unthreaded envelope length reserved at each non-standard end, in millimetres.
|
|
2705
|
-
* Active blunt bevels may raise this reservation to the effective bevel size.
|
|
2706
|
-
* @defaultValue `0`
|
|
2707
|
-
*/
|
|
2708
|
-
readonly endLength?: number;
|
|
2709
|
-
/**
|
|
2710
|
-
* Radial envelope toward which a blunt lead-in collapses.
|
|
2711
|
-
* @defaultValue `"minor"`
|
|
2712
|
-
*/
|
|
2713
|
-
readonly leadInEnvelope?: ThreadLeadInEnvelope;
|
|
2714
|
-
/**
|
|
2715
|
-
* Physical circumferential lead-in length in millimetres.
|
|
2716
|
-
* @defaultValue The profile depth.
|
|
2717
|
-
*/
|
|
2718
|
-
readonly leadInLength?: number;
|
|
2719
|
-
/**
|
|
2720
|
-
* Cross-section scaling curve used by blunt ends. `cut` switches abruptly to the full profile.
|
|
2721
|
-
* @defaultValue `"cut"`
|
|
2722
|
-
*/
|
|
2723
|
-
readonly leadInShape?: ThreadLeadInShape;
|
|
2724
|
-
/**
|
|
2725
|
-
* Ridge shape at the upper working boundary. `blunt` ends at full profile height, `standard`
|
|
2726
|
-
* clips the periodic profile at the face, and `tapered` ramps into the minor envelope.
|
|
2727
|
-
* @defaultValue `"blunt"`
|
|
2728
|
-
*/
|
|
2729
|
-
readonly top?: ThreadEndStyle;
|
|
2730
|
-
}
|
|
2731
|
-
|
|
2732
|
-
/**
|
|
2733
|
-
* Direction in which a conventional helical thread advances around +Z.
|
|
2734
|
-
*/
|
|
2735
|
-
export declare type ThreadHandedness = "left" | "right";
|
|
2736
|
-
|
|
2737
|
-
/** Radial envelope toward which a blunt lead-in collapses. */
|
|
2738
|
-
export declare type ThreadLeadInEnvelope = "major" | "minor";
|
|
2739
|
-
|
|
2740
|
-
/** BOSL2-compatible cross-section scaling curve for a blunt thread lead-in. */
|
|
2741
|
-
export declare type ThreadLeadInShape = "cut" | "linear" | "smooth" | "sqrt";
|
|
2742
|
-
|
|
2743
|
-
/**
|
|
2744
|
-
* A validated immutable periodic thread profile in `[axial, radial]` millimetres.
|
|
2745
|
-
*/
|
|
2746
|
-
export declare interface ThreadProfile {
|
|
2747
|
-
/** Axial width of the flat at the major envelope. */
|
|
2748
|
-
readonly crestFlatWidth: number;
|
|
2749
|
-
/** Radial distance from the major envelope to the root. */
|
|
2750
|
-
readonly depth: number;
|
|
2751
|
-
/** Profile family that produced this validated profile. */
|
|
2752
|
-
readonly kind: ThreadProfileSpec["kind"];
|
|
2753
|
-
/** Adjacent axial thread spacing in millimetres. */
|
|
2754
|
-
readonly pitch: number;
|
|
2755
|
-
/** Immutable open `[axial, radial]` path spanning one pitch. */
|
|
2756
|
-
readonly points: readonly Vector2Data[];
|
|
2757
|
-
/** Axial width of the flat at the minor envelope. */
|
|
2758
|
-
readonly rootFlatWidth: number;
|
|
2759
|
-
}
|
|
2760
|
-
|
|
2761
|
-
/** Fields shared by all thread profile specifications. */
|
|
2762
|
-
export declare interface ThreadProfileBaseSpec {
|
|
2763
|
-
/** Adjacent axial thread spacing in millimetres. */
|
|
2764
|
-
readonly pitch: number;
|
|
2765
|
-
/** Optional numerical tolerance overrides. */
|
|
2766
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
2767
|
-
}
|
|
1880
|
+
export declare function threadedRod(options: ThreadedRodSolidOptions): Solid;
|
|
2768
1881
|
|
|
2769
|
-
/**
|
|
2770
|
-
* Supported built-in and caller-defined thread profiles.
|
|
2771
|
-
*/
|
|
2772
|
-
export declare type ThreadProfileSpec =
|
|
2773
|
-
| AcmeThreadProfileSpec
|
|
2774
|
-
| ButtressThreadProfileSpec
|
|
2775
|
-
| CustomThreadProfileSpec
|
|
2776
|
-
| SquareThreadProfileSpec
|
|
2777
|
-
| TrapezoidalThreadProfileSpec
|
|
2778
|
-
| TriangularThreadProfileSpec;
|
|
2779
|
-
|
|
2780
|
-
/** Helical ridge mesh construction. */
|
|
1882
|
+
/** Declares a helical ridge Solid recipe along +Z, with lengths in millimetres. */
|
|
2781
1883
|
export declare function threadRidge(options: ThreadRidgeOptions): Solid;
|
|
2782
1884
|
|
|
2783
|
-
/** Runtime-neutral options for the dedicated helical ridge mesher. */
|
|
2784
|
-
export declare interface ThreadRidgeOptions {
|
|
2785
|
-
/**
|
|
2786
|
-
* Optional bottom/top ridge-end treatments. Standalone ridges honor the requested boundaries;
|
|
2787
|
-
* BOSL2-style non-cut lead-in scaling is available on complete thread solids.
|
|
2788
|
-
*/
|
|
2789
|
-
readonly ends?: ThreadEndTreatmentOptions;
|
|
2790
|
-
/** Helix direction. Default: `right`. */
|
|
2791
|
-
readonly handedness?: ThreadHandedness;
|
|
2792
|
-
/** Total threaded axial length in millimetres. */
|
|
2793
|
-
readonly length: number;
|
|
2794
|
-
/** Explicit output and circular allocation ceilings. */
|
|
2795
|
-
readonly limits?: Partial<ModelingLimits>;
|
|
2796
|
-
/** Nominal major diameter before any caller-owned fit compensation. */
|
|
2797
|
-
readonly majorDiameter: number;
|
|
2798
|
-
/** Angular offset of the first start in degrees. Default: `0`. */
|
|
2799
|
-
readonly phase?: number;
|
|
2800
|
-
/** Validated periodic profile repeated around the shaft. */
|
|
2801
|
-
readonly profile: ThreadProfile;
|
|
2802
|
-
/** Optional circular-resolution policy. */
|
|
2803
|
-
readonly resolution?: GeometryResolution;
|
|
2804
|
-
/** Number of evenly phased starts. Default: `1`. */
|
|
2805
|
-
readonly starts?: number;
|
|
2806
|
-
/** Optional numerical tolerance overrides. */
|
|
2807
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
2808
|
-
}
|
|
2809
|
-
|
|
2810
|
-
/** Selected sampling counts and conservative allocation estimates, before thread mesh construction. */
|
|
2811
|
-
export declare interface ThreadSolidPreflight {
|
|
2812
|
-
/** Uniform axial intervals required only by a requested physical segment-length limit. */
|
|
2813
|
-
readonly axialIntervals: number;
|
|
2814
|
-
/** Start-aligned full-circle segment count used by the surface mesh. */
|
|
2815
|
-
readonly circularSegments: number;
|
|
2816
|
-
/** Conservative surface-row count across profile breaks, ends, and bevel stations. */
|
|
2817
|
-
readonly estimatedRows: number;
|
|
2818
|
-
/** Conservative triangle count used by the selected output allocation policy. */
|
|
2819
|
-
readonly estimatedTriangles: number;
|
|
2820
|
-
}
|
|
2821
|
-
|
|
2822
1885
|
/**
|
|
2823
1886
|
* Torus around +Z.
|
|
2824
1887
|
*
|
|
@@ -2829,9 +1892,7 @@ export declare interface ThreadSolidPreflight {
|
|
|
2829
1892
|
*/
|
|
2830
1893
|
export declare function torus(options: TorusOptions): Solid;
|
|
2831
1894
|
|
|
2832
|
-
/**
|
|
2833
|
-
* Dimensions and independent ring/profile tessellation for a torus around the Z axis.
|
|
2834
|
-
*/
|
|
1895
|
+
/** Dimensions and independent ring/profile tessellation for a torus around the Z axis. */
|
|
2835
1896
|
export declare interface TorusOptions extends PrimitiveAttachment {
|
|
2836
1897
|
/** Explicit sampling ceilings, bounded by the host policy. */
|
|
2837
1898
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
@@ -2847,221 +1908,6 @@ export declare interface TorusOptions extends PrimitiveAttachment {
|
|
|
2847
1908
|
readonly resolution?: GeometryResolution;
|
|
2848
1909
|
}
|
|
2849
1910
|
|
|
2850
|
-
/** Immutable reusable XY placement. Methods apply in written order; angles are degrees. */
|
|
2851
|
-
export declare interface Transform2 {
|
|
2852
|
-
/** Applies a translation in model units after this placement. */
|
|
2853
|
-
translate(offset: Vector2Input): Transform2;
|
|
2854
|
-
/** Rotates counterclockwise in degrees about an optional world-space pivot (default origin). */
|
|
2855
|
-
rotate(degrees: number, options?: Pivot2Options): Transform2;
|
|
2856
|
-
/** Scales about an optional world-space pivot; finite nonzero factors may reflect. */
|
|
2857
|
-
scale(factors: number | Vector2Input, options?: Pivot2Options): Transform2;
|
|
2858
|
-
/** Applies this placement first, then `next`; neither operand is mutated. */
|
|
2859
|
-
andThen(next: Transform2Input): Transform2;
|
|
2860
|
-
/** Returns the inverse; singular and numerically unstable transforms throw GeometryError. */
|
|
2861
|
-
inverse(): Transform2;
|
|
2862
|
-
/** Transforms a finite point, including translation. Returns a fresh immutable vector. */
|
|
2863
|
-
applyPoint(point: Vector2Input): Vector2;
|
|
2864
|
-
/** Transforms a finite direction, excluding translation and retaining scale. This is not a normal transform. */
|
|
2865
|
-
applyDirection(direction: Vector2Input): Vector2;
|
|
2866
|
-
/** Applies the inverse transpose and normalizes. Ignores translation; rejects zero normals. */
|
|
2867
|
-
applyNormal(normal: Vector2Input): Vector2;
|
|
2868
|
-
/** Returns the frozen canonical row-major 3x3 matrix for interchange. */
|
|
2869
|
-
toData(): Transform2Data;
|
|
2870
|
-
/** Embeds this placement in XYZ, leaving Z unchanged, for solids and 3D paths. */
|
|
2871
|
-
to3D(): Transform3;
|
|
2872
|
-
}
|
|
2873
|
-
|
|
2874
|
-
/**
|
|
2875
|
-
* Creates an immutable XY transform, identity by default.
|
|
2876
|
-
*
|
|
2877
|
-
* Values and data are copied and validated.
|
|
2878
|
-
* Pass it directly to Section.transform() and planar data helpers; to3D() explicitly crosses into XYZ.
|
|
2879
|
-
* Zero scales and singular matrices throw GeometryError; negative scales reflect.
|
|
2880
|
-
*
|
|
2881
|
-
* Use `toData()` for frozen matrix interchange.
|
|
2882
|
-
*
|
|
2883
|
-
* @example
|
|
2884
|
-
* ```ts
|
|
2885
|
-
* const placement = transform2().rotate(90).translate([10, 0]);
|
|
2886
|
-
* placement.applyPoint([1, 0]).toData(); // approximately [10, 1]
|
|
2887
|
-
* ```
|
|
2888
|
-
*/
|
|
2889
|
-
export declare function transform2(input?: Transform2Input): Transform2;
|
|
2890
|
-
|
|
2891
|
-
/**
|
|
2892
|
-
* A row-major affine 3x3 XY matrix applied to column vectors.
|
|
2893
|
-
* Translation occupies indices 2 and 5; the final row is `[0, 0, 1]`.
|
|
2894
|
-
*/
|
|
2895
|
-
export declare type Transform2Data = readonly [
|
|
2896
|
-
m00: number,
|
|
2897
|
-
m01: number,
|
|
2898
|
-
m02: number,
|
|
2899
|
-
m10: number,
|
|
2900
|
-
m11: number,
|
|
2901
|
-
m12: number,
|
|
2902
|
-
m20: number,
|
|
2903
|
-
m21: number,
|
|
2904
|
-
m22: number,
|
|
2905
|
-
];
|
|
2906
|
-
|
|
2907
|
-
/** An immutable XY transform or its canonical row-major matrix for interchange. */
|
|
2908
|
-
export declare type Transform2Input = Transform2 | Transform2Data;
|
|
2909
|
-
|
|
2910
|
-
/** Immutable reusable XYZ placement. Methods apply in written order; angles are degrees. */
|
|
2911
|
-
export declare interface Transform3 {
|
|
2912
|
-
/** Applies a translation in model units after this placement. */
|
|
2913
|
-
translate(offset: Vector3Input): Transform3;
|
|
2914
|
-
/** Rotates about global X, then Y, then Z in degrees, about an optional world-space pivot. */
|
|
2915
|
-
rotate(degrees: Vector3Input, options?: Pivot3Options): Transform3;
|
|
2916
|
-
/** Rotates right-handed in degrees about a nonzero axis and optional world-space pivot. */
|
|
2917
|
-
rotateAxis(
|
|
2918
|
-
axis: Vector3Input,
|
|
2919
|
-
degrees: number,
|
|
2920
|
-
options?: Pivot3Options,
|
|
2921
|
-
): Transform3;
|
|
2922
|
-
/** Scales about an optional world-space pivot; finite nonzero factors may reflect. */
|
|
2923
|
-
scale(factors: number | Vector3Input, options?: Pivot3Options): Transform3;
|
|
2924
|
-
/** Applies this placement first, then `next`; equivalent to composeTransform3(next, current). */
|
|
2925
|
-
andThen(next: Transform3Input): Transform3;
|
|
2926
|
-
/** Returns the inverse; singular and numerically unstable transforms throw GeometryError. */
|
|
2927
|
-
inverse(): Transform3;
|
|
2928
|
-
/** Transforms a finite point, including translation. Returns a fresh immutable vector. */
|
|
2929
|
-
applyPoint(point: Vector3Input): Vector3;
|
|
2930
|
-
/** Transforms a finite direction, excluding translation and retaining scale. This is not a normal transform. */
|
|
2931
|
-
applyDirection(direction: Vector3Input): Vector3;
|
|
2932
|
-
/** Applies the inverse transpose and normalizes. Ignores translation; rejects zero normals. */
|
|
2933
|
-
applyNormal(normal: Vector3Input): Vector3;
|
|
2934
|
-
/** Returns the frozen canonical row-major 4x4 matrix for interchange. */
|
|
2935
|
-
toData(): Transform3Data;
|
|
2936
|
-
/** Restricts to XY; throws GeometryError for a plane change or singular XY restriction. */
|
|
2937
|
-
to2D(): Transform2;
|
|
2938
|
-
}
|
|
2939
|
-
|
|
2940
|
-
/**
|
|
2941
|
-
* Creates an immutable XYZ transform, identity by default.
|
|
2942
|
-
*
|
|
2943
|
-
* Values and data are copied and validated.
|
|
2944
|
-
* Calls apply in written order; rotations use degrees and pivots use current world coordinates.
|
|
2945
|
-
* Zero scales, singular matrices, nonfinite inputs and zero rotation axes throw GeometryError.
|
|
2946
|
-
* Use frameTransform3(frame) as the input for existing orthonormal frame placement.
|
|
2947
|
-
*
|
|
2948
|
-
* Use `toData()` for frozen matrix interchange.
|
|
2949
|
-
* [composeTransform3](/docs/reference/geometry/composeTransform3) takes matrices in after, before order.
|
|
2950
|
-
*
|
|
2951
|
-
* @example
|
|
2952
|
-
* ```ts
|
|
2953
|
-
* const placement = transform3().rotate([0, 0, 90]).translate([10, 0, 0]);
|
|
2954
|
-
* placement.applyPoint([1, 0, 0]).toData(); // approximately [10, 1, 0]
|
|
2955
|
-
* ```
|
|
2956
|
-
*/
|
|
2957
|
-
export declare function transform3(input?: Transform3Input): Transform3;
|
|
2958
|
-
|
|
2959
|
-
/**
|
|
2960
|
-
* A row-major affine 4x4 matrix applied to column vectors.
|
|
2961
|
-
*
|
|
2962
|
-
* Translation occupies indices 3, 7, and 11. The final row must be
|
|
2963
|
-
* `[0, 0, 0, 1]` within the active geometry tolerance.
|
|
2964
|
-
*/
|
|
2965
|
-
export declare type Transform3Data = readonly [
|
|
2966
|
-
m00: number,
|
|
2967
|
-
m01: number,
|
|
2968
|
-
m02: number,
|
|
2969
|
-
m03: number,
|
|
2970
|
-
m10: number,
|
|
2971
|
-
m11: number,
|
|
2972
|
-
m12: number,
|
|
2973
|
-
m13: number,
|
|
2974
|
-
m20: number,
|
|
2975
|
-
m21: number,
|
|
2976
|
-
m22: number,
|
|
2977
|
-
m23: number,
|
|
2978
|
-
m30: number,
|
|
2979
|
-
m31: number,
|
|
2980
|
-
m32: number,
|
|
2981
|
-
m33: number,
|
|
2982
|
-
];
|
|
2983
|
-
|
|
2984
|
-
/** An immutable XYZ transform or its canonical row-major matrix for interchange. */
|
|
2985
|
-
export declare type Transform3Input = Transform3 | Transform3Data;
|
|
2986
|
-
|
|
2987
|
-
/** Trapezoidal thread profile with a configurable included angle. */
|
|
2988
|
-
export declare interface TrapezoidalThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
2989
|
-
/** Selects the trapezoidal profile family. */
|
|
2990
|
-
readonly kind: "trapezoidal";
|
|
2991
|
-
/**
|
|
2992
|
-
* Radial depth in millimetres.
|
|
2993
|
-
* @defaultValue `pitch / 2`
|
|
2994
|
-
*/
|
|
2995
|
-
readonly depth?: number;
|
|
2996
|
-
/**
|
|
2997
|
-
* Full angle between the flanks in degrees, from `0` inclusive to `180` exclusive.
|
|
2998
|
-
* Each flank uses half this angle from the radial direction; `90` gives 45-degree slopes.
|
|
2999
|
-
* @defaultValue `30`
|
|
3000
|
-
*/
|
|
3001
|
-
readonly includedAngle?: number;
|
|
3002
|
-
}
|
|
3003
|
-
|
|
3004
|
-
/** A topology-preserving indexed triangle mesh with mutable owned XYZ buffers. */
|
|
3005
|
-
export declare interface TriangleMesh {
|
|
3006
|
-
/** Three unsigned vertex indices per triangle. */
|
|
3007
|
-
readonly indices: Uint32Array;
|
|
3008
|
-
/** Flat XYZ coordinates in millimetres. */
|
|
3009
|
-
readonly positions: Float32Array;
|
|
3010
|
-
}
|
|
3011
|
-
|
|
3012
|
-
/**
|
|
3013
|
-
* Measurements and optional edge-connected topology from one validated mesh traversal.
|
|
3014
|
-
*/
|
|
3015
|
-
export declare interface TriangleMeshAnalysis extends TriangleMeshMeasurements {
|
|
3016
|
-
/** Number of surface shells connected by shared indexed edges when includeTopology is requested.
|
|
3017
|
-
* Cavities count separately; shells may be open unless requireClosed is enabled. Coordinates are not welded. */
|
|
3018
|
-
readonly shellCount?: number;
|
|
3019
|
-
/** Number of distinct indexed undirected edges when `includeTopology` is requested. */
|
|
3020
|
-
readonly edgeCount?: number;
|
|
3021
|
-
}
|
|
3022
|
-
|
|
3023
|
-
/**
|
|
3024
|
-
* Geometric measurements derived from a validated, non-empty triangle mesh.
|
|
3025
|
-
*/
|
|
3026
|
-
export declare interface TriangleMeshMeasurements {
|
|
3027
|
-
/** Axis-aligned bounds. */
|
|
3028
|
-
readonly bounds: Bounds3Data;
|
|
3029
|
-
/** Signed enclosed volume; positive values correspond to outward winding. */
|
|
3030
|
-
readonly signedVolume: number;
|
|
3031
|
-
/** Sum of all triangle areas in squared model units. */
|
|
3032
|
-
readonly surfaceArea: number;
|
|
3033
|
-
/** Number of indexed triangles. */
|
|
3034
|
-
readonly triangleCount: number;
|
|
3035
|
-
/** Number of distinct entries in the position buffer. */
|
|
3036
|
-
readonly vertexCount: number;
|
|
3037
|
-
}
|
|
3038
|
-
|
|
3039
|
-
/** Mesh measurements with the indexed surface-shell and edge counts requested by includeTopology. */
|
|
3040
|
-
export declare interface TriangleMeshTopologyAnalysis extends TriangleMeshAnalysis {
|
|
3041
|
-
/** Number of surface shells connected by shared indexed edges; cavities count separately. */
|
|
3042
|
-
readonly shellCount: number;
|
|
3043
|
-
/** Number of distinct indexed undirected edges. */
|
|
3044
|
-
readonly edgeCount: number;
|
|
3045
|
-
}
|
|
3046
|
-
|
|
3047
|
-
/**
|
|
3048
|
-
* ISO/UTS-like 60-degree truncated triangular profile.
|
|
3049
|
-
*/
|
|
3050
|
-
export declare interface TriangularThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
3051
|
-
/** Selects the 60-degree triangular profile family. */
|
|
3052
|
-
readonly kind: "triangular";
|
|
3053
|
-
/**
|
|
3054
|
-
* Crest width divided by pitch.
|
|
3055
|
-
* @defaultValue `1 / 8`
|
|
3056
|
-
*/
|
|
3057
|
-
readonly crestFlatRatio?: number;
|
|
3058
|
-
/**
|
|
3059
|
-
* Root width divided by pitch.
|
|
3060
|
-
* @defaultValue `1 / 4`
|
|
3061
|
-
*/
|
|
3062
|
-
readonly rootFlatRatio?: number;
|
|
3063
|
-
}
|
|
3064
|
-
|
|
3065
1911
|
/**
|
|
3066
1912
|
* Hollow +Z tube.
|
|
3067
1913
|
*
|
|
@@ -3072,9 +1918,7 @@ export declare interface TriangularThreadProfileSpec extends ThreadProfileBaseSp
|
|
|
3072
1918
|
*/
|
|
3073
1919
|
export declare function tube(options: TubeOptions): Solid;
|
|
3074
1920
|
|
|
3075
|
-
/**
|
|
3076
|
-
* Dimensions, placement, and tessellation for a hollow Z-axis tube.
|
|
3077
|
-
*/
|
|
1921
|
+
/** Dimensions, placement, and tessellation for a hollow Z-axis tube. */
|
|
3078
1922
|
export declare type TubeOptions = CircularPrimitiveOptions &
|
|
3079
1923
|
PrimitiveAttachment & {
|
|
3080
1924
|
/**
|
|
@@ -3082,6 +1926,8 @@ export declare type TubeOptions = CircularPrimitiveOptions &
|
|
|
3082
1926
|
* @defaultValue `true`
|
|
3083
1927
|
*/
|
|
3084
1928
|
readonly center?: boolean;
|
|
1929
|
+
/** Independent end treatments trim both the outer rim and bore mouth; first setback is cap inset, second is axial depth. */
|
|
1930
|
+
readonly ends?: EndTreatments;
|
|
3085
1931
|
/** Total height along Z in millimetres. */
|
|
3086
1932
|
readonly height: number;
|
|
3087
1933
|
/** Inner nominal dimension meets polygon vertices or faces; defaults to vertex. */
|
|
@@ -3114,6 +1960,8 @@ export declare type TubeOptions = CircularPrimitiveOptions &
|
|
|
3114
1960
|
/**
|
|
3115
1961
|
* Robust union of one or more shapes; empty input rejects during declaration.
|
|
3116
1962
|
*
|
|
1963
|
+
* @param solids - Operands in shared modeling coordinates.
|
|
1964
|
+
*
|
|
3117
1965
|
* @example Union
|
|
3118
1966
|
* ```ts
|
|
3119
1967
|
* const block = box({ size: 20 });
|
|
@@ -3123,135 +1971,11 @@ export declare type TubeOptions = CircularPrimitiveOptions &
|
|
|
3123
1971
|
*/
|
|
3124
1972
|
export declare function union(solids: readonly Solid[]): Solid;
|
|
3125
1973
|
|
|
3126
|
-
/** Native filled section union; dimensions cannot be mixed. */
|
|
3127
|
-
export declare function union(sections: readonly Section[]): Section;
|
|
3128
|
-
|
|
3129
|
-
/** Immutable XY arithmetic; vector operations return new values and measurements return numbers. */
|
|
3130
|
-
export declare interface Vector2 {
|
|
3131
|
-
/** X coordinate in the vector's coordinate units. */
|
|
3132
|
-
readonly x: number;
|
|
3133
|
-
/** Y coordinate in the vector's coordinate units. */
|
|
3134
|
-
readonly y: number;
|
|
3135
|
-
/** Adds another vector component-wise. */
|
|
3136
|
-
add(other: Vector2Input): Vector2;
|
|
3137
|
-
/** Subtracts another vector component-wise. */
|
|
3138
|
-
subtract(other: Vector2Input): Vector2;
|
|
3139
|
-
/** Multiplies by a finite dimensionless scalar. */
|
|
3140
|
-
scale(factor: number): Vector2;
|
|
3141
|
-
/** Returns a unit vector; rejects length at or below finite nonnegative `epsilon` (default `1e-12`). */
|
|
3142
|
-
normalize(epsilon?: number): Vector2;
|
|
3143
|
-
/** Interpolates toward another vector by finite dimensionless `t`; extrapolation is allowed. */
|
|
3144
|
-
lerp(other: Vector2Input, t: number): Vector2;
|
|
3145
|
-
/** Returns the scalar dot product. */
|
|
3146
|
-
dot(other: Vector2Input): number;
|
|
3147
|
-
/** Returns the signed scalar cross product; positive means the other vector is counterclockwise. */
|
|
3148
|
-
cross(other: Vector2Input): number;
|
|
3149
|
-
/** Returns Euclidean length in the vector's coordinate units. */
|
|
3150
|
-
length(): number;
|
|
3151
|
-
/** Returns Euclidean distance to another vector in the same coordinate units. */
|
|
3152
|
-
distance(other: Vector2Input): number;
|
|
3153
|
-
/** Returns this value's frozen readonly tuple for interchange; repeated calls do not allocate. */
|
|
3154
|
-
toData(): Vector2Data;
|
|
3155
|
-
}
|
|
3156
|
-
|
|
3157
|
-
/**
|
|
3158
|
-
* Creates immutable XY arithmetic from a finite tuple or vector, snapshotting the coordinates.
|
|
3159
|
-
*
|
|
3160
|
-
* Values and results are finite. Invalid dimensions throw `INVALID_ARGUMENT`; nonfinite coordinates
|
|
3161
|
-
* and overflow throw `NON_FINITE_VALUE` GeometryError.
|
|
3162
|
-
* Use transform2().applyDirection(value) for rotations and nonuniform scaling.
|
|
3163
|
-
*
|
|
3164
|
-
* Use `toData()` for frozen tuple interchange, or
|
|
3165
|
-
* [normalize2](/docs/reference/geometry/normalize2) for tuple-based normalization in numerical loops.
|
|
3166
|
-
*/
|
|
3167
|
-
export declare function vector2(input: Vector2Input): Vector2;
|
|
3168
|
-
|
|
3169
|
-
/** A two-dimensional Cartesian vector or point. */
|
|
3170
|
-
export declare type Vector2Data = readonly [x: number, y: number];
|
|
3171
|
-
|
|
3172
|
-
/** An XY tuple or immutable fluent vector accepted by vector operations. */
|
|
3173
|
-
export declare type Vector2Input = Vector2Data | Vector2;
|
|
3174
|
-
|
|
3175
|
-
/** Immutable XYZ arithmetic; vector operations return new values and measurements return numbers. */
|
|
3176
|
-
export declare interface Vector3 {
|
|
3177
|
-
/** X coordinate in the vector's coordinate units. */
|
|
3178
|
-
readonly x: number;
|
|
3179
|
-
/** Y coordinate in the vector's coordinate units. */
|
|
3180
|
-
readonly y: number;
|
|
3181
|
-
/** Z coordinate in the vector's coordinate units. */
|
|
3182
|
-
readonly z: number;
|
|
3183
|
-
/** Adds another vector component-wise. */
|
|
3184
|
-
add(other: Vector3Input): Vector3;
|
|
3185
|
-
/** Subtracts another vector component-wise. */
|
|
3186
|
-
subtract(other: Vector3Input): Vector3;
|
|
3187
|
-
/** Multiplies by a finite dimensionless scalar. */
|
|
3188
|
-
scale(factor: number): Vector3;
|
|
3189
|
-
/** Returns a unit vector; rejects length at or below finite nonnegative `epsilon` (default `1e-12`). */
|
|
3190
|
-
normalize(epsilon?: number): Vector3;
|
|
3191
|
-
/** Interpolates toward another vector by finite dimensionless `t`; extrapolation is allowed. */
|
|
3192
|
-
lerp(other: Vector3Input, t: number): Vector3;
|
|
3193
|
-
/** Returns the scalar dot product. */
|
|
3194
|
-
dot(other: Vector3Input): number;
|
|
3195
|
-
/** Returns the right-handed cross product as a new vector. */
|
|
3196
|
-
cross(other: Vector3Input): Vector3;
|
|
3197
|
-
/** Returns Euclidean length in the vector's coordinate units. */
|
|
3198
|
-
length(): number;
|
|
3199
|
-
/** Returns Euclidean distance to another vector in the same coordinate units. */
|
|
3200
|
-
distance(other: Vector3Input): number;
|
|
3201
|
-
/** Returns this value's frozen readonly tuple for interchange; repeated calls do not allocate. */
|
|
3202
|
-
toData(): Vector3Data;
|
|
3203
|
-
}
|
|
3204
|
-
|
|
3205
1974
|
/**
|
|
3206
|
-
*
|
|
3207
|
-
*
|
|
3208
|
-
* Values and results are finite. Invalid dimensions throw `INVALID_ARGUMENT`; nonfinite coordinates
|
|
3209
|
-
* and overflow throw `NON_FINITE_VALUE` GeometryError.
|
|
3210
|
-
* Use transform3().applyDirection(value) for rotations and nonuniform scaling.
|
|
1975
|
+
* Filled Section union; dimensions cannot be mixed.
|
|
3211
1976
|
*
|
|
3212
|
-
*
|
|
3213
|
-
* [normalize3](/docs/reference/geometry/normalize3) for tuple-based normalization in numerical loops.
|
|
3214
|
-
*
|
|
3215
|
-
* @example
|
|
3216
|
-
* ```ts
|
|
3217
|
-
* const direction = vector3([1, 2, 3]).add([4, 0, 0]).normalize().scale(10);
|
|
3218
|
-
* const alignment = direction.dot([0, 0, 1]);
|
|
3219
|
-
* ```
|
|
3220
|
-
*/
|
|
3221
|
-
export declare function vector3(input: Vector3Input): Vector3;
|
|
3222
|
-
|
|
3223
|
-
/** A three-dimensional Cartesian vector or point. */
|
|
3224
|
-
export declare type Vector3Data = readonly [x: number, y: number, z: number];
|
|
3225
|
-
|
|
3226
|
-
/** An XYZ tuple or immutable fluent vector accepted by vector operations. */
|
|
3227
|
-
export declare type Vector3Input = Vector3Data | Vector3;
|
|
3228
|
-
|
|
3229
|
-
/**
|
|
3230
|
-
* Immutable vector layout with no browser, font parser, or kernel ownership.
|
|
1977
|
+
* @param sections - Operands in shared XY coordinates.
|
|
3231
1978
|
*/
|
|
3232
|
-
export declare
|
|
3233
|
-
/** Nonzero-filled path data in millimetres, positive Y upward; empty for text with no ink. */
|
|
3234
|
-
readonly paths: readonly string[];
|
|
3235
|
-
/** Exact measurements of these paths and their logical text layout. */
|
|
3236
|
-
readonly metrics: VectorTextMetrics;
|
|
3237
|
-
}
|
|
3238
|
-
|
|
3239
|
-
/** Text measurements from the same immutable layout that supplies geometry and SVG outlines. */
|
|
3240
|
-
export declare interface VectorTextMetrics {
|
|
3241
|
-
/** Visible curve bounds after alignment, or null when the text has no ink. */
|
|
3242
|
-
readonly bounds: Bounds2Data | null;
|
|
3243
|
-
/** Unaligned logical advance and negative baseline displacement in mm; arcs retain [arc length, 0]. */
|
|
3244
|
-
readonly advance: readonly [number, number];
|
|
3245
|
-
/** Maximum logical line advance in millimetres, including spaces; arc length on circular baselines. */
|
|
3246
|
-
readonly logicalWidth: number;
|
|
3247
|
-
/** Selected font's ascender distance above a baseline in millimetres, independent of the text. */
|
|
3248
|
-
readonly ascent: number;
|
|
3249
|
-
/** Selected font's descender distance below a baseline in millimetres, a non-negative value. */
|
|
3250
|
-
readonly descent: number;
|
|
3251
|
-
/** Actual distance between baselines in millimetres. */
|
|
3252
|
-
readonly lineHeight: number;
|
|
3253
|
-
/** Number of lines, including empty and trailing lines; empty text occupies one line. */
|
|
3254
|
-
readonly lineCount: number;
|
|
3255
|
-
}
|
|
1979
|
+
export declare function union(sections: readonly Section[]): Section;
|
|
3256
1980
|
|
|
3257
1981
|
export {};
|