@itwin/core-geometry 5.8.0-dev.9 → 5.9.0-dev.1
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 +6 -1
- package/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.d.ts +24 -14
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +34 -14
- 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 +1 -0
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +4 -0
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +14 -0
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/ConstrainedCurve2d.d.ts +149 -0
- package/lib/cjs/curve/ConstrainedCurve2d.d.ts.map +1 -0
- package/lib/cjs/curve/ConstrainedCurve2d.js +317 -0
- package/lib/cjs/curve/ConstrainedCurve2d.js.map +1 -0
- package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +2 -2
- package/lib/cjs/curve/CurvePrimitive.js +2 -2
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveTypes.js.map +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/OffsetOptions.js.map +1 -1
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/PointString3d.js.map +1 -1
- 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.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.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/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.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/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
- 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.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PointToCurveTangentHandler.d.ts +26 -0
- package/lib/cjs/curve/internalContexts/PointToCurveTangentHandler.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/PointToCurveTangentHandler.js +78 -0
- package/lib/cjs/curve/internalContexts/PointToCurveTangentHandler.js.map +1 -0
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.d.ts +152 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.js +843 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.js.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ConstraintSet.d.ts +97 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ConstraintSet.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ConstraintSet.js +300 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ConstraintSet.js.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2d.d.ts +105 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2d.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2d.js +141 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2d.js.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.d.ts +27 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.js +152 -0
- package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.js.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedCircle2d.d.ts +81 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedCircle2d.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedCircle2d.js +170 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedCircle2d.js.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedEllipse2d.d.ts +96 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedEllipse2d.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedEllipse2d.js +187 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedEllipse2d.js.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedHyperbola2d.d.ts +91 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedHyperbola2d.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedHyperbola2d.js +197 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedHyperbola2d.js.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedLine2d.d.ts +129 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedLine2d.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedLine2d.js +208 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedLine2d.js.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedParabola2d.d.ts +87 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedParabola2d.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedParabola2d.js +193 -0
- package/lib/cjs/curve/internalContexts/geometry2d/UnboundedParabola2d.js.map +1 -0
- 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.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.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts +7 -0
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +9 -0
- 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.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.js.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.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +8 -6
- 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/SmallSystem.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/IndexedPolyfaceWalker.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/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.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/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/serialization/SerializationHelpers.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.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +3 -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/Voronoi.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.d.ts +24 -14
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +34 -14
- 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 +1 -0
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +4 -0
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +14 -0
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/ConstrainedCurve2d.d.ts +149 -0
- package/lib/esm/curve/ConstrainedCurve2d.d.ts.map +1 -0
- package/lib/esm/curve/ConstrainedCurve2d.js +313 -0
- package/lib/esm/curve/ConstrainedCurve2d.js.map +1 -0
- package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +2 -2
- package/lib/esm/curve/CurvePrimitive.js +2 -2
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveTypes.js.map +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/OffsetOptions.js.map +1 -1
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/PointString3d.js.map +1 -1
- 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.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/ChainCollectorContext.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/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.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/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
- 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.js.map +1 -1
- package/lib/esm/curve/internalContexts/PointToCurveTangentHandler.d.ts +26 -0
- package/lib/esm/curve/internalContexts/PointToCurveTangentHandler.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/PointToCurveTangentHandler.js +74 -0
- package/lib/esm/curve/internalContexts/PointToCurveTangentHandler.js.map +1 -0
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.d.ts +152 -0
- package/lib/esm/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.js +839 -0
- package/lib/esm/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.js.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/ConstraintSet.d.ts +97 -0
- package/lib/esm/curve/internalContexts/geometry2d/ConstraintSet.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/ConstraintSet.js +295 -0
- package/lib/esm/curve/internalContexts/geometry2d/ConstraintSet.js.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2d.d.ts +105 -0
- package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2d.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2d.js +135 -0
- package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2d.js.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.d.ts +27 -0
- package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.js +148 -0
- package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.js.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedCircle2d.d.ts +81 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedCircle2d.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedCircle2d.js +166 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedCircle2d.js.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedEllipse2d.d.ts +96 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedEllipse2d.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedEllipse2d.js +183 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedEllipse2d.js.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedHyperbola2d.d.ts +91 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedHyperbola2d.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedHyperbola2d.js +193 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedHyperbola2d.js.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedLine2d.d.ts +129 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedLine2d.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedLine2d.js +204 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedLine2d.js.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedParabola2d.d.ts +87 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedParabola2d.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedParabola2d.js +189 -0
- package/lib/esm/curve/internalContexts/geometry2d/UnboundedParabola2d.js.map +1 -0
- 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.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.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts +7 -0
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +9 -0
- 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.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.js.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.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +8 -6
- 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/SmallSystem.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/IndexedPolyfaceWalker.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/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.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/IModelJsonSchema.js.map +1 -1
- package/lib/esm/serialization/SerializationHelpers.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.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js +3 -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/Voronoi.js.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module CartesianGeometry
|
|
3
|
+
*/
|
|
4
|
+
import { Arc3d } from "./Arc3d";
|
|
5
|
+
import { CurveLocationDetailPair } from "./CurveLocationDetail";
|
|
6
|
+
import { LineSegment3d } from "./LineSegment3d";
|
|
7
|
+
/**
|
|
8
|
+
* The class has static methods to compute circles and lines with specified constrained (tangent to other lines/circles,
|
|
9
|
+
* perpendicular to other lines/circles, or a specified circle radius).
|
|
10
|
+
* * z components of the input curves are completely ignored.
|
|
11
|
+
* * In this API, a `LineSegment3d` input identifies the underlying unbounded line by its endpoints. The segment
|
|
12
|
+
* itself is bounded, but the geometric line constraint is applied as unbounded.
|
|
13
|
+
* * Each API not only returns the circles or lines that satisfy the constraints but also captures the input curve
|
|
14
|
+
* location details where the tangency/perpendicularity happens. Each returned element contains:
|
|
15
|
+
* * the curve (circle or line) that satisfies the constraints.
|
|
16
|
+
* * an array of {@link CurveLocationDetailPair} objects, where each pair holds:
|
|
17
|
+
* * `detailA`: the result curve with the contact point and fraction on the curve.
|
|
18
|
+
* * `detailB`: the input constraint curve with the same contact point and fraction on the constraint curve.
|
|
19
|
+
* @alpha
|
|
20
|
+
*/
|
|
21
|
+
export declare class ConstrainedCurve2d {
|
|
22
|
+
/**
|
|
23
|
+
* Return all (i.e., up to 4) circles that are tangent to 3 given lines plus data about tangent points/fractions.
|
|
24
|
+
* @param lineA first line
|
|
25
|
+
* @param lineB second line
|
|
26
|
+
* @param lineC third line
|
|
27
|
+
*/
|
|
28
|
+
static circlesTangentLineLineLine(lineA: LineSegment3d, lineB: LineSegment3d, lineC: LineSegment3d): {
|
|
29
|
+
curve: Arc3d;
|
|
30
|
+
details: CurveLocationDetailPair[];
|
|
31
|
+
}[] | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Return all (i.e., up to 2) unbounded lines perpendicular to a line and tangent to a circle plus data about
|
|
34
|
+
* perp/tangent points/fractions.
|
|
35
|
+
* @param line the line
|
|
36
|
+
* @param circle the circle
|
|
37
|
+
*/
|
|
38
|
+
static linesPerpLineTangentCircle(line: LineSegment3d, circle: Arc3d): {
|
|
39
|
+
curve: LineSegment3d;
|
|
40
|
+
details: CurveLocationDetailPair[];
|
|
41
|
+
}[] | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Return all (i.e., 4) variants of the line perpendicular to 2 circles (line between centers, with ends at
|
|
44
|
+
* crossing points on respective circles) plus data about perp points/fractions.
|
|
45
|
+
* @param circleA first circle
|
|
46
|
+
* @param circleB second circle
|
|
47
|
+
*/
|
|
48
|
+
static linesPerpCirclePerpCircle(circleA: Arc3d, circleB: Arc3d): {
|
|
49
|
+
curve: LineSegment3d;
|
|
50
|
+
details: CurveLocationDetailPair[];
|
|
51
|
+
}[] | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Return all (i.e., up to 2) unbounded lines perpendicular to a line and a circle plus data about perp points/fractions.
|
|
54
|
+
* @param line the line
|
|
55
|
+
* @param circle the circle
|
|
56
|
+
*/
|
|
57
|
+
static linesPerpLinePerpCircle(line: LineSegment3d, circle: Arc3d): {
|
|
58
|
+
curve: LineSegment3d;
|
|
59
|
+
details: CurveLocationDetailPair[];
|
|
60
|
+
}[] | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Return all (i.e., up to 4) unbounded lines perpendicular to a circle and tangent to a circle plus data about
|
|
63
|
+
* perp/tangent points/fractions.
|
|
64
|
+
* Note that multiple colinear lines are returned tagged with diametrically opposing points of circleA.
|
|
65
|
+
* @param circleA first circle (for perpendicular constraint)
|
|
66
|
+
* @param circleB second circle (for tangent constraint)
|
|
67
|
+
*/
|
|
68
|
+
static linesPerpCircleTangentCircle(circleA: Arc3d, circleB: Arc3d): {
|
|
69
|
+
curve: LineSegment3d;
|
|
70
|
+
details: CurveLocationDetailPair[];
|
|
71
|
+
}[] | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Return all (i.e., up to 4) unbounded lines tangent to 2 circles plus data about tangent points/fractions.
|
|
74
|
+
* * There are 4 lines if there is neither intersection nor containment between the circles
|
|
75
|
+
* * There are 2 lines if the circles intersect
|
|
76
|
+
* * There are no lines if one circle is entirely inside the other.
|
|
77
|
+
* @param circleA first circle
|
|
78
|
+
* @param circleB second circle
|
|
79
|
+
*/
|
|
80
|
+
static linesTangentCircleCircle(circleA: Arc3d, circleB: Arc3d): {
|
|
81
|
+
curve: LineSegment3d;
|
|
82
|
+
details: CurveLocationDetailPair[];
|
|
83
|
+
}[] | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Return all (i.e., up to 8) circles tangent to two lines and a circle plus data about tangent points/fractions.
|
|
86
|
+
* @param lineA first line
|
|
87
|
+
* @param lineB second line
|
|
88
|
+
* @param circle the circle
|
|
89
|
+
*/
|
|
90
|
+
static circlesTangentLineLineCircle(lineA: LineSegment3d, lineB: LineSegment3d, circle: Arc3d): {
|
|
91
|
+
curve: Arc3d;
|
|
92
|
+
details: CurveLocationDetailPair[];
|
|
93
|
+
}[] | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Return all (i.e., up to 4) circles tangent to 2 circles and a line plus data about tangent points/fractions.
|
|
96
|
+
* @param circleA first circle
|
|
97
|
+
* @param circleB second circle
|
|
98
|
+
* @param line the line
|
|
99
|
+
*/
|
|
100
|
+
static circlesTangentCircleCircleLine(circleA: Arc3d, circleB: Arc3d, line: LineSegment3d): {
|
|
101
|
+
curve: Arc3d;
|
|
102
|
+
details: CurveLocationDetailPair[];
|
|
103
|
+
}[] | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Return all (i.e., up to 8) circles tangent to 3 circles plus data about tangent points/fractions.
|
|
106
|
+
* @param circleA first circle
|
|
107
|
+
* @param circleB second circle
|
|
108
|
+
* @param circleC third circle
|
|
109
|
+
*/
|
|
110
|
+
static circlesTangentCircleCircleCircle(circleA: Arc3d, circleB: Arc3d, circleC: Arc3d): {
|
|
111
|
+
curve: Arc3d;
|
|
112
|
+
details: CurveLocationDetailPair[];
|
|
113
|
+
}[] | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Compute circles of specified radius tangent to each of the lines plus data about tangent points/fractions.
|
|
116
|
+
* * There are normally 4 circles.
|
|
117
|
+
* * Returns undefined when the lines are parallel.
|
|
118
|
+
* @param lineA first line
|
|
119
|
+
* @param lineB second line
|
|
120
|
+
* @param radius radius of tangent circles.
|
|
121
|
+
*/
|
|
122
|
+
static circlesTangentLineLineRadius(lineA: LineSegment3d, lineB: LineSegment3d, radius: number): {
|
|
123
|
+
curve: Arc3d;
|
|
124
|
+
details: CurveLocationDetailPair[];
|
|
125
|
+
}[] | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* Compute circles of specified radius tangent to both a circle and a line plus data about tangent points/fractions.
|
|
128
|
+
* * There can be 0 to 8 circles.
|
|
129
|
+
* @param circle the circle
|
|
130
|
+
* @param line the line
|
|
131
|
+
* @param radius radius of tangent circles
|
|
132
|
+
*/
|
|
133
|
+
static circlesTangentCircleLineRadius(circle: Arc3d, line: LineSegment3d, radius: number): {
|
|
134
|
+
curve: Arc3d;
|
|
135
|
+
details: CurveLocationDetailPair[];
|
|
136
|
+
}[] | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Compute circles of specified radius tangent to both circles plus data about tangent points/fractions.
|
|
139
|
+
* * There can be 0 to 8 circles.
|
|
140
|
+
* @param circleA the first circle
|
|
141
|
+
* @param circleB the second circle
|
|
142
|
+
* @param radius radius of tangent circles
|
|
143
|
+
*/
|
|
144
|
+
static circlesTangentCircleCircleRadius(circleA: Arc3d, circleB: Arc3d, radius: number): {
|
|
145
|
+
curve: Arc3d;
|
|
146
|
+
details: CurveLocationDetailPair[];
|
|
147
|
+
}[] | undefined;
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=ConstrainedCurve2d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConstrainedCurve2d.d.ts","sourceRoot":"","sources":["../../../src/curve/ConstrainedCurve2d.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAuB,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAOrF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;;;;;;;GAaG;AACH,qBAAa,kBAAkB;IAC7B;;;;;OAKG;WACW,0BAA0B,CACtC,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,aAAa,GACnB;QAAE,KAAK,E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EAAE,KAAK,EACd,IAAI,EAAE,aAAa,GAClB;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,uBAAuB,EAAE,CAAA;KAAE,EAAE,GAAG,SAAS;IAerE;;;;;OAKG;WACW,gCAAgC,CAC5C,OAAO,EAAE,KAAK,EACd,OAAO,EAAE,KAAK,EACd,OAAO,EAAE,KAAK,GACb;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,uBAAuB,EAAE,CAAA;KAAE,EAAE,GAAG,SAAS;IAerE;;;;;;;OAOG;WACW,4BAA4B,CACxC,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,MAAM,GACb;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,uBAAuB,EAAE,CAAA;KAAE,EAAE,GAAG,SAAS;IAWrE;;;;;;OAMG;WACW,8BAA8B,CAC1C,MAAM,EAAE,KAAK,EACb,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,MAAM,GACb;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,uBAAuB,EAAE,CAAA;KAAE,EAAE,GAAG,SAAS;IAarE;;;;;;OAMG;WACW,gCAAgC,CAC5C,OAAO,EAAE,KAAK,EACd,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,MAAM,GACb;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,uBAAuB,EAAE,CAAA;KAAE,EAAE,GAAG,SAAS;CAatE"}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module CartesianGeometry
|
|
7
|
+
*/
|
|
8
|
+
import { Geometry } from "../Geometry";
|
|
9
|
+
import { Point3d } from "../geometry3d/Point3dVector3d";
|
|
10
|
+
import { Arc3d } from "./Arc3d";
|
|
11
|
+
import { CurveLocationDetailPair } from "./CurveLocationDetail";
|
|
12
|
+
import { ConstrainedImplicitCurve2d } from "./internalContexts/geometry2d/ConstrainedImplicitCurve2d";
|
|
13
|
+
import { ImplicitCurve2dConverter } from "./internalContexts/geometry2d/ImplicitCurve2dConverter";
|
|
14
|
+
import { UnboundedCircle2dByCenterAndRadius } from "./internalContexts/geometry2d/UnboundedCircle2d";
|
|
15
|
+
import { UnboundedLine2dByPointAndNormal } from "./internalContexts/geometry2d/UnboundedLine2d";
|
|
16
|
+
import { LineSegment3d } from "./LineSegment3d";
|
|
17
|
+
/**
|
|
18
|
+
* The class has static methods to compute circles and lines with specified constrained (tangent to other lines/circles,
|
|
19
|
+
* perpendicular to other lines/circles, or a specified circle radius).
|
|
20
|
+
* * z components of the input curves are completely ignored.
|
|
21
|
+
* * In this API, a `LineSegment3d` input identifies the underlying unbounded line by its endpoints. The segment
|
|
22
|
+
* itself is bounded, but the geometric line constraint is applied as unbounded.
|
|
23
|
+
* * Each API not only returns the circles or lines that satisfy the constraints but also captures the input curve
|
|
24
|
+
* location details where the tangency/perpendicularity happens. Each returned element contains:
|
|
25
|
+
* * the curve (circle or line) that satisfies the constraints.
|
|
26
|
+
* * an array of {@link CurveLocationDetailPair} objects, where each pair holds:
|
|
27
|
+
* * `detailA`: the result curve with the contact point and fraction on the curve.
|
|
28
|
+
* * `detailB`: the input constraint curve with the same contact point and fraction on the constraint curve.
|
|
29
|
+
* @alpha
|
|
30
|
+
*/
|
|
31
|
+
export class ConstrainedCurve2d {
|
|
32
|
+
/**
|
|
33
|
+
* Return all (i.e., up to 4) circles that are tangent to 3 given lines plus data about tangent points/fractions.
|
|
34
|
+
* @param lineA first line
|
|
35
|
+
* @param lineB second line
|
|
36
|
+
* @param lineC third line
|
|
37
|
+
*/
|
|
38
|
+
static circlesTangentLineLineLine(lineA, lineB, lineC) {
|
|
39
|
+
const implicitLineA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineA);
|
|
40
|
+
const implicitLineB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineB);
|
|
41
|
+
const implicitLineC = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineC);
|
|
42
|
+
if (!(implicitLineA instanceof UnboundedLine2dByPointAndNormal)
|
|
43
|
+
|| !(implicitLineB instanceof UnboundedLine2dByPointAndNormal)
|
|
44
|
+
|| !(implicitLineC instanceof UnboundedLine2dByPointAndNormal))
|
|
45
|
+
return undefined;
|
|
46
|
+
const markups = ConstrainedImplicitCurve2d.circlesTangentLLL(implicitLineA, implicitLineB, implicitLineC);
|
|
47
|
+
if (markups === undefined)
|
|
48
|
+
return undefined;
|
|
49
|
+
return getCircleOrLineMarkups(markups, true, [lineA, lineB, lineC]);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Return all (i.e., up to 2) unbounded lines perpendicular to a line and tangent to a circle plus data about
|
|
53
|
+
* perp/tangent points/fractions.
|
|
54
|
+
* @param line the line
|
|
55
|
+
* @param circle the circle
|
|
56
|
+
*/
|
|
57
|
+
static linesPerpLineTangentCircle(line, circle) {
|
|
58
|
+
if (isNotCircularOrPoint(circle))
|
|
59
|
+
return undefined;
|
|
60
|
+
const implicitLine = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(line);
|
|
61
|
+
const implicitCircle = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circle);
|
|
62
|
+
if (!(implicitLine instanceof UnboundedLine2dByPointAndNormal)
|
|
63
|
+
|| !(implicitCircle instanceof UnboundedCircle2dByCenterAndRadius))
|
|
64
|
+
return undefined;
|
|
65
|
+
const markups = ConstrainedImplicitCurve2d.linesPerpLTangentC(implicitLine, implicitCircle);
|
|
66
|
+
if (markups === undefined)
|
|
67
|
+
return undefined;
|
|
68
|
+
return getCircleOrLineMarkups(markups, false, [line, circle]);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Return all (i.e., 4) variants of the line perpendicular to 2 circles (line between centers, with ends at
|
|
72
|
+
* crossing points on respective circles) plus data about perp points/fractions.
|
|
73
|
+
* @param circleA first circle
|
|
74
|
+
* @param circleB second circle
|
|
75
|
+
*/
|
|
76
|
+
static linesPerpCirclePerpCircle(circleA, circleB) {
|
|
77
|
+
if (!circleA.isCircular || !circleB.isCircular)
|
|
78
|
+
return undefined;
|
|
79
|
+
const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);
|
|
80
|
+
const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);
|
|
81
|
+
if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)
|
|
82
|
+
|| !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius))
|
|
83
|
+
return undefined;
|
|
84
|
+
const markups = ConstrainedImplicitCurve2d.linesPerpCPerpC(implicitCircleA, implicitCircleB);
|
|
85
|
+
if (markups === undefined)
|
|
86
|
+
return undefined;
|
|
87
|
+
return getCircleOrLineMarkups(markups, false, [circleA, circleB]);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Return all (i.e., up to 2) unbounded lines perpendicular to a line and a circle plus data about perp points/fractions.
|
|
91
|
+
* @param line the line
|
|
92
|
+
* @param circle the circle
|
|
93
|
+
*/
|
|
94
|
+
static linesPerpLinePerpCircle(line, circle) {
|
|
95
|
+
if (isNotCircularOrPoint(circle))
|
|
96
|
+
return undefined;
|
|
97
|
+
const implicitLine = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(line);
|
|
98
|
+
const implicitCircle = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circle);
|
|
99
|
+
if (!(implicitLine instanceof UnboundedLine2dByPointAndNormal)
|
|
100
|
+
|| !(implicitCircle instanceof UnboundedCircle2dByCenterAndRadius))
|
|
101
|
+
return undefined;
|
|
102
|
+
const markups = ConstrainedImplicitCurve2d.linesPerpLPerpC(implicitLine, implicitCircle);
|
|
103
|
+
if (markups === undefined)
|
|
104
|
+
return undefined;
|
|
105
|
+
return getCircleOrLineMarkups(markups, false, [line, circle]);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Return all (i.e., up to 4) unbounded lines perpendicular to a circle and tangent to a circle plus data about
|
|
109
|
+
* perp/tangent points/fractions.
|
|
110
|
+
* Note that multiple colinear lines are returned tagged with diametrically opposing points of circleA.
|
|
111
|
+
* @param circleA first circle (for perpendicular constraint)
|
|
112
|
+
* @param circleB second circle (for tangent constraint)
|
|
113
|
+
*/
|
|
114
|
+
static linesPerpCircleTangentCircle(circleA, circleB) {
|
|
115
|
+
if (isNotCircularOrPoint(circleA) || isNotCircularOrPoint(circleB))
|
|
116
|
+
return undefined;
|
|
117
|
+
const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);
|
|
118
|
+
const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);
|
|
119
|
+
if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)
|
|
120
|
+
|| !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius))
|
|
121
|
+
return undefined;
|
|
122
|
+
const markups = ConstrainedImplicitCurve2d.linesPerpCTangentC(implicitCircleA, implicitCircleB);
|
|
123
|
+
if (markups === undefined)
|
|
124
|
+
return undefined;
|
|
125
|
+
return getCircleOrLineMarkups(markups, false, [circleA, circleB]);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Return all (i.e., up to 4) unbounded lines tangent to 2 circles plus data about tangent points/fractions.
|
|
129
|
+
* * There are 4 lines if there is neither intersection nor containment between the circles
|
|
130
|
+
* * There are 2 lines if the circles intersect
|
|
131
|
+
* * There are no lines if one circle is entirely inside the other.
|
|
132
|
+
* @param circleA first circle
|
|
133
|
+
* @param circleB second circle
|
|
134
|
+
*/
|
|
135
|
+
static linesTangentCircleCircle(circleA, circleB) {
|
|
136
|
+
if (isNotCircularOrPoint(circleA) || isNotCircularOrPoint(circleB))
|
|
137
|
+
return undefined;
|
|
138
|
+
const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);
|
|
139
|
+
const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);
|
|
140
|
+
if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)
|
|
141
|
+
|| !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius))
|
|
142
|
+
return undefined;
|
|
143
|
+
const markups = ConstrainedImplicitCurve2d.linesTangentCC(implicitCircleA, implicitCircleB);
|
|
144
|
+
if (markups === undefined)
|
|
145
|
+
return undefined;
|
|
146
|
+
return getCircleOrLineMarkups(markups, false, [circleA, circleB]);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Return all (i.e., up to 8) circles tangent to two lines and a circle plus data about tangent points/fractions.
|
|
150
|
+
* @param lineA first line
|
|
151
|
+
* @param lineB second line
|
|
152
|
+
* @param circle the circle
|
|
153
|
+
*/
|
|
154
|
+
static circlesTangentLineLineCircle(lineA, lineB, circle) {
|
|
155
|
+
if (isNotCircularOrPoint(circle))
|
|
156
|
+
return undefined;
|
|
157
|
+
const implicitLineA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineA);
|
|
158
|
+
const implicitLineB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineB);
|
|
159
|
+
const implicitCircle = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circle);
|
|
160
|
+
if (!(implicitLineA instanceof UnboundedLine2dByPointAndNormal)
|
|
161
|
+
|| !(implicitLineB instanceof UnboundedLine2dByPointAndNormal)
|
|
162
|
+
|| !(implicitCircle instanceof UnboundedCircle2dByCenterAndRadius))
|
|
163
|
+
return undefined;
|
|
164
|
+
const markups = ConstrainedImplicitCurve2d.circlesTangentLLC(implicitLineA, implicitLineB, implicitCircle);
|
|
165
|
+
if (markups === undefined)
|
|
166
|
+
return undefined;
|
|
167
|
+
return getCircleOrLineMarkups(markups, true, [lineA, lineB, circle]);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Return all (i.e., up to 4) circles tangent to 2 circles and a line plus data about tangent points/fractions.
|
|
171
|
+
* @param circleA first circle
|
|
172
|
+
* @param circleB second circle
|
|
173
|
+
* @param line the line
|
|
174
|
+
*/
|
|
175
|
+
static circlesTangentCircleCircleLine(circleA, circleB, line) {
|
|
176
|
+
if (isNotCircularOrPoint(circleA) || isNotCircularOrPoint(circleB))
|
|
177
|
+
return undefined;
|
|
178
|
+
const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);
|
|
179
|
+
const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);
|
|
180
|
+
const implicitLine = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(line);
|
|
181
|
+
if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)
|
|
182
|
+
|| !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius)
|
|
183
|
+
|| !(implicitLine instanceof UnboundedLine2dByPointAndNormal))
|
|
184
|
+
return undefined;
|
|
185
|
+
const markups = ConstrainedImplicitCurve2d.circlesTangentCCL(implicitCircleA, implicitCircleB, implicitLine);
|
|
186
|
+
if (markups === undefined)
|
|
187
|
+
return undefined;
|
|
188
|
+
return getCircleOrLineMarkups(markups, true, [circleA, circleB, line]);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Return all (i.e., up to 8) circles tangent to 3 circles plus data about tangent points/fractions.
|
|
192
|
+
* @param circleA first circle
|
|
193
|
+
* @param circleB second circle
|
|
194
|
+
* @param circleC third circle
|
|
195
|
+
*/
|
|
196
|
+
static circlesTangentCircleCircleCircle(circleA, circleB, circleC) {
|
|
197
|
+
if (isNotCircularOrPoint(circleA) || isNotCircularOrPoint(circleB) || isNotCircularOrPoint(circleC))
|
|
198
|
+
return undefined;
|
|
199
|
+
const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);
|
|
200
|
+
const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);
|
|
201
|
+
const implicitCircleC = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleC);
|
|
202
|
+
if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)
|
|
203
|
+
|| !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius)
|
|
204
|
+
|| !(implicitCircleC instanceof UnboundedCircle2dByCenterAndRadius))
|
|
205
|
+
return undefined;
|
|
206
|
+
const markups = ConstrainedImplicitCurve2d.circlesTangentCCC(implicitCircleA, implicitCircleB, implicitCircleC);
|
|
207
|
+
if (markups === undefined)
|
|
208
|
+
return undefined;
|
|
209
|
+
return getCircleOrLineMarkups(markups, true, [circleA, circleB, circleC]);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Compute circles of specified radius tangent to each of the lines plus data about tangent points/fractions.
|
|
213
|
+
* * There are normally 4 circles.
|
|
214
|
+
* * Returns undefined when the lines are parallel.
|
|
215
|
+
* @param lineA first line
|
|
216
|
+
* @param lineB second line
|
|
217
|
+
* @param radius radius of tangent circles.
|
|
218
|
+
*/
|
|
219
|
+
static circlesTangentLineLineRadius(lineA, lineB, radius) {
|
|
220
|
+
const implicitLineA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineA);
|
|
221
|
+
const implicitLineB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineB);
|
|
222
|
+
if (!(implicitLineA instanceof UnboundedLine2dByPointAndNormal)
|
|
223
|
+
|| !(implicitLineB instanceof UnboundedLine2dByPointAndNormal))
|
|
224
|
+
return undefined;
|
|
225
|
+
const markups = ConstrainedImplicitCurve2d.circlesTangentLLR(implicitLineA, implicitLineB, radius);
|
|
226
|
+
if (markups === undefined)
|
|
227
|
+
return undefined;
|
|
228
|
+
return getCircleOrLineMarkups(markups, true, [lineA, lineB]);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Compute circles of specified radius tangent to both a circle and a line plus data about tangent points/fractions.
|
|
232
|
+
* * There can be 0 to 8 circles.
|
|
233
|
+
* @param circle the circle
|
|
234
|
+
* @param line the line
|
|
235
|
+
* @param radius radius of tangent circles
|
|
236
|
+
*/
|
|
237
|
+
static circlesTangentCircleLineRadius(circle, line, radius) {
|
|
238
|
+
if (isNotCircularOrPoint(circle))
|
|
239
|
+
return undefined;
|
|
240
|
+
const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circle);
|
|
241
|
+
const implicitLineB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(line);
|
|
242
|
+
if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)
|
|
243
|
+
|| !(implicitLineB instanceof UnboundedLine2dByPointAndNormal))
|
|
244
|
+
return undefined;
|
|
245
|
+
const markups = ConstrainedImplicitCurve2d.circlesTangentCLR(implicitCircleA, implicitLineB, radius);
|
|
246
|
+
if (markups === undefined)
|
|
247
|
+
return undefined;
|
|
248
|
+
return getCircleOrLineMarkups(markups, true, [circle, line]);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Compute circles of specified radius tangent to both circles plus data about tangent points/fractions.
|
|
252
|
+
* * There can be 0 to 8 circles.
|
|
253
|
+
* @param circleA the first circle
|
|
254
|
+
* @param circleB the second circle
|
|
255
|
+
* @param radius radius of tangent circles
|
|
256
|
+
*/
|
|
257
|
+
static circlesTangentCircleCircleRadius(circleA, circleB, radius) {
|
|
258
|
+
if (isNotCircularOrPoint(circleA) || isNotCircularOrPoint(circleB))
|
|
259
|
+
return undefined;
|
|
260
|
+
const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);
|
|
261
|
+
const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);
|
|
262
|
+
if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)
|
|
263
|
+
|| !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius))
|
|
264
|
+
return undefined;
|
|
265
|
+
const markups = ConstrainedImplicitCurve2d.circlesTangentCCR(implicitCircleA, implicitCircleB, radius);
|
|
266
|
+
if (markups === undefined)
|
|
267
|
+
return undefined;
|
|
268
|
+
return getCircleOrLineMarkups(markups, true, [circleA, circleB]);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
// return true if the input is not a circular arc
|
|
272
|
+
function isNotCircularArc(cp) {
|
|
273
|
+
return !(cp instanceof Arc3d) || !cp.isCircular;
|
|
274
|
+
}
|
|
275
|
+
// return true if the curve primitive is not a circle or a point
|
|
276
|
+
function isNotCircularOrPoint(arc) {
|
|
277
|
+
return arc.circularRadius() === undefined && !arc.isDegenerateCircle;
|
|
278
|
+
}
|
|
279
|
+
// create a CurveLocationDetail for a point on a curve if point is on the curve
|
|
280
|
+
function makeLocationDetail(curve, contact) {
|
|
281
|
+
const contact3d = Point3d.create(contact.x, contact.y, 0);
|
|
282
|
+
const detail = curve.closestPointXY(contact3d, true);
|
|
283
|
+
if (detail === undefined || detail.a > Geometry.smallMetricDistance)
|
|
284
|
+
return undefined;
|
|
285
|
+
return detail;
|
|
286
|
+
}
|
|
287
|
+
function getCircleOrLineMarkups(markups, expectCircle, originalConstraint) {
|
|
288
|
+
const result = [];
|
|
289
|
+
for (const markup of markups) {
|
|
290
|
+
const cp = ImplicitCurve2dConverter.createCurvePrimitiveFromImplicitCurve(markup.curve);
|
|
291
|
+
if (cp === undefined)
|
|
292
|
+
return undefined;
|
|
293
|
+
if ((expectCircle && isNotCircularArc(cp)) || (!expectCircle && !(cp instanceof LineSegment3d)))
|
|
294
|
+
return undefined;
|
|
295
|
+
const curve = expectCircle ? cp : cp;
|
|
296
|
+
const details = [];
|
|
297
|
+
for (const original of originalConstraint) {
|
|
298
|
+
for (const implicitData of markup.data) {
|
|
299
|
+
const returnedDetail = makeLocationDetail(original, implicitData.point);
|
|
300
|
+
if (returnedDetail !== undefined) {
|
|
301
|
+
const detailA = returnedDetail;
|
|
302
|
+
const detailB = makeLocationDetail(curve, implicitData.point);
|
|
303
|
+
details.push(new CurveLocationDetailPair(detailA, detailB));
|
|
304
|
+
markup.data = markup.data.filter(d => d !== implicitData);
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
result.push({ curve, details });
|
|
310
|
+
}
|
|
311
|
+
return result.length > 0 ? result : undefined;
|
|
312
|
+
}
|
|
313
|
+
//# sourceMappingURL=ConstrainedCurve2d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConstrainedCurve2d.js","sourceRoot":"","sources":["../../../src/curve/ConstrainedCurve2d.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAuB,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAErF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAEtG,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,kCAAkC,EAAE,MAAM,iDAAiD,CAAC;AACrG,OAAO,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AAChG,OAAO,EAAE,aA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ACvC,MAAM,cAAc,GAAG,kBAAkB,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;gBACxE,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;oBACjC,MAAM,OAAO,GAAG,cAAc,CAAC;oBAC/B,MAAM,OAAO,GAAG,kBAAkB,CAAC,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;oBAC9D,OAAO,CAAC,IAAI,CAAC,IAAI,uBAAuB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;oBAC5D,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC;oBAC1D,MAAM;gBACR,CAAC;YACH,CAAC;QACH,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAChD,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { Geometry } from \"../Geometry\";\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\nimport { Arc3d } from \"./Arc3d\";\nimport { CurveLocationDetail, CurveLocationDetailPair } from \"./CurveLocationDetail\";\nimport { CurvePrimitive } from \"./CurvePrimitive\";\nimport { ConstrainedImplicitCurve2d } from \"./internalContexts/geometry2d/ConstrainedImplicitCurve2d\";\nimport { ImplicitCurve2d, ImplicitGeometryMarkup } from \"./internalContexts/geometry2d/ImplicitCurve2d\";\nimport { ImplicitCurve2dConverter } from \"./internalContexts/geometry2d/ImplicitCurve2dConverter\";\nimport { UnboundedCircle2dByCenterAndRadius } from \"./internalContexts/geometry2d/UnboundedCircle2d\";\nimport { UnboundedLine2dByPointAndNormal } from \"./internalContexts/geometry2d/UnboundedLine2d\";\nimport { LineSegment3d } from \"./LineSegment3d\";\n\n/**\n * The class has static methods to compute circles and lines with specified constrained (tangent to other lines/circles,\n * perpendicular to other lines/circles, or a specified circle radius).\n * * z components of the input curves are completely ignored.\n * * In this API, a `LineSegment3d` input identifies the underlying unbounded line by its endpoints. The segment\n * itself is bounded, but the geometric line constraint is applied as unbounded.\n * * Each API not only returns the circles or lines that satisfy the constraints but also captures the input curve\n * location details where the tangency/perpendicularity happens. Each returned element contains:\n * * the curve (circle or line) that satisfies the constraints.\n * * an array of {@link CurveLocationDetailPair} objects, where each pair holds:\n * * `detailA`: the result curve with the contact point and fraction on the curve.\n * * `detailB`: the input constraint curve with the same contact point and fraction on the constraint curve.\n * @alpha\n */\nexport class ConstrainedCurve2d {\n /**\n * Return all (i.e., up to 4) circles that are tangent to 3 given lines plus data about tangent points/fractions.\n * @param lineA first line\n * @param lineB second line\n * @param lineC third line\n */\n public static circlesTangentLineLineLine(\n lineA: LineSegment3d,\n lineB: LineSegment3d,\n lineC: LineSegment3d,\n ): { curve: Arc3d, details: CurveLocationDetailPair[] }[] | undefined {\n const implicitLineA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineA);\n const implicitLineB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineB);\n const implicitLineC = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineC);\n if (!(implicitLineA instanceof UnboundedLine2dByPointAndNormal)\n || !(implicitLineB instanceof UnboundedLine2dByPointAndNormal)\n || !(implicitLineC instanceof UnboundedLine2dByPointAndNormal))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.circlesTangentLLL(implicitLineA, implicitLineB, implicitLineC);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, true, [lineA, lineB, lineC]);\n }\n /**\n * Return all (i.e., up to 2) unbounded lines perpendicular to a line and tangent to a circle plus data about\n * perp/tangent points/fractions.\n * @param line the line\n * @param circle the circle\n */\n public static linesPerpLineTangentCircle(\n line: LineSegment3d,\n circle: Arc3d,\n ): { curve: LineSegment3d, details: CurveLocationDetailPair[] }[] | undefined {\n if (isNotCircularOrPoint(circle))\n return undefined;\n const implicitLine = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(line);\n const implicitCircle = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circle);\n if (!(implicitLine instanceof UnboundedLine2dByPointAndNormal)\n || !(implicitCircle instanceof UnboundedCircle2dByCenterAndRadius))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.linesPerpLTangentC(implicitLine, implicitCircle);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, false, [line, circle]);\n }\n /**\n * Return all (i.e., 4) variants of the line perpendicular to 2 circles (line between centers, with ends at\n * crossing points on respective circles) plus data about perp points/fractions.\n * @param circleA first circle\n * @param circleB second circle\n */\n public static linesPerpCirclePerpCircle(\n circleA: Arc3d,\n circleB: Arc3d,\n ): { curve: LineSegment3d, details: CurveLocationDetailPair[] }[] | undefined {\n if (!circleA.isCircular || !circleB.isCircular)\n return undefined;\n const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);\n const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);\n if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)\n || !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.linesPerpCPerpC(implicitCircleA, implicitCircleB);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, false, [circleA, circleB]);\n }\n /**\n * Return all (i.e., up to 2) unbounded lines perpendicular to a line and a circle plus data about perp points/fractions.\n * @param line the line\n * @param circle the circle\n */\n public static linesPerpLinePerpCircle(\n line: LineSegment3d,\n circle: Arc3d,\n ): { curve: LineSegment3d, details: CurveLocationDetailPair[] }[] | undefined {\n if (isNotCircularOrPoint(circle))\n return undefined;\n const implicitLine = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(line);\n const implicitCircle = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circle);\n if (!(implicitLine instanceof UnboundedLine2dByPointAndNormal)\n || !(implicitCircle instanceof UnboundedCircle2dByCenterAndRadius))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.linesPerpLPerpC(implicitLine, implicitCircle);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, false, [line, circle]);\n }\n /**\n * Return all (i.e., up to 4) unbounded lines perpendicular to a circle and tangent to a circle plus data about\n * perp/tangent points/fractions.\n * Note that multiple colinear lines are returned tagged with diametrically opposing points of circleA.\n * @param circleA first circle (for perpendicular constraint)\n * @param circleB second circle (for tangent constraint)\n */\n public static linesPerpCircleTangentCircle(\n circleA: Arc3d,\n circleB: Arc3d,\n ): { curve: LineSegment3d, details: CurveLocationDetailPair[] }[] | undefined {\n if (isNotCircularOrPoint(circleA) || isNotCircularOrPoint(circleB))\n return undefined;\n const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);\n const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);\n if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)\n || !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.linesPerpCTangentC(implicitCircleA, implicitCircleB);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, false, [circleA, circleB]);\n }\n /**\n * Return all (i.e., up to 4) unbounded lines tangent to 2 circles plus data about tangent points/fractions.\n * * There are 4 lines if there is neither intersection nor containment between the circles\n * * There are 2 lines if the circles intersect\n * * There are no lines if one circle is entirely inside the other.\n * @param circleA first circle\n * @param circleB second circle\n */\n public static linesTangentCircleCircle(\n circleA: Arc3d,\n circleB: Arc3d,\n ): { curve: LineSegment3d, details: CurveLocationDetailPair[] }[] | undefined {\n if (isNotCircularOrPoint(circleA) || isNotCircularOrPoint(circleB))\n return undefined;\n const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);\n const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);\n if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)\n || !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.linesTangentCC(implicitCircleA, implicitCircleB);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, false, [circleA, circleB]);\n }\n /**\n * Return all (i.e., up to 8) circles tangent to two lines and a circle plus data about tangent points/fractions.\n * @param lineA first line\n * @param lineB second line\n * @param circle the circle\n */\n public static circlesTangentLineLineCircle(\n lineA: LineSegment3d,\n lineB: LineSegment3d,\n circle: Arc3d,\n ): { curve: Arc3d, details: CurveLocationDetailPair[] }[] | undefined {\n if (isNotCircularOrPoint(circle))\n return undefined;\n const implicitLineA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineA);\n const implicitLineB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineB);\n const implicitCircle = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circle);\n if (!(implicitLineA instanceof UnboundedLine2dByPointAndNormal)\n || !(implicitLineB instanceof UnboundedLine2dByPointAndNormal)\n || !(implicitCircle instanceof UnboundedCircle2dByCenterAndRadius))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.circlesTangentLLC(implicitLineA, implicitLineB, implicitCircle);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, true, [lineA, lineB, circle]);\n }\n /**\n * Return all (i.e., up to 4) circles tangent to 2 circles and a line plus data about tangent points/fractions.\n * @param circleA first circle\n * @param circleB second circle\n * @param line the line\n */\n public static circlesTangentCircleCircleLine(\n circleA: Arc3d,\n circleB: Arc3d,\n line: LineSegment3d,\n ): { curve: Arc3d, details: CurveLocationDetailPair[] }[] | undefined {\n if (isNotCircularOrPoint(circleA) || isNotCircularOrPoint(circleB))\n return undefined;\n const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);\n const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);\n const implicitLine = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(line);\n if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)\n || !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius)\n || !(implicitLine instanceof UnboundedLine2dByPointAndNormal))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.circlesTangentCCL(implicitCircleA, implicitCircleB, implicitLine);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, true, [circleA, circleB, line]);\n }\n /**\n * Return all (i.e., up to 8) circles tangent to 3 circles plus data about tangent points/fractions.\n * @param circleA first circle\n * @param circleB second circle\n * @param circleC third circle\n */\n public static circlesTangentCircleCircleCircle(\n circleA: Arc3d,\n circleB: Arc3d,\n circleC: Arc3d,\n ): { curve: Arc3d, details: CurveLocationDetailPair[] }[] | undefined {\n if (isNotCircularOrPoint(circleA) || isNotCircularOrPoint(circleB) || isNotCircularOrPoint(circleC))\n return undefined;\n const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);\n const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);\n const implicitCircleC = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleC);\n if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)\n || !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius)\n || !(implicitCircleC instanceof UnboundedCircle2dByCenterAndRadius))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.circlesTangentCCC(implicitCircleA, implicitCircleB, implicitCircleC);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, true, [circleA, circleB, circleC]);\n }\n /**\n * Compute circles of specified radius tangent to each of the lines plus data about tangent points/fractions.\n * * There are normally 4 circles.\n * * Returns undefined when the lines are parallel.\n * @param lineA first line\n * @param lineB second line\n * @param radius radius of tangent circles.\n */\n public static circlesTangentLineLineRadius(\n lineA: LineSegment3d,\n lineB: LineSegment3d,\n radius: number,\n ): { curve: Arc3d, details: CurveLocationDetailPair[] }[] | undefined {\n const implicitLineA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineA);\n const implicitLineB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(lineB);\n if (!(implicitLineA instanceof UnboundedLine2dByPointAndNormal)\n || !(implicitLineB instanceof UnboundedLine2dByPointAndNormal))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.circlesTangentLLR(implicitLineA, implicitLineB, radius);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, true, [lineA, lineB]);\n }\n /**\n * Compute circles of specified radius tangent to both a circle and a line plus data about tangent points/fractions.\n * * There can be 0 to 8 circles.\n * @param circle the circle\n * @param line the line\n * @param radius radius of tangent circles\n */\n public static circlesTangentCircleLineRadius(\n circle: Arc3d,\n line: LineSegment3d,\n radius: number,\n ): { curve: Arc3d, details: CurveLocationDetailPair[] }[] | undefined {\n if (isNotCircularOrPoint(circle))\n return undefined;\n const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circle);\n const implicitLineB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(line);\n if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)\n || !(implicitLineB instanceof UnboundedLine2dByPointAndNormal))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.circlesTangentCLR(implicitCircleA, implicitLineB, radius);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, true, [circle, line]);\n }\n /**\n * Compute circles of specified radius tangent to both circles plus data about tangent points/fractions.\n * * There can be 0 to 8 circles.\n * @param circleA the first circle\n * @param circleB the second circle\n * @param radius radius of tangent circles\n */\n public static circlesTangentCircleCircleRadius(\n circleA: Arc3d,\n circleB: Arc3d,\n radius: number,\n ): { curve: Arc3d, details: CurveLocationDetailPair[] }[] | undefined {\n if (isNotCircularOrPoint(circleA) || isNotCircularOrPoint(circleB))\n return undefined;\n const implicitCircleA = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleA);\n const implicitCircleB = ImplicitCurve2dConverter.createImplicitCurve2dFromCurvePrimitiveXY(circleB);\n if (!(implicitCircleA instanceof UnboundedCircle2dByCenterAndRadius)\n || !(implicitCircleB instanceof UnboundedCircle2dByCenterAndRadius))\n return undefined;\n const markups = ConstrainedImplicitCurve2d.circlesTangentCCR(implicitCircleA, implicitCircleB, radius);\n if (markups === undefined)\n return undefined;\n return getCircleOrLineMarkups(markups, true, [circleA, circleB]);\n }\n}\n\n// return true if the input is not a circular arc\nfunction isNotCircularArc(cp: CurvePrimitive): boolean {\n return !(cp instanceof Arc3d) || !cp.isCircular;\n}\n// return true if the curve primitive is not a circle or a point\nfunction isNotCircularOrPoint(arc: Arc3d): boolean {\n return arc.circularRadius() === undefined && !arc.isDegenerateCircle;\n}\n// create a CurveLocationDetail for a point on a curve if point is on the curve\nfunction makeLocationDetail(curve: CurvePrimitive, contact: Point2d): CurveLocationDetail | undefined {\n const contact3d = Point3d.create(contact.x, contact.y, 0);\n const detail = curve.closestPointXY(contact3d, true);\n if (detail === undefined || detail.a > Geometry.smallMetricDistance)\n return undefined;\n return detail;\n}\n// return markups with captured circles or lines and their data\nfunction getCircleOrLineMarkups(\n markups: ImplicitGeometryMarkup<ImplicitCurve2d>[], expectCircle: true, originalConstraint: (Arc3d | LineSegment3d)[],\n): { curve: Arc3d, details: CurveLocationDetailPair[] }[] | undefined;\nfunction getCircleOrLineMarkups(\n markups: ImplicitGeometryMarkup<ImplicitCurve2d>[], expectCircle: false, originalConstraint: (Arc3d | LineSegment3d)[],\n): { curve: LineSegment3d, details: CurveLocationDetailPair[] }[] | undefined;\nfunction getCircleOrLineMarkups(\n markups: ImplicitGeometryMarkup<ImplicitCurve2d>[], expectCircle: boolean, originalConstraint: (Arc3d | LineSegment3d)[],\n): { curve: Arc3d | LineSegment3d, details: CurveLocationDetailPair[] }[] | undefined {\n const result: { curve: Arc3d | LineSegment3d, details: CurveLocationDetailPair[] }[] = [];\n for (const markup of markups) {\n const cp = ImplicitCurve2dConverter.createCurvePrimitiveFromImplicitCurve(markup.curve) as CurvePrimitive | undefined;\n if (cp === undefined)\n return undefined;\n if ((expectCircle && isNotCircularArc(cp)) || (!expectCircle && !(cp instanceof LineSegment3d)))\n return undefined;\n const curve = expectCircle ? cp as Arc3d : cp as LineSegment3d;\n const details: CurveLocationDetailPair[] = [];\n for (const original of originalConstraint) {\n for (const implicitData of markup.data) {\n const returnedDetail = makeLocationDetail(original, implicitData.point);\n if (returnedDetail !== undefined) {\n const detailA = returnedDetail;\n const detailB = makeLocationDetail(curve, implicitData.point);\n details.push(new CurveLocationDetailPair(detailA, detailB));\n markup.data = markup.data.filter(d => d !== implicitData);\n break;\n }\n }\n }\n result.push({ curve, details });\n }\n return result.length > 0 ? result : undefined;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConstructCurveBetweenCurves.js","sourceRoot":"","sources":["../../../src/curve/ConstructCurveBetweenCurves.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAA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AAC;IACnB,CAAC;IAED;;;;;;;;;OASG;IACI,MAAM,CAAC,kBAAkB,CAAC,SAAwB,EAAE,QAAgB,EAAE,SAAwB;QACnG,MAAM,OAAO,GAAG,IAAI,2BAA2B,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAChF,OAAO,SAAS,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"ConstructCurveBetweenCurves.js","sourceRoot":"","sources":["../../../src/curve/ConstructCurveBetweenCurves.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,OAAO,2BAA4B,SAAQ,mBAAmB;IAClE,oDAAoD;IAC5C,UAAU,CAAgB;IAC1B,SAAS,CAAS;IAC1B,YAAoB,UAAyB,EAAE,SAAiB,EAAE,UAAyB;QACzF,KAAK,EAAE,CAAC;QACR,gDAAgD;QAChD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACa,mBAAmB,CAAC,QAAuB;QACzD,IAAI,IAAI,CAAC,UAAU,YAAY,aAAa,EAAE,CAAC;YAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC;YACjC,OAAO,aAAa,CAAC,MAAM,CACzB,QAA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,CAAC;YACrC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;YAC7B,OAAO,KAAK,CAAC,MAAM,CACjB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,EACpD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,EACtD,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,EACxD,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;;;;OASG;IACI,MAAM,CAAC,kBAAkB,CAAC,SAAwB,EAAE,QAAgB,EAAE,SAAwB;QACnG,MAAM,OAAO,GAAG,IAAI,2BAA2B,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAChF,OAAO,SAAS,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Curve\n */\n\nimport { Geometry } from \"../Geometry\";\nimport { NullGeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Arc3d } from \"./Arc3d\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { LineSegment3d } from \"./LineSegment3d\";\nimport { LineString3d } from \"./LineString3d\";\n\n/**\n * Context for constructing a curve that is interpolated between two other curves.\n * * The only callable method is the static `InterpolateBetween`.\n * * Other methods are called only by `dispatchToGeometryHandler`\n * @public\n */\nexport class ConstructCurveBetweenCurves extends NullGeometryHandler {\n // private geometry0: GeometryQuery; <-- Never used\n private _geometry1: GeometryQuery;\n private _fraction: number;\n private constructor(_geometry0: GeometryQuery, _fraction: number, _geometry1: GeometryQuery) {\n super();\n // this.geometry0 = _geometry0; <-- Never used\n this._geometry1 = _geometry1;\n this._fraction = _fraction;\n }\n\n /**\n * * To be directly called only by double dispatcher\n * * Assumes this.geometry1 was set by calling context.\n * * Construct the interpolated curve between this.geometry1 and the supplied segment0.\n */\n public override handleLineSegment3d(segment0: LineSegment3d): any {\n if (this._geometry1 instanceof LineSegment3d) {\n const segment1 = this._geometry1;\n return LineSegment3d.create(\n segment0.startPoint().interpolate(this._fraction, segment1.startPoint()),\n segment0.endPoint().interpolate(this._fraction, segment1.endPoint()));\n }\n return undefined;\n }\n /**\n * * To be directly called only by double dispatcher\n * * Assumes this.geometry1 was set by calling context.\n * * Construct the interpolated curve between this.geometry1 and the supplied ls0.\n */\n public override handleLineString3d(ls0: LineString3d): any {\n if (this._geometry1 instanceof LineString3d) {\n const ls1 = this._geometry1;\n if (ls0.numPoints() === ls1.numPoints()) {\n const numPoints = ls0.numPoints();\n const ls = LineString3d.create();\n const workPoint = Point3d.create();\n const workPoint0 = Point3d.create();\n const workPoint1 = Point3d.create();\n const fraction = this._fraction;\n for (let i = 0; i < numPoints; i++) {\n ls0.pointAt(i, workPoint0);\n ls1.pointAt(i, workPoint1);\n workPoint0.interpolate(fraction, workPoint1, workPoint);\n ls.addPoint(workPoint);\n }\n if (ls0.fractions && ls1.fractions) {\n for (let i = 0; i < numPoints; i++) {\n ls.addFraction(Geometry.interpolate(ls0.fractions.atUncheckedIndex(i), fraction, ls1.fractions.atUncheckedIndex(i)));\n }\n }\n if (ls0.strokeData && ls1.strokeData) {\n // Policy: simple clone of stroke count map from ls0.\n // The curveLength will not match.\n // But we expect to be called at a time compatible count and a0,a1 are the important thing.\n ls.strokeData = ls0.strokeData.clone();\n }\n if (ls0.packedDerivatives && ls1.packedDerivatives) {\n const workVector0 = Vector3d.create();\n const workVector1 = Vector3d.create();\n for (let i = 0; i < numPoints; i++) {\n ls0.packedDerivatives.getVector3dAtCheckedVectorIndex(i, workVector0);\n ls1.packedDerivatives.getVector3dAtCheckedVectorIndex(i, workVector1);\n ls.addDerivative(workVector0.interpolate(fraction, workVector1));\n }\n\n }\n return ls;\n }\n }\n return undefined;\n }\n /**\n * * To be directly called only by double dispatcher\n * * Assumes this.geometry1 was set by calling context.\n * * Construct the interpolated curve between this.geometry1 and the supplied arc0.\n */\n public override handleArc3d(arc0: Arc3d): any {\n if (this._geometry1 instanceof Arc3d) {\n const arc1 = this._geometry1;\n return Arc3d.create(\n arc0.center.interpolate(this._fraction, arc1.center),\n arc0.vector0.interpolate(this._fraction, arc1.vector0),\n arc0.vector90.interpolate(this._fraction, arc1.vector90),\n arc0.sweep.interpolate(this._fraction, arc1.sweep));\n }\n return undefined;\n }\n\n /**\n * Construct a geometry item which is fractionally interpolated between two others.\n * * The construction is only supported between certain types:\n * * * LineSegment3d+LineSegment3d -- endpoints are interpolated\n * * * LineString3d+LineString3d with matching counts. Each point is interpolated.\n * * * Arc3d+Arc3d -- center, vector0, vector90, and limit angles of the sweep are interpolated.\n * @param geometry0 geometry \"at fraction 0\"\n * @param fraction fractional position\n * @param geometry1 geometry \"at fraction 1\"\n */\n public static interpolateBetween(geometry0: GeometryQuery, fraction: number, geometry1: GeometryQuery): GeometryQuery | undefined {\n const handler = new ConstructCurveBetweenCurves(geometry0, fraction, geometry1);\n return geometry0.dispatchToGeometryHandler(handler);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoordinateXYZ.js","sourceRoot":"","sources":["../../../src/curve/CoordinateXYZ.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,aA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ACd,CAAC;IACD,kCAAkC;IAC3B,gBAAgB,CAAC,SAAoB;QAC1C,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACpD,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACtC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,sBAAsB;IACf,KAAK;QACV,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IAC9C,CAAC;IACD,8CAA8C;IACvC,mBAAmB,CAAC,KAAoB;QAC7C,OAAO,KAAK,YAAY,aAAa,CAAC;IACxC,CAAC;IACD;;;;;;OAMG;IACa,aAAa,CAAC,KAAoB;QAChD,OAAO,CAAC,KAAK,YAAY,aAAa,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjF,CAAC;IACD,+EAA+E;IACxE,yBAAyB,CAAC,OAAwB;QACvD,OAAO,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"CoordinateXYZ.js","sourceRoot":"","sources":["../../../src/curve/CoordinateXYZ.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,aAAa;IAC9C,4CAA4C;IAC5B,gBAAgB,GAAG,OAAO,CAAC;IACnC,IAAI,CAAU;IACtB,mDAAmD;IACnD,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IACD;;;OAGG;IACH,YAAoB,GAAY;QAC9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IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IAC9C,CAAC;IACD,8CAA8C;IACvC,mBAAmB,CAAC,KAAoB;QAC7C,OAAO,KAAK,YAAY,aAAa,CAAC;IACxC,CAAC;IACD;;;;;;OAMG;IACa,aAAa,CAAC,KAAoB;QAChD,OAAO,CAAC,KAAK,YAAY,aAAa,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjF,CAAC;IACD,+EAA+E;IACxE,yBAAyB,CAAC,OAAwB;QACvD,OAAO,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Curve\n */\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range3d } from \"../geometry3d/Range\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { GeometryQuery } from \"./GeometryQuery\";\n\n/**\n * A Coordinate is a Point3d with supporting methods from the GeometryQuery abstraction.\n * @public\n */\nexport class CoordinateXYZ extends GeometryQuery {\n /** String name for interface properties. */\n public readonly geometryCategory = \"point\";\n private _xyz: Point3d;\n /** Return a (REFERENCE TO) the coordinate data. */\n public get point() {\n return this._xyz;\n }\n /**\n * Constructor\n * @param xyz point to be CAPTURED.\n */\n private constructor(xyz: Point3d) {\n super();\n this._xyz = xyz;\n }\n /** Create a new CoordinateXYZ containing a CLONE of point. */\n public static create(point: Point3d): CoordinateXYZ {\n return new CoordinateXYZ(point.clone());\n }\n /** Create a new CoordinateXYZ. */\n public static createXYZ(x: number = 0, y: number = 0, z: number = 0): CoordinateXYZ {\n return new CoordinateXYZ(Point3d.create(x, y, z));\n }\n /** Return the range of the point. */\n public override range(): Range3d {\n return Range3d.create(this._xyz);\n }\n /** Extend `rangeToExtend` to include this point (optionally transformed). */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n if (transform)\n rangeToExtend.extendTransformedXYZ(transform, this._xyz.x, this._xyz.y, this._xyz.z);\n else\n rangeToExtend.extend(this._xyz);\n }\n /** Apply transform to the Coordinate's point. */\n public tryTransformInPlace(transform: Transform): boolean {\n transform.multiplyPoint3d(this._xyz, this._xyz);\n return true;\n }\n /** Return a transformed clone. */\n public cloneTransformed(transform: Transform): GeometryQuery | undefined {\n const result = new CoordinateXYZ(this._xyz.clone());\n result.tryTransformInPlace(transform);\n return result;\n }\n /** Return a clone. */\n public clone(): GeometryQuery | undefined {\n return new CoordinateXYZ(this._xyz.clone());\n }\n /** Test if (other instanceof Coordinate). */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof CoordinateXYZ;\n }\n /**\n * Test for exact structure and nearly identical geometry.\n * * Leaf classes must implement.\n * * Base class implementation recurses through children.\n * * Base implementation is complete for classes with children and no properties.\n * * Classes with both children and properties must implement for properties, call super for children.\n */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n return (other instanceof CoordinateXYZ) && this._xyz.isAlmostEqual(other._xyz);\n }\n /** Second step of double dispatch: call `handler.handleCoordinateXYZ(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleCoordinateXYZ(this);\n }\n}\n"]}
|