@metamesh/modeling 0.19.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 +49 -0
- package/README.md +34 -18
- package/dist/api/engine.d.ts +217 -121
- package/dist/api/export.d.ts +123 -79
- package/dist/api/geometry.d.ts +406 -2102
- package/dist/api/index.d.ts +472 -1798
- package/dist/api/math.d.ts +315 -0
- package/dist/api/mechanical.d.ts +1041 -0
- package/dist/api/mesh.d.ts +360 -88
- package/dist/api/text.d.ts +24 -44
- package/dist/docs/guides/concepts.md +67 -33
- package/dist/docs/guides/exporting.md +88 -0
- package/dist/docs/guides/fonts.md +5 -3
- package/dist/docs/guides/fundamentals.md +12 -24
- package/dist/docs/guides/generation.md +24 -16
- package/dist/docs/guides/geometry-values.md +192 -134
- package/dist/docs/guides/hosting.md +51 -96
- package/dist/docs/guides/profiles-and-extrusion.md +159 -11
- package/dist/docs/guides/recipes.md +121 -28
- package/dist/docs/guides/resolution-and-inspection.md +43 -23
- package/dist/docs/guides/solid-joins.md +12 -2
- package/dist/docs/guides/standalone-model.md +4 -2
- package/dist/docs/guides/svg-and-text.md +76 -39
- package/dist/docs/guides/sweeps-and-lofts.md +88 -44
- package/dist/docs/guides/transforms-and-placement.md +113 -103
- package/dist/docs/guides/workers.md +166 -0
- package/dist/docs/manifest.json +4133 -4153
- package/dist/docs/reference/engine/GenerationOptions.md +2 -3
- package/dist/docs/reference/engine/GeometryResource.md +6 -6
- package/dist/docs/reference/engine/ModelDependencies.md +2 -2
- package/dist/docs/reference/engine/ModelEngine.md +2 -3
- package/dist/docs/reference/engine/ModelEngineOptions.md +2 -7
- package/dist/docs/reference/engine/ModelPart.md +6 -6
- package/dist/docs/reference/engine/ModelResult.md +2 -2
- package/dist/docs/reference/engine/ModelRunArguments.md +2 -2
- package/dist/docs/reference/engine/ModelRunOptions.md +2 -3
- package/dist/docs/reference/engine/ModelSession.md +2 -2
- package/dist/docs/reference/engine/SessionOptions.md +2 -3
- package/dist/docs/reference/engine/categories/host-lifecycle.md +9 -3
- package/dist/docs/reference/engine/checkModel.md +6 -2
- package/dist/docs/reference/engine/createModelEngine.md +5 -3
- package/dist/docs/reference/engine/defaultModelingLimits.md +4 -11
- package/dist/docs/reference/engine/modelingWasmUrl.md +2 -2
- package/dist/docs/reference/engine.md +7 -1
- package/dist/docs/reference/export/Export3mfOptions.md +2 -6
- package/dist/docs/reference/export/ExportDiagnostic.md +2 -14
- package/dist/docs/reference/export/ExportFormat.md +2 -14
- package/dist/docs/reference/export/ExportGeometry.md +3 -15
- package/dist/docs/reference/export/ExportGlbOptions.md +14 -18
- package/dist/docs/reference/export/ExportLimits.md +2 -14
- package/dist/docs/reference/export/ExportMaterial.md +2 -14
- package/dist/docs/reference/export/ExportOptions.md +2 -14
- package/dist/docs/reference/export/ExportPart.md +2 -14
- package/dist/docs/reference/export/ExportReport.md +2 -14
- package/dist/docs/reference/export/ExportSink.md +5 -15
- package/dist/docs/reference/export/ExportStlOptions.md +2 -6
- package/dist/docs/reference/export/ExportedFile.md +14 -26
- package/dist/docs/reference/export/categories/mesh-serialization.md +9 -3
- package/dist/docs/reference/export/defaultExportLimits.md +2 -2
- package/dist/docs/reference/export/export3mf.md +4 -6
- package/dist/docs/reference/export/exportGlb.md +8 -10
- package/dist/docs/reference/export/exportStl.md +4 -6
- package/dist/docs/reference/export/write3mf.md +6 -6
- package/dist/docs/reference/export/writeGlb.md +10 -10
- package/dist/docs/reference/export/writeStl.md +6 -6
- package/dist/docs/reference/export.md +9 -3
- package/dist/docs/reference/geometry/AlignedCircularSegmentsOptions.md +4 -4
- package/dist/docs/reference/geometry/Anchor3-type.md +3 -7
- package/dist/docs/reference/geometry/Anchor3Options.md +70 -0
- package/dist/docs/reference/geometry/ArcCurve2.md +3 -3
- package/dist/docs/reference/geometry/ArcCurve3.md +3 -3
- package/dist/docs/reference/geometry/AttachOptions.md +4 -9
- package/dist/docs/reference/geometry/Bounds2-type.md +9 -30
- package/dist/docs/reference/geometry/Bounds2Data.md +2 -19
- package/dist/docs/reference/geometry/Bounds2Input.md +2 -10
- package/dist/docs/reference/geometry/Bounds2Options.md +2 -6
- package/dist/docs/reference/geometry/Bounds3-type.md +9 -30
- package/dist/docs/reference/geometry/Bounds3Data.md +2 -15
- package/dist/docs/reference/geometry/Bounds3Input.md +2 -10
- package/dist/docs/reference/geometry/Bounds3Options.md +2 -6
- package/dist/docs/reference/geometry/BoundsFit2.md +2 -2
- package/dist/docs/reference/geometry/BoundsFit3.md +2 -2
- package/dist/docs/reference/geometry/BoundsFitOptions.md +2 -2
- package/dist/docs/reference/geometry/BoxAnchorFace.md +3 -3
- package/dist/docs/reference/geometry/BoxAnchorOptions.md +3 -3
- package/dist/docs/reference/geometry/ChamferedEdgeTreatment.md +3 -7
- package/dist/docs/reference/geometry/CircleContourOptions.md +3 -7
- package/dist/docs/reference/geometry/CircularPrimitiveOptions.md +3 -12
- package/dist/docs/reference/geometry/CircularResolutionOptions.md +2 -2
- package/dist/docs/reference/geometry/CircularSampling.md +2 -2
- package/dist/docs/reference/geometry/CircularSamplingOptions.md +2 -2
- package/dist/docs/reference/geometry/Contour.md +4 -9
- package/dist/docs/reference/geometry/ContourCurve.md +3 -3
- package/dist/docs/reference/geometry/ContourPoint.md +3 -3
- package/dist/docs/reference/geometry/ContourSegment.md +3 -3
- package/dist/docs/reference/geometry/CorrespondingComponent.md +3 -7
- package/dist/docs/reference/geometry/CorrespondingContour.md +3 -7
- package/dist/docs/reference/geometry/CorrespondingProfile.md +3 -7
- package/dist/docs/reference/geometry/CorrespondingProfileStation.md +4 -8
- package/dist/docs/reference/geometry/CubicBezierCurve2.md +3 -3
- package/dist/docs/reference/geometry/CubicBezierCurve3.md +3 -3
- package/dist/docs/reference/geometry/Curve2.md +3 -3
- package/dist/docs/reference/geometry/Curve3.md +3 -3
- package/dist/docs/reference/geometry/CurveSamplingOptions.md +3 -11
- package/dist/docs/reference/geometry/CylinderAnchorFace.md +3 -3
- package/dist/docs/reference/geometry/CylinderAnchorOptions.md +4 -4
- package/dist/docs/reference/geometry/DEFAULT_GEOMETRY_TOLERANCE.md +2 -2
- package/dist/docs/reference/geometry/EdgeTreatment.md +2 -6
- package/dist/docs/reference/geometry/EllipseContourOptions.md +3 -7
- package/dist/docs/reference/geometry/ExtrusionSamplingOptions.md +9 -18
- package/dist/docs/reference/geometry/FittedTextLayout.md +2 -2
- package/dist/docs/reference/geometry/{Frame3.md → Frame3-type.md} +4 -11
- package/dist/docs/reference/geometry/Frame3Options.md +69 -0
- package/dist/docs/reference/geometry/GeometryError.md +2 -6
- package/dist/docs/reference/geometry/GeometryErrorCode.md +2 -6
- package/dist/docs/reference/geometry/GeometryErrorContext.md +2 -6
- package/dist/docs/reference/geometry/GeometryResolution.md +2 -10
- package/dist/docs/reference/geometry/GeometrySamplingLimits.md +3 -11
- package/dist/docs/reference/geometry/GeometryToleranceOptions.md +3 -11
- package/dist/docs/reference/geometry/GridPatternOptions.md +7 -9
- package/dist/docs/reference/geometry/ImmutableBuffer-type.md +2 -10
- package/dist/docs/reference/geometry/LineCurve2.md +3 -3
- package/dist/docs/reference/geometry/LineCurve3.md +3 -3
- package/dist/docs/reference/geometry/LinearPatternOptions.md +2 -6
- package/dist/docs/reference/geometry/LoftPlacement.md +13 -21
- package/dist/docs/reference/geometry/MatchProfilesOptions.md +3 -7
- package/dist/docs/reference/geometry/ModelingLimits.md +2 -14
- package/dist/docs/reference/geometry/NumericArray.md +2 -10
- package/dist/docs/reference/geometry/Path2-type.md +153 -12
- package/dist/docs/reference/geometry/Path2Data.md +3 -11
- package/dist/docs/reference/geometry/Path2Input.md +3 -11
- package/dist/docs/reference/geometry/Path3-type.md +153 -12
- package/dist/docs/reference/geometry/Path3Data.md +3 -11
- package/dist/docs/reference/geometry/Path3Input.md +3 -11
- package/dist/docs/reference/geometry/PathFrame.md +3 -3
- package/dist/docs/reference/geometry/PathLocation.md +3 -11
- package/dist/docs/reference/geometry/PathNormalGuide.md +4 -12
- package/dist/docs/reference/geometry/PathOptions.md +3 -7
- package/dist/docs/reference/geometry/PathPatternOptions.md +3 -7
- package/dist/docs/reference/geometry/PathPlacement.md +5 -5
- package/dist/docs/reference/geometry/PathResamplingOptions.md +3 -11
- 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 +3 -11
- package/dist/docs/reference/geometry/Pivot3Options.md +3 -11
- package/dist/docs/reference/geometry/PolygonData.md +4 -8
- package/dist/docs/reference/geometry/PolylineResamplingOptions.md +3 -3
- package/dist/docs/reference/geometry/Profile.md +3 -4
- package/dist/docs/reference/geometry/ProfileComponent2.md +3 -7
- package/dist/docs/reference/geometry/ProfileContour2.md +3 -7
- package/dist/docs/reference/geometry/ProfileSpan2.md +3 -7
- package/dist/docs/reference/geometry/ProfiledEdgeTreatment.md +5 -8
- package/dist/docs/reference/geometry/RadialPatternOptions.md +2 -6
- package/dist/docs/reference/geometry/RadialSizing.md +2 -6
- package/dist/docs/reference/geometry/RadialSizingOptions.md +2 -6
- package/dist/docs/reference/geometry/RectangleContourOptions.md +4 -7
- package/dist/docs/reference/geometry/RectangleCornerTreatment.md +3 -7
- package/dist/docs/reference/geometry/RectangleCornerTreatments.md +3 -7
- package/dist/docs/reference/geometry/RectangleProfileOptions.md +3 -3
- package/dist/docs/reference/geometry/RegionData.md +3 -7
- package/dist/docs/reference/geometry/RegularPolygonContourOptions.md +3 -3
- package/dist/docs/reference/geometry/ResolvedGeometryResolution.md +71 -0
- package/dist/docs/reference/geometry/ResolvedGeometryTolerance.md +2 -2
- package/dist/docs/reference/geometry/RoundedEdgeTreatment.md +2 -6
- package/dist/docs/reference/geometry/RowLayoutOptions.md +2 -2
- package/dist/docs/reference/geometry/SampleContourOptions.md +3 -3
- package/dist/docs/reference/geometry/SampleHelixOptions.md +3 -3
- package/dist/docs/reference/geometry/SampleSideProfileOptions.md +3 -3
- package/dist/docs/reference/geometry/SampledCurve2.md +3 -3
- package/dist/docs/reference/geometry/SampledCurve3.md +3 -3
- package/dist/docs/reference/geometry/SideProfileCurve.md +3 -3
- package/dist/docs/reference/geometry/SideProfilePoint.md +3 -3
- package/dist/docs/reference/geometry/SideProfileSegment.md +3 -3
- package/dist/docs/reference/geometry/SmoothEdgeTreatment.md +2 -6
- package/dist/docs/reference/geometry/SplineOptions.md +69 -0
- package/dist/docs/reference/geometry/StarContourOptions.md +7 -7
- package/dist/docs/reference/geometry/StrokeCap.md +2 -6
- package/dist/docs/reference/geometry/StrokeJoin.md +2 -6
- package/dist/docs/reference/geometry/StrokeOptions.md +3 -7
- package/dist/docs/reference/geometry/SvgImportOptions.md +4 -4
- package/dist/docs/reference/geometry/SvgRegionPreflight.md +2 -2
- package/dist/docs/reference/geometry/SvgRegionPreflightGeometryMetrics.md +2 -2
- package/dist/docs/reference/geometry/SvgRegionPreflightRepairs.md +2 -2
- package/dist/docs/reference/geometry/SvgRegionPreflightSourceMetrics.md +2 -2
- package/dist/docs/reference/geometry/Transform2-type.md +3 -11
- package/dist/docs/reference/geometry/Transform2Data.md +3 -11
- package/dist/docs/reference/geometry/Transform2Input.md +3 -11
- package/dist/docs/reference/geometry/Transform3-type.md +4 -12
- package/dist/docs/reference/geometry/Transform3Data.md +3 -11
- package/dist/docs/reference/geometry/Transform3Input.md +6 -13
- package/dist/docs/reference/geometry/Vector2-type.md +3 -11
- package/dist/docs/reference/geometry/Vector2Data.md +3 -15
- package/dist/docs/reference/geometry/Vector2Input.md +3 -11
- package/dist/docs/reference/geometry/Vector3-type.md +27 -11
- package/dist/docs/reference/geometry/Vector3Data.md +3 -11
- package/dist/docs/reference/geometry/Vector3Input.md +3 -11
- package/dist/docs/reference/geometry/VectorTextLayout.md +2 -10
- package/dist/docs/reference/geometry/VectorTextMetrics.md +3 -11
- package/dist/docs/reference/geometry/anchor3.md +17 -26
- package/dist/docs/reference/geometry/anchorFrame3.md +6 -6
- package/dist/docs/reference/geometry/attachmentTransform3.md +8 -8
- package/dist/docs/reference/geometry/bounds2.md +6 -8
- package/dist/docs/reference/geometry/bounds3.md +4 -6
- package/dist/docs/reference/geometry/boundsCenter.md +2 -2
- package/dist/docs/reference/geometry/boundsSize.md +2 -2
- package/dist/docs/reference/geometry/boxAnchor3.md +3 -3
- package/dist/docs/reference/geometry/categories/bounds-layout.md +9 -3
- 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 +10 -4
- 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 +7 -4
- package/dist/docs/reference/geometry/circleContour.md +3 -3
- package/dist/docs/reference/geometry/closeToAxis.md +7 -3
- package/dist/docs/reference/geometry/computeClosedParallelTransportFrames.md +9 -6
- package/dist/docs/reference/geometry/computeParallelTransportFrames.md +13 -6
- package/dist/docs/reference/geometry/contourContainsPoint.md +7 -3
- package/dist/docs/reference/geometry/cylinderAnchor3.md +5 -5
- package/dist/docs/reference/geometry/defaultGeometrySamplingLimits.md +3 -3
- package/dist/docs/reference/geometry/distributeAlongPath.md +16 -11
- package/dist/docs/reference/geometry/ellipseContour.md +3 -3
- package/dist/docs/reference/geometry/fitBounds.md +10 -2
- package/dist/docs/reference/geometry/fitTextLayout.md +5 -5
- package/dist/docs/reference/geometry/frame3.md +66 -0
- package/dist/docs/reference/geometry/gridPatternTransforms.md +6 -6
- package/dist/docs/reference/geometry/immutableBuffer.md +5 -7
- package/dist/docs/reference/geometry/isGeometryError.md +2 -6
- package/dist/docs/reference/geometry/layoutRow.md +4 -2
- package/dist/docs/reference/geometry/linearPatternTransforms.md +6 -6
- package/dist/docs/reference/geometry/matchProfiles.md +5 -3
- package/dist/docs/reference/geometry/normalizeContour.md +8 -4
- package/dist/docs/reference/geometry/normalizePolygon.md +5 -3
- package/dist/docs/reference/geometry/normalizeRegion.md +5 -3
- package/dist/docs/reference/geometry/path2.md +7 -7
- package/dist/docs/reference/geometry/path3.md +7 -7
- package/dist/docs/reference/geometry/pathPatternTransforms.md +12 -8
- package/dist/docs/reference/geometry/preflightSvgRegion.md +5 -5
- package/dist/docs/reference/geometry/radialPatternTransforms.md +5 -5
- package/dist/docs/reference/geometry/rectangleContour.md +3 -3
- package/dist/docs/reference/geometry/rectangleProfile.md +3 -4
- package/dist/docs/reference/geometry/regionArea.md +3 -3
- package/dist/docs/reference/geometry/regionBounds.md +6 -4
- package/dist/docs/reference/geometry/regularPolygonContour.md +3 -3
- package/dist/docs/reference/geometry/resamplePolyline2.md +7 -3
- package/dist/docs/reference/geometry/resamplePolyline3.md +7 -3
- package/dist/docs/reference/geometry/resolveAlignedCircularSegments.md +5 -5
- package/dist/docs/reference/geometry/resolveArcSegments.md +8 -6
- package/dist/docs/reference/geometry/resolveCircularSampling.md +2 -2
- package/dist/docs/reference/geometry/resolveCircularSegments.md +5 -3
- package/dist/docs/reference/geometry/{resolveExtrusionDivisions.md → resolveExtrusionSlices.md} +16 -15
- package/dist/docs/reference/geometry/resolveGeometrySamplingLimits.md +5 -3
- package/dist/docs/reference/geometry/resolveGeometryTolerance.md +3 -3
- package/dist/docs/reference/geometry/roundClosedPolylinePath.md +12 -5
- package/dist/docs/reference/geometry/sampleContour.md +5 -5
- package/dist/docs/reference/geometry/sampleCurve2.md +7 -3
- package/dist/docs/reference/geometry/sampleCurve3.md +7 -3
- package/dist/docs/reference/geometry/sampleHelix.md +3 -3
- package/dist/docs/reference/geometry/sampleSideProfile.md +5 -5
- package/dist/docs/reference/geometry/sampleTextContours.md +3 -3
- package/dist/docs/reference/geometry/signedContourArea.md +5 -3
- 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 +3 -3
- package/dist/docs/reference/geometry/strokeRegionData.md +8 -5
- package/dist/docs/reference/geometry/transform2.md +5 -7
- package/dist/docs/reference/geometry/transform3.md +23 -10
- package/dist/docs/reference/geometry/transformRegionData.md +7 -3
- package/dist/docs/reference/geometry/triangulateContour.md +6 -4
- package/dist/docs/reference/geometry/vector2.md +6 -8
- package/dist/docs/reference/geometry/vector3.md +8 -8
- package/dist/docs/reference/geometry.md +13 -18
- package/dist/docs/reference/{geometry → math}/AxisAngleRotation3.md +4 -5
- 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 +4 -13
- package/dist/docs/reference/{geometry → mechanical}/Bevel.md +3 -11
- package/dist/docs/reference/{geometry → mechanical}/BevelSize.md +3 -11
- package/dist/docs/reference/{geometry → mechanical}/ButtressPressureFlankSide.md +3 -11
- package/dist/docs/reference/{geometry → mechanical}/ButtressThreadProfileSpec.md +4 -13
- package/dist/docs/reference/{geometry → mechanical}/ClearanceHoleDimensions.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/ClearanceHoleFit.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/CompensatedThreadDiameters.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/CustomThreadProfileSpec.md +5 -15
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearDimensions.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearMeshKind.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearOutlineOptions.md +5 -10
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearPairDimensions.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearPairMotionOptions.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearPairMotionReport.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearPairSpec.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/CylindricalGearSpec.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/InternalThreadCutterOptions.md +6 -13
- package/dist/docs/reference/{geometry → mechanical}/KnuckleHingeBaseSpec.md +3 -7
- package/dist/docs/reference/{geometry → mechanical}/KnuckleHingeDimensions.md +4 -5
- package/dist/docs/reference/{geometry → mechanical}/KnuckleHingeInterval.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/KnuckleHingeSamplingOptions.md +5 -14
- package/dist/docs/reference/{geometry → mechanical}/KnuckleHingeSpec.md +3 -7
- package/dist/docs/reference/{geometry → mechanical}/METRIC_FASTENER_STANDARDS.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/MetricFastenerSize.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/MetricFastenerStandard.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/MetricHexNutDimensions.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/MetricSocketCapHeadDimensions.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/PRINTABLE_THREAD_FIT_POLICIES.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/PrintableThreadFit.md +3 -7
- package/dist/docs/reference/{geometry → mechanical}/PrintableThreadFitPolicy.md +3 -7
- package/dist/docs/reference/{geometry → mechanical}/RackPitchDimensions.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/RackPitchSpec.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/SampledThreadHelices.md +4 -8
- package/dist/docs/reference/{geometry → mechanical}/SquareThreadProfileSpec.md +4 -13
- package/dist/docs/reference/{geometry → mechanical}/ThreadBevelOptions.md +3 -7
- package/dist/docs/reference/{geometry → mechanical}/ThreadCircularSegmentsOptions.md +5 -7
- package/dist/docs/reference/{geometry → mechanical}/ThreadCompensationOptions.md +4 -5
- package/dist/docs/reference/{geometry → mechanical}/ThreadEndStyle.md +3 -11
- package/dist/docs/reference/{geometry → mechanical}/ThreadEndTreatmentOptions.md +3 -11
- package/dist/docs/reference/{geometry → mechanical}/ThreadHandedness.md +3 -11
- package/dist/docs/reference/{geometry → mechanical}/ThreadHelixOptions.md +5 -7
- package/dist/docs/reference/{geometry → mechanical}/ThreadLeadInEnvelope.md +3 -11
- package/dist/docs/reference/{geometry → mechanical}/ThreadLeadInShape.md +3 -11
- package/dist/docs/reference/{geometry → mechanical}/ThreadProfile-type.md +5 -17
- package/dist/docs/reference/{geometry → mechanical}/ThreadProfileBaseSpec.md +4 -13
- package/dist/docs/reference/{geometry → mechanical}/ThreadProfileSpec.md +3 -11
- package/dist/docs/reference/{geometry → mechanical}/ThreadRidgeOptions.md +7 -18
- package/dist/docs/reference/{geometry → mechanical}/ThreadRole.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/ThreadSolidOptions.md +8 -15
- package/dist/docs/reference/{geometry → mechanical}/ThreadSolidPreflight.md +3 -11
- package/dist/docs/reference/{geometry → mechanical}/ThreadedNutOptions.md +7 -14
- package/dist/docs/reference/{geometry → mechanical}/ThreadedNutPreflight.md +3 -7
- package/dist/docs/reference/{geometry → mechanical}/ThreadedNutShape.md +3 -7
- package/dist/docs/reference/{geometry → mechanical}/ThreadedRodOptions.md +6 -13
- package/dist/docs/reference/{geometry → mechanical}/TrapezoidalThreadProfileSpec.md +4 -13
- package/dist/docs/reference/{geometry → mechanical}/TriangularThreadProfileSpec.md +4 -13
- package/dist/docs/reference/{geometry → mechanical}/categories/mechanical.md +8 -2
- package/dist/docs/reference/{geometry → mechanical}/compensateThreadDiameters.md +4 -4
- package/dist/docs/reference/{geometry → mechanical}/compensateThreadProfileAxially.md +12 -6
- package/dist/docs/reference/{geometry → mechanical}/compensateThreadProfileForFaceting.md +13 -3
- package/dist/docs/reference/{geometry → mechanical}/getMetricClearanceHoleDiameter.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/getMetricFastenerStandard.md +3 -3
- package/dist/docs/reference/{geometry → mechanical}/measureInternalCylindricalGearPairMotion.md +9 -7
- package/dist/docs/reference/{geometry → mechanical}/minimumCylindricalGearToothCountWithoutUndercut.md +5 -3
- package/dist/docs/reference/{geometry → mechanical}/preflightInternalThreadCutter.md +8 -6
- package/dist/docs/reference/{geometry → mechanical}/preflightThreadedNut.md +9 -7
- package/dist/docs/reference/{geometry → mechanical}/preflightThreadedRod.md +8 -6
- package/dist/docs/reference/{geometry → mechanical}/resolveCylindricalGear.md +5 -3
- package/dist/docs/reference/{geometry → mechanical}/resolveCylindricalGearPair.md +5 -3
- package/dist/docs/reference/{geometry → mechanical}/resolveKnuckleHinge.md +9 -7
- package/dist/docs/reference/{geometry → mechanical}/resolvePrintableThreadFitPolicy.md +5 -3
- package/dist/docs/reference/{geometry → mechanical}/resolveRackPitch.md +5 -3
- package/dist/docs/reference/{geometry → mechanical}/resolveThreadCircularSegments.md +7 -5
- package/dist/docs/reference/{geometry → mechanical}/sampleCylindricalGearOutline.md +9 -8
- package/dist/docs/reference/{geometry → mechanical}/sampleInternalCylindricalGearSpaceOutline.md +9 -8
- package/dist/docs/reference/{geometry → mechanical}/sampleRackToothPath.md +10 -8
- package/dist/docs/reference/{geometry → mechanical}/sampleThreadHelices.md +8 -6
- package/dist/docs/reference/{geometry → mechanical}/threadProfile.md +7 -3
- package/dist/docs/reference/mechanical.md +19 -0
- package/dist/docs/reference/mesh/ExtrudeMeshOptions.md +128 -0
- package/dist/docs/reference/{geometry → mesh}/HeightfieldMeshLimits.md +5 -13
- package/dist/docs/reference/{geometry → mesh}/HeightfieldPreflight.md +3 -7
- package/dist/docs/reference/{geometry → mesh}/ImmutableTriangleMesh.md +5 -17
- package/dist/docs/reference/mesh/LoftMeshStation.md +32 -0
- package/dist/docs/reference/mesh/MeshRenderOptions.md +3 -3
- package/dist/docs/reference/{geometry → mesh}/PlanarMeshOptimizationFallbackReason.md +4 -8
- package/dist/docs/reference/{geometry → mesh}/PlanarMeshOptimizationOptions.md +4 -9
- package/dist/docs/reference/{geometry → mesh}/PlanarMeshOptimizationResult.md +4 -8
- package/dist/docs/reference/{geometry → mesh}/PlanarPatchQuality.md +4 -12
- package/dist/docs/reference/mesh/RenderMesh.md +19 -19
- package/dist/docs/reference/{geometry → mesh}/SolidMeshValidationOptions.md +4 -12
- package/dist/docs/reference/{geometry → mesh}/TriangleMesh.md +8 -12
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshAnalysis.md +5 -14
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshAnalysisOptions.md +4 -9
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshInput.md +3 -7
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshMeasurements.md +5 -14
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshQualityOptions.md +4 -9
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshQualityReport.md +3 -7
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshSignature.md +4 -9
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshSignatureOptions.md +3 -7
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshSignatureTolerances.md +3 -7
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshTopologyAnalysis.md +5 -14
- package/dist/docs/reference/{geometry → mesh}/TriangleMeshValidationOptions.md +4 -9
- package/dist/docs/reference/mesh/analyze.md +26 -18
- package/dist/docs/reference/mesh/analyzeQuality.md +12 -12
- package/dist/docs/reference/mesh/bounds.md +5 -6
- package/dist/docs/reference/mesh/categories/operations.md +37 -4
- package/dist/docs/reference/mesh/centroid.md +5 -6
- package/dist/docs/reference/mesh/extrude.md +21 -20
- package/dist/docs/reference/mesh/heightfield.md +8 -8
- package/dist/docs/reference/mesh/immutable.md +7 -5
- package/dist/docs/reference/mesh/join.md +7 -7
- package/dist/docs/reference/mesh/loft.md +19 -18
- package/dist/docs/reference/mesh/optimizePlanarPatches.md +21 -21
- package/dist/docs/reference/mesh/preflightHeightfield.md +8 -8
- package/dist/docs/reference/mesh/preflightThreadSolid.md +22 -25
- package/dist/docs/reference/mesh/render.md +7 -5
- package/dist/docs/reference/mesh/reverse.md +7 -7
- package/dist/docs/reference/mesh/revolve.md +12 -14
- package/dist/docs/reference/mesh/signature.md +12 -12
- package/dist/docs/reference/mesh/sweep.md +96 -25
- package/dist/docs/reference/mesh/threadRidge.md +19 -18
- package/dist/docs/reference/mesh/threadSolid.md +23 -22
- package/dist/docs/reference/mesh/transform.md +8 -9
- package/dist/docs/reference/mesh/validate.md +11 -11
- package/dist/docs/reference/mesh/validateSolid.md +10 -10
- package/dist/docs/reference/mesh.md +8 -2
- package/dist/docs/reference/model/BoxEdge.md +23 -0
- package/dist/docs/reference/model/BoxEdgeSelection.md +27 -0
- package/dist/docs/reference/model/BoxEdgeTreatments.md +27 -0
- package/dist/docs/reference/{geometry → model}/BoxOptions.md +12 -12
- package/dist/docs/reference/model/CircleOptions.md +4 -5
- package/dist/docs/reference/model/CornerCutterOptions.md +93 -0
- package/dist/docs/reference/model/CornerCutterTreatment.md +53 -0
- package/dist/docs/reference/model/{HoleCutterOverrun.md → CutterOverrun.md} +8 -7
- package/dist/docs/reference/model/CylinderOptions.md +64 -0
- package/dist/docs/reference/model/DiagnosticOptions.md +2 -2
- package/dist/docs/reference/model/EdgeCutterOptions.md +129 -0
- package/dist/docs/reference/model/EllipseOptions.md +4 -5
- package/dist/docs/reference/model/EndTreatments.md +43 -0
- package/dist/docs/reference/model/ExtrudeOptions.md +153 -0
- package/dist/docs/reference/model/GenerateCallback.md +2 -2
- package/dist/docs/reference/model/GenerateContext.md +27 -3
- package/dist/docs/reference/model/GenerationDiagnostic.md +2 -2
- package/dist/docs/reference/model/GenerationError.md +2 -2
- package/dist/docs/reference/{geometry → model}/HeightfieldOptions.md +5 -23
- package/dist/docs/reference/model/HoleCutterOpening.md +27 -0
- package/dist/docs/reference/model/HoleCutterOptions.md +9 -22
- package/dist/docs/reference/model/HoleCutterRecess.md +5 -4
- package/dist/docs/reference/model/HullOptions.md +2 -3
- package/dist/docs/reference/model/ImmutableValue.md +2 -2
- package/dist/docs/reference/model/ImplicitOptions.md +3 -9
- package/dist/docs/reference/model/JoinOptions.md +2 -5
- package/dist/docs/reference/model/JoinTransition.md +2 -2
- package/dist/docs/reference/model/KnuckleHinge-type.md +2 -3
- package/dist/docs/reference/model/KnuckleHingeHalfOptions.md +2 -2
- package/dist/docs/reference/model/KnuckleHingeOptions.md +3 -5
- package/dist/docs/reference/model/KnuckleHingeWeb.md +2 -2
- package/dist/docs/reference/{geometry → model}/LoftCorrespondence.md +8 -11
- package/dist/docs/reference/{geometry → model}/LoftOptions.md +11 -16
- package/dist/docs/reference/model/LoftStation.md +4 -5
- package/dist/docs/reference/model/Memo.md +2 -2
- package/dist/docs/reference/model/ModelProgram.md +2 -2
- package/dist/docs/reference/model/PartDeclaration.md +4 -5
- package/dist/docs/reference/model/PartGeometry.md +3 -5
- package/dist/docs/reference/model/PartOptions.md +4 -5
- package/dist/docs/reference/model/PatternSource.md +4 -4
- package/dist/docs/reference/model/PlaneOptions.md +3 -7
- package/dist/docs/reference/model/PolygonOptions.md +2 -7
- package/dist/docs/reference/model/PrimitiveAttachment.md +50 -0
- package/dist/docs/reference/model/PrimitiveAttachmentOptions.md +111 -0
- package/dist/docs/reference/model/RectangleOptions.md +21 -26
- package/dist/docs/reference/model/RegularPolygonOptions.md +4 -37
- package/dist/docs/reference/{geometry → model}/RevolveOptions.md +15 -24
- package/dist/docs/reference/model/Section.md +115 -53
- package/dist/docs/reference/model/SectionHullOptions.md +2 -3
- package/dist/docs/reference/model/SectionInspection.md +2 -6
- package/dist/docs/reference/model/SectionOffsetJoin.md +2 -2
- package/dist/docs/reference/model/SectionOffsetOptions.md +2 -3
- package/dist/docs/reference/model/Solid.md +24 -12
- package/dist/docs/reference/model/SolidInspection.md +2 -6
- package/dist/docs/reference/model/SolidSegmentHit.md +2 -6
- package/dist/docs/reference/model/SphereOptions.md +27 -0
- package/dist/docs/reference/model/StarOptions.md +21 -23
- package/dist/docs/reference/model/SvgOrigin.md +2 -2
- package/dist/docs/reference/model/SvgPathSectionOptions.md +3 -5
- package/dist/docs/reference/model/SvgSectionOptions.md +3 -6
- package/dist/docs/reference/model/SweepOptions.md +109 -0
- package/dist/docs/reference/model/SweepOrientation.md +119 -0
- package/dist/docs/reference/model/SweepTransformOptions.md +105 -0
- package/dist/docs/reference/model/TextSectionOptions.md +2 -7
- package/dist/docs/reference/{geometry → model}/TorusOptions.md +11 -10
- package/dist/docs/reference/model/TubeOptions.md +84 -0
- package/dist/docs/reference/model/box.md +11 -10
- package/dist/docs/reference/model/categories/boolean-operations.md +9 -3
- package/dist/docs/reference/model/categories/bounded-surfaces.md +13 -1
- package/dist/docs/reference/model/categories/extrude-revolve-sweep.md +26 -7
- package/dist/docs/reference/model/categories/generation.md +11 -3
- package/dist/docs/reference/model/categories/hinges.md +7 -1
- package/dist/docs/reference/model/categories/mesh-inspection.md +7 -1
- package/dist/docs/reference/model/categories/primitives.md +34 -6
- package/dist/docs/reference/model/categories/sections.md +8 -2
- package/dist/docs/reference/model/categories/threads.md +8 -5
- package/dist/docs/reference/model/categories/transforms-placement.md +15 -10
- package/dist/docs/reference/model/circle.md +7 -3
- package/dist/docs/reference/model/cornerCutter.md +88 -0
- package/dist/docs/reference/model/cylinder.md +6 -5
- package/dist/docs/reference/model/edgeCutter.md +91 -0
- package/dist/docs/reference/model/ellipse.md +7 -3
- package/dist/docs/reference/model/extrude.md +29 -23
- package/dist/docs/reference/model/generate.md +4 -2
- package/dist/docs/reference/model/gridPattern.md +11 -4
- package/dist/docs/reference/model/heightfield.md +5 -5
- package/dist/docs/reference/model/holeCutter.md +26 -12
- package/dist/docs/reference/model/hull.md +2 -2
- package/dist/docs/reference/model/implicit.md +3 -3
- package/dist/docs/reference/model/internalThreadCutter.md +32 -21
- package/dist/docs/reference/model/intersect.md +7 -3
- package/dist/docs/reference/model/join.md +6 -2
- package/dist/docs/reference/model/knuckleHinge.md +2 -3
- package/dist/docs/reference/model/linearPattern.md +11 -4
- package/dist/docs/reference/model/loft.md +28 -24
- package/dist/docs/reference/model/minkowskiSum.md +3 -3
- package/dist/docs/reference/model/pathPattern.md +17 -8
- package/dist/docs/reference/model/polygon.md +8 -3
- package/dist/docs/reference/model/radialPattern.md +11 -4
- package/dist/docs/reference/model/rectangle.md +11 -7
- package/dist/docs/reference/model/regularPolygon.md +7 -3
- package/dist/docs/reference/model/revolve.md +18 -12
- package/dist/docs/reference/model/solidFromMesh.md +10 -6
- package/dist/docs/reference/model/sphere.md +7 -6
- package/dist/docs/reference/model/star.md +11 -7
- package/dist/docs/reference/model/stroke.md +12 -8
- package/dist/docs/reference/model/svgPathSection.md +10 -4
- package/dist/docs/reference/model/svgSection.md +10 -4
- package/dist/docs/reference/model/sweep.md +102 -25
- package/dist/docs/reference/model/textSection.md +7 -3
- package/dist/docs/reference/model/threadRidge.md +16 -17
- package/dist/docs/reference/model/threadedNut.md +25 -22
- package/dist/docs/reference/model/threadedRod.md +21 -18
- package/dist/docs/reference/model/torus.md +13 -12
- package/dist/docs/reference/model/tube.md +6 -5
- package/dist/docs/reference/model/union.md +7 -3
- package/dist/docs/reference/model.md +10 -5
- package/dist/docs/reference/text/MAX_VECTOR_FONT_BYTES.md +2 -2
- package/dist/docs/reference/text/VectorFont.md +38 -34
- package/dist/docs/reference/text/VectorFontOptions.md +2 -2
- package/dist/docs/reference/{geometry → text}/VectorTextArcBaseline.md +2 -11
- package/dist/docs/reference/{geometry → text}/VectorTextLayoutOptions.md +3 -11
- package/dist/docs/reference/{geometry → text}/VectorTextOptions.md +2 -10
- package/dist/docs/reference/text/categories/font-preparation.md +10 -1
- package/dist/docs/reference/text/prepareVectorFont.md +4 -2
- package/dist/docs/reference/text.md +7 -1
- package/dist/engine/execution.js +5 -3
- package/dist/engine/finalization.js +5 -5
- package/dist/engine/index.js +9 -4
- package/dist/engine/native/adapter.js +1 -1
- package/dist/engine/native/construction-mesh.js +15 -5
- package/dist/engine/native/context.js +10 -7
- package/dist/engine/native/index.js +1 -1
- package/dist/engine/native/material-components.js +2 -2
- package/dist/engine/native/mesh-observation.js +1 -1
- package/dist/engine/native/regions.js +44 -24
- 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 +13 -6
- package/dist/engine/operations/cutters.js +112 -0
- package/dist/engine/operations/environment.js +2 -2
- package/dist/engine/operations/extrusion-finishing.js +42 -16
- package/dist/engine/operations/hole-cutter.js +125 -114
- package/dist/engine/operations/join-collar-profile.js +19 -19
- package/dist/engine/operations/join.js +86 -73
- 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 +86 -30
- package/dist/engine/session/declarations.js +98 -0
- package/dist/engine/session/dependencies.js +81 -28
- package/dist/engine/session/graph.js +39 -137
- package/dist/engine/session/parameters.js +78 -0
- package/dist/engine/session/session.js +2 -2
- package/dist/engine/session/snapshot-cache.js +2 -2
- package/dist/engine/shape-anchors.js +13 -6
- package/dist/export/3mf.js +9 -2
- package/dist/export/capture.js +10 -6
- package/dist/export/glb.js +7 -2
- package/dist/export/stl.js +21 -6
- package/dist/geometry/{bounds.js → bounds/operations.js} +3 -1
- package/dist/geometry/{bounds-value.js → bounds/value.js} +20 -16
- 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 +7 -1
- 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/{join-geometry.js → mesh/join-layers.js} +53 -59
- 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/{mesh-render.js → render-buffers.js} +22 -7
- package/dist/geometry/mesh/{mesh-signature.js → signature.js} +1 -1
- package/dist/geometry/mesh/{mesh-solid-intersections.js → solid-intersections.js} +2 -0
- package/dist/geometry/mesh/{mesh-solid.js → solid.js} +4 -4
- 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 -11
- 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/{region-offset.js → regions/offset.js} +7 -5
- package/dist/geometry/{regions.js → regions/operations.js} +59 -22
- 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/{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 +2 -0
- package/dist/model/immutable-generation-data.js +2 -0
- package/dist/model/operations.js +130 -94
- package/dist/model/recipe-declaration.js +5 -7
- package/dist/text/index.js +3 -0
- package/dist/text/vector-text-layout.js +1 -0
- package/package.json +15 -17
- package/dist/api/export-3mf.d.ts +0 -2
- package/dist/api/export-glb.d.ts +0 -2
- package/dist/api/export-stl.d.ts +0 -2
- package/dist/docs/reference/geometry/BoxEdge.md +0 -17
- package/dist/docs/reference/geometry/BoxEdgeSelection.md +0 -24
- package/dist/docs/reference/geometry/BoxEdgeTreatments.md +0 -25
- package/dist/docs/reference/geometry/CylinderOptions.md +0 -63
- package/dist/docs/reference/geometry/EndTreatments.md +0 -44
- package/dist/docs/reference/geometry/ExtrudeMeshOptions.md +0 -144
- package/dist/docs/reference/geometry/ExtrudeOptions.md +0 -156
- package/dist/docs/reference/geometry/IDENTITY_TRANSFORM3.md +0 -25
- package/dist/docs/reference/geometry/LoftMeshStation.md +0 -41
- package/dist/docs/reference/geometry/PrimitiveAttachment.md +0 -39
- package/dist/docs/reference/geometry/PrimitiveAttachmentOptions.md +0 -114
- package/dist/docs/reference/geometry/SphereOptions.md +0 -25
- package/dist/docs/reference/geometry/SweepOptions.md +0 -127
- package/dist/docs/reference/geometry/SweepOrientation.md +0 -127
- package/dist/docs/reference/geometry/TubeOptions.md +0 -72
- package/dist/docs/reference/geometry/add2.md +0 -43
- package/dist/docs/reference/geometry/add3.md +0 -49
- package/dist/docs/reference/geometry/applyTransformDirection3.md +0 -52
- package/dist/docs/reference/geometry/applyTransformPoint3.md +0 -50
- package/dist/docs/reference/geometry/categories/meshes.md +0 -68
- package/dist/docs/reference/geometry/composeTransform3.md +0 -51
- package/dist/docs/reference/geometry/cross2.md +0 -43
- package/dist/docs/reference/geometry/cross3.md +0 -49
- package/dist/docs/reference/geometry/distance2.md +0 -43
- package/dist/docs/reference/geometry/distance3.md +0 -43
- package/dist/docs/reference/geometry/dot2.md +0 -43
- package/dist/docs/reference/geometry/dot3.md +0 -49
- package/dist/docs/reference/geometry/eulerTransform3.md +0 -49
- package/dist/docs/reference/geometry/frameTransform3.md +0 -55
- package/dist/docs/reference/geometry/inverseTransform3.md +0 -41
- package/dist/docs/reference/geometry/length2.md +0 -37
- package/dist/docs/reference/geometry/length3.md +0 -37
- package/dist/docs/reference/geometry/lerp2.md +0 -49
- package/dist/docs/reference/geometry/lerp3.md +0 -49
- package/dist/docs/reference/geometry/normalize2.md +0 -46
- package/dist/docs/reference/geometry/normalize3.md +0 -46
- package/dist/docs/reference/geometry/projectOntoPlane3.md +0 -43
- package/dist/docs/reference/geometry/rotate2.md +0 -43
- package/dist/docs/reference/geometry/rotationTransform3.md +0 -60
- package/dist/docs/reference/geometry/scale2.md +0 -43
- package/dist/docs/reference/geometry/scale3.md +0 -49
- package/dist/docs/reference/geometry/scaleTransform3.md +0 -45
- package/dist/docs/reference/geometry/subtract2.md +0 -43
- package/dist/docs/reference/geometry/subtract3.md +0 -49
- package/dist/docs/reference/geometry/transformDeterminant3.md +0 -43
- package/dist/docs/reference/geometry/translationTransform3.md +0 -42
- package/dist/docs/reference/geometry/validateRigidTransform3.md +0 -41
- package/dist/docs/reference/geometry/validateTransform3.md +0 -54
- package/dist/docs/reference/model/Profile.md +0 -30
- package/dist/docs/reference/model/categories/explicit-profiles.md +0 -21
- package/dist/docs/reference/model/matchProfiles.md +0 -48
- package/dist/docs/reference/model/preflightInternalThreadCutter.md +0 -93
- package/dist/docs/reference/model/preflightThreadedNut.md +0 -109
- package/dist/docs/reference/model/preflightThreadedRod.md +0 -93
- package/dist/engine/operations/patterns.js +0 -47
- 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/mechanical/{standards.js → fastener-standards.js} +0 -0
- /package/dist/geometry/mesh/{mesh-edge-table.js → edge-table.js} +0 -0
- /package/dist/geometry/mesh/{mesh-types.js → types.js} +0 -0
- /package/dist/geometry/mesh/{mesh-view-cache.js → view-cache.js} +0 -0
- /package/dist/geometry/{primitive-options.js → primitives/options.js} +0 -0
- /package/dist/geometry/{text-layout.js → sweep/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 memo data require
|
|
77
|
-
* the current Modeling runtime.
|
|
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 memo data require
|
|
134
|
-
* the current Modeling runtime.
|
|
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,153 +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
|
-
/**
|
|
303
|
-
* A sampled closed two-dimensional boundary whose first point is not repeated at the end.
|
|
304
|
-
*
|
|
305
|
-
* Polygon exteriors are counter-clockwise and holes are clockwise. Algorithms
|
|
306
|
-
* may reject duplicate adjacent points or fewer than three effective vertices.
|
|
307
|
-
* 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.
|
|
308
180
|
*
|
|
309
|
-
* @
|
|
310
|
-
*
|
|
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
|
+
* ```
|
|
311
203
|
*/
|
|
312
|
-
export declare
|
|
313
|
-
|
|
314
|
-
/** One sampled component retaining contour identities and logical point correspondence. */
|
|
315
|
-
export declare interface CorrespondingComponent {
|
|
316
|
-
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
317
|
-
readonly id: string;
|
|
318
|
-
/** Counterclockwise outer contour. */
|
|
319
|
-
readonly outer: CorrespondingContour;
|
|
320
|
-
/** Clockwise hole contours belonging to this component. */
|
|
321
|
-
readonly holes: readonly CorrespondingContour[];
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
/** A sampled contour retaining logical slots, including intentionally collapsed spans. */
|
|
325
|
-
export declare interface CorrespondingContour {
|
|
326
|
-
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
327
|
-
readonly id: string;
|
|
328
|
-
/** Ordered sampled points in millimetres; closing vertices are implicit. */
|
|
329
|
-
readonly points: Contour;
|
|
330
|
-
/** One span identity per point; indices correspond between every matched family member. */
|
|
331
|
-
readonly spans: readonly string[];
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/** Shared logical contour sampling suitable for a loft or hollow sweep. */
|
|
335
|
-
export declare interface CorrespondingProfile {
|
|
336
|
-
/** Ordered components with explicit contour identities. */
|
|
337
|
-
readonly components: readonly CorrespondingComponent[];
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
/** One already matched profile at an explicit height or right-handed spatial frame. */
|
|
341
|
-
export declare type CorrespondingProfileStation = LoftPlacement & {
|
|
342
|
-
/** Already corresponding filled contours with authoritative landmark slots. */
|
|
343
|
-
readonly profile: CorrespondingProfile;
|
|
344
|
-
};
|
|
204
|
+
export declare function cornerCutter(options: CornerCutterOptions): Solid;
|
|
345
205
|
|
|
346
206
|
/**
|
|
347
|
-
*
|
|
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.
|
|
348
209
|
*/
|
|
349
|
-
export declare interface
|
|
350
|
-
/**
|
|
351
|
-
readonly
|
|
352
|
-
/**
|
|
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. */
|
|
353
216
|
readonly resolution?: GeometryResolution;
|
|
354
|
-
/**
|
|
355
|
-
readonly
|
|
356
|
-
/** Explicit sampling ceilings; omitted values use package defaults without ambient state. */
|
|
357
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
217
|
+
/** Local allocation ceilings may only lower the evaluating host's limits. */
|
|
218
|
+
readonly limits?: Partial<ModelingLimits>;
|
|
358
219
|
}
|
|
359
220
|
|
|
360
|
-
/**
|
|
361
|
-
export declare
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
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;
|
|
369
237
|
}
|
|
370
238
|
|
|
371
239
|
/**
|
|
@@ -425,51 +293,62 @@ export declare interface DiagnosticOptions<P> {
|
|
|
425
293
|
}
|
|
426
294
|
|
|
427
295
|
/**
|
|
428
|
-
*
|
|
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
|
+
* ```
|
|
429
312
|
*/
|
|
430
|
-
export declare
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
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
|
+
}
|
|
435
335
|
|
|
436
336
|
/**
|
|
437
337
|
* Centered elliptical section.
|
|
438
338
|
*
|
|
439
339
|
* @example Ellipse by full dimensions
|
|
440
340
|
* ```ts
|
|
441
|
-
* ellipse({ size: [30, 20] });
|
|
341
|
+
* ellipse({ size: [30, 20] }).extrude({ height: 3 });
|
|
442
342
|
* ```
|
|
443
343
|
*/
|
|
444
344
|
export declare function ellipse(options: EllipseOptions): Section;
|
|
445
345
|
|
|
446
|
-
/**
|
|
447
|
-
* Ellipse dimensions with exactly one XY radii or full-size tuple and explicit sampling.
|
|
448
|
-
*/
|
|
449
|
-
export declare type EllipseContourOptions = CircularPrimitiveOptions &
|
|
450
|
-
(
|
|
451
|
-
| {
|
|
452
|
-
/** Positive XY radii in millimetres; mutually exclusive with size. */
|
|
453
|
-
readonly radius: Vector2Input;
|
|
454
|
-
/** Full XY extents are unavailable when radius is supplied. */
|
|
455
|
-
readonly size?: never;
|
|
456
|
-
}
|
|
457
|
-
| {
|
|
458
|
-
/** Positive full XY extents in millimetres; mutually exclusive with radius. */
|
|
459
|
-
readonly size: Vector2Input;
|
|
460
|
-
/** XY radii are unavailable when size is supplied. */
|
|
461
|
-
readonly radius?: never;
|
|
462
|
-
}
|
|
463
|
-
);
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* Ellipse dimensions in local XY, with exactly one radii or full-size tuple.
|
|
467
|
-
*/
|
|
346
|
+
/** Ellipse dimensions in local XY, with exactly one radii or full-size tuple. */
|
|
468
347
|
export declare type EllipseOptions = EllipseContourOptions &
|
|
469
348
|
PrimitiveAttachment;
|
|
470
349
|
|
|
471
350
|
/**
|
|
472
|
-
* Independent inward finishing on primitive or source-corresponding
|
|
351
|
+
* Independent inward finishing on primitive or source-corresponding extrusion ends.
|
|
473
352
|
* Zero amounts leave the end untreated, including when all ends are disabled.
|
|
474
353
|
*/
|
|
475
354
|
export declare interface EndTreatments {
|
|
@@ -483,10 +362,12 @@ export declare interface EndTreatments {
|
|
|
483
362
|
* Extrudes a filled Section or explicit corresponding contours along +Z with degree twist and top scaling.
|
|
484
363
|
* Use `section.extrude(options)` in fluent sequences, or this function for generic profile inputs.
|
|
485
364
|
*
|
|
365
|
+
* @param shape - Filled XY profile in millimetres.
|
|
366
|
+
*
|
|
486
367
|
* @example Extrude
|
|
487
368
|
* ```ts
|
|
488
|
-
* import { extrude
|
|
489
|
-
* import { rectangleProfile } from "@metamesh/modeling/geometry";
|
|
369
|
+
* import { extrude } from "@metamesh/modeling";
|
|
370
|
+
* import { matchProfiles, rectangleProfile } from "@metamesh/modeling/geometry";
|
|
490
371
|
*
|
|
491
372
|
* const [profile] = matchProfiles([rectangleProfile({ size: [30, 20] })]);
|
|
492
373
|
* extrude(profile!, { height: 8 });
|
|
@@ -497,53 +378,19 @@ export declare function extrude(
|
|
|
497
378
|
options: ExtrudeOptions,
|
|
498
379
|
): Solid;
|
|
499
380
|
|
|
500
|
-
/**
|
|
501
|
-
* Dimensions and sampling for pure +Z mesh extrusion, without end treatments.
|
|
502
|
-
*/
|
|
503
|
-
export declare interface ExtrudeMeshOptions extends ExtrusionSamplingOptions {
|
|
504
|
-
/** Positive extrusion height in millimetres. */
|
|
505
|
-
readonly height: number;
|
|
506
|
-
/** Center the extrusion on Z; otherwise its bottom is at zero. Defaults to false. */
|
|
507
|
-
readonly center?: boolean;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
381
|
/** Native +Z extrusion with optional inward end treatments. */
|
|
511
382
|
export declare interface ExtrudeOptions extends ExtrudeMeshOptions {
|
|
512
|
-
/** Independent inward treatments on every material rim
|
|
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. */
|
|
513
384
|
readonly ends?: EndTreatments;
|
|
514
385
|
}
|
|
515
386
|
|
|
516
|
-
/** Shared sampling controls for a twisted or scaled linear extrusion. */
|
|
517
|
-
export declare interface ExtrusionSamplingOptions {
|
|
518
|
-
/** Exact number of intermediate profiles, nonnegative; overrides physical sampling. */
|
|
519
|
-
readonly divisions?: number;
|
|
520
|
-
/** Explicit output and sampling allocation ceilings. */
|
|
521
|
-
readonly limits?: Partial<ModelingLimits>;
|
|
522
|
-
/** Operation-level physical policy over the nearest model scope. */
|
|
523
|
-
readonly resolution?: GeometryResolution;
|
|
524
|
-
/** Finite uniform or XY scale of the top profile; defaults to one. */
|
|
525
|
-
readonly scaleTop?: number | Vector2Input;
|
|
526
|
-
/** Finite rotation of the top profile about +Z, in degrees; defaults to zero. */
|
|
527
|
-
readonly twist?: number;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
/** A right-handed orthonormal coordinate frame expressed in world coordinates. */
|
|
531
|
-
export declare interface Frame3 {
|
|
532
|
-
/** World-space origin of the local frame. */
|
|
533
|
-
readonly origin: Vector3Data;
|
|
534
|
-
/** Unit vector defining the local +X axis. */
|
|
535
|
-
readonly xAxis: Vector3Data;
|
|
536
|
-
/** Unit vector defining the local +Y axis. */
|
|
537
|
-
readonly yAxis: Vector3Data;
|
|
538
|
-
/** Unit vector defining the local +Z axis. */
|
|
539
|
-
readonly zAxis: Vector3Data;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
387
|
/**
|
|
543
388
|
* Defines a typed model without executing it. Parameters are an object map of capturable data;
|
|
544
389
|
* runtime capture rejects arrays at the root, ordinary class instances, mutable buffers, and functions.
|
|
545
390
|
* Supply live capabilities through services. Use `memo` only for work worth reusing.
|
|
546
391
|
*
|
|
392
|
+
* @param callback - Synchronous callback returning one part or a readonly part array.
|
|
393
|
+
*
|
|
547
394
|
* @example A simple model
|
|
548
395
|
* ```ts
|
|
549
396
|
* const model = generate<{ height: number }>(({ params, part, assert }) => {
|
|
@@ -564,7 +411,7 @@ export declare type GenerateCallback<
|
|
|
564
411
|
context: GenerateContext<P, S>,
|
|
565
412
|
) => PartDeclaration | readonly PartDeclaration[];
|
|
566
413
|
|
|
567
|
-
/**
|
|
414
|
+
/** Synchronous authoring context with immutable parameters and host-prepared services. */
|
|
568
415
|
export declare interface GenerateContext<
|
|
569
416
|
P extends object,
|
|
570
417
|
S = Record<never, never>,
|
|
@@ -573,6 +420,10 @@ export declare interface GenerateContext<
|
|
|
573
420
|
readonly params: ImmutableValue<P>;
|
|
574
421
|
/** Host-prepared readonly synchronous capabilities, fixed for the session. */
|
|
575
422
|
readonly services: Readonly<S>;
|
|
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>;
|
|
576
427
|
/** Reuses a pure synchronous function; pass changing inputs as arguments and keep helpers stable. */
|
|
577
428
|
readonly memo: Memo;
|
|
578
429
|
/** Declares a semantic part with identity placement, or explicit placement and appearance. */
|
|
@@ -611,101 +462,11 @@ export declare class GenerationError extends Error {
|
|
|
611
462
|
constructor(diagnostics: readonly GenerationDiagnostic[]);
|
|
612
463
|
}
|
|
613
464
|
|
|
614
|
-
/**
|
|
615
|
-
* Error raised when a geometry precondition or invariant is not satisfied.
|
|
616
|
-
*
|
|
617
|
-
* Callers may use `code` for coarse recovery decisions. Human-facing details
|
|
618
|
-
* remain in `message`; messages are descriptive but are not a stable API.
|
|
619
|
-
*
|
|
620
|
-
* @example
|
|
621
|
-
* ```ts
|
|
622
|
-
* const error = new GeometryError("INVALID_ARGUMENT", "Radius must be positive.", {
|
|
623
|
-
* operation: "example",
|
|
624
|
-
* details: { radius: 0 },
|
|
625
|
-
* });
|
|
626
|
-
* ```
|
|
627
|
-
*/
|
|
628
|
-
export declare class GeometryError extends Error {
|
|
629
|
-
/** Machine-readable failure category. */
|
|
630
|
-
readonly code: GeometryErrorCode;
|
|
631
|
-
/** Operation and scalar facts associated with the failure. */
|
|
632
|
-
readonly context: GeometryErrorContext;
|
|
633
|
-
/**
|
|
634
|
-
* Creates a geometry error with a stable category, operation, and descriptive message.
|
|
635
|
-
*
|
|
636
|
-
* @param code - Machine-readable failure category.
|
|
637
|
-
* @param message - Human-readable diagnostic message.
|
|
638
|
-
* @param context - Operation and optional scalar facts. Defaults to `{ operation: "geometry" }`.
|
|
639
|
-
*/
|
|
640
|
-
constructor(
|
|
641
|
-
code: GeometryErrorCode,
|
|
642
|
-
message: string,
|
|
643
|
-
context?: GeometryErrorContext,
|
|
644
|
-
);
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
/** Stable categories for invalid inputs, topology, allocation, and runtime failures. */
|
|
648
|
-
export declare type GeometryErrorCode =
|
|
649
|
-
| "COMPLEXITY_LIMIT"
|
|
650
|
-
| "DEGENERATE_GEOMETRY"
|
|
651
|
-
| "INVALID_ARGUMENT"
|
|
652
|
-
| "INVALID_MESH"
|
|
653
|
-
| "INVALID_TOPOLOGY"
|
|
654
|
-
| "INVALID_TOLERANCE"
|
|
655
|
-
| "NON_FINITE_VALUE"
|
|
656
|
-
| "SELF_INTERSECTION"
|
|
657
|
-
| "SINGULAR_TRANSFORM"
|
|
658
|
-
| "UNSUPPORTED_RUNTIME";
|
|
659
|
-
|
|
660
|
-
/** Serializable context attached to a geometry failure. */
|
|
661
|
-
export declare interface GeometryErrorContext {
|
|
662
|
-
/** Optional scalar facts useful for diagnostics without parsing the message. */
|
|
663
|
-
readonly details?: Readonly<Record<string, boolean | number | string>>;
|
|
664
|
-
/** Stable operation name, such as `normalizeContour` or `extrude`. */
|
|
665
|
-
readonly operation: string;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* Tessellation policy for sampled geometry measured in millimetres.
|
|
670
|
-
*/
|
|
671
|
-
export declare interface GeometryResolution {
|
|
672
|
-
/** Optional exact full-circle segment count, of at least three, bounded by the selected circular ceiling. */
|
|
673
|
-
readonly circularSegments?: number;
|
|
674
|
-
/** Maximum radial chord error in millimetres; defaults to 0.05. */
|
|
675
|
-
readonly maxChordError?: number;
|
|
676
|
-
/** Optional maximum sampled edge length in millimetres. */
|
|
677
|
-
readonly maxSegmentLength?: number;
|
|
678
|
-
/** Upper safety bound for a full circle; defaults to the selected maxCircularSegments (512 by default). */
|
|
679
|
-
readonly maxSegments?: number;
|
|
680
|
-
/** Lower full-circle segment count; defaults to 16 or a lower selected circular ceiling. */
|
|
681
|
-
readonly minSegments?: number;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
/** Explicit allocation ceilings for pure sampling and host-owned modeling operations. */
|
|
685
|
-
export declare interface GeometrySamplingLimits {
|
|
686
|
-
/** Maximum points in one sampled path or placement/frame result. */
|
|
687
|
-
readonly maxPathPoints: number;
|
|
688
|
-
/** Maximum aggregate points in one sampled profile or Section. */
|
|
689
|
-
readonly maxProfilePoints: number;
|
|
690
|
-
/** Maximum points in one profile swept along a path. */
|
|
691
|
-
readonly maxSweepProfilePoints: number;
|
|
692
|
-
/** Maximum segments around one complete circle. */
|
|
693
|
-
readonly maxCircularSegments: number;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
/** Optional overrides for MetaMesh's geometry comparison policy. */
|
|
697
|
-
export declare interface GeometryToleranceOptions {
|
|
698
|
-
/** Absolute distance floor in model units. Must be finite and greater than zero. */
|
|
699
|
-
readonly absolute?: number;
|
|
700
|
-
/** Angular comparison threshold in radians. Must be finite and greater than zero. */
|
|
701
|
-
readonly angular?: number;
|
|
702
|
-
/** Dimensionless scale multiplier. Must be finite and non-negative. */
|
|
703
|
-
readonly relative?: number;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
465
|
/**
|
|
707
466
|
* XY or XYZ copies, optionally centered or placed in an explicit frame.
|
|
708
467
|
*
|
|
468
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
469
|
+
*
|
|
709
470
|
* @example Centered XY grid
|
|
710
471
|
* ```ts
|
|
711
472
|
* gridPattern(box({ size: 4 }), { count: [3, 2], spacing: [10, 10], center: true });
|
|
@@ -716,38 +477,16 @@ export declare function gridPattern(
|
|
|
716
477
|
options: GridPatternOptions,
|
|
717
478
|
): readonly Solid[];
|
|
718
479
|
|
|
719
|
-
/**
|
|
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
|
+
*/
|
|
720
485
|
export declare function gridPattern(
|
|
721
486
|
source: PatternSource<Section>,
|
|
722
487
|
options: GridPatternOptions<2>,
|
|
723
488
|
): readonly Section[];
|
|
724
489
|
|
|
725
|
-
/**
|
|
726
|
-
* XY or XYZ grid with X varying fastest. The first item starts at the local origin.
|
|
727
|
-
* Dimension 2 restricts counts and spacing to XY; any frame must preserve the XY plane.
|
|
728
|
-
*/
|
|
729
|
-
export declare type GridPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
730
|
-
/** Center the complete distribution around its local origin; defaults to false. */
|
|
731
|
-
readonly center?: boolean;
|
|
732
|
-
/** Optional right-handed local axes and origin for the grid. */
|
|
733
|
-
readonly frame?: Frame3;
|
|
734
|
-
} & (
|
|
735
|
-
| {
|
|
736
|
-
/** Positive integer counts on X and Y. */
|
|
737
|
-
readonly count: Vector2Data;
|
|
738
|
-
/** Signed millimetres between adjacent copies on X and Y. */
|
|
739
|
-
readonly spacing: Vector2Data;
|
|
740
|
-
}
|
|
741
|
-
| (Dimension extends 3
|
|
742
|
-
? {
|
|
743
|
-
/** Positive integer counts on X, Y and Z. */
|
|
744
|
-
readonly count: Vector3Data;
|
|
745
|
-
/** Signed millimetres between adjacent copies on X, Y and Z. */
|
|
746
|
-
readonly spacing: Vector3Data;
|
|
747
|
-
}
|
|
748
|
-
: never)
|
|
749
|
-
);
|
|
750
|
-
|
|
751
490
|
/**
|
|
752
491
|
* Closed rectilinear top above a flat base, with uniform or explicit XY coordinates.
|
|
753
492
|
*
|
|
@@ -817,40 +556,58 @@ export declare type HeightfieldOptions = {
|
|
|
817
556
|
);
|
|
818
557
|
|
|
819
558
|
/**
|
|
820
|
-
* Declares a +Z hole or blind-pocket cutter with
|
|
559
|
+
* Declares a +Z hole or blind-pocket cutter with independent opening treatments.
|
|
821
560
|
*
|
|
822
561
|
* @remarks
|
|
823
|
-
* Choose exactly one circular diameter or existing Section.
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
*
|
|
827
|
-
*
|
|
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.
|
|
828
568
|
* Existing Section samples are authoritative; limits and unspecified circular sampling belong
|
|
829
569
|
* to the evaluating host.
|
|
830
570
|
*
|
|
831
|
-
* @example
|
|
571
|
+
* @example Amber cutter · Blue blind hex pocket
|
|
832
572
|
* ```ts
|
|
833
|
-
* holeCutter
|
|
834
|
-
*
|
|
835
|
-
*
|
|
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 },
|
|
836
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
|
+
* ]);
|
|
837
589
|
* ```
|
|
838
590
|
*/
|
|
839
591
|
export declare function holeCutter(options: HoleCutterOptions): Solid;
|
|
840
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
|
+
|
|
841
600
|
/**
|
|
842
601
|
* A deferred +Z hole or pocket cutter, with exactly one circular diameter or existing Section.
|
|
843
|
-
*
|
|
844
|
-
*
|
|
845
|
-
*
|
|
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.
|
|
846
605
|
*/
|
|
847
606
|
export declare type HoleCutterOptions = {
|
|
848
|
-
/** Positive nominal depth along +Z, starting exactly at Z=0. */
|
|
607
|
+
/** Positive nominal depth in millimetres along +Z, starting exactly at Z=0. */
|
|
849
608
|
readonly height: number;
|
|
850
|
-
/** Opening carrying the recess or entry chamfer; defaults to top. */
|
|
851
|
-
readonly face?: "bottom" | "top";
|
|
852
609
|
/** Extra length outside each nominal face; both ends default to zero. */
|
|
853
|
-
readonly overrun?:
|
|
610
|
+
readonly overrun?: CutterOverrun;
|
|
854
611
|
/** Operation-level physical sampling; an existing Section retains its sampled boundary. */
|
|
855
612
|
readonly resolution?: GeometryResolution;
|
|
856
613
|
/** Local allocation ceilings may only lower the evaluating host's limits. */
|
|
@@ -862,44 +619,36 @@ export declare type HoleCutterOptions = {
|
|
|
862
619
|
readonly diameter: number;
|
|
863
620
|
/** Unavailable in this input form. */
|
|
864
621
|
readonly profile?: never;
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
/** Circular head seating; mutually exclusive with entryChamfer. */
|
|
874
|
-
readonly recess: HoleCutterRecess;
|
|
875
|
-
/** Unavailable in this input form. */
|
|
876
|
-
readonly entryChamfer?: never;
|
|
877
|
-
}
|
|
878
|
-
))
|
|
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
|
+
})
|
|
879
630
|
| {
|
|
880
631
|
/** Local XY material to remove, retaining its position, orientation and physical sampling. */
|
|
881
632
|
readonly profile: Section;
|
|
882
633
|
/** Unavailable in this input form. */
|
|
883
634
|
readonly diameter?: never;
|
|
884
635
|
/** Unavailable in this input form. */
|
|
885
|
-
readonly recess?: never;
|
|
886
|
-
/** Unavailable in this input form. */
|
|
887
636
|
readonly segments?: never;
|
|
888
637
|
/** Unavailable in this input form. */
|
|
889
638
|
readonly sizing?: never;
|
|
890
|
-
/**
|
|
891
|
-
|
|
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
|
+
};
|
|
892
649
|
}
|
|
893
650
|
);
|
|
894
651
|
|
|
895
|
-
/** Explicit extra cutter length outside the nominal Z=0..height interval, in millimetres. */
|
|
896
|
-
export declare interface HoleCutterOverrun {
|
|
897
|
-
/** Extension below Z=0. Omitted means zero, preserving a blind pocket's floor. */
|
|
898
|
-
readonly bottom?: number;
|
|
899
|
-
/** Extension above Z=height. Omitted means zero. */
|
|
900
|
-
readonly top?: number;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
652
|
/** Circular screw seating dimensions in millimetres; allowances belong to the caller. */
|
|
904
653
|
export declare type HoleCutterRecess =
|
|
905
654
|
| {
|
|
@@ -907,7 +656,7 @@ export declare type HoleCutterRecess =
|
|
|
907
656
|
readonly kind: "counterbore";
|
|
908
657
|
/** Positive seat diameter greater than the bore, in millimetres. */
|
|
909
658
|
readonly diameter: number;
|
|
910
|
-
/** Positive seat depth
|
|
659
|
+
/** Positive seat depth in millimetres; both openings must leave an untreated bore interval. */
|
|
911
660
|
readonly depth: number;
|
|
912
661
|
}
|
|
913
662
|
| {
|
|
@@ -915,7 +664,7 @@ export declare type HoleCutterRecess =
|
|
|
915
664
|
readonly kind: "countersink";
|
|
916
665
|
/** Positive mouth diameter greater than the bore, in millimetres. */
|
|
917
666
|
readonly diameter: number;
|
|
918
|
-
/** 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. */
|
|
919
668
|
readonly includedAngle: number;
|
|
920
669
|
};
|
|
921
670
|
|
|
@@ -949,22 +698,7 @@ export declare type HullOptions =
|
|
|
949
698
|
readonly points?: never;
|
|
950
699
|
};
|
|
951
700
|
|
|
952
|
-
|
|
953
|
-
* Copies numeric data once into private storage. This pure helper needs no active generation.
|
|
954
|
-
* @example
|
|
955
|
-
* ```ts
|
|
956
|
-
* import { immutableBuffer } from "@metamesh/modeling";
|
|
957
|
-
* const heights = immutableBuffer(new Float32Array([2, 4, 6]));
|
|
958
|
-
* const count = heights.length;
|
|
959
|
-
* const first = heights.at(0);
|
|
960
|
-
* const doubled = Array.from(heights, (height) => height * 2);
|
|
961
|
-
* const editable = heights.copy();
|
|
962
|
-
* editable[0] = 8; // heights still contains 2, 4, 6.
|
|
963
|
-
* ```
|
|
964
|
-
*/
|
|
965
|
-
export declare function immutableBuffer<T extends NumericArray>(
|
|
966
|
-
source: T,
|
|
967
|
-
): ImmutableBuffer<T>;
|
|
701
|
+
declare const immutableBufferBrand: unique symbol;
|
|
968
702
|
|
|
969
703
|
/**
|
|
970
704
|
* Deeply readonly view of captured generation data, including nested arrays and tuples.
|
|
@@ -987,7 +721,7 @@ export declare function implicit(options: ImplicitOptions): Solid;
|
|
|
987
721
|
|
|
988
722
|
/** Positive-inside sampling, bounded to 4M native BCC grid slots and 8M field calls. */
|
|
989
723
|
export declare interface ImplicitOptions {
|
|
990
|
-
/** Positive-inside scalar field evaluated at finite XYZ points. */
|
|
724
|
+
/** Positive-inside scalar field evaluated at finite XYZ points in millimetres. */
|
|
991
725
|
readonly field: (point: Vector3Data) => number;
|
|
992
726
|
/** Axis-aligned XYZ bounds in millimetres. */
|
|
993
727
|
readonly bounds: Bounds3Data;
|
|
@@ -1002,32 +736,33 @@ export declare interface ImplicitOptions {
|
|
|
1002
736
|
/**
|
|
1003
737
|
* Compensated internal threaded cutter.
|
|
1004
738
|
*
|
|
1005
|
-
* @example
|
|
739
|
+
* @example Amber thread cutter · Blue cutaway result
|
|
1006
740
|
* ```ts
|
|
1007
|
-
* import { cylinder, internalThreadCutter } from "@metamesh/modeling";
|
|
1008
|
-
* 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
|
+
*
|
|
1009
745
|
* const profile = threadProfile({ kind: "triangular", pitch: 1.75 });
|
|
1010
746
|
* const body = cylinder({ diameter: 20, height: 12, center: false });
|
|
1011
747
|
* const cutter = internalThreadCutter({ nominalMajorDiameter: 12, length: 12, profile });
|
|
1012
|
-
*
|
|
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
|
+
* ]);
|
|
1013
755
|
* ```
|
|
1014
756
|
*/
|
|
1015
757
|
export declare function internalThreadCutter(
|
|
1016
|
-
options:
|
|
758
|
+
options: InternalThreadCutterSolidOptions,
|
|
1017
759
|
): Solid;
|
|
1018
760
|
|
|
1019
|
-
/** Options for a compensated internal-thread subtraction tool along +Z. */
|
|
1020
|
-
export declare interface InternalThreadCutterOptions
|
|
1021
|
-
extends Omit<ThreadRidgeOptions, "majorDiameter">, ThreadBevelOptions {
|
|
1022
|
-
/** Printable fit or caller-calibrated allowances. Default: `normal`. */
|
|
1023
|
-
readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
|
|
1024
|
-
/** Nominal major diameter before female compensation and faceting correction. */
|
|
1025
|
-
readonly nominalMajorDiameter: number;
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
761
|
/**
|
|
1029
762
|
* Robust intersection of one or more shapes; empty input rejects during declaration.
|
|
1030
763
|
*
|
|
764
|
+
* @param solids - Operands in shared modeling coordinates.
|
|
765
|
+
*
|
|
1031
766
|
* @example Intersect
|
|
1032
767
|
* ```ts
|
|
1033
768
|
* intersect([box({ size: 20 }), sphere({ radius: 12 })]);
|
|
@@ -1035,16 +770,12 @@ export declare interface InternalThreadCutterOptions
|
|
|
1035
770
|
*/
|
|
1036
771
|
export declare function intersect(solids: readonly Solid[]): Solid;
|
|
1037
772
|
|
|
1038
|
-
/** Native filled section intersection; dimensions cannot be mixed. */
|
|
1039
|
-
export declare function intersect(sections: readonly Section[]): Section;
|
|
1040
|
-
|
|
1041
773
|
/**
|
|
1042
|
-
*
|
|
774
|
+
* Filled Section intersection; dimensions cannot be mixed.
|
|
1043
775
|
*
|
|
1044
|
-
*
|
|
1045
|
-
* does not survive structured cloning; worker protocols carry their own serialized error envelope.
|
|
776
|
+
* @param sections - Operands in shared XY coordinates.
|
|
1046
777
|
*/
|
|
1047
|
-
export declare function
|
|
778
|
+
export declare function intersect(sections: readonly Section[]): Section;
|
|
1048
779
|
|
|
1049
780
|
/**
|
|
1050
781
|
* Fuses two positioned solids with a dimensioned transition at the feature's source datum.
|
|
@@ -1056,6 +787,9 @@ export declare function isGeometryError(value: unknown): value is GeometryError;
|
|
|
1056
787
|
* Neither operand moves, loses material, or changes sampling. The result has no inherited anchors.
|
|
1057
788
|
* This operation promises neither a circular radius, a constant bevel angle, nor global curvature continuity.
|
|
1058
789
|
*
|
|
790
|
+
* @param base - Support solid in shared modeling coordinates.
|
|
791
|
+
* @param feature - Positioned feature that owns the source datum.
|
|
792
|
+
*
|
|
1059
793
|
* @example Join a mounting boss
|
|
1060
794
|
* ```ts
|
|
1061
795
|
* const base = box({ size: [50, 40, 6] });
|
|
@@ -1116,7 +850,6 @@ export declare interface KnuckleHinge {
|
|
|
1116
850
|
* Each half's `chamfer` bevels its barrel outer rims and all web edges. Consumers own plates, screw holes,
|
|
1117
851
|
* pin retention, fit policy, and part placement. Added mounting material must preserve the bores.
|
|
1118
852
|
* No opening range or collision freedom is implied for arbitrary caller attachments.
|
|
1119
|
-
* Compiled Generator packages using this operation require runtime 10.0.0 or newer in major 10.
|
|
1120
853
|
*
|
|
1121
854
|
* @example Integral-pin hinge with two mounting webs
|
|
1122
855
|
* ```ts
|
|
@@ -1132,22 +865,6 @@ export declare function knuckleHinge(
|
|
|
1132
865
|
options: KnuckleHingeOptions,
|
|
1133
866
|
): KnuckleHinge;
|
|
1134
867
|
|
|
1135
|
-
/** Shared knuckle-joint dimensions in millimetres, independent of mounting geometry. */
|
|
1136
|
-
export declare interface KnuckleHingeBaseSpec {
|
|
1137
|
-
/** Total extent along the +X pin axis, centered at the origin. */
|
|
1138
|
-
readonly length: number;
|
|
1139
|
-
/** Number of equal alternating intervals, starting with half A. */
|
|
1140
|
-
readonly knuckleCount: number;
|
|
1141
|
-
/** Outside vertex-sized barrel diameter. */
|
|
1142
|
-
readonly barrelDiameter: number;
|
|
1143
|
-
/** Vertex-sized shaft diameter, including an externally supplied shaft. */
|
|
1144
|
-
readonly pinDiameter: number;
|
|
1145
|
-
/** Nonnegative per-side radial allowance; bores circumscribe this running envelope. */
|
|
1146
|
-
readonly radialClearance: number;
|
|
1147
|
-
/** Nonnegative total air gap between each neighboring pair of knuckle ends. */
|
|
1148
|
-
readonly axialGap: number;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
868
|
/** Optional mounting and edge treatment for one knuckle owner. */
|
|
1152
869
|
export declare interface KnuckleHingeHalfOptions {
|
|
1153
870
|
/** Omit for barrels only. Each interval receives one web; disconnected intervals need caller geometry. */
|
|
@@ -1171,41 +888,6 @@ export declare type KnuckleHingeOptions = KnuckleHingeSpec &
|
|
|
1171
888
|
readonly halfB?: KnuckleHingeHalfOptions;
|
|
1172
889
|
};
|
|
1173
890
|
|
|
1174
|
-
/** Shared circular sampling for barrels, shafts, and bores. */
|
|
1175
|
-
export declare interface KnuckleHingeSamplingOptions {
|
|
1176
|
-
/** Exact full-circle count, divisible by four and at least four; overrides adaptive sampling. */
|
|
1177
|
-
readonly segments?: number;
|
|
1178
|
-
/** Physical tessellation policy. Exact circular counts must also be divisible by four. */
|
|
1179
|
-
readonly resolution?: GeometryResolution;
|
|
1180
|
-
/** Explicit allocation ceilings; defaults to the pure geometry sampling limits. */
|
|
1181
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
/**
|
|
1185
|
-
* Knuckle-joint construction modes and interval ownership.
|
|
1186
|
-
*
|
|
1187
|
-
* Print-in-place requires an odd count of at least three: A owns both
|
|
1188
|
-
* end anchors and the entire shaft. Inserted-pin bores both halves and supplies no shaft.
|
|
1189
|
-
* Lift-off requires exactly two intervals; A's integral pin enters B without a far anchor.
|
|
1190
|
-
*/
|
|
1191
|
-
export declare type KnuckleHingeSpec = KnuckleHingeBaseSpec &
|
|
1192
|
-
(
|
|
1193
|
-
| {
|
|
1194
|
-
/** Captive integral shaft or bores for an externally supplied pin. */
|
|
1195
|
-
readonly mode: "print-in-place" | "inserted-pin";
|
|
1196
|
-
/** Engagement applies only to lift-off construction. */
|
|
1197
|
-
readonly pinEngagement?: never;
|
|
1198
|
-
}
|
|
1199
|
-
| {
|
|
1200
|
-
/** Detachable socket on a finite integral pin. */
|
|
1201
|
-
readonly mode: "lift-off";
|
|
1202
|
-
/** Lift-off has one fixed interval and one removable interval. */
|
|
1203
|
-
readonly knuckleCount: 2;
|
|
1204
|
-
/** Positive axial engagement into B, no greater than its knuckle length. */
|
|
1205
|
-
readonly pinEngagement: number;
|
|
1206
|
-
}
|
|
1207
|
-
);
|
|
1208
|
-
|
|
1209
891
|
/** Rectangular connection from the axis into a caller-owned mounting body, in millimetres. */
|
|
1210
892
|
export declare interface KnuckleHingeWeb {
|
|
1211
893
|
/** Direction from the pin axis; independently chosen for each half. */
|
|
@@ -1221,6 +903,8 @@ export declare interface KnuckleHingeWeb {
|
|
|
1221
903
|
/**
|
|
1222
904
|
* Repeats one solid along a normalized direction.
|
|
1223
905
|
*
|
|
906
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
907
|
+
*
|
|
1224
908
|
* @example Three copies along X
|
|
1225
909
|
* ```ts
|
|
1226
910
|
* linearPattern(box({ size: 4 }), { count: 3, spacing: 10 });
|
|
@@ -1231,50 +915,22 @@ export declare function linearPattern(
|
|
|
1231
915
|
options: LinearPatternOptions,
|
|
1232
916
|
): readonly Solid[];
|
|
1233
917
|
|
|
1234
|
-
/**
|
|
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
|
+
*/
|
|
1235
923
|
export declare function linearPattern(
|
|
1236
924
|
source: PatternSource<Section>,
|
|
1237
925
|
options: LinearPatternOptions<2>,
|
|
1238
926
|
): readonly Section[];
|
|
1239
927
|
|
|
1240
928
|
/**
|
|
1241
|
-
*
|
|
1242
|
-
* Dimension defaults to 3; Section patterns use 2 and accept XY vector directions.
|
|
1243
|
-
*/
|
|
1244
|
-
export declare type LinearPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
1245
|
-
/** Direction of repetition; magnitude is ignored. Defaults to +X. */
|
|
1246
|
-
readonly direction?: Dimension extends 2 ? Vector2Input : Vector3Input;
|
|
1247
|
-
} & (
|
|
1248
|
-
| {
|
|
1249
|
-
/** Positive copy count, including the original. */
|
|
1250
|
-
readonly count: number;
|
|
1251
|
-
/** Signed nonzero millimetres between adjacent copies. */
|
|
1252
|
-
readonly spacing: number;
|
|
1253
|
-
/** Determined by count and spacing. */
|
|
1254
|
-
readonly length?: never;
|
|
1255
|
-
}
|
|
1256
|
-
| {
|
|
1257
|
-
/** Positive copy count, including the original. */
|
|
1258
|
-
readonly count: number;
|
|
1259
|
-
/** Signed millimetres from first to last copy; zero only for one copy. */
|
|
1260
|
-
readonly length: number;
|
|
1261
|
-
/** Determined by count and length. */
|
|
1262
|
-
readonly spacing?: never;
|
|
1263
|
-
}
|
|
1264
|
-
| {
|
|
1265
|
-
/** Signed nonzero millimetres between adjacent copies. */
|
|
1266
|
-
readonly spacing: number;
|
|
1267
|
-
/** Signed first-to-last millimetres; a nonnegative whole multiple of spacing. */
|
|
1268
|
-
readonly length: number;
|
|
1269
|
-
/** Determined by spacing and length. */
|
|
1270
|
-
readonly count?: never;
|
|
1271
|
-
}
|
|
1272
|
-
);
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* 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;
|
|
1276
930
|
* other profiles default to direct correspondence, preserving their supplied seams.
|
|
1277
931
|
*
|
|
932
|
+
* @param stations - Ordered profiles at millimetre Z heights or affine placements.
|
|
933
|
+
*
|
|
1278
934
|
* @example Loft
|
|
1279
935
|
* ```ts
|
|
1280
936
|
* loft([
|
|
@@ -1288,7 +944,11 @@ export declare function loft(
|
|
|
1288
944
|
options?: LoftOptions,
|
|
1289
945
|
): Solid;
|
|
1290
946
|
|
|
1291
|
-
/**
|
|
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
|
+
*/
|
|
1292
952
|
export declare function loft(
|
|
1293
953
|
stations: readonly CorrespondingProfileStation[],
|
|
1294
954
|
options?: LoftOptions,
|
|
@@ -1320,7 +980,7 @@ export declare interface LoftOptions {
|
|
|
1320
980
|
readonly distribution?: "perimeter" | "segments";
|
|
1321
981
|
/** Positive integer point-density multiplier, uniformly or per input profile. Original vertices are retained. Defaults to one. */
|
|
1322
982
|
readonly refine?: number | readonly number[];
|
|
1323
|
-
/**
|
|
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. */
|
|
1324
984
|
readonly slices?: number | readonly number[];
|
|
1325
985
|
/** Physical curve policy for retained primitives, and maximum edge length for point data. Exact primitive curve counts take precedence. */
|
|
1326
986
|
readonly resolution?: GeometryResolution;
|
|
@@ -1328,48 +988,12 @@ export declare interface LoftOptions {
|
|
|
1328
988
|
readonly limits?: Partial<ModelingLimits>;
|
|
1329
989
|
}
|
|
1330
990
|
|
|
1331
|
-
/**
|
|
1332
|
-
* A horizontal XY station height, or an explicit right-handed spatial frame, never both.
|
|
1333
|
-
*/
|
|
1334
|
-
export declare type LoftPlacement =
|
|
1335
|
-
| {
|
|
1336
|
-
/** Horizontal XY station height in millimetres. */
|
|
1337
|
-
readonly z: number;
|
|
1338
|
-
/** Excluded when a horizontal height is supplied. */
|
|
1339
|
-
readonly frame?: never;
|
|
1340
|
-
}
|
|
1341
|
-
| {
|
|
1342
|
-
/** Right-handed orthonormal station frame in world coordinates. */
|
|
1343
|
-
readonly frame: Frame3;
|
|
1344
|
-
/** Excluded when an explicit spatial frame is supplied. */
|
|
1345
|
-
readonly z?: never;
|
|
1346
|
-
};
|
|
1347
|
-
|
|
1348
|
-
/**
|
|
1349
|
-
* A Section or point loop at an explicit height or frame.
|
|
1350
|
-
*/
|
|
991
|
+
/** A Section or point loop at a horizontal height or explicit affine transform. */
|
|
1351
992
|
export declare type LoftStation = LoftPlacement & {
|
|
1352
993
|
/** Filled Section recipe or ordered XY boundary point data. */
|
|
1353
994
|
readonly profile: Section | Path2Input;
|
|
1354
995
|
};
|
|
1355
996
|
|
|
1356
|
-
/**
|
|
1357
|
-
* Matches a profile family using operation settings over host resolution and limits.
|
|
1358
|
-
* Requires active synchronous model execution. Use Geometry's matchProfiles for standalone preparation.
|
|
1359
|
-
*/
|
|
1360
|
-
export declare function matchProfiles(
|
|
1361
|
-
profiles: readonly Profile[],
|
|
1362
|
-
options?: MatchProfilesOptions,
|
|
1363
|
-
): readonly CorrespondingProfile[];
|
|
1364
|
-
|
|
1365
|
-
/** Explicit family sampling settings; omitted values use physical package defaults. */
|
|
1366
|
-
export declare interface MatchProfilesOptions {
|
|
1367
|
-
/** Local physical sampling policy; exact interval counts take precedence. */
|
|
1368
|
-
readonly resolution?: GeometryResolution;
|
|
1369
|
-
/** Explicit per-profile and circular ceilings; the family also has a one-million-slot work bound. */
|
|
1370
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
997
|
/** Eagerly reuses pure synchronous functions by function identity and immutable arguments. */
|
|
1374
998
|
export declare interface Memo {
|
|
1375
999
|
/**
|
|
@@ -1384,21 +1008,9 @@ export declare interface Memo {
|
|
|
1384
1008
|
): ImmutableValue<Result>;
|
|
1385
1009
|
}
|
|
1386
1010
|
|
|
1387
|
-
/**
|
|
1011
|
+
/** Declares the three-dimensional Minkowski sum of two Solid recipes. */
|
|
1388
1012
|
export declare function minkowskiSum(a: Solid, b: Solid): Solid;
|
|
1389
1013
|
|
|
1390
|
-
/** Aggregate manufacturing output ceilings selected by a trusted host. */
|
|
1391
|
-
export declare interface ModelingLimits extends GeometrySamplingLimits {
|
|
1392
|
-
/** Maximum number of named finalized parts. */
|
|
1393
|
-
readonly maxParts: number;
|
|
1394
|
-
/** Maximum aggregate output vertex count. */
|
|
1395
|
-
readonly maxVertices: number;
|
|
1396
|
-
/** Maximum aggregate output triangle count. */
|
|
1397
|
-
readonly maxTriangles: number;
|
|
1398
|
-
/** Maximum unique transferable output backing-buffer bytes. */
|
|
1399
|
-
readonly maxBytes: number;
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
1014
|
/** Stateless portable program descriptor. Execution and caches belong to an engine session. */
|
|
1403
1015
|
export declare interface ModelProgram<
|
|
1404
1016
|
P extends object,
|
|
@@ -1424,141 +1036,19 @@ export declare interface PartOptions {
|
|
|
1424
1036
|
/** Local manufacturing geometry; native objects never cross a revision. */
|
|
1425
1037
|
readonly geometry: PartGeometry;
|
|
1426
1038
|
/** Rigid local-to-world transform; translation uses millimetres. Defaults to identity.
|
|
1427
|
-
* 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.
|
|
1428
1040
|
*/
|
|
1429
1041
|
readonly transform?: Transform3Input;
|
|
1430
|
-
/** Optional six-digit hexadecimal
|
|
1042
|
+
/** Optional six-digit hexadecimal display color. */
|
|
1431
1043
|
readonly color?: string;
|
|
1432
1044
|
}
|
|
1433
1045
|
|
|
1434
|
-
/** Immutable directed XY polyline. Closure is explicit and does not imply a filled Section. */
|
|
1435
|
-
export declare interface Path2 {
|
|
1436
|
-
/** Coordinate dimension; identifies planar paths even when empty. */
|
|
1437
|
-
readonly dimension: 2;
|
|
1438
|
-
/** Whether traversal includes the last-to-first edge. */
|
|
1439
|
-
readonly closed: boolean;
|
|
1440
|
-
/** Returns complete deeply frozen path data, including dimension and closure. Repeated calls do not allocate. */
|
|
1441
|
-
toData(): Path2Data;
|
|
1442
|
-
/** Total sampled edge length in model units, including the closing edge when closed. */
|
|
1443
|
-
length(): number;
|
|
1444
|
-
/** Immutable axis-aligned bounds, or undefined for an empty path. */
|
|
1445
|
-
bounds(): Bounds2 | undefined;
|
|
1446
|
-
/** Finds the nearest edge location; requires at least two vertices. */
|
|
1447
|
-
closestPoint(point: Vector2Input): PathLocation<Vector2>;
|
|
1448
|
-
/** Applies an XY placement without reordering traversal, including after reflection. */
|
|
1449
|
-
transform(placement: Transform2Input): Path2;
|
|
1450
|
-
/** Reverses vertex order and traversal; neither the source nor its coordinates are mutated. */
|
|
1451
|
-
reverse(): Path2;
|
|
1452
|
-
/** Returns a path sampled at equal arc lengths. Corners may be bridged; closure is preserved. */
|
|
1453
|
-
resample(options?: PathResamplingOptions): Path2;
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
/**
|
|
1457
|
-
* Snapshots finite XY coordinates as an immutable sampled path, independent of engine initialization.
|
|
1458
|
-
*
|
|
1459
|
-
* Open paths may be empty or have one point; closed paths need three vertices and omit a duplicated
|
|
1460
|
-
* seam. Repeated adjacent vertices are retained. No winding normalization or filling is performed.
|
|
1461
|
-
* Malformed dimensions or topology throw INVALID_ARGUMENT; nonfinite coordinates or measurement
|
|
1462
|
-
* overflow throw NON_FINITE_VALUE; exhausted allocation ceilings throw COMPLEXITY_LIMIT GeometryError.
|
|
1463
|
-
* A path input retains its closure. Limits bound construction only; resampling takes its own limits.
|
|
1464
|
-
*
|
|
1465
|
-
* Use `toData()` for a frozen record that restores coordinates, closure, and dimension together.
|
|
1466
|
-
*/
|
|
1467
|
-
export declare function path2(input: Path2Input, options?: PathOptions): Path2;
|
|
1468
|
-
|
|
1469
|
-
/** Complete plain XY path representation, including topology and empty-path dimensional identity. */
|
|
1470
|
-
export declare interface Path2Data {
|
|
1471
|
-
/** Coordinate dimension, retained even when points is empty. */
|
|
1472
|
-
readonly dimension: 2;
|
|
1473
|
-
/** Frozen or caller-owned XY coordinates; closed paths omit a duplicated seam. */
|
|
1474
|
-
readonly points: readonly Vector2Data[];
|
|
1475
|
-
/** Whether traversal includes the last-to-first edge. */
|
|
1476
|
-
readonly closed: boolean;
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
/** A matching path value, complete plain path data, or a collection of vectors. */
|
|
1480
|
-
export declare type Path2Input = Path2 | Path2Data | readonly Vector2Input[];
|
|
1481
|
-
|
|
1482
|
-
/** Immutable directed XYZ polyline; it represents sampled edges, not an analytic curve. */
|
|
1483
|
-
export declare interface Path3 {
|
|
1484
|
-
/** Coordinate dimension; identifies spatial paths even when empty. */
|
|
1485
|
-
readonly dimension: 3;
|
|
1486
|
-
/** Whether traversal includes the last-to-first edge. */
|
|
1487
|
-
readonly closed: boolean;
|
|
1488
|
-
/** Returns complete deeply frozen path data, including dimension and closure. Repeated calls do not allocate. */
|
|
1489
|
-
toData(): Path3Data;
|
|
1490
|
-
/** Total sampled edge length in model units, including the closing edge when closed. */
|
|
1491
|
-
length(): number;
|
|
1492
|
-
/** Immutable axis-aligned bounds, or undefined for an empty path. */
|
|
1493
|
-
bounds(): Bounds3 | undefined;
|
|
1494
|
-
/** Finds the nearest edge location; requires at least two vertices. */
|
|
1495
|
-
closestPoint(point: Vector3Input): PathLocation<Vector3>;
|
|
1496
|
-
/** Applies an XYZ placement without changing traversal order or closure. */
|
|
1497
|
-
transform(placement: Transform3Input): Path3;
|
|
1498
|
-
/** Reverses vertex order and traversal without mutating the source. */
|
|
1499
|
-
reverse(): Path3;
|
|
1500
|
-
/** Returns a path sampled at equal arc lengths. Corners may be bridged; closure is preserved. */
|
|
1501
|
-
resample(options?: PathResamplingOptions): Path3;
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
/**
|
|
1505
|
-
* Snapshots finite XYZ coordinates as an immutable sampled path with the same closure, seam,
|
|
1506
|
-
* allocation and error rules as path2. Analytic curves must be sampled explicitly first.
|
|
1507
|
-
*
|
|
1508
|
-
* Use `toData()` for a frozen record that restores coordinates, closure, and dimension together.
|
|
1509
|
-
*
|
|
1510
|
-
* @see {@link path2} for shared construction rules.
|
|
1511
|
-
*/
|
|
1512
|
-
export declare function path3(input: Path3Input, options?: PathOptions): Path3;
|
|
1513
|
-
|
|
1514
|
-
/** Complete plain XYZ path representation, including topology and empty-path dimensional identity. */
|
|
1515
|
-
export declare interface Path3Data {
|
|
1516
|
-
/** Coordinate dimension, retained even when points is empty. */
|
|
1517
|
-
readonly dimension: 3;
|
|
1518
|
-
/** Frozen or caller-owned XYZ coordinates; closed paths omit a duplicated seam. */
|
|
1519
|
-
readonly points: readonly Vector3Data[];
|
|
1520
|
-
/** Whether traversal includes the last-to-first edge. */
|
|
1521
|
-
readonly closed: boolean;
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
/** A matching path value, complete plain path data, or a collection of vectors. */
|
|
1525
|
-
export declare type Path3Input = Path3 | Path3Data | readonly Vector3Input[];
|
|
1526
|
-
|
|
1527
|
-
/** Nearest location on a sampled boundary, rather than inside a filled shape or on an analytic curve. */
|
|
1528
|
-
export declare interface PathLocation<Point extends Vector2 | Vector3> {
|
|
1529
|
-
/** Immutable position on the selected edge. */
|
|
1530
|
-
readonly point: Point;
|
|
1531
|
-
/** Euclidean distance from the query in model units. */
|
|
1532
|
-
readonly distance: number;
|
|
1533
|
-
/** Starting vertex of the selected edge; ties keep the first edge in traversal order. */
|
|
1534
|
-
readonly edgeIndex: number;
|
|
1535
|
-
/** Clamped fraction along that edge, not the whole path's normalized arc length. */
|
|
1536
|
-
readonly fraction: number;
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
/**
|
|
1540
|
-
* Supplies a profile-X orientation guide for each original normalized sweep station.
|
|
1541
|
-
*
|
|
1542
|
-
* @param point - Current XYZ path point in model units.
|
|
1543
|
-
* @param index - Zero-based index of `point` in the normalized authored sweep path.
|
|
1544
|
-
* @returns A finite guide vector that is not parallel to the local path tangent.
|
|
1545
|
-
*/
|
|
1546
|
-
export declare type PathNormalGuide = (
|
|
1547
|
-
point: Vector3Data,
|
|
1548
|
-
index: number,
|
|
1549
|
-
) => Vector3Input;
|
|
1550
|
-
|
|
1551
|
-
/** Topology and allocation ceiling for an immutable sampled path. */
|
|
1552
|
-
export declare interface PathOptions {
|
|
1553
|
-
/** Connects the last vertex to the first; closed paths omit the repeated seam. Defaults to false. */
|
|
1554
|
-
readonly closed?: boolean;
|
|
1555
|
-
/** Construction point ceiling; defaults to package sampling limits. Later sampling has its own options. */
|
|
1556
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
1046
|
/**
|
|
1560
1047
|
* Physical arc-length copies along a sampled path, with optional tangent orientation.
|
|
1561
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
|
+
*
|
|
1562
1052
|
* @example Copies along a bent path
|
|
1563
1053
|
* ```ts
|
|
1564
1054
|
* pathPattern(box({ size: 4 }), [[0, 0, 0], [20, 0, 0], [20, 20, 0]], { count: 5 });
|
|
@@ -1573,6 +1063,9 @@ export declare function pathPattern(
|
|
|
1573
1063
|
/**
|
|
1574
1064
|
* Repeats a filled Section along a sampled XY path. Tangent orientation maps local +X
|
|
1575
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.
|
|
1576
1069
|
*/
|
|
1577
1070
|
export declare function pathPattern(
|
|
1578
1071
|
source: PatternSource<Section>,
|
|
@@ -1580,41 +1073,11 @@ export declare function pathPattern(
|
|
|
1580
1073
|
options: PathPatternOptions,
|
|
1581
1074
|
): readonly Section[];
|
|
1582
1075
|
|
|
1583
|
-
/**
|
|
1584
|
-
export declare interface PathPatternOptions {
|
|
1585
|
-
/** Positive number of copies; open paths include both endpoints when greater than one. */
|
|
1586
|
-
readonly count: number;
|
|
1587
|
-
/** Raw point closure defaults to false; a path value supplies closure and rejects conflicts. */
|
|
1588
|
-
readonly closed?: boolean;
|
|
1589
|
-
/** Preserve orientation, or align local +X for Sections / +Z for Solids to the tangent. Defaults to fixed. */
|
|
1590
|
-
readonly orientation?: "fixed" | "tangent";
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
/** Equal arc-length sampling; the path itself owns whether its closing edge is included. */
|
|
1594
|
-
export declare interface PathResamplingOptions extends CurveSamplingOptions {
|
|
1595
|
-
/** Exact arc-length intervals; closed paths need at least three. Otherwise physical resolution or the effective source edge count controls sampling. */
|
|
1596
|
-
readonly segments?: number;
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
/**
|
|
1600
|
-
* One immutable shape, or a synchronous factory called once per copy in index order.
|
|
1601
|
-
*/
|
|
1076
|
+
/** One immutable shape, or a synchronous factory called once per copy in zero-based index order. */
|
|
1602
1077
|
export declare type PatternSource<T extends Solid | Section = Solid> =
|
|
1603
1078
|
T | ((index: number) => T);
|
|
1604
1079
|
|
|
1605
|
-
/** A
|
|
1606
|
-
export declare interface Pivot2Options {
|
|
1607
|
-
/** World-space point left fixed by rotation or scaling. */
|
|
1608
|
-
readonly pivot?: Vector2Input;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
/** A fixed XYZ point in world coordinates; omitted pivots use the coordinate origin. */
|
|
1612
|
-
export declare interface Pivot3Options {
|
|
1613
|
-
/** World-space point left fixed by rotation or scaling. */
|
|
1614
|
-
readonly pivot?: Vector3Input;
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
/** 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. */
|
|
1618
1081
|
export declare interface PlaneOptions {
|
|
1619
1082
|
/** Finite nonzero plane normal; magnitude does not affect the plane. */
|
|
1620
1083
|
readonly normal: Vector3Input;
|
|
@@ -1628,6 +1091,8 @@ export declare interface PlaneOptions {
|
|
|
1628
1091
|
* Closing edges are implicit. Compound contours use nonzero fill unless selected otherwise.
|
|
1629
1092
|
* Explicit topology must be simple and disjoint; compound winding may resolve overlaps.
|
|
1630
1093
|
*
|
|
1094
|
+
* @param input - XY outline in millimetres, or explicit or compound topology.
|
|
1095
|
+
*
|
|
1631
1096
|
* @example Extrude a triangular plate
|
|
1632
1097
|
* ```ts
|
|
1633
1098
|
* polygon([[0, 0], [20, 0], [10, 12]]).extrude({ height: 3 });
|
|
@@ -1635,23 +1100,6 @@ export declare interface PlaneOptions {
|
|
|
1635
1100
|
*/
|
|
1636
1101
|
export declare function polygon(input: Path2Input | PolygonOptions): Section;
|
|
1637
1102
|
|
|
1638
|
-
/**
|
|
1639
|
-
* One filled two-dimensional polygon with an exterior and optional holes.
|
|
1640
|
-
*
|
|
1641
|
-
* `outer` is counter-clockwise and each hole is clockwise. Boundary arrays omit
|
|
1642
|
-
* their duplicated closing point. Holes must lie inside `outer` and must not
|
|
1643
|
-
* intersect each other or the exterior.
|
|
1644
|
-
*
|
|
1645
|
-
* @see {@link Contour}
|
|
1646
|
-
* @see {@link RegionData}
|
|
1647
|
-
*/
|
|
1648
|
-
export declare interface PolygonData {
|
|
1649
|
-
/** Clockwise interior boundaries, each omitting its duplicated closing point. */
|
|
1650
|
-
readonly holes: readonly Contour[];
|
|
1651
|
-
/** Counter-clockwise exterior boundary, omitting its duplicated closing point. */
|
|
1652
|
-
readonly outer: Contour;
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
1103
|
/** Explicit polygon topology or compound contours; all closing edges are implicit. */
|
|
1656
1104
|
export declare type PolygonOptions =
|
|
1657
1105
|
| {
|
|
@@ -1691,174 +1139,25 @@ export declare type PolygonOptions =
|
|
|
1691
1139
|
readonly fillRule?: never;
|
|
1692
1140
|
};
|
|
1693
1141
|
|
|
1694
|
-
/**
|
|
1695
|
-
* Checks compensated cutter dimensions and conservative mesh estimates against host output limits.
|
|
1696
|
-
*
|
|
1697
|
-
* Requires active synchronous model execution and uses its resolution and limits. Estimates include
|
|
1698
|
-
* the one-pitch extension beyond each requested face, without mesh buffers or native objects.
|
|
1699
|
-
* Mesh validity, native construction, and aggregate output limits are checked later.
|
|
1700
|
-
*
|
|
1701
|
-
* @see {@link internalThreadCutter}
|
|
1702
|
-
*/
|
|
1703
|
-
export declare function preflightInternalThreadCutter(
|
|
1704
|
-
options: InternalThreadCutterOptions,
|
|
1705
|
-
): ThreadSolidPreflight;
|
|
1706
|
-
|
|
1707
|
-
/**
|
|
1708
|
-
* Checks nut dimensions, chamfers, end-face wall, and the extended compensated cutter's allocation plan.
|
|
1709
|
-
*
|
|
1710
|
-
* Requires active synchronous model execution and uses its resolution and limits, without mesh
|
|
1711
|
-
* buffers or native objects. Returned thread estimates cover the cutter, excluding the body and
|
|
1712
|
-
* Boolean result. Mesh validity, native construction, and aggregate output limits are checked later.
|
|
1713
|
-
*
|
|
1714
|
-
* @see {@link threadedNut}
|
|
1715
|
-
*/
|
|
1716
|
-
export declare function preflightThreadedNut(
|
|
1717
|
-
options: ThreadedNutOptions,
|
|
1718
|
-
): ThreadedNutPreflight;
|
|
1719
|
-
|
|
1720
|
-
/**
|
|
1721
|
-
* Checks compensated rod dimensions and conservative mesh estimates against host output limits.
|
|
1722
|
-
*
|
|
1723
|
-
* Requires active synchronous model execution and uses its resolution and limits. Returns selected
|
|
1724
|
-
* sampling and conservative row/triangle estimates without mesh buffers or native objects.
|
|
1725
|
-
* Mesh validity, native construction, and aggregate output limits are checked later.
|
|
1726
|
-
*
|
|
1727
|
-
* @see {@link threadedRod}
|
|
1728
|
-
*/
|
|
1729
|
-
export declare function preflightThreadedRod(
|
|
1730
|
-
options: ThreadedRodOptions,
|
|
1731
|
-
): ThreadSolidPreflight;
|
|
1732
|
-
|
|
1733
1142
|
/** Anchor attachment shared by solid and filled-section factories. */
|
|
1734
1143
|
export declare interface PrimitiveAttachment {
|
|
1735
1144
|
/** Applied after local construction; Section attachment must preserve the XY plane. */
|
|
1736
1145
|
readonly attachment?: PrimitiveAttachmentOptions;
|
|
1737
1146
|
}
|
|
1738
1147
|
|
|
1739
|
-
/** Maps an explicit or named shape-local attachment anchor onto a world-space anchor. */
|
|
1740
|
-
export declare interface PrimitiveAttachmentOptions extends AttachOptions {
|
|
1741
|
-
/** Shape-local source frame or a named primitive anchor such as bottom. */
|
|
1742
|
-
readonly source: Anchor3 | string;
|
|
1743
|
-
/** World-space target frame in millimetres. */
|
|
1744
|
-
readonly target: Anchor3;
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
/**
|
|
1748
|
-
* Named baseline fit policies for calibrated FDM-style printed threads.
|
|
1749
|
-
*/
|
|
1750
|
-
export declare type PrintableThreadFit = "tight" | "normal" | "loose";
|
|
1751
|
-
|
|
1752
|
-
/**
|
|
1753
|
-
* Explicit radial and axial allowances for a mating printed thread pair.
|
|
1754
|
-
*
|
|
1755
|
-
* Male and female radial values are applied independently, so their sum is the
|
|
1756
|
-
* assembled radial clearance. Values are millimetres and intentionally do not
|
|
1757
|
-
* encode printer, material, or process calibration.
|
|
1758
|
-
*/
|
|
1759
|
-
export declare interface PrintableThreadFitPolicy {
|
|
1760
|
-
/** Nominal axial backlash available between opposing flanks. */
|
|
1761
|
-
readonly axialBacklash: number;
|
|
1762
|
-
/** Radial increase applied to an internal thread envelope. */
|
|
1763
|
-
readonly femaleRadialOutset: number;
|
|
1764
|
-
/** Radial reduction applied to an external thread envelope. */
|
|
1765
|
-
readonly maleRadialInset: number;
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
/**
|
|
1769
|
-
* An explicit component/contour/span topology, before shared family sampling with matchProfiles.
|
|
1770
|
-
* Component, contour and span identities establish correspondence across a loft or sweep family.
|
|
1771
|
-
*
|
|
1772
|
-
* @see {@link CorrespondingProfile}
|
|
1773
|
-
* @see {@link matchProfiles}
|
|
1774
|
-
*/
|
|
1775
|
-
export declare interface Profile {
|
|
1776
|
-
/** Ordered components with explicit contour identities. */
|
|
1777
|
-
readonly components: readonly ProfileComponent2[];
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
/** One component and its explicitly identified holes. */
|
|
1781
|
-
export declare interface ProfileComponent2 {
|
|
1782
|
-
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
1783
|
-
readonly id: string;
|
|
1784
|
-
/** Counterclockwise outer contour. */
|
|
1785
|
-
readonly outer: ProfileContour2;
|
|
1786
|
-
/** Clockwise hole contours belonging to this component. */
|
|
1787
|
-
readonly holes: readonly ProfileContour2[];
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
/**
|
|
1791
|
-
* An identified closed boundary of curve spans, before shared family sampling.
|
|
1792
|
-
* Outer winding is CCW and hole winding is CW. matchProfiles retains span identities in sampled contours.
|
|
1793
|
-
*
|
|
1794
|
-
* @see {@link Contour} for sampled point coordinates.
|
|
1795
|
-
* @see {@link CorrespondingContour} for sampled coordinates with correspondence metadata.
|
|
1796
|
-
*/
|
|
1797
|
-
export declare interface ProfileContour2 {
|
|
1798
|
-
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
1799
|
-
readonly id: string;
|
|
1800
|
-
/** Ordered identified spans; the last endpoint meets the first start. */
|
|
1801
|
-
readonly spans: readonly ProfileSpan2[];
|
|
1802
|
-
}
|
|
1803
|
-
|
|
1804
|
-
/** A deliberately sampled, inward-only corner profile with exact polyline geometry. */
|
|
1805
|
-
export declare interface ProfiledEdgeTreatment {
|
|
1806
|
-
/** Selects an explicit corner profile; no analytic curve is inferred from its samples. */
|
|
1807
|
-
readonly kind: "profile";
|
|
1808
|
-
/**
|
|
1809
|
-
* Millimetre setbacks on adjoining surfaces, from [positive, 0] to [0, positive].
|
|
1810
|
-
* First coordinates decrease and second coordinates increase. Cylinder/extrusion ends use
|
|
1811
|
-
* cap inset first, side setback second; planar corners use incoming then outgoing edges.
|
|
1812
|
-
*/
|
|
1813
|
-
readonly profile: readonly Vector2Data[];
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
/** An identified line, circular arc, or cubic Bézier between corresponding landmarks. */
|
|
1817
|
-
export declare type ProfileSpan2 = {
|
|
1818
|
-
/** Stable canonical lowercase identity; unique within the containing topology or output. */
|
|
1819
|
-
readonly id: string;
|
|
1820
|
-
/** Optional exact span interval count; the family uses the largest requested count. */
|
|
1821
|
-
readonly segments?: number;
|
|
1822
|
-
/** Optional span-local physical sampling over the family's resolution; exact intervals take precedence. */
|
|
1823
|
-
readonly resolution?: GeometryResolution;
|
|
1824
|
-
} & (
|
|
1825
|
-
| {
|
|
1826
|
-
/** Selects a straight span. */
|
|
1827
|
-
readonly kind: "line";
|
|
1828
|
-
/** Start point in millimetres. */
|
|
1829
|
-
readonly start: Vector2Data;
|
|
1830
|
-
/** End point in millimetres. */
|
|
1831
|
-
readonly end: Vector2Data;
|
|
1832
|
-
}
|
|
1833
|
-
| {
|
|
1834
|
-
/** Selects the geometric curve or span family. */
|
|
1835
|
-
readonly kind: "arc";
|
|
1836
|
-
/** Center point in millimetres. */
|
|
1837
|
-
readonly center: Vector2Data;
|
|
1838
|
-
/** Circular radius in millimetres. */
|
|
1839
|
-
readonly radius: number;
|
|
1840
|
-
/** Initial counterclockwise angle in degrees. */
|
|
1841
|
-
readonly startAngle: number;
|
|
1842
|
-
/** Signed counterclockwise angular sweep in degrees. */
|
|
1843
|
-
readonly sweepAngle: number;
|
|
1844
|
-
}
|
|
1845
|
-
| {
|
|
1846
|
-
/** Selects a cubic Bézier span with the same coordinates as CubicBezierCurve2. */
|
|
1847
|
-
readonly kind: "cubic";
|
|
1848
|
-
/** Start point in millimetres. */
|
|
1849
|
-
readonly start: Vector2Data;
|
|
1850
|
-
/** First control point in millimetres. */
|
|
1851
|
-
readonly control1: Vector2Data;
|
|
1852
|
-
/** Second control point in millimetres. */
|
|
1853
|
-
readonly control2: Vector2Data;
|
|
1854
|
-
/** End point in millimetres. */
|
|
1855
|
-
readonly end: Vector2Data;
|
|
1856
|
-
}
|
|
1857
|
-
);
|
|
1148
|
+
/** Maps an explicit or named shape-local attachment anchor onto a world-space anchor. */
|
|
1149
|
+
export declare interface PrimitiveAttachmentOptions extends AttachOptions {
|
|
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
|
+
}
|
|
1858
1155
|
|
|
1859
1156
|
/**
|
|
1860
1157
|
* Repeats one solid about an axis.
|
|
1861
1158
|
*
|
|
1159
|
+
* @param source - Recipe or factory called once per copy, in zero-based order.
|
|
1160
|
+
*
|
|
1862
1161
|
* @example Six copies around Z
|
|
1863
1162
|
* ```ts
|
|
1864
1163
|
* const pin = cylinder({ height: 6, radius: 2 }).translate([12, 0, 0]);
|
|
@@ -1870,45 +1169,16 @@ export declare function radialPattern(
|
|
|
1870
1169
|
options: RadialPatternOptions,
|
|
1871
1170
|
): readonly Solid[];
|
|
1872
1171
|
|
|
1873
|
-
/**
|
|
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
|
+
*/
|
|
1874
1177
|
export declare function radialPattern(
|
|
1875
1178
|
source: PatternSource<Section>,
|
|
1876
1179
|
options: RadialPatternOptions<2>,
|
|
1877
1180
|
): readonly Section[];
|
|
1878
1181
|
|
|
1879
|
-
/**
|
|
1880
|
-
* Degree rotations about a fixed world-space pivot; XY patterns use the implicit +Z axis.
|
|
1881
|
-
*/
|
|
1882
|
-
export declare type RadialPatternOptions<Dimension extends 2 | 3 = 3> = {
|
|
1883
|
-
/** Number of shapes to return, including the original. */
|
|
1884
|
-
readonly count: number;
|
|
1885
|
-
/** Signed rotation from one copy to the next, in degrees. */
|
|
1886
|
-
readonly angle: number;
|
|
1887
|
-
/** Fixed world-space rotation pivot; defaults to the coordinate origin. */
|
|
1888
|
-
readonly pivot?: Dimension extends 2 ? Vector2Input : Vector3Input;
|
|
1889
|
-
} & (Dimension extends 2
|
|
1890
|
-
? {
|
|
1891
|
-
/** XY rotation uses +Z; an explicit spatial axis is unavailable. */
|
|
1892
|
-
readonly axis?: never;
|
|
1893
|
-
}
|
|
1894
|
-
: {
|
|
1895
|
-
/** Axis of the right-handed rotation. Its nonzero magnitude is ignored. */
|
|
1896
|
-
readonly axis: Vector3Input;
|
|
1897
|
-
});
|
|
1898
|
-
|
|
1899
|
-
/** Radial dimensions refer to polygon vertices or compensate faceting to meet polygon faces. */
|
|
1900
|
-
export declare type RadialSizing = "vertex" | "face";
|
|
1901
|
-
|
|
1902
|
-
/**
|
|
1903
|
-
* Nominal radial sizing shared by circular and regular polygon construction.
|
|
1904
|
-
*/
|
|
1905
|
-
export declare interface RadialSizingOptions {
|
|
1906
|
-
/** Explicit sampling ceilings; bound modeling operations may only lower the host policy. */
|
|
1907
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1908
|
-
/** Vertex sizing is inscribed; face sizing circumscribes the nominal radius. Defaults to vertex. */
|
|
1909
|
-
readonly sizing?: RadialSizing;
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
1182
|
/**
|
|
1913
1183
|
* Filled rectangular section with uniform or independently treated corners.
|
|
1914
1184
|
*
|
|
@@ -1917,86 +1187,39 @@ export declare interface RadialSizingOptions {
|
|
|
1917
1187
|
*
|
|
1918
1188
|
* @example Round the corners
|
|
1919
1189
|
* ```ts
|
|
1920
|
-
* rectangle({ size: [30, 20], treatment: { kind: "round", radius: 3 } });
|
|
1190
|
+
* rectangle({ size: [30, 20], treatment: { kind: "round", radius: 3 } }).extrude({ height: 3 });
|
|
1921
1191
|
* ```
|
|
1922
1192
|
*/
|
|
1923
1193
|
export declare function rectangle(options: RectangleOptions): Section;
|
|
1924
1194
|
|
|
1925
|
-
/**
|
|
1926
|
-
* Shared rectangle dimensions, origin and uniform or per-corner treatment.
|
|
1927
|
-
*/
|
|
1928
|
-
export declare interface RectangleContourOptions {
|
|
1929
|
-
/** Positive uniform size or explicit XY extents in millimetres. */
|
|
1930
|
-
readonly size: number | Vector2Input;
|
|
1931
|
-
/** Center on XY; otherwise the minimum corner is the origin. Defaults to true. */
|
|
1932
|
-
readonly center?: boolean;
|
|
1933
|
-
/** Uniform treatment or four corner treatments. Exact round segments describe a complete circle and must divide by four. */
|
|
1934
|
-
readonly treatment?: EdgeTreatment | RectangleCornerTreatments;
|
|
1935
|
-
/** Explicit sampling ceiling for the complete output profile. */
|
|
1936
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
1937
|
-
}
|
|
1938
|
-
|
|
1939
|
-
/** A rectangle corner, including an explicitly untreated corner in a treatment tuple. */
|
|
1940
|
-
export declare type RectangleCornerTreatment =
|
|
1941
|
-
| EdgeTreatment
|
|
1942
|
-
| {
|
|
1943
|
-
/** Leaves this corner untreated. */
|
|
1944
|
-
readonly kind: "square";
|
|
1945
|
-
};
|
|
1946
|
-
|
|
1947
|
-
/** Corner treatments ordered top-right, top-left, bottom-left, bottom-right. */
|
|
1948
|
-
export declare type RectangleCornerTreatments = readonly [
|
|
1949
|
-
topRight: RectangleCornerTreatment,
|
|
1950
|
-
topLeft: RectangleCornerTreatment,
|
|
1951
|
-
bottomLeft: RectangleCornerTreatment,
|
|
1952
|
-
bottomRight: RectangleCornerTreatment,
|
|
1953
|
-
];
|
|
1954
|
-
|
|
1955
|
-
/**
|
|
1956
|
-
* Rectangle dimensions, placement and uniform or per-corner treatment.
|
|
1957
|
-
*/
|
|
1195
|
+
/** Rectangle dimensions, placement and uniform or per-corner treatment. */
|
|
1958
1196
|
export declare interface RectangleOptions
|
|
1959
1197
|
extends RectangleContourOptions, PrimitiveAttachment {}
|
|
1960
1198
|
|
|
1961
|
-
/**
|
|
1962
|
-
* A two-dimensional region represented by disjoint filled polygons.
|
|
1963
|
-
* Each PolygonData owns one exterior and its holes; an empty region contains no material.
|
|
1964
|
-
*
|
|
1965
|
-
* @see {@link PolygonData}
|
|
1966
|
-
*/
|
|
1967
|
-
export declare type RegionData = readonly PolygonData[];
|
|
1968
|
-
|
|
1969
1199
|
/**
|
|
1970
1200
|
* Regular polygon with a vertex on +X.
|
|
1971
1201
|
*
|
|
1972
1202
|
* @example Hexagonal section
|
|
1973
1203
|
* ```ts
|
|
1974
|
-
* regularPolygon({ radius: 10, sides: 6, sizing: "face" });
|
|
1204
|
+
* regularPolygon({ radius: 10, sides: 6, sizing: "face" }).extrude({ height: 3 });
|
|
1975
1205
|
* ```
|
|
1976
1206
|
*/
|
|
1977
1207
|
export declare function regularPolygon(options: RegularPolygonOptions): Section;
|
|
1978
1208
|
|
|
1979
|
-
/**
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
export declare type RegularPolygonOptions = RadialSizingOptions &
|
|
1983
|
-
PrimitiveAttachment & {
|
|
1984
|
-
/** Positive nominal radius in millimetres, interpreted according to sizing. */
|
|
1985
|
-
readonly radius: number;
|
|
1986
|
-
/** Exact integer side count from three through 100000. */
|
|
1987
|
-
readonly sides: number;
|
|
1988
|
-
/** Counterclockwise rotation in degrees; defaults to zero with a vertex on +X. */
|
|
1989
|
-
readonly rotation?: number;
|
|
1990
|
-
};
|
|
1209
|
+
/** Regular polygon dimensions, radial convention and degree rotation. */
|
|
1210
|
+
export declare type RegularPolygonOptions = RegularPolygonContourOptions &
|
|
1211
|
+
PrimitiveAttachment;
|
|
1991
1212
|
|
|
1992
1213
|
/**
|
|
1993
1214
|
* Revolves a filled Section or explicit corresponding radial/Z contours around +Z, with caps for partial sweeps.
|
|
1994
1215
|
* Use `section.revolve(options)` in fluent sequences, or this function for generic profile inputs.
|
|
1995
1216
|
*
|
|
1217
|
+
* @param shape - Profile coordinates are [radius, Z] in millimetres.
|
|
1218
|
+
*
|
|
1996
1219
|
* @example Revolve
|
|
1997
1220
|
* ```ts
|
|
1998
|
-
* import {
|
|
1999
|
-
* import { rectangleProfile } from "@metamesh/modeling/geometry";
|
|
1221
|
+
* import { revolve } from "@metamesh/modeling";
|
|
1222
|
+
* import { matchProfiles, rectangleProfile } from "@metamesh/modeling/geometry";
|
|
2000
1223
|
*
|
|
2001
1224
|
* // Contour coordinates are [radius, Z].
|
|
2002
1225
|
* const [profile] = matchProfiles([rectangleProfile({ size: [4, 16], center: false })]);
|
|
@@ -2008,9 +1231,7 @@ export declare function revolve(
|
|
|
2008
1231
|
options?: RevolveOptions,
|
|
2009
1232
|
): Solid;
|
|
2010
1233
|
|
|
2011
|
-
/**
|
|
2012
|
-
* Circumferential sampling and degree sweep shared by pure and filled revolution.
|
|
2013
|
-
*/
|
|
1234
|
+
/** Circumferential sampling and degree sweep shared by pure and filled revolution. */
|
|
2014
1235
|
export declare interface RevolveOptions extends CircularPrimitiveOptions {
|
|
2015
1236
|
/**
|
|
2016
1237
|
* Positive sweep in degrees, no greater than 360. Defaults to a full revolution;
|
|
@@ -2025,16 +1246,6 @@ export declare interface RevolveOptions extends CircularPrimitiveOptions {
|
|
|
2025
1246
|
readonly limits?: Partial<ModelingLimits>;
|
|
2026
1247
|
}
|
|
2027
1248
|
|
|
2028
|
-
/**
|
|
2029
|
-
* A circular edge or corner roundover with explicit physical sampling.
|
|
2030
|
-
*/
|
|
2031
|
-
export declare interface RoundedEdgeTreatment extends CircularPrimitiveOptions {
|
|
2032
|
-
/** Selects circular corners or spherical all-edge roundovers. */
|
|
2033
|
-
readonly kind: "round";
|
|
2034
|
-
/** Nonnegative millimetre radius; zero leaves the edge or corner untreated. Positive values must fit adjoining dimensions. */
|
|
2035
|
-
readonly radius: number;
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
1249
|
/**
|
|
2039
1250
|
* Immutable deferred filled XY section recipe.
|
|
2040
1251
|
*
|
|
@@ -2051,6 +1262,7 @@ export declare interface RoundedEdgeTreatment extends CircularPrimitiveOptions {
|
|
|
2051
1262
|
* .subtract(rectangle({ size: [16, 8] }))
|
|
2052
1263
|
* .offset(0.5)
|
|
2053
1264
|
* .extrude({ height: 4 });
|
|
1265
|
+
* body;
|
|
2054
1266
|
* ```
|
|
2055
1267
|
*/
|
|
2056
1268
|
export declare interface Section {
|
|
@@ -2072,7 +1284,11 @@ export declare interface Section {
|
|
|
2072
1284
|
factors: number | Vector2Input,
|
|
2073
1285
|
options?: Pivot2Options,
|
|
2074
1286
|
): Section;
|
|
2075
|
-
/**
|
|
1287
|
+
/**
|
|
1288
|
+
* Reflects across a line through the XY origin.
|
|
1289
|
+
*
|
|
1290
|
+
* @param normal - Nonzero XY line normal; length has no effect.
|
|
1291
|
+
*/
|
|
2076
1292
|
mirror(this: Section, normal: Vector2Input): Section;
|
|
2077
1293
|
/** Applies a reusable XY placement or canonical row-major matrix. */
|
|
2078
1294
|
transform(this: Section, placement: Transform2Input): Section;
|
|
@@ -2093,33 +1309,41 @@ export declare interface Section {
|
|
|
2093
1309
|
* than selecting a lower rendering quality; fine features may be removed.
|
|
2094
1310
|
*/
|
|
2095
1311
|
simplify(this: Section, tolerance: number): Section;
|
|
2096
|
-
/**
|
|
2097
|
-
* Returns a new recipe with copied named anchors; existing names may be replaced.
|
|
2098
|
-
*/
|
|
1312
|
+
/** Returns a new recipe with copied named anchors; existing names may be replaced. */
|
|
2099
1313
|
withAnchors(
|
|
2100
1314
|
this: Section,
|
|
2101
1315
|
anchors: Readonly<Record<string, Anchor3>>,
|
|
2102
1316
|
): Section;
|
|
2103
1317
|
/**
|
|
2104
1318
|
* Native millimetre offset preserving holes.
|
|
1319
|
+
*
|
|
1320
|
+
* @param distance - Millimetres: positive expands material; negative erodes it.
|
|
2105
1321
|
*/
|
|
2106
1322
|
offset(
|
|
2107
1323
|
this: Section,
|
|
2108
1324
|
distance: number,
|
|
2109
1325
|
options?: SectionOffsetOptions,
|
|
2110
1326
|
): Section;
|
|
2111
|
-
/**
|
|
2112
|
-
* Extrudes along +Z with degree twist and top scaling.
|
|
2113
|
-
*/
|
|
1327
|
+
/** Extrudes along +Z with degree twist and top scaling. */
|
|
2114
1328
|
extrude(this: Section, options: ExtrudeOptions): Solid;
|
|
2115
|
-
/**
|
|
2116
|
-
* Revolves a filled radial/Z shape around +Z, with caps for partial sweeps.
|
|
2117
|
-
*/
|
|
1329
|
+
/** Revolves a filled radial/Z shape around +Z, with caps for partial sweeps. */
|
|
2118
1330
|
revolve(this: Section, options?: RevolveOptions): Solid;
|
|
2119
1331
|
/**
|
|
2120
|
-
* 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.
|
|
2121
1335
|
*/
|
|
2122
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;
|
|
2123
1347
|
/** Reads immutable bounds, filled area in mm², and component/contour/vertex counts.
|
|
2124
1348
|
* Requires active synchronous model execution; repeated reads share scoped native results.
|
|
2125
1349
|
*/
|
|
@@ -2186,20 +1410,6 @@ export declare interface SectionOffsetOptions {
|
|
|
2186
1410
|
readonly resolution?: GeometryResolution;
|
|
2187
1411
|
}
|
|
2188
1412
|
|
|
2189
|
-
/** A cubic corner transition with zero curvature at its straight tangent joins. */
|
|
2190
|
-
export declare interface SmoothEdgeTreatment {
|
|
2191
|
-
/** Selects continuous-curvature cubic rounding, rather than a circular radius. */
|
|
2192
|
-
readonly kind: "smooth";
|
|
2193
|
-
/** Millimetre setbacks, equal or [first, second]; zero or [0, 0] leaves the edge untreated, otherwise both must be positive. */
|
|
2194
|
-
readonly distance: number | readonly [first: number, second: number];
|
|
2195
|
-
/** Exact cubic interval count, positive; overrides physical sampling. */
|
|
2196
|
-
readonly segments?: number;
|
|
2197
|
-
/** Physical chord/edge-length sampling; circularSegments does not describe a cubic. */
|
|
2198
|
-
readonly resolution?: GeometryResolution;
|
|
2199
|
-
/** Explicit sampling ceilings, bounded by the host policy. */
|
|
2200
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
1413
|
/**
|
|
2204
1414
|
* Immutable deferred solid recipe.
|
|
2205
1415
|
*
|
|
@@ -2215,14 +1425,13 @@ export declare interface SmoothEdgeTreatment {
|
|
|
2215
1425
|
* const body = box({ size: [30, 20, 6] })
|
|
2216
1426
|
* .subtract(cylinder({ height: 8, radius: 3 }))
|
|
2217
1427
|
* .rotate([0, 0, 45]);
|
|
1428
|
+
* body;
|
|
2218
1429
|
* ```
|
|
2219
1430
|
*/
|
|
2220
1431
|
export declare interface Solid {
|
|
2221
1432
|
/** Compile-time identity brand for an immutable solid recipe. */
|
|
2222
1433
|
readonly [solidBrand]: "Solid";
|
|
2223
|
-
/**
|
|
2224
|
-
* Translates XYZ coordinates in millimetres.
|
|
2225
|
-
*/
|
|
1434
|
+
/** Translates XYZ coordinates in millimetres. */
|
|
2226
1435
|
translate(this: Solid, offset: Vector3Input): Solid;
|
|
2227
1436
|
/**
|
|
2228
1437
|
* Rotates about global X, then Y, then Z in degrees.
|
|
@@ -2239,10 +1448,12 @@ export declare interface Solid {
|
|
|
2239
1448
|
options?: Pivot3Options,
|
|
2240
1449
|
): Solid;
|
|
2241
1450
|
/**
|
|
2242
|
-
*
|
|
1451
|
+
* Reflects across a plane through the origin.
|
|
1452
|
+
*
|
|
1453
|
+
* @param normal - Nonzero XYZ plane normal; length has no effect.
|
|
2243
1454
|
*/
|
|
2244
1455
|
mirror(this: Solid, normal: Vector3Input): Solid;
|
|
2245
|
-
/** Applies
|
|
1456
|
+
/** Applies an XYZ frame, transform value, or canonical row-major affine matrix. */
|
|
2246
1457
|
transform(this: Solid, placement: Transform3Input): Solid;
|
|
2247
1458
|
/** Copies indexed Float32 XYZ and Uint32 triangle buffers in millimetres for interchange.
|
|
2248
1459
|
* Requires an active synchronous model execution; the returned TriangleMesh is caller-owned.
|
|
@@ -2255,6 +1466,8 @@ export declare interface Solid {
|
|
|
2255
1466
|
* The source datum belongs to the feature; neither input moves or loses material.
|
|
2256
1467
|
* Requires a verified local straight collar and continuous sampled support patch.
|
|
2257
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.
|
|
2258
1471
|
*/
|
|
2259
1472
|
join(this: Solid, feature: Solid, options: JoinOptions): Solid;
|
|
2260
1473
|
/** Robust intersection with every supplied solid; an empty operand array preserves this solid. */
|
|
@@ -2271,12 +1484,13 @@ export declare interface Solid {
|
|
|
2271
1484
|
* and the solid's existing native tolerance. Choose it from the detail you can afford to lose.
|
|
2272
1485
|
*/
|
|
2273
1486
|
simplify(this: Solid, tolerance: number): Solid;
|
|
2274
|
-
/**
|
|
2275
|
-
* Returns a new recipe with copied named anchors; existing names may be replaced.
|
|
2276
|
-
*/
|
|
1487
|
+
/** Returns a new recipe with copied named anchors; existing names may be replaced. */
|
|
2277
1488
|
withAnchors(this: Solid, anchors: Readonly<Record<string, Anchor3>>): Solid;
|
|
2278
1489
|
/**
|
|
2279
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.
|
|
2280
1494
|
*/
|
|
2281
1495
|
attach(
|
|
2282
1496
|
this: Solid,
|
|
@@ -2311,6 +1525,9 @@ export declare interface Solid {
|
|
|
2311
1525
|
distance(this: Solid, other: Solid): number;
|
|
2312
1526
|
/** Copies intersections along the finite directed origin-to-endpoint segment in millimetres.
|
|
2313
1527
|
* Requires active synchronous model execution.
|
|
1528
|
+
*
|
|
1529
|
+
* @param origin - Segment start in modeling coordinates.
|
|
1530
|
+
* @param endpoint - Segment end in modeling coordinates.
|
|
2314
1531
|
*/
|
|
2315
1532
|
castSegment(
|
|
2316
1533
|
this: Solid,
|
|
@@ -2333,6 +1550,8 @@ declare const solidBrand: unique symbol;
|
|
|
2333
1550
|
/**
|
|
2334
1551
|
* Imports a bounded closed indexed mesh.
|
|
2335
1552
|
*
|
|
1553
|
+
* @param mesh - Closed, oriented mesh in millimetres; ownership stays with the caller.
|
|
1554
|
+
*
|
|
2336
1555
|
* @example Mesh import
|
|
2337
1556
|
* ```ts
|
|
2338
1557
|
* import { solidFromMesh } from "@metamesh/modeling";
|
|
@@ -2379,7 +1598,8 @@ export declare interface SolidSegmentHit {
|
|
|
2379
1598
|
}
|
|
2380
1599
|
|
|
2381
1600
|
/**
|
|
2382
|
-
* 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.
|
|
2383
1603
|
*
|
|
2384
1604
|
* @example Sphere
|
|
2385
1605
|
* ```ts
|
|
@@ -2388,9 +1608,7 @@ export declare interface SolidSegmentHit {
|
|
|
2388
1608
|
*/
|
|
2389
1609
|
export declare function sphere(options: SphereOptions): Solid;
|
|
2390
1610
|
|
|
2391
|
-
/**
|
|
2392
|
-
* Exactly one radius or diameter, placement, and tessellation for an origin-centered sphere.
|
|
2393
|
-
*/
|
|
1611
|
+
/** Exactly one radius or diameter, placement, and tessellation for an origin-centered sphere. */
|
|
2394
1612
|
export declare type SphereOptions = CircularPrimitiveOptions &
|
|
2395
1613
|
PrimitiveAttachment &
|
|
2396
1614
|
(
|
|
@@ -2408,54 +1626,29 @@ export declare type SphereOptions = CircularPrimitiveOptions &
|
|
|
2408
1626
|
}
|
|
2409
1627
|
);
|
|
2410
1628
|
|
|
2411
|
-
/** Square profile with equal crest and root widths. */
|
|
2412
|
-
export declare interface SquareThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
2413
|
-
/** Selects the square profile family. */
|
|
2414
|
-
readonly kind: "square";
|
|
2415
|
-
/**
|
|
2416
|
-
* Radial depth in millimetres.
|
|
2417
|
-
* @defaultValue `pitch / 2`
|
|
2418
|
-
*/
|
|
2419
|
-
readonly depth?: number;
|
|
2420
|
-
}
|
|
2421
|
-
|
|
2422
1629
|
/**
|
|
2423
1630
|
* Alternating outer/inner star vertices.
|
|
2424
1631
|
*
|
|
2425
1632
|
* @example Five-point section
|
|
2426
1633
|
* ```ts
|
|
2427
|
-
* star({ outerRadius: 12, innerRadius: 6, points: 5 });
|
|
1634
|
+
* star({ outerRadius: 12, innerRadius: 6, points: 5 }).extrude({ height: 3 });
|
|
2428
1635
|
* ```
|
|
2429
1636
|
*/
|
|
2430
1637
|
export declare function star(options: StarOptions): Section;
|
|
2431
1638
|
|
|
2432
|
-
/** Alternating
|
|
2433
|
-
export declare interface StarContourOptions {
|
|
2434
|
-
/** Positive outer vertex radius in millimetres. */
|
|
2435
|
-
readonly outerRadius: number;
|
|
2436
|
-
/** Positive inner vertex radius in millimetres, smaller than the outer radius. */
|
|
2437
|
-
readonly innerRadius: number;
|
|
2438
|
-
/** Integer outer point count, at least three; output contains twice as many vertices. */
|
|
2439
|
-
readonly points: number;
|
|
2440
|
-
/** Counterclockwise rotation in degrees; defaults to zero with an outer vertex on +X. */
|
|
2441
|
-
readonly rotation?: number;
|
|
2442
|
-
/** Explicit sampling ceilings, bounded by the host policy during modeling. */
|
|
2443
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
/**
|
|
2447
|
-
* Alternating outer and inner vertices, centered on the XY origin.
|
|
2448
|
-
*/
|
|
1639
|
+
/** Alternating outer and inner vertices, centered on the XY origin. */
|
|
2449
1640
|
export declare interface StarOptions
|
|
2450
1641
|
extends StarContourOptions, PrimitiveAttachment {}
|
|
2451
1642
|
|
|
2452
1643
|
/**
|
|
2453
|
-
*
|
|
1644
|
+
* Declares a centered-width Section recipe along a sampled XY path.
|
|
2454
1645
|
*
|
|
2455
|
-
* Shares caps, joins and physical sampling with Geometry's strokeRegionData.
|
|
2456
|
-
* 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;
|
|
2457
1648
|
* closed paths omit the duplicated seam. Returns an immutable deferred recipe.
|
|
2458
1649
|
*
|
|
1650
|
+
* @param path - XY path in millimetres.
|
|
1651
|
+
*
|
|
2459
1652
|
* @example Extrude a rounded track
|
|
2460
1653
|
* ```ts
|
|
2461
1654
|
* stroke([[0, 0], [20, 0], [20, 10]], { width: 3, join: "round", cap: "round" }).extrude({ height: 2 });
|
|
@@ -2466,37 +1659,17 @@ export declare function stroke(
|
|
|
2466
1659
|
options: StrokeOptions,
|
|
2467
1660
|
): Section;
|
|
2468
1661
|
|
|
2469
|
-
/** End-cap treatment for an open stroked path. */
|
|
2470
|
-
export declare type StrokeCap = "butt" | "round" | "square";
|
|
2471
|
-
|
|
2472
|
-
/** Join treatment where adjacent stroked path segments meet. */
|
|
2473
|
-
export declare type StrokeJoin = "bevel" | "miter" | "round";
|
|
2474
|
-
|
|
2475
|
-
/** Physical stroke and topology controls shared by pure regions and native Sections. */
|
|
2476
|
-
export declare interface StrokeOptions {
|
|
2477
|
-
/** Explicit path, circular and expanded-profile allocation ceilings. */
|
|
2478
|
-
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
2479
|
-
/** Raw point closure defaults to false; a Path2 supplies its closure and rejects conflicts. */
|
|
2480
|
-
readonly closed?: boolean;
|
|
2481
|
-
/** End-cap treatment for an open path. Ignored for closed paths. Default: `butt`. */
|
|
2482
|
-
readonly cap?: StrokeCap;
|
|
2483
|
-
/** Corner treatment; miters exceeding SVG's default limit of 4 become bevels. Default: `miter`. */
|
|
2484
|
-
readonly join?: StrokeJoin;
|
|
2485
|
-
/** Physical tessellation policy for round caps and joins. */
|
|
2486
|
-
readonly resolution?: GeometryResolution;
|
|
2487
|
-
/** Positive total stroke width in millimetres, centered on the sampled path. */
|
|
2488
|
-
readonly width: number;
|
|
2489
|
-
}
|
|
2490
|
-
|
|
2491
1662
|
/** Placement of painted SVG geometry after SVG Y-axis inversion. */
|
|
2492
1663
|
export declare type SvgOrigin = "center" | "document";
|
|
2493
1664
|
|
|
2494
1665
|
/**
|
|
2495
1666
|
* Imports bounded filled SVG path data.
|
|
2496
1667
|
*
|
|
1668
|
+
* @param path - SVG path data, at most 1 MiB of UTF-8; omit the XML wrapper.
|
|
1669
|
+
*
|
|
2497
1670
|
* @example Fill an SVG path in millimetres
|
|
2498
1671
|
* ```ts
|
|
2499
|
-
* svgPathSection("M0 0H20V12H0Z", { origin: "center", scale: 1 });
|
|
1672
|
+
* svgPathSection("M0 0H20V12H0Z", { origin: "center", scale: 1 }).extrude({ height: 3 });
|
|
2500
1673
|
* ```
|
|
2501
1674
|
*/
|
|
2502
1675
|
export declare function svgPathSection(
|
|
@@ -2512,7 +1685,7 @@ export declare interface SvgPathSectionOptions {
|
|
|
2512
1685
|
readonly fillRule?: "evenodd" | "nonzero";
|
|
2513
1686
|
/** Local physical sampling policy; exact interval counts take precedence. */
|
|
2514
1687
|
readonly resolution?: GeometryResolution;
|
|
2515
|
-
/** Center
|
|
1688
|
+
/** Center painted bounds (default), or preserve original path coordinates. */
|
|
2516
1689
|
readonly origin?: SvgOrigin;
|
|
2517
1690
|
/** Positive uniform factor converting SVG user units to millimetres; defaults to one. */
|
|
2518
1691
|
readonly scale?: number;
|
|
@@ -2521,12 +1694,14 @@ export declare interface SvgPathSectionOptions {
|
|
|
2521
1694
|
/**
|
|
2522
1695
|
* Imports bounded painted SVG document geometry.
|
|
2523
1696
|
*
|
|
1697
|
+
* @param svg - Complete SVG XML, at most 256 KiB of UTF-8.
|
|
1698
|
+
*
|
|
2524
1699
|
* @example Import a physical SVG rectangle
|
|
2525
1700
|
* ```ts
|
|
2526
1701
|
* svgSection(
|
|
2527
1702
|
* '<svg xmlns="http://www.w3.org/2000/svg" width="30mm" height="20mm" viewBox="0 0 30 20"><rect width="30" height="20"/></svg>',
|
|
2528
1703
|
* { origin: "center" },
|
|
2529
|
-
* );
|
|
1704
|
+
* ).extrude({ height: 3 });
|
|
2530
1705
|
* ```
|
|
2531
1706
|
*/
|
|
2532
1707
|
export declare function svgSection(
|
|
@@ -2534,9 +1709,7 @@ export declare function svgSection(
|
|
|
2534
1709
|
options?: SvgSectionOptions,
|
|
2535
1710
|
): Section;
|
|
2536
1711
|
|
|
2537
|
-
/**
|
|
2538
|
-
* Bounded SVG document sampling. Center origin uses the final painted bounds.
|
|
2539
|
-
*/
|
|
1712
|
+
/** Bounded SVG document sampling. Center origin uses the final painted bounds. */
|
|
2540
1713
|
export declare interface SvgSectionOptions {
|
|
2541
1714
|
/** Fit painted bounds uniformly inside positioned XY millimetre bounds; adaptive resolution applies at the fitted size. */
|
|
2542
1715
|
readonly fit?: Bounds2Input;
|
|
@@ -2546,18 +1719,21 @@ export declare interface SvgSectionOptions {
|
|
|
2546
1719
|
readonly circularSegments?: number;
|
|
2547
1720
|
/** Local physical sampling policy; exact interval counts take precedence. */
|
|
2548
1721
|
readonly resolution?: GeometryResolution;
|
|
2549
|
-
/**
|
|
1722
|
+
/** Center painted bounds (default), or preserve document coordinates. */
|
|
2550
1723
|
readonly origin?: SvgOrigin;
|
|
2551
1724
|
}
|
|
2552
1725
|
|
|
2553
1726
|
/**
|
|
2554
|
-
* Sweeps a filled Section or
|
|
1727
|
+
* Sweeps a filled Section or corresponding contours along a path or explicit affine placements.
|
|
2555
1728
|
* Use `section.sweep(path, options)` in fluent sequences, or this function for generic profile inputs.
|
|
2556
1729
|
*
|
|
1730
|
+
* @param shape - Profile in local XY millimetres.
|
|
1731
|
+
* @param path - XYZ path in millimetres.
|
|
1732
|
+
*
|
|
2557
1733
|
* @example Sweep
|
|
2558
1734
|
* ```ts
|
|
2559
|
-
* import {
|
|
2560
|
-
* import { rectangleProfile } from "@metamesh/modeling/geometry";
|
|
1735
|
+
* import { sweep } from "@metamesh/modeling";
|
|
1736
|
+
* import { matchProfiles, rectangleProfile } from "@metamesh/modeling/geometry";
|
|
2561
1737
|
*
|
|
2562
1738
|
* const [profile] = matchProfiles([rectangleProfile({ size: [6, 3] })]);
|
|
2563
1739
|
* sweep(profile!, [[0, 0, 0], [0, 0, 15], [10, 0, 25]], {
|
|
@@ -2572,25 +1748,33 @@ export declare function sweep(
|
|
|
2572
1748
|
): Solid;
|
|
2573
1749
|
|
|
2574
1750
|
/**
|
|
2575
|
-
*
|
|
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.
|
|
2576
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. */
|
|
2577
1763
|
export declare interface SweepOptions {
|
|
2578
1764
|
/** Raw point closure defaults to false; a Path3 supplies its closure and rejects conflicts. */
|
|
2579
1765
|
readonly closed?: boolean;
|
|
2580
1766
|
/** Explicit output and sampling allocation ceilings. */
|
|
2581
1767
|
readonly limits?: Partial<ModelingLimits>;
|
|
2582
|
-
/**
|
|
1768
|
+
/** Default transport minimizes rotations, initially projecting +X then +Y then +Z. */
|
|
2583
1769
|
readonly orientation?: SweepOrientation;
|
|
2584
|
-
/** Physical sampling of
|
|
1770
|
+
/** Physical sampling of twist and varying scale, plus optional segment-length limits. Inserted stations retain authored controls. */
|
|
2585
1771
|
readonly resolution?: GeometryResolution;
|
|
2586
|
-
/** Total additional profile rotation in degrees
|
|
1772
|
+
/** Total additional profile rotation in degrees; compatible closed boundaries are aligned automatically. */
|
|
2587
1773
|
readonly twist?: number;
|
|
2588
1774
|
/** Twist advances by physical path length (default), or normalized authored station position, including a closed seam gap. */
|
|
2589
1775
|
readonly twistBy?: "length" | "stations";
|
|
2590
|
-
/** 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. */
|
|
2591
1777
|
readonly scale?: number | Vector2Input | readonly Vector2Input[];
|
|
2592
|
-
/** Corresponding point-index advance at a rotationally equivalent closed seam. */
|
|
2593
|
-
readonly seamProfileOffset?: number;
|
|
2594
1778
|
}
|
|
2595
1779
|
|
|
2596
1780
|
/**
|
|
@@ -2620,11 +1804,34 @@ export declare type SweepOrientation =
|
|
|
2620
1804
|
readonly kind: "frenet";
|
|
2621
1805
|
};
|
|
2622
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
|
+
|
|
2623
1825
|
/**
|
|
2624
1826
|
* Consumes a previously prepared layout; never shapes or fetches a font.
|
|
2625
1827
|
*
|
|
1828
|
+
* @param layout - Prepared millimetre outlines; create the layout before generation.
|
|
1829
|
+
*
|
|
2626
1830
|
* @example Use a prepared text layout
|
|
2627
1831
|
* ```ts
|
|
1832
|
+
* import { textSection } from "@metamesh/modeling";
|
|
1833
|
+
* import type { VectorTextLayout } from "@metamesh/modeling/geometry";
|
|
1834
|
+
*
|
|
2628
1835
|
* // Prepare the exact font and layout before entering build.
|
|
2629
1836
|
* function labelSection(layout: VectorTextLayout) {
|
|
2630
1837
|
* return textSection(layout);
|
|
@@ -2636,9 +1843,7 @@ export declare function textSection(
|
|
|
2636
1843
|
options?: TextSectionOptions,
|
|
2637
1844
|
): Section;
|
|
2638
1845
|
|
|
2639
|
-
/**
|
|
2640
|
-
* Physical curve sampling applied to already prepared vector text.
|
|
2641
|
-
*/
|
|
1846
|
+
/** Physical curve sampling applied to already prepared vector text. */
|
|
2642
1847
|
export declare interface TextSectionOptions {
|
|
2643
1848
|
/** Local allocation ceilings may only lower the configured engine policy. */
|
|
2644
1849
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
@@ -2646,73 +1851,19 @@ export declare interface TextSectionOptions {
|
|
|
2646
1851
|
readonly resolution?: GeometryResolution;
|
|
2647
1852
|
}
|
|
2648
1853
|
|
|
2649
|
-
/** 45-degree end bevels for compensated rods and cutters. */
|
|
2650
|
-
export declare interface ThreadBevelOptions {
|
|
2651
|
-
/** Bottom/top sizes in millimetres. Omitted disables both. Auto uses profile depth for standard/tapered ends,
|
|
2652
|
-
* or one sixth of the compensated male minor/female major radius for blunt ends. */
|
|
2653
|
-
readonly bevel?: Bevel;
|
|
2654
|
-
}
|
|
2655
|
-
|
|
2656
1854
|
/**
|
|
2657
1855
|
* Compensated threaded nut.
|
|
2658
1856
|
*
|
|
2659
1857
|
* @example Threaded nut
|
|
2660
1858
|
* ```ts
|
|
2661
1859
|
* import { threadedNut } from "@metamesh/modeling";
|
|
2662
|
-
* import { threadProfile } from "@metamesh/modeling/geometry";
|
|
1860
|
+
* import { threadProfile } from "@metamesh/modeling/geometry/mechanical";
|
|
2663
1861
|
*
|
|
2664
1862
|
* const profile = threadProfile({ kind: "triangular", pitch: 1.75 });
|
|
2665
1863
|
* threadedNut({ nominalMajorDiameter: 12, thickness: 8, width: 20, shape: "hex", profile, fit: "normal" });
|
|
2666
1864
|
* ```
|
|
2667
1865
|
*/
|
|
2668
|
-
export declare function threadedNut(options:
|
|
2669
|
-
|
|
2670
|
-
/**
|
|
2671
|
-
* Options for a compensated nut with an internal thread.
|
|
2672
|
-
*/
|
|
2673
|
-
export declare interface ThreadedNutOptions extends Omit<
|
|
2674
|
-
InternalThreadCutterOptions,
|
|
2675
|
-
"bevel" | "length"
|
|
2676
|
-
> {
|
|
2677
|
-
/** Opening bevels in [bottom, top] order. Omitted or auto uses min(profile.depth, thickness/4); zero disables. */
|
|
2678
|
-
readonly innerBevel?: Bevel;
|
|
2679
|
-
/** Body bevels in [bottom, top] order. Omitted or auto uses min(profile.depth, thickness/4).
|
|
2680
|
-
* Use [0, "auto"] to keep the outside bottom flat without disabling its inner opening bevel. */
|
|
2681
|
-
readonly outerBevel?: Bevel;
|
|
2682
|
-
/** Optional physical policy for a round body, independent of the thread's matched facet grid. */
|
|
2683
|
-
readonly bodyResolution?: GeometryResolution;
|
|
2684
|
-
/** Nut body shape. */
|
|
2685
|
-
readonly shape: ThreadedNutShape;
|
|
2686
|
-
/** Nut thickness along +Z in millimetres. */
|
|
2687
|
-
readonly thickness: number;
|
|
2688
|
-
/** Across-flats width for hex/square or diameter for round, in millimetres. */
|
|
2689
|
-
readonly width: number;
|
|
2690
|
-
}
|
|
2691
|
-
|
|
2692
|
-
/** Resolved body and end-face dimensions plus conservative allocation estimates for the thread cutter. */
|
|
2693
|
-
export declare interface ThreadedNutPreflight {
|
|
2694
|
-
/** Polygon segment count used by the nut body. */
|
|
2695
|
-
readonly bodySegments: number;
|
|
2696
|
-
/** Resolved opening bevel sizes in millimetres, [bottom, top]. */
|
|
2697
|
-
readonly innerBevel: readonly [bottom: number, top: number];
|
|
2698
|
-
/** Resolved body bevel sizes in millimetres, [bottom, top]. */
|
|
2699
|
-
readonly outerBevel: readonly [bottom: number, top: number];
|
|
2700
|
-
/** Maximum compensated cutter radius at either requested face. */
|
|
2701
|
-
readonly cutterFaceRadius: number;
|
|
2702
|
-
/** Minimum nut-body inradius across the requested top and bottom faces. */
|
|
2703
|
-
readonly minimumBodyFaceInradius: number;
|
|
2704
|
-
/** Smallest radial wall left between the body and cutter at either requested face. */
|
|
2705
|
-
readonly minimumFaceWall: number;
|
|
2706
|
-
/** Conservative allocation estimates for the extended cutter; excludes the body and Boolean result. */
|
|
2707
|
-
readonly thread: ThreadSolidPreflight;
|
|
2708
|
-
/** Start-aligned circular facet count used by the compensated thread cutter. */
|
|
2709
|
-
readonly threadCircularSegments: number;
|
|
2710
|
-
}
|
|
2711
|
-
|
|
2712
|
-
/**
|
|
2713
|
-
* Supported printable nut body shapes.
|
|
2714
|
-
*/
|
|
2715
|
-
export declare type ThreadedNutShape = "hex" | "round" | "square";
|
|
1866
|
+
export declare function threadedNut(options: ThreadedNutSolidOptions): Solid;
|
|
2716
1867
|
|
|
2717
1868
|
/**
|
|
2718
1869
|
* Compensated external threaded rod.
|
|
@@ -2720,155 +1871,17 @@ export declare type ThreadedNutShape = "hex" | "round" | "square";
|
|
|
2720
1871
|
* @example Threaded rod
|
|
2721
1872
|
* ```ts
|
|
2722
1873
|
* import { threadedRod } from "@metamesh/modeling";
|
|
2723
|
-
* import { threadProfile } from "@metamesh/modeling/geometry";
|
|
1874
|
+
* import { threadProfile } from "@metamesh/modeling/geometry/mechanical";
|
|
2724
1875
|
*
|
|
2725
1876
|
* const profile = threadProfile({ kind: "triangular", pitch: 1.75 });
|
|
2726
1877
|
* threadedRod({ nominalMajorDiameter: 12, length: 24, profile, fit: "normal" });
|
|
2727
1878
|
* ```
|
|
2728
1879
|
*/
|
|
2729
|
-
export declare function threadedRod(options:
|
|
2730
|
-
|
|
2731
|
-
/**
|
|
2732
|
-
* Options for a compensated external threaded rod along +Z.
|
|
2733
|
-
*/
|
|
2734
|
-
export declare interface ThreadedRodOptions
|
|
2735
|
-
extends Omit<ThreadRidgeOptions, "majorDiameter">, ThreadBevelOptions {
|
|
2736
|
-
/** Printable fit or caller-calibrated allowances. Default: `normal`. */
|
|
2737
|
-
readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
|
|
2738
|
-
/** Nominal major diameter before male compensation. */
|
|
2739
|
-
readonly nominalMajorDiameter: number;
|
|
2740
|
-
}
|
|
2741
|
-
|
|
2742
|
-
/** End shape of a generated helical ridge. */
|
|
2743
|
-
export declare type ThreadEndStyle = "blunt" | "standard" | "tapered";
|
|
2744
|
-
|
|
2745
|
-
/** Axial end controls for a generated ridge. */
|
|
2746
|
-
export declare interface ThreadEndTreatmentOptions {
|
|
2747
|
-
/**
|
|
2748
|
-
* Ridge shape at the lower working boundary. `blunt` ends at full profile height, `standard`
|
|
2749
|
-
* clips the periodic profile at the face, and `tapered` ramps out from the minor envelope.
|
|
2750
|
-
* @defaultValue `"blunt"`
|
|
2751
|
-
*/
|
|
2752
|
-
readonly bottom?: ThreadEndStyle;
|
|
2753
|
-
/**
|
|
2754
|
-
* Non-negative unthreaded envelope length reserved at each non-standard end, in millimetres.
|
|
2755
|
-
* Active blunt bevels may raise this reservation to the effective bevel size.
|
|
2756
|
-
* @defaultValue `0`
|
|
2757
|
-
*/
|
|
2758
|
-
readonly endLength?: number;
|
|
2759
|
-
/**
|
|
2760
|
-
* Radial envelope toward which a blunt lead-in collapses.
|
|
2761
|
-
* @defaultValue `"minor"`
|
|
2762
|
-
*/
|
|
2763
|
-
readonly leadInEnvelope?: ThreadLeadInEnvelope;
|
|
2764
|
-
/**
|
|
2765
|
-
* Physical circumferential lead-in length in millimetres.
|
|
2766
|
-
* @defaultValue The profile depth.
|
|
2767
|
-
*/
|
|
2768
|
-
readonly leadInLength?: number;
|
|
2769
|
-
/**
|
|
2770
|
-
* Cross-section scaling curve used by blunt ends. `cut` switches abruptly to the full profile.
|
|
2771
|
-
* @defaultValue `"cut"`
|
|
2772
|
-
*/
|
|
2773
|
-
readonly leadInShape?: ThreadLeadInShape;
|
|
2774
|
-
/**
|
|
2775
|
-
* Ridge shape at the upper working boundary. `blunt` ends at full profile height, `standard`
|
|
2776
|
-
* clips the periodic profile at the face, and `tapered` ramps into the minor envelope.
|
|
2777
|
-
* @defaultValue `"blunt"`
|
|
2778
|
-
*/
|
|
2779
|
-
readonly top?: ThreadEndStyle;
|
|
2780
|
-
}
|
|
2781
|
-
|
|
2782
|
-
/**
|
|
2783
|
-
* Direction in which a conventional helical thread advances around +Z.
|
|
2784
|
-
*/
|
|
2785
|
-
export declare type ThreadHandedness = "left" | "right";
|
|
2786
|
-
|
|
2787
|
-
/** Radial envelope toward which a blunt lead-in collapses. */
|
|
2788
|
-
export declare type ThreadLeadInEnvelope = "major" | "minor";
|
|
2789
|
-
|
|
2790
|
-
/** BOSL2-compatible cross-section scaling curve for a blunt thread lead-in. */
|
|
2791
|
-
export declare type ThreadLeadInShape = "cut" | "linear" | "smooth" | "sqrt";
|
|
2792
|
-
|
|
2793
|
-
/**
|
|
2794
|
-
* A validated immutable periodic thread profile in `[axial, radial]` millimetres.
|
|
2795
|
-
*/
|
|
2796
|
-
export declare interface ThreadProfile {
|
|
2797
|
-
/** Axial width of the flat at the major envelope. */
|
|
2798
|
-
readonly crestFlatWidth: number;
|
|
2799
|
-
/** Radial distance from the major envelope to the root. */
|
|
2800
|
-
readonly depth: number;
|
|
2801
|
-
/** Profile family that produced this validated profile. */
|
|
2802
|
-
readonly kind: ThreadProfileSpec["kind"];
|
|
2803
|
-
/** Adjacent axial thread spacing in millimetres. */
|
|
2804
|
-
readonly pitch: number;
|
|
2805
|
-
/** Immutable open `[axial, radial]` path spanning one pitch. */
|
|
2806
|
-
readonly points: readonly Vector2Data[];
|
|
2807
|
-
/** Axial width of the flat at the minor envelope. */
|
|
2808
|
-
readonly rootFlatWidth: number;
|
|
2809
|
-
}
|
|
2810
|
-
|
|
2811
|
-
/** Fields shared by all thread profile specifications. */
|
|
2812
|
-
export declare interface ThreadProfileBaseSpec {
|
|
2813
|
-
/** Adjacent axial thread spacing in millimetres. */
|
|
2814
|
-
readonly pitch: number;
|
|
2815
|
-
/** Optional numerical tolerance overrides. */
|
|
2816
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
2817
|
-
}
|
|
1880
|
+
export declare function threadedRod(options: ThreadedRodSolidOptions): Solid;
|
|
2818
1881
|
|
|
2819
|
-
/**
|
|
2820
|
-
* Supported built-in and caller-defined thread profiles.
|
|
2821
|
-
*/
|
|
2822
|
-
export declare type ThreadProfileSpec =
|
|
2823
|
-
| AcmeThreadProfileSpec
|
|
2824
|
-
| ButtressThreadProfileSpec
|
|
2825
|
-
| CustomThreadProfileSpec
|
|
2826
|
-
| SquareThreadProfileSpec
|
|
2827
|
-
| TrapezoidalThreadProfileSpec
|
|
2828
|
-
| TriangularThreadProfileSpec;
|
|
2829
|
-
|
|
2830
|
-
/** Helical ridge mesh construction. */
|
|
1882
|
+
/** Declares a helical ridge Solid recipe along +Z, with lengths in millimetres. */
|
|
2831
1883
|
export declare function threadRidge(options: ThreadRidgeOptions): Solid;
|
|
2832
1884
|
|
|
2833
|
-
/** Runtime-neutral options for the dedicated helical ridge mesher. */
|
|
2834
|
-
export declare interface ThreadRidgeOptions {
|
|
2835
|
-
/**
|
|
2836
|
-
* Optional bottom/top ridge-end treatments. Standalone ridges honor the requested boundaries;
|
|
2837
|
-
* BOSL2-style non-cut lead-in scaling is available on complete thread solids.
|
|
2838
|
-
*/
|
|
2839
|
-
readonly ends?: ThreadEndTreatmentOptions;
|
|
2840
|
-
/** Helix direction. Default: `right`. */
|
|
2841
|
-
readonly handedness?: ThreadHandedness;
|
|
2842
|
-
/** Total threaded axial length in millimetres. */
|
|
2843
|
-
readonly length: number;
|
|
2844
|
-
/** Explicit output and circular allocation ceilings. */
|
|
2845
|
-
readonly limits?: Partial<ModelingLimits>;
|
|
2846
|
-
/** Nominal major diameter before any caller-owned fit compensation. */
|
|
2847
|
-
readonly majorDiameter: number;
|
|
2848
|
-
/** Angular offset of the first start in degrees. Default: `0`. */
|
|
2849
|
-
readonly phase?: number;
|
|
2850
|
-
/** Validated periodic profile repeated around the shaft. */
|
|
2851
|
-
readonly profile: ThreadProfile;
|
|
2852
|
-
/** Optional circular-resolution policy. */
|
|
2853
|
-
readonly resolution?: GeometryResolution;
|
|
2854
|
-
/** Number of evenly phased starts. Default: `1`. */
|
|
2855
|
-
readonly starts?: number;
|
|
2856
|
-
/** Optional numerical tolerance overrides. */
|
|
2857
|
-
readonly tolerance?: GeometryToleranceOptions;
|
|
2858
|
-
}
|
|
2859
|
-
|
|
2860
|
-
/** Selected sampling counts and conservative allocation estimates, before thread mesh construction. */
|
|
2861
|
-
export declare interface ThreadSolidPreflight {
|
|
2862
|
-
/** Uniform axial intervals required only by a requested physical segment-length limit. */
|
|
2863
|
-
readonly axialIntervals: number;
|
|
2864
|
-
/** Start-aligned full-circle segment count used by the surface mesh. */
|
|
2865
|
-
readonly circularSegments: number;
|
|
2866
|
-
/** Conservative surface-row count across profile breaks, ends, and bevel stations. */
|
|
2867
|
-
readonly estimatedRows: number;
|
|
2868
|
-
/** Conservative triangle count used by the selected output allocation policy. */
|
|
2869
|
-
readonly estimatedTriangles: number;
|
|
2870
|
-
}
|
|
2871
|
-
|
|
2872
1885
|
/**
|
|
2873
1886
|
* Torus around +Z.
|
|
2874
1887
|
*
|
|
@@ -2879,9 +1892,7 @@ export declare interface ThreadSolidPreflight {
|
|
|
2879
1892
|
*/
|
|
2880
1893
|
export declare function torus(options: TorusOptions): Solid;
|
|
2881
1894
|
|
|
2882
|
-
/**
|
|
2883
|
-
* Dimensions and independent ring/profile tessellation for a torus around the Z axis.
|
|
2884
|
-
*/
|
|
1895
|
+
/** Dimensions and independent ring/profile tessellation for a torus around the Z axis. */
|
|
2885
1896
|
export declare interface TorusOptions extends PrimitiveAttachment {
|
|
2886
1897
|
/** Explicit sampling ceilings, bounded by the host policy. */
|
|
2887
1898
|
readonly limits?: Partial<GeometrySamplingLimits>;
|
|
@@ -2897,221 +1908,6 @@ export declare interface TorusOptions extends PrimitiveAttachment {
|
|
|
2897
1908
|
readonly resolution?: GeometryResolution;
|
|
2898
1909
|
}
|
|
2899
1910
|
|
|
2900
|
-
/** Immutable reusable XY placement. Methods apply in written order; angles are degrees. */
|
|
2901
|
-
export declare interface Transform2 {
|
|
2902
|
-
/** Applies a translation in model units after this placement. */
|
|
2903
|
-
translate(offset: Vector2Input): Transform2;
|
|
2904
|
-
/** Rotates counterclockwise in degrees about an optional world-space pivot (default origin). */
|
|
2905
|
-
rotate(degrees: number, options?: Pivot2Options): Transform2;
|
|
2906
|
-
/** Scales about an optional world-space pivot; finite nonzero factors may reflect. */
|
|
2907
|
-
scale(factors: number | Vector2Input, options?: Pivot2Options): Transform2;
|
|
2908
|
-
/** Applies this placement first, then `next`; neither operand is mutated. */
|
|
2909
|
-
andThen(next: Transform2Input): Transform2;
|
|
2910
|
-
/** Returns the inverse; singular and numerically unstable transforms throw GeometryError. */
|
|
2911
|
-
inverse(): Transform2;
|
|
2912
|
-
/** Transforms a finite point, including translation. Returns a fresh immutable vector. */
|
|
2913
|
-
applyPoint(point: Vector2Input): Vector2;
|
|
2914
|
-
/** Transforms a finite direction, excluding translation and retaining scale. This is not a normal transform. */
|
|
2915
|
-
applyDirection(direction: Vector2Input): Vector2;
|
|
2916
|
-
/** Applies the inverse transpose and normalizes. Ignores translation; rejects zero normals. */
|
|
2917
|
-
applyNormal(normal: Vector2Input): Vector2;
|
|
2918
|
-
/** Returns the frozen canonical row-major 3x3 matrix for interchange. */
|
|
2919
|
-
toData(): Transform2Data;
|
|
2920
|
-
/** Embeds this placement in XYZ, leaving Z unchanged, for solids and 3D paths. */
|
|
2921
|
-
to3D(): Transform3;
|
|
2922
|
-
}
|
|
2923
|
-
|
|
2924
|
-
/**
|
|
2925
|
-
* Creates an immutable XY transform, identity by default.
|
|
2926
|
-
*
|
|
2927
|
-
* Values and data are copied and validated.
|
|
2928
|
-
* Pass it directly to Section.transform() and planar data helpers; to3D() explicitly crosses into XYZ.
|
|
2929
|
-
* Zero scales and singular matrices throw GeometryError; negative scales reflect.
|
|
2930
|
-
*
|
|
2931
|
-
* Use `toData()` for frozen matrix interchange.
|
|
2932
|
-
*
|
|
2933
|
-
* @example
|
|
2934
|
-
* ```ts
|
|
2935
|
-
* const placement = transform2().rotate(90).translate([10, 0]);
|
|
2936
|
-
* placement.applyPoint([1, 0]).toData(); // approximately [10, 1]
|
|
2937
|
-
* ```
|
|
2938
|
-
*/
|
|
2939
|
-
export declare function transform2(input?: Transform2Input): Transform2;
|
|
2940
|
-
|
|
2941
|
-
/**
|
|
2942
|
-
* A row-major affine 3x3 XY matrix applied to column vectors.
|
|
2943
|
-
* Translation occupies indices 2 and 5; the final row is `[0, 0, 1]`.
|
|
2944
|
-
*/
|
|
2945
|
-
export declare type Transform2Data = readonly [
|
|
2946
|
-
m00: number,
|
|
2947
|
-
m01: number,
|
|
2948
|
-
m02: number,
|
|
2949
|
-
m10: number,
|
|
2950
|
-
m11: number,
|
|
2951
|
-
m12: number,
|
|
2952
|
-
m20: number,
|
|
2953
|
-
m21: number,
|
|
2954
|
-
m22: number,
|
|
2955
|
-
];
|
|
2956
|
-
|
|
2957
|
-
/** An immutable XY transform or its canonical row-major matrix for interchange. */
|
|
2958
|
-
export declare type Transform2Input = Transform2 | Transform2Data;
|
|
2959
|
-
|
|
2960
|
-
/** Immutable reusable XYZ placement. Methods apply in written order; angles are degrees. */
|
|
2961
|
-
export declare interface Transform3 {
|
|
2962
|
-
/** Applies a translation in model units after this placement. */
|
|
2963
|
-
translate(offset: Vector3Input): Transform3;
|
|
2964
|
-
/** Rotates about global X, then Y, then Z in degrees, about an optional world-space pivot. */
|
|
2965
|
-
rotate(degrees: Vector3Input, options?: Pivot3Options): Transform3;
|
|
2966
|
-
/** Rotates right-handed in degrees about a nonzero axis and optional world-space pivot. */
|
|
2967
|
-
rotateAxis(
|
|
2968
|
-
axis: Vector3Input,
|
|
2969
|
-
degrees: number,
|
|
2970
|
-
options?: Pivot3Options,
|
|
2971
|
-
): Transform3;
|
|
2972
|
-
/** Scales about an optional world-space pivot; finite nonzero factors may reflect. */
|
|
2973
|
-
scale(factors: number | Vector3Input, options?: Pivot3Options): Transform3;
|
|
2974
|
-
/** Applies this placement first, then `next`; equivalent to composeTransform3(next, current). */
|
|
2975
|
-
andThen(next: Transform3Input): Transform3;
|
|
2976
|
-
/** Returns the inverse; singular and numerically unstable transforms throw GeometryError. */
|
|
2977
|
-
inverse(): Transform3;
|
|
2978
|
-
/** Transforms a finite point, including translation. Returns a fresh immutable vector. */
|
|
2979
|
-
applyPoint(point: Vector3Input): Vector3;
|
|
2980
|
-
/** Transforms a finite direction, excluding translation and retaining scale. This is not a normal transform. */
|
|
2981
|
-
applyDirection(direction: Vector3Input): Vector3;
|
|
2982
|
-
/** Applies the inverse transpose and normalizes. Ignores translation; rejects zero normals. */
|
|
2983
|
-
applyNormal(normal: Vector3Input): Vector3;
|
|
2984
|
-
/** Returns the frozen canonical row-major 4x4 matrix for interchange. */
|
|
2985
|
-
toData(): Transform3Data;
|
|
2986
|
-
/** Restricts to XY; throws GeometryError for a plane change or singular XY restriction. */
|
|
2987
|
-
to2D(): Transform2;
|
|
2988
|
-
}
|
|
2989
|
-
|
|
2990
|
-
/**
|
|
2991
|
-
* Creates an immutable XYZ transform, identity by default.
|
|
2992
|
-
*
|
|
2993
|
-
* Values and data are copied and validated.
|
|
2994
|
-
* Calls apply in written order; rotations use degrees and pivots use current world coordinates.
|
|
2995
|
-
* Zero scales, singular matrices, nonfinite inputs and zero rotation axes throw GeometryError.
|
|
2996
|
-
* Use frameTransform3(frame) as the input for existing orthonormal frame placement.
|
|
2997
|
-
*
|
|
2998
|
-
* Use `toData()` for frozen matrix interchange.
|
|
2999
|
-
* [composeTransform3](/docs/reference/geometry/composeTransform3) takes matrices in after, before order.
|
|
3000
|
-
*
|
|
3001
|
-
* @example
|
|
3002
|
-
* ```ts
|
|
3003
|
-
* const placement = transform3().rotate([0, 0, 90]).translate([10, 0, 0]);
|
|
3004
|
-
* placement.applyPoint([1, 0, 0]).toData(); // approximately [10, 1, 0]
|
|
3005
|
-
* ```
|
|
3006
|
-
*/
|
|
3007
|
-
export declare function transform3(input?: Transform3Input): Transform3;
|
|
3008
|
-
|
|
3009
|
-
/**
|
|
3010
|
-
* A row-major affine 4x4 matrix applied to column vectors.
|
|
3011
|
-
*
|
|
3012
|
-
* Translation occupies indices 3, 7, and 11. The final row must be
|
|
3013
|
-
* `[0, 0, 0, 1]` within the active geometry tolerance.
|
|
3014
|
-
*/
|
|
3015
|
-
export declare type Transform3Data = readonly [
|
|
3016
|
-
m00: number,
|
|
3017
|
-
m01: number,
|
|
3018
|
-
m02: number,
|
|
3019
|
-
m03: number,
|
|
3020
|
-
m10: number,
|
|
3021
|
-
m11: number,
|
|
3022
|
-
m12: number,
|
|
3023
|
-
m13: number,
|
|
3024
|
-
m20: number,
|
|
3025
|
-
m21: number,
|
|
3026
|
-
m22: number,
|
|
3027
|
-
m23: number,
|
|
3028
|
-
m30: number,
|
|
3029
|
-
m31: number,
|
|
3030
|
-
m32: number,
|
|
3031
|
-
m33: number,
|
|
3032
|
-
];
|
|
3033
|
-
|
|
3034
|
-
/** An immutable XYZ transform or its canonical row-major matrix for interchange. */
|
|
3035
|
-
export declare type Transform3Input = Transform3 | Transform3Data;
|
|
3036
|
-
|
|
3037
|
-
/** Trapezoidal thread profile with a configurable included angle. */
|
|
3038
|
-
export declare interface TrapezoidalThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
3039
|
-
/** Selects the trapezoidal profile family. */
|
|
3040
|
-
readonly kind: "trapezoidal";
|
|
3041
|
-
/**
|
|
3042
|
-
* Radial depth in millimetres.
|
|
3043
|
-
* @defaultValue `pitch / 2`
|
|
3044
|
-
*/
|
|
3045
|
-
readonly depth?: number;
|
|
3046
|
-
/**
|
|
3047
|
-
* Full angle between the flanks in degrees, from `0` inclusive to `180` exclusive.
|
|
3048
|
-
* Each flank uses half this angle from the radial direction; `90` gives 45-degree slopes.
|
|
3049
|
-
* @defaultValue `30`
|
|
3050
|
-
*/
|
|
3051
|
-
readonly includedAngle?: number;
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
|
-
/** A topology-preserving indexed triangle mesh with mutable owned XYZ buffers. */
|
|
3055
|
-
export declare interface TriangleMesh {
|
|
3056
|
-
/** Three unsigned vertex indices per triangle. */
|
|
3057
|
-
readonly indices: Uint32Array;
|
|
3058
|
-
/** Flat XYZ coordinates in millimetres. */
|
|
3059
|
-
readonly positions: Float32Array;
|
|
3060
|
-
}
|
|
3061
|
-
|
|
3062
|
-
/**
|
|
3063
|
-
* Measurements and optional edge-connected topology from one validated mesh traversal.
|
|
3064
|
-
*/
|
|
3065
|
-
export declare interface TriangleMeshAnalysis extends TriangleMeshMeasurements {
|
|
3066
|
-
/** Number of surface shells connected by shared indexed edges when includeTopology is requested.
|
|
3067
|
-
* Cavities count separately; shells may be open unless requireClosed is enabled. Coordinates are not welded. */
|
|
3068
|
-
readonly shellCount?: number;
|
|
3069
|
-
/** Number of distinct indexed undirected edges when `includeTopology` is requested. */
|
|
3070
|
-
readonly edgeCount?: number;
|
|
3071
|
-
}
|
|
3072
|
-
|
|
3073
|
-
/**
|
|
3074
|
-
* Geometric measurements derived from a validated, non-empty triangle mesh.
|
|
3075
|
-
*/
|
|
3076
|
-
export declare interface TriangleMeshMeasurements {
|
|
3077
|
-
/** Axis-aligned bounds. */
|
|
3078
|
-
readonly bounds: Bounds3Data;
|
|
3079
|
-
/** Signed enclosed volume; positive values correspond to outward winding. */
|
|
3080
|
-
readonly signedVolume: number;
|
|
3081
|
-
/** Sum of all triangle areas in squared model units. */
|
|
3082
|
-
readonly surfaceArea: number;
|
|
3083
|
-
/** Number of indexed triangles. */
|
|
3084
|
-
readonly triangleCount: number;
|
|
3085
|
-
/** Number of distinct entries in the position buffer. */
|
|
3086
|
-
readonly vertexCount: number;
|
|
3087
|
-
}
|
|
3088
|
-
|
|
3089
|
-
/** Mesh measurements with the indexed surface-shell and edge counts requested by includeTopology. */
|
|
3090
|
-
export declare interface TriangleMeshTopologyAnalysis extends TriangleMeshAnalysis {
|
|
3091
|
-
/** Number of surface shells connected by shared indexed edges; cavities count separately. */
|
|
3092
|
-
readonly shellCount: number;
|
|
3093
|
-
/** Number of distinct indexed undirected edges. */
|
|
3094
|
-
readonly edgeCount: number;
|
|
3095
|
-
}
|
|
3096
|
-
|
|
3097
|
-
/**
|
|
3098
|
-
* ISO/UTS-like 60-degree truncated triangular profile.
|
|
3099
|
-
*/
|
|
3100
|
-
export declare interface TriangularThreadProfileSpec extends ThreadProfileBaseSpec {
|
|
3101
|
-
/** Selects the 60-degree triangular profile family. */
|
|
3102
|
-
readonly kind: "triangular";
|
|
3103
|
-
/**
|
|
3104
|
-
* Crest width divided by pitch.
|
|
3105
|
-
* @defaultValue `1 / 8`
|
|
3106
|
-
*/
|
|
3107
|
-
readonly crestFlatRatio?: number;
|
|
3108
|
-
/**
|
|
3109
|
-
* Root width divided by pitch.
|
|
3110
|
-
* @defaultValue `1 / 4`
|
|
3111
|
-
*/
|
|
3112
|
-
readonly rootFlatRatio?: number;
|
|
3113
|
-
}
|
|
3114
|
-
|
|
3115
1911
|
/**
|
|
3116
1912
|
* Hollow +Z tube.
|
|
3117
1913
|
*
|
|
@@ -3122,9 +1918,7 @@ export declare interface TriangularThreadProfileSpec extends ThreadProfileBaseSp
|
|
|
3122
1918
|
*/
|
|
3123
1919
|
export declare function tube(options: TubeOptions): Solid;
|
|
3124
1920
|
|
|
3125
|
-
/**
|
|
3126
|
-
* Dimensions, placement, and tessellation for a hollow Z-axis tube.
|
|
3127
|
-
*/
|
|
1921
|
+
/** Dimensions, placement, and tessellation for a hollow Z-axis tube. */
|
|
3128
1922
|
export declare type TubeOptions = CircularPrimitiveOptions &
|
|
3129
1923
|
PrimitiveAttachment & {
|
|
3130
1924
|
/**
|
|
@@ -3132,6 +1926,8 @@ export declare type TubeOptions = CircularPrimitiveOptions &
|
|
|
3132
1926
|
* @defaultValue `true`
|
|
3133
1927
|
*/
|
|
3134
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;
|
|
3135
1931
|
/** Total height along Z in millimetres. */
|
|
3136
1932
|
readonly height: number;
|
|
3137
1933
|
/** Inner nominal dimension meets polygon vertices or faces; defaults to vertex. */
|
|
@@ -3164,6 +1960,8 @@ export declare type TubeOptions = CircularPrimitiveOptions &
|
|
|
3164
1960
|
/**
|
|
3165
1961
|
* Robust union of one or more shapes; empty input rejects during declaration.
|
|
3166
1962
|
*
|
|
1963
|
+
* @param solids - Operands in shared modeling coordinates.
|
|
1964
|
+
*
|
|
3167
1965
|
* @example Union
|
|
3168
1966
|
* ```ts
|
|
3169
1967
|
* const block = box({ size: 20 });
|
|
@@ -3173,135 +1971,11 @@ export declare type TubeOptions = CircularPrimitiveOptions &
|
|
|
3173
1971
|
*/
|
|
3174
1972
|
export declare function union(solids: readonly Solid[]): Solid;
|
|
3175
1973
|
|
|
3176
|
-
/** Native filled section union; dimensions cannot be mixed. */
|
|
3177
|
-
export declare function union(sections: readonly Section[]): Section;
|
|
3178
|
-
|
|
3179
|
-
/** Immutable XY arithmetic; vector operations return new values and measurements return numbers. */
|
|
3180
|
-
export declare interface Vector2 {
|
|
3181
|
-
/** X coordinate in the vector's coordinate units. */
|
|
3182
|
-
readonly x: number;
|
|
3183
|
-
/** Y coordinate in the vector's coordinate units. */
|
|
3184
|
-
readonly y: number;
|
|
3185
|
-
/** Adds another vector component-wise. */
|
|
3186
|
-
add(other: Vector2Input): Vector2;
|
|
3187
|
-
/** Subtracts another vector component-wise. */
|
|
3188
|
-
subtract(other: Vector2Input): Vector2;
|
|
3189
|
-
/** Multiplies by a finite dimensionless scalar. */
|
|
3190
|
-
scale(factor: number): Vector2;
|
|
3191
|
-
/** Returns a unit vector; rejects length at or below finite nonnegative `epsilon` (default `1e-12`). */
|
|
3192
|
-
normalize(epsilon?: number): Vector2;
|
|
3193
|
-
/** Interpolates toward another vector by finite dimensionless `t`; extrapolation is allowed. */
|
|
3194
|
-
lerp(other: Vector2Input, t: number): Vector2;
|
|
3195
|
-
/** Returns the scalar dot product. */
|
|
3196
|
-
dot(other: Vector2Input): number;
|
|
3197
|
-
/** Returns the signed scalar cross product; positive means the other vector is counterclockwise. */
|
|
3198
|
-
cross(other: Vector2Input): number;
|
|
3199
|
-
/** Returns Euclidean length in the vector's coordinate units. */
|
|
3200
|
-
length(): number;
|
|
3201
|
-
/** Returns Euclidean distance to another vector in the same coordinate units. */
|
|
3202
|
-
distance(other: Vector2Input): number;
|
|
3203
|
-
/** Returns this value's frozen readonly tuple for interchange; repeated calls do not allocate. */
|
|
3204
|
-
toData(): Vector2Data;
|
|
3205
|
-
}
|
|
3206
|
-
|
|
3207
|
-
/**
|
|
3208
|
-
* Creates immutable XY arithmetic from a finite tuple or vector, snapshotting the coordinates.
|
|
3209
|
-
*
|
|
3210
|
-
* Values and results are finite. Invalid dimensions throw `INVALID_ARGUMENT`; nonfinite coordinates
|
|
3211
|
-
* and overflow throw `NON_FINITE_VALUE` GeometryError.
|
|
3212
|
-
* Use transform2().applyDirection(value) for rotations and nonuniform scaling.
|
|
3213
|
-
*
|
|
3214
|
-
* Use `toData()` for frozen tuple interchange, or
|
|
3215
|
-
* [normalize2](/docs/reference/geometry/normalize2) for tuple-based normalization in numerical loops.
|
|
3216
|
-
*/
|
|
3217
|
-
export declare function vector2(input: Vector2Input): Vector2;
|
|
3218
|
-
|
|
3219
|
-
/** A two-dimensional Cartesian vector or point. */
|
|
3220
|
-
export declare type Vector2Data = readonly [x: number, y: number];
|
|
3221
|
-
|
|
3222
|
-
/** An XY tuple or immutable fluent vector accepted by vector operations. */
|
|
3223
|
-
export declare type Vector2Input = Vector2Data | Vector2;
|
|
3224
|
-
|
|
3225
|
-
/** Immutable XYZ arithmetic; vector operations return new values and measurements return numbers. */
|
|
3226
|
-
export declare interface Vector3 {
|
|
3227
|
-
/** X coordinate in the vector's coordinate units. */
|
|
3228
|
-
readonly x: number;
|
|
3229
|
-
/** Y coordinate in the vector's coordinate units. */
|
|
3230
|
-
readonly y: number;
|
|
3231
|
-
/** Z coordinate in the vector's coordinate units. */
|
|
3232
|
-
readonly z: number;
|
|
3233
|
-
/** Adds another vector component-wise. */
|
|
3234
|
-
add(other: Vector3Input): Vector3;
|
|
3235
|
-
/** Subtracts another vector component-wise. */
|
|
3236
|
-
subtract(other: Vector3Input): Vector3;
|
|
3237
|
-
/** Multiplies by a finite dimensionless scalar. */
|
|
3238
|
-
scale(factor: number): Vector3;
|
|
3239
|
-
/** Returns a unit vector; rejects length at or below finite nonnegative `epsilon` (default `1e-12`). */
|
|
3240
|
-
normalize(epsilon?: number): Vector3;
|
|
3241
|
-
/** Interpolates toward another vector by finite dimensionless `t`; extrapolation is allowed. */
|
|
3242
|
-
lerp(other: Vector3Input, t: number): Vector3;
|
|
3243
|
-
/** Returns the scalar dot product. */
|
|
3244
|
-
dot(other: Vector3Input): number;
|
|
3245
|
-
/** Returns the right-handed cross product as a new vector. */
|
|
3246
|
-
cross(other: Vector3Input): Vector3;
|
|
3247
|
-
/** Returns Euclidean length in the vector's coordinate units. */
|
|
3248
|
-
length(): number;
|
|
3249
|
-
/** Returns Euclidean distance to another vector in the same coordinate units. */
|
|
3250
|
-
distance(other: Vector3Input): number;
|
|
3251
|
-
/** Returns this value's frozen readonly tuple for interchange; repeated calls do not allocate. */
|
|
3252
|
-
toData(): Vector3Data;
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3255
1974
|
/**
|
|
3256
|
-
*
|
|
3257
|
-
*
|
|
3258
|
-
* Values and results are finite. Invalid dimensions throw `INVALID_ARGUMENT`; nonfinite coordinates
|
|
3259
|
-
* and overflow throw `NON_FINITE_VALUE` GeometryError.
|
|
3260
|
-
* Use transform3().applyDirection(value) for rotations and nonuniform scaling.
|
|
1975
|
+
* Filled Section union; dimensions cannot be mixed.
|
|
3261
1976
|
*
|
|
3262
|
-
*
|
|
3263
|
-
* [normalize3](/docs/reference/geometry/normalize3) for tuple-based normalization in numerical loops.
|
|
3264
|
-
*
|
|
3265
|
-
* @example
|
|
3266
|
-
* ```ts
|
|
3267
|
-
* const direction = vector3([1, 2, 3]).add([4, 0, 0]).normalize().scale(10);
|
|
3268
|
-
* const alignment = direction.dot([0, 0, 1]);
|
|
3269
|
-
* ```
|
|
3270
|
-
*/
|
|
3271
|
-
export declare function vector3(input: Vector3Input): Vector3;
|
|
3272
|
-
|
|
3273
|
-
/** A three-dimensional Cartesian vector or point. */
|
|
3274
|
-
export declare type Vector3Data = readonly [x: number, y: number, z: number];
|
|
3275
|
-
|
|
3276
|
-
/** An XYZ tuple or immutable fluent vector accepted by vector operations. */
|
|
3277
|
-
export declare type Vector3Input = Vector3Data | Vector3;
|
|
3278
|
-
|
|
3279
|
-
/**
|
|
3280
|
-
* Immutable vector layout with no browser, font parser, or kernel ownership.
|
|
1977
|
+
* @param sections - Operands in shared XY coordinates.
|
|
3281
1978
|
*/
|
|
3282
|
-
export declare
|
|
3283
|
-
/** Nonzero-filled path data in millimetres, positive Y upward; empty for text with no ink. */
|
|
3284
|
-
readonly paths: readonly string[];
|
|
3285
|
-
/** Exact measurements of these paths and their logical text layout. */
|
|
3286
|
-
readonly metrics: VectorTextMetrics;
|
|
3287
|
-
}
|
|
3288
|
-
|
|
3289
|
-
/** Text measurements from the same immutable layout that supplies geometry and SVG outlines. */
|
|
3290
|
-
export declare interface VectorTextMetrics {
|
|
3291
|
-
/** Visible curve bounds after alignment, or null when the text has no ink. */
|
|
3292
|
-
readonly bounds: Bounds2Data | null;
|
|
3293
|
-
/** Unaligned logical advance and negative baseline displacement in mm; arcs retain [arc length, 0]. */
|
|
3294
|
-
readonly advance: readonly [number, number];
|
|
3295
|
-
/** Maximum logical line advance in millimetres, including spaces; arc length on circular baselines. */
|
|
3296
|
-
readonly logicalWidth: number;
|
|
3297
|
-
/** Selected font's ascender distance above a baseline in millimetres, independent of the text. */
|
|
3298
|
-
readonly ascent: number;
|
|
3299
|
-
/** Selected font's descender distance below a baseline in millimetres, a non-negative value. */
|
|
3300
|
-
readonly descent: number;
|
|
3301
|
-
/** Actual distance between baselines in millimetres. */
|
|
3302
|
-
readonly lineHeight: number;
|
|
3303
|
-
/** Number of lines, including empty and trailing lines; empty text occupies one line. */
|
|
3304
|
-
readonly lineCount: number;
|
|
3305
|
-
}
|
|
1979
|
+
export declare function union(sections: readonly Section[]): Section;
|
|
3306
1980
|
|
|
3307
1981
|
export {};
|