@itwin/core-geometry 4.1.0-dev.4 → 4.1.0-dev.40
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 +32 -1
- package/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/cjs/bspline/KnotVector.js.map +1 -1
- package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +1 -0
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +4 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +71 -86
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +110 -96
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/ChainCollectorContext.js.map +1 -1
- package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveChain.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +61 -41
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +69 -46
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +73 -46
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +100 -64
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +45 -46
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +39 -41
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +138 -92
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +115 -75
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.d.ts +26 -20
- package/lib/cjs/curve/GeometryQuery.d.ts.map +1 -1
- package/lib/cjs/curve/GeometryQuery.js +11 -9
- package/lib/cjs/curve/GeometryQuery.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.d.ts +38 -27
- package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +77 -39
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +70 -51
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +120 -71
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.d.ts +7 -5
- package/lib/cjs/curve/Loop.d.ts.map +1 -1
- package/lib/cjs/curve/Loop.js +18 -6
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/ParityRegion.d.ts +7 -7
- package/lib/cjs/curve/ParityRegion.d.ts.map +1 -1
- package/lib/cjs/curve/ParityRegion.js +19 -11
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.d.ts +6 -6
- package/lib/cjs/curve/Path.d.ts.map +1 -1
- package/lib/cjs/curve/Path.js +15 -9
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/PointString3d.js.map +1 -1
- package/lib/cjs/curve/ProxyCurve.d.ts +4 -6
- package/lib/cjs/curve/ProxyCurve.d.ts.map +1 -1
- package/lib/cjs/curve/ProxyCurve.js +7 -7
- package/lib/cjs/curve/ProxyCurve.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountMap.d.ts +14 -13
- package/lib/cjs/curve/Query/StrokeCountMap.d.ts.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountMap.js +9 -8
- package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +69 -47
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +70 -47
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts +29 -21
- package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js +50 -24
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.d.ts +6 -5
- package/lib/cjs/curve/UnionRegion.d.ts.map +1 -1
- package/lib/cjs/curve/UnionRegion.js +17 -8
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts +2 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.js +6 -2
- package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +4 -0
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js +5 -2
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts +56 -34
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +152 -87
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js +4 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +2 -2
- package/lib/cjs/geometry3d/Matrix3d.js +2 -2
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +35 -32
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +133 -93
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +296 -144
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/geometry4d/Map4d.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/geometry4d/MomentData.js.map +1 -1
- package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/BandedSystem.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
- package/lib/cjs/numerics/Complex.js.map +1 -1
- package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
- package/lib/cjs/numerics/PolarData.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/Quadrature.js.map +1 -1
- package/lib/cjs/numerics/Range1dArray.js.map +1 -1
- package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/cjs/numerics/UnionFind.js.map +1 -1
- package/lib/cjs/numerics/UsageSums.js.map +1 -1
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/BoxTopology.js.map +1 -1
- package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
- package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
- package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
- package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/cjs/serialization/DeepCompare.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/MaskManager.js.map +1 -1
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
- package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
- package/lib/esm/Constant.js.map +1 -1
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/esm/bspline/KnotVector.js.map +1 -1
- package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +1 -0
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +2 -0
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +71 -86
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +110 -96
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/ChainCollectorContext.js.map +1 -1
- package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
- package/lib/esm/curve/CurveChain.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +61 -41
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +69 -46
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +73 -46
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +100 -64
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.js.map +1 -1
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +45 -46
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +39 -41
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +138 -92
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +115 -75
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.d.ts +26 -20
- package/lib/esm/curve/GeometryQuery.d.ts.map +1 -1
- package/lib/esm/curve/GeometryQuery.js +11 -9
- package/lib/esm/curve/GeometryQuery.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.d.ts +38 -27
- package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +77 -39
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +70 -51
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +120 -71
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.d.ts +7 -5
- package/lib/esm/curve/Loop.d.ts.map +1 -1
- package/lib/esm/curve/Loop.js +18 -6
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/ParityRegion.d.ts +7 -7
- package/lib/esm/curve/ParityRegion.d.ts.map +1 -1
- package/lib/esm/curve/ParityRegion.js +19 -11
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.d.ts +6 -6
- package/lib/esm/curve/Path.d.ts.map +1 -1
- package/lib/esm/curve/Path.js +15 -9
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/PointString3d.js.map +1 -1
- package/lib/esm/curve/ProxyCurve.d.ts +4 -6
- package/lib/esm/curve/ProxyCurve.d.ts.map +1 -1
- package/lib/esm/curve/ProxyCurve.js +7 -7
- package/lib/esm/curve/ProxyCurve.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/Query/InOutTests.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountMap.d.ts +14 -13
- package/lib/esm/curve/Query/StrokeCountMap.d.ts.map +1 -1
- package/lib/esm/curve/Query/StrokeCountMap.js +9 -8
- package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +69 -47
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +70 -47
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts +29 -21
- package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/esm/curve/StrokeOptions.js +50 -24
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.d.ts +6 -5
- package/lib/esm/curve/UnionRegion.d.ts.map +1 -1
- package/lib/esm/curve/UnionRegion.js +17 -8
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.d.ts +2 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.js +6 -2
- package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +4 -0
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.js +5 -2
- package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts +56 -34
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +152 -87
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js +4 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +2 -2
- package/lib/esm/geometry3d/Matrix3d.js +2 -2
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +35 -32
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +133 -93
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +296 -144
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/Segment1d.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/esm/geometry3d/XYZProps.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/geometry4d/Map4d.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/geometry4d/MomentData.js.map +1 -1
- package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/BandedSystem.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/ClusterableArray.js.map +1 -1
- package/lib/esm/numerics/Complex.js.map +1 -1
- package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
- package/lib/esm/numerics/PolarData.js.map +1 -1
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/Quadrature.js.map +1 -1
- package/lib/esm/numerics/Range1dArray.js.map +1 -1
- package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/esm/numerics/UnionFind.js.map +1 -1
- package/lib/esm/numerics/UsageSums.js.map +1 -1
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/BoxTopology.js.map +1 -1
- package/lib/esm/polyface/FacetFaceData.js.map +1 -1
- package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/esm/polyface/FacetOrientation.js.map +1 -1
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeLengthData.js.map +1 -1
- package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
- package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/esm/serialization/DeepCompare.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/SolidPrimitive.js.map +1 -1
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/MaskManager.js.map +1 -1
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/SignedDataSummary.js.map +1 -1
- package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +3 -3
|
@@ -23,7 +23,7 @@ const Path_1 = require("../Path");
|
|
|
23
23
|
const RegionOps_1 = require("../RegionOps");
|
|
24
24
|
const StrokeOptions_1 = require("../StrokeOptions");
|
|
25
25
|
/**
|
|
26
|
-
* Classification of
|
|
26
|
+
* Classification of how the joint is constructed.
|
|
27
27
|
* @internal
|
|
28
28
|
*/
|
|
29
29
|
var JointMode;
|
|
@@ -36,26 +36,44 @@ var JointMode;
|
|
|
36
36
|
JointMode[JointMode["Gap"] = 4] = "Gap";
|
|
37
37
|
})(JointMode || (JointMode = {}));
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* *
|
|
42
|
-
*
|
|
43
|
-
* *
|
|
44
|
-
*
|
|
45
|
-
* *
|
|
39
|
+
* Control parameters for joint construction.
|
|
40
|
+
* * Define a "joint" as the common point between adjacent segments of the input curve.
|
|
41
|
+
* * Define the "turn angle" at a joint to be the angle in [0,pi] between the first derivatives (tangents) of
|
|
42
|
+
* the segments at the joint.
|
|
43
|
+
* * When creating offsets, if an offset needs to do an "outside" turn, the first applicable construction is applied:
|
|
44
|
+
* * If the turn angle is larger than `options.minArcDegrees`, a circular arc is constructed to offset the joint.
|
|
45
|
+
* * If the turn angle is less than or equal to `options.maxChamferTurnDegrees`, extend curves along tangent to
|
|
46
|
+
* single intersection point (to create a sharp corner).
|
|
47
|
+
* * If the turn angle is larger than `options.maxChamferDegrees`, the joint is offset with a line string whose edges:
|
|
48
|
+
* * lie outside the arc that would have been created by the first construction
|
|
49
|
+
* * have uniform turn angle less than `options.maxChamferDegrees`
|
|
50
|
+
* * touch the arc at their midpoint (except first and last edge).
|
|
46
51
|
* @public
|
|
47
52
|
*/
|
|
48
53
|
class JointOptions {
|
|
49
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Construct JointOptions.
|
|
50
56
|
* * leftOffsetDistance is required
|
|
51
57
|
* * minArcDegrees and maxChamferDegrees are optional.
|
|
52
58
|
*/
|
|
53
|
-
constructor(leftOffsetDistance, minArcDegrees = 180, maxChamferDegrees = 90, preserveEllipticalArcs = false) {
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
59
|
+
constructor(leftOffsetDistance, minArcDegrees = 180, maxChamferDegrees = 90, preserveEllipticalArcs = false, allowSharpestCorners = false) {
|
|
60
|
+
/**
|
|
61
|
+
* Smallest arc to construct.
|
|
62
|
+
* * If this control angle is 180 degrees or more, arcs are never created.
|
|
56
63
|
*/
|
|
57
64
|
this.minArcDegrees = 180.0;
|
|
65
|
+
/** Largest turn angle at which to construct a sharp corner, or largest turn angle in a multi-segment chamfer. */
|
|
58
66
|
this.maxChamferTurnDegrees = 90;
|
|
67
|
+
/**
|
|
68
|
+
* Whether to remove the internal turn angle upper bound for sharp corner construction.
|
|
69
|
+
* * By default, a sharp corner is not created at a joint when the turn angle is too large, so as to avoid offsets whose
|
|
70
|
+
* ranges blow up. Internally, this is implemented by applying an upper bound of 120 degrees to `maxChamferTurnDegrees`.
|
|
71
|
+
* * When `allowSharpestCorners` is true, this internal upper bound is removed, allowing sharp corners for turn angles
|
|
72
|
+
* up to `maxChamferTurnDegrees`.
|
|
73
|
+
* * Thus, if you know your input turn angles are no greater than `maxChamferTurnDegrees`, you can create an offset
|
|
74
|
+
* with sharp corners at each joint by setting `minArcDegrees` to 180 and `allowSharpestCorners` to true.
|
|
75
|
+
*/
|
|
76
|
+
this.allowSharpestCorners = false;
|
|
59
77
|
/** Offset distance, positive to left of base curve. */
|
|
60
78
|
this.leftOffsetDistance = 0;
|
|
61
79
|
/** Whether to offset elliptical arcs as elliptical arcs (true) or as B-spline curves (false, default). */
|
|
@@ -64,10 +82,11 @@ class JointOptions {
|
|
|
64
82
|
this.minArcDegrees = minArcDegrees;
|
|
65
83
|
this.maxChamferTurnDegrees = maxChamferDegrees;
|
|
66
84
|
this.preserveEllipticalArcs = preserveEllipticalArcs;
|
|
85
|
+
this.allowSharpestCorners = allowSharpestCorners;
|
|
67
86
|
}
|
|
68
87
|
/** Return a deep clone. */
|
|
69
88
|
clone() {
|
|
70
|
-
return new JointOptions(this.leftOffsetDistance, this.minArcDegrees, this.maxChamferTurnDegrees, this.preserveEllipticalArcs);
|
|
89
|
+
return new JointOptions(this.leftOffsetDistance, this.minArcDegrees, this.maxChamferTurnDegrees, this.preserveEllipticalArcs, this.allowSharpestCorners);
|
|
71
90
|
}
|
|
72
91
|
/** Copy values of input options */
|
|
73
92
|
setFrom(other) {
|
|
@@ -75,6 +94,7 @@ class JointOptions {
|
|
|
75
94
|
this.minArcDegrees = other.minArcDegrees;
|
|
76
95
|
this.maxChamferTurnDegrees = other.maxChamferTurnDegrees;
|
|
77
96
|
this.preserveEllipticalArcs = other.preserveEllipticalArcs;
|
|
97
|
+
this.allowSharpestCorners = other.allowSharpestCorners;
|
|
78
98
|
}
|
|
79
99
|
/**
|
|
80
100
|
* Parse a number or JointOptions up to JointOptions:
|
|
@@ -85,17 +105,22 @@ class JointOptions {
|
|
|
85
105
|
static create(leftOffsetDistanceOrOptions) {
|
|
86
106
|
if (leftOffsetDistanceOrOptions instanceof JointOptions)
|
|
87
107
|
return leftOffsetDistanceOrOptions;
|
|
88
|
-
// if (Number.isFinite(leftOffsetDistanceOrOptions))
|
|
89
108
|
return new JointOptions(leftOffsetDistanceOrOptions);
|
|
90
109
|
}
|
|
91
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
/** Return true if the options indicate this amount of turn should be handled with an arc. */
|
|
92
112
|
needArc(theta) {
|
|
93
113
|
return Math.abs(theta.degrees) >= this.minArcDegrees;
|
|
94
114
|
}
|
|
95
|
-
/**
|
|
115
|
+
/** Return the number of corners needed to chamfer the given turn angle. */
|
|
96
116
|
numChamferPoints(theta) {
|
|
97
117
|
const degrees = Math.abs(theta.degrees);
|
|
98
|
-
const
|
|
118
|
+
const minStepDegreesClamp = 10;
|
|
119
|
+
let maxStepDegreesClamp = 120;
|
|
120
|
+
if (this.allowSharpestCorners) {
|
|
121
|
+
maxStepDegreesClamp = this.maxChamferTurnDegrees;
|
|
122
|
+
}
|
|
123
|
+
const stepDegrees = Geometry_1.Geometry.clamp(this.maxChamferTurnDegrees, minStepDegreesClamp, maxStepDegreesClamp);
|
|
99
124
|
if (degrees <= stepDegrees)
|
|
100
125
|
return 1;
|
|
101
126
|
return Math.ceil(degrees / stepDegrees);
|
|
@@ -112,17 +137,41 @@ class OffsetOptions {
|
|
|
112
137
|
this.jointOptions = JointOptions.create(offsetDistanceOrOptions);
|
|
113
138
|
this.strokeOptions = (strokeOptions !== undefined) ? strokeOptions : StrokeOptions_1.StrokeOptions.createForCurves();
|
|
114
139
|
}
|
|
115
|
-
get minArcDegrees() {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
set
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
get
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
get minArcDegrees() {
|
|
141
|
+
return this.jointOptions.minArcDegrees;
|
|
142
|
+
}
|
|
143
|
+
set minArcDegrees(value) {
|
|
144
|
+
this.jointOptions.minArcDegrees = value;
|
|
145
|
+
}
|
|
146
|
+
get maxChamferTurnDegrees() {
|
|
147
|
+
return this.jointOptions.maxChamferTurnDegrees;
|
|
148
|
+
}
|
|
149
|
+
set maxChamferTurnDegrees(value) {
|
|
150
|
+
this.jointOptions.maxChamferTurnDegrees = value;
|
|
151
|
+
}
|
|
152
|
+
get allowSharpestCorners() {
|
|
153
|
+
return this.jointOptions.allowSharpestCorners;
|
|
154
|
+
}
|
|
155
|
+
set allowSharpestCorners(value) {
|
|
156
|
+
this.jointOptions.allowSharpestCorners = value;
|
|
157
|
+
}
|
|
158
|
+
get leftOffsetDistance() {
|
|
159
|
+
return this.jointOptions.leftOffsetDistance;
|
|
160
|
+
}
|
|
161
|
+
set leftOffsetDistance(value) {
|
|
162
|
+
this.jointOptions.leftOffsetDistance = value;
|
|
163
|
+
}
|
|
164
|
+
get preserveEllipticalArcs() {
|
|
165
|
+
return this.jointOptions.preserveEllipticalArcs;
|
|
166
|
+
}
|
|
167
|
+
set preserveEllipticalArcs(value) {
|
|
168
|
+
this.jointOptions.preserveEllipticalArcs = value;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Convert variant input into OffsetOptions.
|
|
124
172
|
* * If a JointOptions is provided, it is captured.
|
|
125
|
-
* * If an OffsetOptions is provided, a reference to it is returned.
|
|
173
|
+
* * If an OffsetOptions is provided, a reference to it is returned.
|
|
174
|
+
*/
|
|
126
175
|
static create(offsetDistanceOrOptions) {
|
|
127
176
|
if (offsetDistanceOrOptions instanceof OffsetOptions)
|
|
128
177
|
return offsetDistanceOrOptions;
|
|
@@ -152,7 +201,9 @@ class Joint {
|
|
|
152
201
|
this.swingPoint = swingPoint;
|
|
153
202
|
this.flexure = JointMode.Unknown;
|
|
154
203
|
}
|
|
155
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Try to construct an arc transition from ray0 to ray1 with given center.
|
|
206
|
+
*/
|
|
156
207
|
static constructArc(ray0, center, ray1) {
|
|
157
208
|
if (center !== undefined && Geometry_1.Geometry.isSameCoordinate(ray0.origin.distance(center), ray1.origin.distance(center))) {
|
|
158
209
|
const angle = ray0.direction.angleToXY(ray1.direction);
|
|
@@ -197,6 +248,7 @@ class Joint {
|
|
|
197
248
|
destination.packedPoints.push(point);
|
|
198
249
|
}
|
|
199
250
|
}
|
|
251
|
+
/** Append stroke points along the offset curve defined by the Joint chain to the destination line string. */
|
|
200
252
|
static collectStrokesFromChain(start, destination, maxTest = 100) {
|
|
201
253
|
let numOut = -2 * maxTest; // allow extra things to happen
|
|
202
254
|
Joint.visitJointsOnChain(start, (joint) => {
|
|
@@ -208,7 +260,7 @@ class Joint {
|
|
|
208
260
|
if (fA === 0.0 && fB === 1.0)
|
|
209
261
|
curve1 = joint.curve1.clone();
|
|
210
262
|
else if (fA < fB)
|
|
211
|
-
curve1 = joint.curve1.clonePartialCurve(fA, fB);
|
|
263
|
+
curve1 = joint.curve1.clonePartialCurve(fA, fB); // trimming is done by clonePartialCurve
|
|
212
264
|
if (curve1) {
|
|
213
265
|
if (!joint.jointCurve) {
|
|
214
266
|
this.addPoint(destination, curve1.startPoint());
|
|
@@ -248,6 +300,7 @@ class Joint {
|
|
|
248
300
|
}
|
|
249
301
|
}
|
|
250
302
|
}
|
|
303
|
+
/** Append CurvePrimitives along the offset curve defined by the Joint chain to the destination array. */
|
|
251
304
|
static collectCurvesFromChain(start, destination, maxTest = 100) {
|
|
252
305
|
if (start === undefined)
|
|
253
306
|
return;
|
|
@@ -262,13 +315,13 @@ class Joint {
|
|
|
262
315
|
if (fA === 0.0 && fB === 1.0)
|
|
263
316
|
curve1 = joint.curve1.clone();
|
|
264
317
|
else if (fA < fB)
|
|
265
|
-
curve1 = joint.curve1.clonePartialCurve(fA, fB);
|
|
318
|
+
curve1 = joint.curve1.clonePartialCurve(fA, fB); // trimming is done by clonePartialCurve
|
|
266
319
|
this.collectPrimitive(destination, curve1);
|
|
267
320
|
}
|
|
268
321
|
return numOut++ < maxTest;
|
|
269
322
|
}, maxTest);
|
|
270
323
|
}
|
|
271
|
-
/** Execute `joint.annotateJointMode()` at all joints on the chain. */
|
|
324
|
+
/** Execute `joint.annotateJointMode()` at all joints on the chain to set some of the joints attributes. */
|
|
272
325
|
static annotateChain(start, options, maxTest = 100) {
|
|
273
326
|
if (start)
|
|
274
327
|
Joint.visitJointsOnChain(start, (joint) => { joint.annotateJointMode(options); return true; }, maxTest);
|
|
@@ -276,7 +329,7 @@ class Joint {
|
|
|
276
329
|
/**
|
|
277
330
|
* Visit joints on a chain.
|
|
278
331
|
* * terminate on `false` return from `callback`
|
|
279
|
-
* @param start first (and, for cyclic chain, final)
|
|
332
|
+
* @param start first (and, for cyclic chain, final) joint
|
|
280
333
|
* @param callback function to call with each Joint as a single parameter.
|
|
281
334
|
*/
|
|
282
335
|
static visitJointsOnChain(start, callback, maxTest = 100) {
|
|
@@ -284,7 +337,7 @@ class Joint {
|
|
|
284
337
|
if (joint) {
|
|
285
338
|
let numTest = 0;
|
|
286
339
|
while (joint !== undefined) {
|
|
287
|
-
if (numTest++ >= maxTest + 5)
|
|
340
|
+
if (numTest++ >= maxTest + 5) // allow extra things to happen
|
|
288
341
|
return true;
|
|
289
342
|
if (!callback(joint))
|
|
290
343
|
return false;
|
|
@@ -300,13 +353,13 @@ class Joint {
|
|
|
300
353
|
if (this.curve0 && this.curve1) {
|
|
301
354
|
const ray0 = this.curve0.fractionToPointAndDerivative(1.0);
|
|
302
355
|
const ray1 = this.curve1.fractionToPointAndDerivative(0.0);
|
|
303
|
-
const intersection = Ray3d_1.Ray3d.closestApproachRay3dRay3d(ray0, ray1);
|
|
356
|
+
const intersection = Ray3d_1.Ray3d.closestApproachRay3dRay3d(ray0, ray1); // intersection of the 2 ray lines
|
|
304
357
|
if (intersection.approachType === CurveLocationDetail_1.CurveCurveApproachType.Intersection) {
|
|
305
358
|
if (intersection.detailA.fraction >= 0.0 && intersection.detailB.fraction <= 0.0) {
|
|
306
359
|
this.fraction0 = 1.0;
|
|
307
360
|
this.fraction1 = 0.0;
|
|
308
361
|
this.flexure = JointMode.Extend;
|
|
309
|
-
const theta = ray0.getDirectionRef().angleToXY(ray1.getDirectionRef());
|
|
362
|
+
const theta = ray0.getDirectionRef().angleToXY(ray1.getDirectionRef()); // angle between the 2 ray lines
|
|
310
363
|
if (options.needArc(theta)) {
|
|
311
364
|
const arc = Joint.constructArc(ray0, this.curve0.baseCurveEnd, ray1);
|
|
312
365
|
if (arc) {
|
|
@@ -314,13 +367,12 @@ class Joint {
|
|
|
314
367
|
return;
|
|
315
368
|
}
|
|
316
369
|
}
|
|
317
|
-
const numChamferPoints = options.numChamferPoints(theta);
|
|
318
|
-
if (numChamferPoints <= 1) {
|
|
370
|
+
const numChamferPoints = options.numChamferPoints(theta); // how many interior points in the linestring
|
|
371
|
+
if (numChamferPoints <= 1) { // create sharp corner
|
|
319
372
|
this.jointCurve = LineString3d_1.LineString3d.create(ray0.origin, intersection.detailA.point, ray1.origin);
|
|
320
373
|
return;
|
|
321
374
|
}
|
|
322
|
-
if (numChamferPoints > 1) {
|
|
323
|
-
// A nontrivial linestring ...
|
|
375
|
+
if (numChamferPoints > 1) { // create chamfer corner (a line string)
|
|
324
376
|
const radians0 = theta.radians;
|
|
325
377
|
const numHalfStep = 2.0 * numChamferPoints;
|
|
326
378
|
const halfStepRadians = radians0 / numHalfStep;
|
|
@@ -340,19 +392,20 @@ class Joint {
|
|
|
340
392
|
}
|
|
341
393
|
}
|
|
342
394
|
}
|
|
343
|
-
//
|
|
395
|
+
// if there is no intersection between the 2 ray lines, fill the gap by a line segment
|
|
344
396
|
this.flexure = JointMode.Gap;
|
|
345
397
|
this.jointCurve = LineSegment3d_1.LineSegment3d.create(this.curve0.fractionToPoint(1.0), this.curve1.fractionToPoint(0.0));
|
|
346
398
|
this.fraction0 = 1.0;
|
|
347
399
|
this.fraction1 = 0.0;
|
|
348
400
|
}
|
|
349
401
|
}
|
|
350
|
-
|
|
402
|
+
/** Select the index at which summed fraction difference is smallest */
|
|
351
403
|
selectIntersectionIndexByFraction(fractionA, fractionB, intersections) {
|
|
352
404
|
let index = -1;
|
|
353
405
|
let aMin = Number.MAX_VALUE;
|
|
354
406
|
for (let i = 0; i < intersections.length; i++) {
|
|
355
|
-
const a = Math.abs(intersections[i].detailA.fraction - fractionA)
|
|
407
|
+
const a = Math.abs(intersections[i].detailA.fraction - fractionA)
|
|
408
|
+
+ Math.abs(intersections[i].detailB.fraction - fractionB);
|
|
356
409
|
if (a < aMin) {
|
|
357
410
|
aMin = a;
|
|
358
411
|
index = i;
|
|
@@ -361,42 +414,42 @@ class Joint {
|
|
|
361
414
|
return index;
|
|
362
415
|
}
|
|
363
416
|
/**
|
|
364
|
-
* Examine the adjacent geometry
|
|
365
|
-
* * set JointMode:
|
|
417
|
+
* Examine the adjacent geometry to set some of joint attributes:
|
|
418
|
+
* * set JointMode: one of Cap, Extend, or Trim
|
|
366
419
|
* * set fraction0 and fraction1 of intersection of curve0 and curve1
|
|
420
|
+
* * set joint curve
|
|
367
421
|
* * this REFERENCES curve0, curve1, fraction0, fraction1
|
|
368
422
|
* * this does not reference nextJoint and previousJoint
|
|
369
423
|
*/
|
|
370
424
|
annotateJointMode(options) {
|
|
371
|
-
if (this.curve0 &&
|
|
425
|
+
if (!this.curve0 && this.curve1) { // joint at the start of the chain
|
|
372
426
|
this.flexure = JointMode.Cap;
|
|
373
|
-
this.
|
|
427
|
+
this.fraction1 = 0.0;
|
|
374
428
|
}
|
|
375
|
-
else if (this.
|
|
429
|
+
else if (this.curve0 && !this.curve1) { // joint at the end of the chain
|
|
376
430
|
this.flexure = JointMode.Cap;
|
|
377
|
-
this.
|
|
431
|
+
this.fraction0 = 1.0;
|
|
378
432
|
}
|
|
379
|
-
else if (this.curve0 && this.curve1) {
|
|
380
|
-
|
|
381
|
-
if (this.curve0.endPoint().isAlmostEqual(this.curve1.startPoint())) {
|
|
433
|
+
else if (this.curve0 && this.curve1) { // joints at the middle of the chain
|
|
434
|
+
if (this.curve0.endPoint().isAlmostEqual(this.curve1.startPoint())) { // joint between colinear segments
|
|
382
435
|
this.fraction0 = 1.0;
|
|
383
436
|
this.fraction1 = 0.0;
|
|
384
437
|
this.flexure = JointMode.Trim;
|
|
385
438
|
}
|
|
386
|
-
else if (this.curve0 instanceof LineSegment3d_1.LineSegment3d && this.curve1 instanceof LineSegment3d_1.LineSegment3d) {
|
|
387
|
-
const ray0 = this.curve0.fractionToPointAndDerivative(0.0);
|
|
388
|
-
const ray1 = this.curve1.fractionToPointAndDerivative(0.0);
|
|
389
|
-
const intersection = Ray3d_1.Ray3d.closestApproachRay3dRay3d(ray0, ray1);
|
|
439
|
+
else if (this.curve0 instanceof LineSegment3d_1.LineSegment3d && this.curve1 instanceof LineSegment3d_1.LineSegment3d) { // pair of lines
|
|
440
|
+
const ray0 = this.curve0.fractionToPointAndDerivative(0.0);
|
|
441
|
+
const ray1 = this.curve1.fractionToPointAndDerivative(0.0);
|
|
442
|
+
const intersection = Ray3d_1.Ray3d.closestApproachRay3dRay3d(ray0, ray1); // intersection of the 2 ray lines
|
|
390
443
|
if (intersection.approachType === CurveLocationDetail_1.CurveCurveApproachType.Intersection) {
|
|
391
444
|
this.fraction0 = intersection.detailA.fraction;
|
|
392
445
|
this.fraction1 = intersection.detailB.fraction;
|
|
393
|
-
if (this.fraction0 >= 1.0 && this.fraction1 <= 0.0) {
|
|
446
|
+
if (this.fraction0 >= 1.0 && this.fraction1 <= 0.0) { // need to extend
|
|
394
447
|
this.annotateExtension(options);
|
|
395
448
|
}
|
|
396
|
-
else if (this.fraction0 < 1.0 && this.fraction1 > 0.0) {
|
|
449
|
+
else if (this.fraction0 < 1.0 && this.fraction1 > 0.0) { // need to trim
|
|
397
450
|
this.flexure = JointMode.Trim;
|
|
398
451
|
}
|
|
399
|
-
else if (this.fraction0 > 1.0 && this.fraction1 > 1.0) {
|
|
452
|
+
else if (this.fraction0 > 1.0 && this.fraction1 > 1.0) { // need to fill gap with a single line segment
|
|
400
453
|
this.flexure = JointMode.Gap;
|
|
401
454
|
this.jointCurve = LineSegment3d_1.LineSegment3d.create(this.curve0.fractionToPoint(1.0), this.curve1.fractionToPoint(0.0));
|
|
402
455
|
this.fraction0 = 1.0;
|
|
@@ -404,15 +457,15 @@ class Joint {
|
|
|
404
457
|
}
|
|
405
458
|
}
|
|
406
459
|
}
|
|
407
|
-
else { // generic pair of curves
|
|
460
|
+
else { // generic pair of curves
|
|
408
461
|
const intersections = CurveCurve_1.CurveCurve.intersectionXYPairs(this.curve0, false, this.curve1, false);
|
|
409
462
|
const intersectionIndex = this.selectIntersectionIndexByFraction(1.0, 0.0, intersections);
|
|
410
|
-
if (intersectionIndex >= 0) {
|
|
463
|
+
if (intersectionIndex >= 0) { // need to trim
|
|
411
464
|
this.flexure = JointMode.Trim;
|
|
412
465
|
this.fraction0 = intersections[intersectionIndex].detailA.fraction;
|
|
413
466
|
this.fraction1 = intersections[intersectionIndex].detailB.fraction;
|
|
414
467
|
}
|
|
415
|
-
else {
|
|
468
|
+
else { // need to extend
|
|
416
469
|
this.annotateExtension(options);
|
|
417
470
|
}
|
|
418
471
|
}
|
|
@@ -420,7 +473,8 @@ class Joint {
|
|
|
420
473
|
}
|
|
421
474
|
/**
|
|
422
475
|
* * Examine the primitive trim fractions between each pair of joints.
|
|
423
|
-
* * If trim fractions indicate the primitive must disappear, replace the joint pair by a new joint pointing at
|
|
476
|
+
* * If trim fractions indicate the primitive must disappear, replace the joint pair by a new joint pointing at
|
|
477
|
+
* surrounding primitives
|
|
424
478
|
* @param start
|
|
425
479
|
*/
|
|
426
480
|
static removeDegeneratePrimitives(start, options, maxTest) {
|
|
@@ -455,8 +509,7 @@ class Joint {
|
|
|
455
509
|
}
|
|
456
510
|
*/
|
|
457
511
|
const eliminateF = f0 >= f1 || f0 > 1.0;
|
|
458
|
-
const eliminateG = (g0 !== undefined && g0 > 1.0)
|
|
459
|
-
|| (g0 !== undefined && g1 !== undefined && g0 >= g1);
|
|
512
|
+
const eliminateG = (g0 !== undefined && g0 > 1.0) || (g0 !== undefined && g1 !== undefined && g0 >= g1);
|
|
460
513
|
if (eliminateF && eliminateG) {
|
|
461
514
|
const jointC = jointB.nextJoint;
|
|
462
515
|
const newJoint = new Joint(jointA.curve0, jointC.curve1, undefined);
|
|
@@ -512,9 +565,8 @@ class Joint {
|
|
|
512
565
|
* @internal
|
|
513
566
|
*/
|
|
514
567
|
class PolygonWireOffsetContext {
|
|
515
|
-
/**
|
|
516
|
-
constructor() {
|
|
517
|
-
}
|
|
568
|
+
/** Construct a context. */
|
|
569
|
+
constructor() { }
|
|
518
570
|
// Construct a single offset from base points
|
|
519
571
|
static createOffsetSegment(basePointA, basePointB, distance) {
|
|
520
572
|
Point3dVector3d_1.Vector3d.createStartEnd(basePointA, basePointB, this._unitAlong);
|
|
@@ -527,13 +579,25 @@ class PolygonWireOffsetContext {
|
|
|
527
579
|
return undefined;
|
|
528
580
|
}
|
|
529
581
|
/**
|
|
530
|
-
* Construct
|
|
531
|
-
*
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
582
|
+
* Construct a wire (not area) that is offset from given polyline or polygon (which must be in xy-plane or in
|
|
583
|
+
* a plane parallel to xy-plane).
|
|
584
|
+
* * This is a simple wire offset (in the form of a line string), not an area.
|
|
585
|
+
* * If offsetDistance is given as a number, default OffsetOptions are applied.
|
|
586
|
+
* * See [[JointOptions]] class doc for offset construction rules.
|
|
587
|
+
* @param points a single loop or path
|
|
588
|
+
* @param wrap true to offset the wraparound joint. Assumes first = last point.
|
|
589
|
+
* @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or JointOptions
|
|
590
|
+
* object.
|
|
535
591
|
*/
|
|
536
592
|
constructPolygonWireXYOffset(points, wrap, leftOffsetDistanceOrOptions) {
|
|
593
|
+
/**
|
|
594
|
+
* if "wrap = true", then first and last point in the points array must be close; otherwise
|
|
595
|
+
* generated offset will be invalid.
|
|
596
|
+
*/
|
|
597
|
+
if (wrap && !points[0].isAlmostEqual(points[points.length - 1])) {
|
|
598
|
+
wrap = false;
|
|
599
|
+
}
|
|
600
|
+
/** create raw offsets as a linked list (joint0) */
|
|
537
601
|
const options = JointOptions.create(leftOffsetDistanceOrOptions);
|
|
538
602
|
const numPoints = points.length;
|
|
539
603
|
let fragment0 = PolygonWireOffsetContext.createOffsetSegment(points[0], points[1], options.leftOffsetDistance);
|
|
@@ -553,7 +617,9 @@ class PolygonWireOffsetContext {
|
|
|
553
617
|
newJoint = new Joint(fragment0, undefined, points[numPoints - 1]);
|
|
554
618
|
Joint.link(previousJoint, newJoint);
|
|
555
619
|
}
|
|
620
|
+
/** annotateChain sets some of the joints attributes (including how to extend curves or fill the gap between curves) */
|
|
556
621
|
Joint.annotateChain(joint0, options, numPoints);
|
|
622
|
+
/** make limited passes through the Joint chain until no self-intersections are removed */
|
|
557
623
|
for (let pass = 0; pass++ < 5;) {
|
|
558
624
|
const state = Joint.removeDegeneratePrimitives(joint0, options, numPoints);
|
|
559
625
|
joint0 = state.newStart;
|
|
@@ -567,6 +633,7 @@ class PolygonWireOffsetContext {
|
|
|
567
633
|
*/
|
|
568
634
|
}
|
|
569
635
|
// Joint.collectPrimitivesFromChain(joint0, result, numPoints);
|
|
636
|
+
/** turn the Joint linked list into a CurveCollection (Loop or Path). trimming is done in collectStrokesFromChain */
|
|
570
637
|
const chain = LineString3d_1.LineString3d.create();
|
|
571
638
|
Joint.collectStrokesFromChain(joint0, chain, numPoints);
|
|
572
639
|
const n = chain.packedPoints.length;
|
|
@@ -590,14 +657,13 @@ exports.PolygonWireOffsetContext = PolygonWireOffsetContext;
|
|
|
590
657
|
*/
|
|
591
658
|
class CurveChainWireOffsetContext {
|
|
592
659
|
/** construct a context. */
|
|
593
|
-
constructor() {
|
|
594
|
-
}
|
|
660
|
+
constructor() { }
|
|
595
661
|
/**
|
|
596
662
|
* Annotate a CurvePrimitive with properties `baseCurveStart` and `baseCurveEnd`.
|
|
597
|
-
*
|
|
598
|
-
* @param cp primitive to annotate
|
|
663
|
+
* @param cp curve primitive to annotate
|
|
599
664
|
* @param startPoint optional start point
|
|
600
665
|
* @param endPoint optional end point
|
|
666
|
+
* @return the input CurvePrimitive with annotations
|
|
601
667
|
*/
|
|
602
668
|
static applyBasePoints(cp, startPoint, endPoint) {
|
|
603
669
|
if (cp !== undefined) {
|
|
@@ -609,7 +675,7 @@ class CurveChainWireOffsetContext {
|
|
|
609
675
|
return cp;
|
|
610
676
|
}
|
|
611
677
|
/**
|
|
612
|
-
* Create the offset of a single primitive.
|
|
678
|
+
* Create the offset of a single primitive as viewed in the xy-plane (ignoring z).
|
|
613
679
|
* * each primitive may be labeled (as an `any` object) with start or end point of base curve:
|
|
614
680
|
* * `(primitive as any).baseCurveStart: Point3d`
|
|
615
681
|
* * `(primitive as any).baseCurveEnd: Point3d`
|
|
@@ -633,15 +699,10 @@ class CurveChainWireOffsetContext {
|
|
|
633
699
|
}
|
|
634
700
|
/**
|
|
635
701
|
* Construct curves that are offset from a Path or Loop as viewed in xy-plane (ignoring z).
|
|
636
|
-
* * The construction will remove "some" local effects of features smaller than the offset distance, but will
|
|
702
|
+
* * The construction will remove "some" local effects of features smaller than the offset distance, but will
|
|
703
|
+
* not detect self intersection among widely separated edges.
|
|
637
704
|
* * If offsetDistance is given as a number, default OffsetOptions are applied.
|
|
638
|
-
* *
|
|
639
|
-
* * If the turn is larger than `options.minArcDegrees`, a circular arc is constructed.
|
|
640
|
-
* * If the turn is less than or equal to `options.maxChamferTurnDegrees`, extend curves along tangent to single intersection point.
|
|
641
|
-
* * If the turn is larger than `options.maxChamferDegrees`, the turn is constructed as a sequence of straight lines that are:
|
|
642
|
-
* * outside the arc
|
|
643
|
-
* * have uniform turn angle less than `options.maxChamferDegrees`
|
|
644
|
-
* * each line segment (except first and last) touches the arc at its midpoint.
|
|
705
|
+
* * See [[JointOptions]] class doc for offset construction rules.
|
|
645
706
|
* @param curves base curves.
|
|
646
707
|
* @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or options object.
|
|
647
708
|
*/
|
|
@@ -649,14 +710,15 @@ class CurveChainWireOffsetContext {
|
|
|
649
710
|
const wrap = curves instanceof Loop_1.Loop;
|
|
650
711
|
const offsetOptions = OffsetOptions.create(offsetDistanceOrOptions);
|
|
651
712
|
const simpleOffsets = [];
|
|
652
|
-
|
|
713
|
+
/** traverse primitives (children of curves) and create simple offsets of each primitive as an array */
|
|
653
714
|
for (const c of curves.children) {
|
|
654
715
|
const c1 = CurveChainWireOffsetContext.createSingleOffsetPrimitiveXY(c, offsetOptions);
|
|
655
716
|
if (c1 === undefined) {
|
|
656
717
|
// bad .. maybe arc to inside?
|
|
657
718
|
}
|
|
658
|
-
else if (c1 instanceof CurvePrimitive_1.CurvePrimitive)
|
|
719
|
+
else if (c1 instanceof CurvePrimitive_1.CurvePrimitive) {
|
|
659
720
|
simpleOffsets.push(c1);
|
|
721
|
+
}
|
|
660
722
|
else if (Array.isArray(c1)) {
|
|
661
723
|
for (const c2 of c1) {
|
|
662
724
|
if (c2 instanceof CurvePrimitive_1.CurvePrimitive)
|
|
@@ -664,6 +726,7 @@ class CurveChainWireOffsetContext {
|
|
|
664
726
|
}
|
|
665
727
|
}
|
|
666
728
|
}
|
|
729
|
+
/** create joints between array elements to make offsets as a linked list (joint0) */
|
|
667
730
|
let fragment0;
|
|
668
731
|
let newJoint;
|
|
669
732
|
let previousJoint;
|
|
@@ -682,8 +745,10 @@ class CurveChainWireOffsetContext {
|
|
|
682
745
|
}
|
|
683
746
|
if (joint0 && previousJoint && curves instanceof Loop_1.Loop)
|
|
684
747
|
Joint.link(previousJoint, joint0);
|
|
748
|
+
/** annotateChain sets some of the joints attributes (including how to extend curves or fill the gap between curves) */
|
|
685
749
|
const numOffset = simpleOffsets.length;
|
|
686
750
|
Joint.annotateChain(joint0, offsetOptions.jointOptions, numOffset);
|
|
751
|
+
/** turn the Joint linked list into a CurveCollection. trimming is done in collectCurvesFromChain */
|
|
687
752
|
const outputCurves = [];
|
|
688
753
|
Joint.collectCurvesFromChain(joint0, outputCurves, numOffset);
|
|
689
754
|
return RegionOps_1.RegionOps.createLoopPathOrBagOfCurves(outputCurves, wrap, true);
|