@itwin/core-geometry 5.8.0-dev.8 → 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 +11 -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,105 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module CartesianGeometry
|
|
3
|
+
*/
|
|
4
|
+
import { Point2d, Vector2d } from "../../../geometry3d/Point2dVector2d";
|
|
5
|
+
import { XAndY } from "../../../geometry3d/XYZProps";
|
|
6
|
+
/**
|
|
7
|
+
* Abstract base class for curves with an implicit 2d function.
|
|
8
|
+
* * Curves in the class are required to have an implicit function f(x,y)=0.
|
|
9
|
+
* * They MAY (but are not required to) implement a parametric evaluator radiansToPoint2d.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class ImplicitCurve2d {
|
|
13
|
+
/**
|
|
14
|
+
* Return the implicit function value at xy, i.e, f(x,y).
|
|
15
|
+
* @param xy point for evaluation.
|
|
16
|
+
*/
|
|
17
|
+
abstract functionValue(xy: XAndY): number;
|
|
18
|
+
/**
|
|
19
|
+
* Return the implicit function gradient at xy.
|
|
20
|
+
* @param xy point for evaluation.
|
|
21
|
+
*/
|
|
22
|
+
abstract gradient(xy: XAndY): Vector2d;
|
|
23
|
+
/** Map a gradient vector (du,dv) from its local frame to global. */
|
|
24
|
+
static gradientLocalToGlobal(du: number, dv: number, vectorU: Vector2d, vectorV: Vector2d): Vector2d;
|
|
25
|
+
/**
|
|
26
|
+
* Find all perpendiculars from space point to the curve.
|
|
27
|
+
* Pass each in turn to the handler.
|
|
28
|
+
* @param spacePoint the space point.
|
|
29
|
+
* @handler the handler to receive all the points on the curve and radians where perpendicular happens.
|
|
30
|
+
*/
|
|
31
|
+
abstract emitPerpendiculars(spacePoint: Point2d, handler: (curvePoint: Point2d, radians: number | undefined) => any): any;
|
|
32
|
+
/**
|
|
33
|
+
* Call emitPerpendiculars. Return the closest of the perpendiculars.
|
|
34
|
+
* * Return undefined if no perpendiculars are received.
|
|
35
|
+
* @param spacePoint the space point.
|
|
36
|
+
*/
|
|
37
|
+
closestPoint(spacePoint: Point2d): Point2d | undefined;
|
|
38
|
+
/** Return true if the item has degenerate defining data. */
|
|
39
|
+
abstract isDegenerate(): boolean;
|
|
40
|
+
/** Return a clone of the curve. */
|
|
41
|
+
abstract clone(): ImplicitCurve2d;
|
|
42
|
+
/**
|
|
43
|
+
* OPTIONAL method to return a Point2d at given radians value.
|
|
44
|
+
* * The default implementation returns undefined.
|
|
45
|
+
* * Concrete classes that can be expressed as a function of radians should implement this.
|
|
46
|
+
*/
|
|
47
|
+
radiansToPoint2d(_radians: number): Point2d | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* OPTIONAL method to return the tangent at given radians value.
|
|
50
|
+
* * The default implementation returns undefined.
|
|
51
|
+
* * Concrete classes that can be expressed as a function of radians should implement this.
|
|
52
|
+
*/
|
|
53
|
+
radiansToTangentVector2d(_radians: number): Vector2d | undefined;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Carrier class containing:
|
|
57
|
+
* * a point
|
|
58
|
+
* * the curve to which the point is related.
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
export declare class Point2dImplicitCurve2d {
|
|
62
|
+
point: Point2d;
|
|
63
|
+
curve: ImplicitCurve2d;
|
|
64
|
+
/**
|
|
65
|
+
* CAPTURE a point and curve.
|
|
66
|
+
* @param point point member
|
|
67
|
+
* @param curve curve member
|
|
68
|
+
*/
|
|
69
|
+
constructor(point: Point2d, curve: ImplicitCurve2d);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Carrier class containing:
|
|
73
|
+
* * a curve which is a subclass of ImplicitCurve2d
|
|
74
|
+
* * an array of paired point and ImplicitCurve2d.
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export declare class ImplicitGeometryMarkup<GeometryType extends ImplicitCurve2d> {
|
|
78
|
+
curve: GeometryType;
|
|
79
|
+
data: Point2dImplicitCurve2d[];
|
|
80
|
+
/**
|
|
81
|
+
* Construct a new carrier. The data array is created empty.
|
|
82
|
+
* @param curve curve to CAPTURE
|
|
83
|
+
*/
|
|
84
|
+
constructor(curve: GeometryType);
|
|
85
|
+
/**
|
|
86
|
+
* * Use the otherCurve's emitPerpendiculars method to examine all perpendiculars from spacePoint to the curve.
|
|
87
|
+
* * For each such point, compute distance from bias point.
|
|
88
|
+
* * Choose the one whose distance is closest to biasDistance.
|
|
89
|
+
* * push the chosen point on the data array.
|
|
90
|
+
* @param spacePoint point to project to otherCurve
|
|
91
|
+
* @param otherCurve target curve for projection
|
|
92
|
+
* @param referencePoint reference point for point selection
|
|
93
|
+
* @param biasDistance preferred distance.
|
|
94
|
+
*/
|
|
95
|
+
appendClosePoint(spacePoint: Point2d, otherCurve: ImplicitCurve2d, referencePoint: XAndY, biasDistance: number): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Find closest points of an array of curves.
|
|
98
|
+
* @param spacePoint point to project to otherCurve
|
|
99
|
+
* @param referencePoint reference point for point selection
|
|
100
|
+
* @param biasDistance preferred distance.
|
|
101
|
+
* @param otherCurves array of curves to check.
|
|
102
|
+
*/
|
|
103
|
+
closePointsOfGeometry(spacePoint: Point2d, referencePoint: Point2d, biasRadius: number, otherCurves: ImplicitCurve2d[]): void;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=ImplicitCurve2d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImplicitCurve2d.d.ts","sourceRoot":"","sources":["../../../../../src/curve/internalContexts/geometry2d/ImplicitCurve2d.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAGrD;;;;;GAKG;AACH,8BAAsB,eAAe;IACnC;;;OAGG;aACa,aAAa,CAAC,EAAE,EAAE,KAAK,GAAG,MAAM;IAChD;;;OAGG;aACa,QAAQ,CAAC,EAAE,EAAE,KAAK,GAAG,QAAQ;IAC7C,oEAAoE;WACtD,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,GAAG,QAAQ;IAO3G;;;;;OAKG;aACa,kBAAkB,CAChC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,GAAG,GACtF,GAAG;IACN;;;;OAIG;IACI,YAAY,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;IAiB7D,4DAA4D;aAC5C,YAAY,IAAI,OAAO;IACvC,mCAAmC;aACnB,KAAK,IAAI,eAAe;IACxC;;;;OAIG;IACI,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAG9D;;;;OAIG;IACI,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;CAGxE;AAED;;;;;GAKG;AACH,qBAAa,sBAAsB;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,eAAe,CAAC;IAC9B;;;;OAIG;gBACgB,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe;CAI1D;AACD;;;;;GAKG;AACH,qBAAa,sBAAsB,CAAC,YAAY,SAAS,eAAe;IAC/D,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,EAAE,sBAAsB,EAAE,CAAC;IACtC;;;OAGG;gBACgB,KAAK,EAAE,YAAY;IAItC;;;;;;;;;OASG;IACI,gBAAgB,CACrB,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,GAC5F,OAAO;IAoBV;;;;;;OAMG;IACI,qBAAqB,CAC1B,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,GAC/F,IAAI;CAIR"}
|
|
@@ -0,0 +1,135 @@
|
|
|
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 { Vector2d } from "../../../geometry3d/Point2dVector2d";
|
|
9
|
+
import { SmallSystem } from "../../../numerics/SmallSystem";
|
|
10
|
+
/**
|
|
11
|
+
* Abstract base class for curves with an implicit 2d function.
|
|
12
|
+
* * Curves in the class are required to have an implicit function f(x,y)=0.
|
|
13
|
+
* * They MAY (but are not required to) implement a parametric evaluator radiansToPoint2d.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export class ImplicitCurve2d {
|
|
17
|
+
/** Map a gradient vector (du,dv) from its local frame to global. */
|
|
18
|
+
static gradientLocalToGlobal(du, dv, vectorU, vectorV) {
|
|
19
|
+
const result = Vector2d.create();
|
|
20
|
+
// use INVERSE of TRANSPOSE of [UV] matrix to map gradient terms
|
|
21
|
+
if (SmallSystem.linearSystem2d(vectorU.x, vectorU.y, vectorV.x, vectorV.y, du, dv, result))
|
|
22
|
+
return result;
|
|
23
|
+
return Vector2d.create(0, 0);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Call emitPerpendiculars. Return the closest of the perpendiculars.
|
|
27
|
+
* * Return undefined if no perpendiculars are received.
|
|
28
|
+
* @param spacePoint the space point.
|
|
29
|
+
*/
|
|
30
|
+
closestPoint(spacePoint) {
|
|
31
|
+
let minDistanceSquared = Number.MAX_SAFE_INTEGER;
|
|
32
|
+
let point;
|
|
33
|
+
// console.log ({space: spacePoint.toJSON()});
|
|
34
|
+
this.emitPerpendiculars(spacePoint, (curvePoint, _radians) => {
|
|
35
|
+
const distanceSquared = curvePoint.distanceSquared(spacePoint);
|
|
36
|
+
// console.log ({distanceSquared, xy: curvePoint.toJSON(), minD: minDistanceSquared});
|
|
37
|
+
if (distanceSquared < minDistanceSquared) {
|
|
38
|
+
point = curvePoint.clone();
|
|
39
|
+
minDistanceSquared = distanceSquared;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return point;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* OPTIONAL method to return a Point2d at given radians value.
|
|
46
|
+
* * The default implementation returns undefined.
|
|
47
|
+
* * Concrete classes that can be expressed as a function of radians should implement this.
|
|
48
|
+
*/
|
|
49
|
+
radiansToPoint2d(_radians) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* OPTIONAL method to return the tangent at given radians value.
|
|
54
|
+
* * The default implementation returns undefined.
|
|
55
|
+
* * Concrete classes that can be expressed as a function of radians should implement this.
|
|
56
|
+
*/
|
|
57
|
+
radiansToTangentVector2d(_radians) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Carrier class containing:
|
|
63
|
+
* * a point
|
|
64
|
+
* * the curve to which the point is related.
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export class Point2dImplicitCurve2d {
|
|
68
|
+
point;
|
|
69
|
+
curve;
|
|
70
|
+
/**
|
|
71
|
+
* CAPTURE a point and curve.
|
|
72
|
+
* @param point point member
|
|
73
|
+
* @param curve curve member
|
|
74
|
+
*/
|
|
75
|
+
constructor(point, curve) {
|
|
76
|
+
this.point = point;
|
|
77
|
+
this.curve = curve;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Carrier class containing:
|
|
82
|
+
* * a curve which is a subclass of ImplicitCurve2d
|
|
83
|
+
* * an array of paired point and ImplicitCurve2d.
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
export class ImplicitGeometryMarkup {
|
|
87
|
+
curve;
|
|
88
|
+
data;
|
|
89
|
+
/**
|
|
90
|
+
* Construct a new carrier. The data array is created empty.
|
|
91
|
+
* @param curve curve to CAPTURE
|
|
92
|
+
*/
|
|
93
|
+
constructor(curve) {
|
|
94
|
+
this.curve = curve;
|
|
95
|
+
this.data = [];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* * Use the otherCurve's emitPerpendiculars method to examine all perpendiculars from spacePoint to the curve.
|
|
99
|
+
* * For each such point, compute distance from bias point.
|
|
100
|
+
* * Choose the one whose distance is closest to biasDistance.
|
|
101
|
+
* * push the chosen point on the data array.
|
|
102
|
+
* @param spacePoint point to project to otherCurve
|
|
103
|
+
* @param otherCurve target curve for projection
|
|
104
|
+
* @param referencePoint reference point for point selection
|
|
105
|
+
* @param biasDistance preferred distance.
|
|
106
|
+
*/
|
|
107
|
+
appendClosePoint(spacePoint, otherCurve, referencePoint, biasDistance) {
|
|
108
|
+
let dMin;
|
|
109
|
+
let closestPoint;
|
|
110
|
+
otherCurve.emitPerpendiculars(spacePoint, (curvePoint, _radians) => {
|
|
111
|
+
const d = Math.abs(curvePoint.distance(referencePoint) - Math.abs(biasDistance));
|
|
112
|
+
if (dMin === undefined || d < dMin) {
|
|
113
|
+
dMin = d;
|
|
114
|
+
closestPoint = curvePoint.clone();
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
if (closestPoint !== undefined) {
|
|
118
|
+
this.data.push(new Point2dImplicitCurve2d(closestPoint, otherCurve));
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Find closest points of an array of curves.
|
|
125
|
+
* @param spacePoint point to project to otherCurve
|
|
126
|
+
* @param referencePoint reference point for point selection
|
|
127
|
+
* @param biasDistance preferred distance.
|
|
128
|
+
* @param otherCurves array of curves to check.
|
|
129
|
+
*/
|
|
130
|
+
closePointsOfGeometry(spacePoint, referencePoint, biasRadius, otherCurves) {
|
|
131
|
+
for (const c of otherCurves)
|
|
132
|
+
this.appendClosePoint(spacePoint, c, referencePoint, biasRadius);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=ImplicitCurve2d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImplicitCurve2d.js","sourceRoot":"","sources":["../../../../../src/curve/internalContexts/geometry2d/ImplicitCurve2d.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAW,QAAQ,EAAE,MAAM,qCAAqC,CAAC;A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AK,MAAM,CAAC,IAAI,WAAW;YACzB,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;IACrE,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 CartesianGeometry\n */\n\nimport { Point2d, Vector2d } from \"../../../geometry3d/Point2dVector2d\";\nimport { XAndY } from \"../../../geometry3d/XYZProps\";\nimport { SmallSystem } from \"../../../numerics/SmallSystem\";\n\n/**\n * Abstract base class for curves with an implicit 2d function.\n * * Curves in the class are required to have an implicit function f(x,y)=0.\n * * They MAY (but are not required to) implement a parametric evaluator radiansToPoint2d.\n * @internal\n */\nexport abstract class ImplicitCurve2d {\n /**\n * Return the implicit function value at xy, i.e, f(x,y).\n * @param xy point for evaluation.\n */\n public abstract functionValue(xy: XAndY): number;\n /**\n * Return the implicit function gradient at xy.\n * @param xy point for evaluation.\n */\n public abstract gradient(xy: XAndY): Vector2d;\n /** Map a gradient vector (du,dv) from its local frame to global. */\n public static gradientLocalToGlobal(du: number, dv: number, vectorU: Vector2d, vectorV: Vector2d): Vector2d {\n const result = Vector2d.create();\n // use INVERSE of TRANSPOSE of [UV] matrix to map gradient terms\n if (SmallSystem.linearSystem2d(vectorU.x, vectorU.y, vectorV.x, vectorV.y, du, dv, result))\n return result;\n return Vector2d.create(0, 0);\n }\n /**\n * Find all perpendiculars from space point to the curve.\n * Pass each in turn to the handler.\n * @param spacePoint the space point.\n * @handler the handler to receive all the points on the curve and radians where perpendicular happens.\n */\n public abstract emitPerpendiculars(\n spacePoint: Point2d, handler: (curvePoint: Point2d, radians: number | undefined) => any,\n ): any;\n /**\n * Call emitPerpendiculars. Return the closest of the perpendiculars.\n * * Return undefined if no perpendiculars are received.\n * @param spacePoint the space point.\n */\n public closestPoint(spacePoint: Point2d): Point2d | undefined {\n let minDistanceSquared: number = Number.MAX_SAFE_INTEGER;\n let point: Point2d | undefined;\n // console.log ({space: spacePoint.toJSON()});\n this.emitPerpendiculars(\n spacePoint,\n (curvePoint: Point2d, _radians: number | undefined) => {\n const distanceSquared = curvePoint.distanceSquared(spacePoint);\n // console.log ({distanceSquared, xy: curvePoint.toJSON(), minD: minDistanceSquared});\n if (distanceSquared < minDistanceSquared) {\n point = curvePoint.clone();\n minDistanceSquared = distanceSquared;\n }\n }\n );\n return point;\n }\n /** Return true if the item has degenerate defining data. */\n public abstract isDegenerate(): boolean;\n /** Return a clone of the curve. */\n public abstract clone(): ImplicitCurve2d;\n /**\n * OPTIONAL method to return a Point2d at given radians value.\n * * The default implementation returns undefined.\n * * Concrete classes that can be expressed as a function of radians should implement this.\n */\n public radiansToPoint2d(_radians: number): Point2d | undefined {\n return undefined;\n }\n /**\n * OPTIONAL method to return the tangent at given radians value.\n * * The default implementation returns undefined.\n * * Concrete classes that can be expressed as a function of radians should implement this.\n */\n public radiansToTangentVector2d(_radians: number): Vector2d | undefined {\n return undefined;\n }\n}\n\n/**\n * Carrier class containing:\n * * a point\n * * the curve to which the point is related.\n * @internal\n */\nexport class Point2dImplicitCurve2d {\n public point: Point2d;\n public curve: ImplicitCurve2d;\n /**\n * CAPTURE a point and curve.\n * @param point point member\n * @param curve curve member\n */\n public constructor(point: Point2d, curve: ImplicitCurve2d) {\n this.point = point;\n this.curve = curve;\n }\n}\n/**\n * Carrier class containing:\n * * a curve which is a subclass of ImplicitCurve2d\n * * an array of paired point and ImplicitCurve2d.\n * @internal\n */\nexport class ImplicitGeometryMarkup<GeometryType extends ImplicitCurve2d> {\n public curve: GeometryType;\n public data: Point2dImplicitCurve2d[];\n /**\n * Construct a new carrier. The data array is created empty.\n * @param curve curve to CAPTURE\n */\n public constructor(curve: GeometryType) {\n this.curve = curve;\n this.data = [];\n }\n /**\n * * Use the otherCurve's emitPerpendiculars method to examine all perpendiculars from spacePoint to the curve.\n * * For each such point, compute distance from bias point.\n * * Choose the one whose distance is closest to biasDistance.\n * * push the chosen point on the data array.\n * @param spacePoint point to project to otherCurve\n * @param otherCurve target curve for projection\n * @param referencePoint reference point for point selection\n * @param biasDistance preferred distance.\n */\n public appendClosePoint(\n spacePoint: Point2d, otherCurve: ImplicitCurve2d, referencePoint: XAndY, biasDistance: number,\n ): boolean {\n let dMin: undefined | number;\n \n let closestPoint;\n otherCurve.emitPerpendiculars(\n spacePoint,\n (curvePoint: Point2d, _radians: number | undefined) => {\n const d = Math.abs(curvePoint.distance(referencePoint) - Math.abs(biasDistance));\n if (dMin === undefined || d < dMin) {\n dMin = d;\n closestPoint = curvePoint.clone();\n }\n }\n );\n if (closestPoint !== undefined) {\n this.data.push(new Point2dImplicitCurve2d(closestPoint, otherCurve));\n return true;\n }\n return false;\n }\n /**\n * Find closest points of an array of curves.\n * @param spacePoint point to project to otherCurve\n * @param referencePoint reference point for point selection\n * @param biasDistance preferred distance.\n * @param otherCurves array of curves to check.\n */\n public closePointsOfGeometry(\n spacePoint: Point2d, referencePoint: Point2d, biasRadius: number, otherCurves: ImplicitCurve2d[],\n ): void {\n for (const c of otherCurves)\n this.appendClosePoint(spacePoint, c, referencePoint, biasRadius);\n }\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module CartesianGeometry
|
|
3
|
+
*/
|
|
4
|
+
import { CurvePrimitive } from "../../CurvePrimitive";
|
|
5
|
+
import { ImplicitCurve2d } from "./ImplicitCurve2d";
|
|
6
|
+
/**
|
|
7
|
+
* Class to convert between `CurvePrimitive` and `ImplicitCurve2d`.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare class ImplicitCurve2dConverter {
|
|
11
|
+
/**
|
|
12
|
+
* Return an implicit curve for the XY parts of the given curve3d.
|
|
13
|
+
* * z components of the input curve are completely ignored
|
|
14
|
+
* * input Arc3d can convert to UnboundedEllipse2d or circle
|
|
15
|
+
* * Returned curves are untrimmed, i.e. lines do not record endpoints and arcs have no angle range.
|
|
16
|
+
* @param curve3d curve to convert. Must be a LineSegment3d or Arc3d. Other curve types return `undefined`.
|
|
17
|
+
*/
|
|
18
|
+
static createImplicitCurve2dFromCurvePrimitiveXY(curve3d: CurvePrimitive): ImplicitCurve2d | ImplicitCurve2d[] | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Create a curve primitive from an implicit curve.
|
|
21
|
+
* @param source the implicit curve(s) to convert.
|
|
22
|
+
* @param sizeHint for unbounded curves, the size hint is used when creating a curve primitive. Larger values create a
|
|
23
|
+
* longer curve primitive. Ignored for bounded curves. Default is 10.
|
|
24
|
+
*/
|
|
25
|
+
static createCurvePrimitiveFromImplicitCurve(source: ImplicitCurve2d | ImplicitCurve2d[], sizeHint?: number): CurvePrimitive | CurvePrimitive[] | undefined;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=ImplicitCurve2dConverter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImplicitCurve2dConverter.d.ts","sourceRoot":"","sources":["../../../../../src/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.ts"],"names":[],"mappings":"AAIA;;GAEG;AAOH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpD;;;GAGG;AACH,qBAAa,wBAAwB;IACnC;;;;;;OAMG;WACW,yCAAyC,CAAC,OAAO,EAAE,cAAc,GAC7E,eAAe,GAAG,eAAe,EAAE,GAAG,SAAS;IAqBjD;;;;;OAKG;WACW,qCAAqC,CACjD,MAAM,EAAE,eAAe,GAAG,eAAe,EAAE,EAAE,QAAQ,GAAE,MAAW,GACjE,cAAc,GAAG,cAAc,EAAE,GAAG,SAAS;CA4FjD"}
|
|
@@ -0,0 +1,148 @@
|
|
|
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 { BezierCurve3dH } from "../../../bspline/BezierCurve3dH";
|
|
9
|
+
import { Vector2d } from "../../../geometry3d/Point2dVector2d";
|
|
10
|
+
import { Point3d, Vector3d } from "../../../geometry3d/Point3dVector3d";
|
|
11
|
+
import { Point4d } from "../../../geometry4d/Point4d";
|
|
12
|
+
import { Arc3d } from "../../Arc3d";
|
|
13
|
+
import { CurvePrimitive } from "../../CurvePrimitive";
|
|
14
|
+
import { LineSegment3d } from "../../LineSegment3d";
|
|
15
|
+
import { UnboundedCircle2dByCenterAndRadius } from "./UnboundedCircle2d";
|
|
16
|
+
import { UnboundedEllipse2d } from "./UnboundedEllipse2d";
|
|
17
|
+
import { UnboundedHyperbola2d } from "./UnboundedHyperbola2d";
|
|
18
|
+
import { UnboundedLine2dByPointAndNormal } from "./UnboundedLine2d";
|
|
19
|
+
import { UnboundedParabola2d } from "./UnboundedParabola2d";
|
|
20
|
+
/**
|
|
21
|
+
* Class to convert between `CurvePrimitive` and `ImplicitCurve2d`.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export class ImplicitCurve2dConverter {
|
|
25
|
+
/**
|
|
26
|
+
* Return an implicit curve for the XY parts of the given curve3d.
|
|
27
|
+
* * z components of the input curve are completely ignored
|
|
28
|
+
* * input Arc3d can convert to UnboundedEllipse2d or circle
|
|
29
|
+
* * Returned curves are untrimmed, i.e. lines do not record endpoints and arcs have no angle range.
|
|
30
|
+
* @param curve3d curve to convert. Must be a LineSegment3d or Arc3d. Other curve types return `undefined`.
|
|
31
|
+
*/
|
|
32
|
+
static createImplicitCurve2dFromCurvePrimitiveXY(curve3d) {
|
|
33
|
+
if (curve3d instanceof LineSegment3d) {
|
|
34
|
+
const pointA = curve3d.startPoint();
|
|
35
|
+
const pointB = curve3d.endPoint();
|
|
36
|
+
return UnboundedLine2dByPointAndNormal.createPointXYPointXY(pointA.x, pointA.y, pointB.x, pointB.y);
|
|
37
|
+
}
|
|
38
|
+
else if (curve3d instanceof Arc3d) {
|
|
39
|
+
const center = curve3d.center;
|
|
40
|
+
const columnX = curve3d.matrixRef.columnX();
|
|
41
|
+
const columnY = curve3d.matrixRef.columnY();
|
|
42
|
+
if (curve3d.isCircularXY || curve3d.isDegenerateCircle) {
|
|
43
|
+
return UnboundedCircle2dByCenterAndRadius.createXYRadius(center.x, center.y, columnX.magnitudeXY());
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return UnboundedEllipse2d.createCenterAndAxisVectors(center, Vector2d.createFrom(columnX), Vector2d.createFrom(columnY));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Create a curve primitive from an implicit curve.
|
|
53
|
+
* @param source the implicit curve(s) to convert.
|
|
54
|
+
* @param sizeHint for unbounded curves, the size hint is used when creating a curve primitive. Larger values create a
|
|
55
|
+
* longer curve primitive. Ignored for bounded curves. Default is 10.
|
|
56
|
+
*/
|
|
57
|
+
static createCurvePrimitiveFromImplicitCurve(source, sizeHint = 10) {
|
|
58
|
+
if (Array.isArray(source)) {
|
|
59
|
+
const result = [];
|
|
60
|
+
for (const s of source) {
|
|
61
|
+
const c = this.createCurvePrimitiveFromImplicitCurve(s);
|
|
62
|
+
if (c === undefined) {
|
|
63
|
+
// ignore it
|
|
64
|
+
}
|
|
65
|
+
else if (c instanceof CurvePrimitive) {
|
|
66
|
+
result.push(c);
|
|
67
|
+
}
|
|
68
|
+
else if (Array.isArray(c)) {
|
|
69
|
+
for (const c1 of c)
|
|
70
|
+
result.push(c1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
// source is a single curve
|
|
76
|
+
if (source instanceof UnboundedCircle2dByCenterAndRadius) {
|
|
77
|
+
return Arc3d.createXY(Point3d.createFrom(source.center), source.radius);
|
|
78
|
+
}
|
|
79
|
+
else if (source instanceof UnboundedLine2dByPointAndNormal) {
|
|
80
|
+
const vectorAlong = source.vectorAlongLine();
|
|
81
|
+
return LineSegment3d.createXYXY(source.point.x - sizeHint * vectorAlong.x, source.point.y - sizeHint * vectorAlong.y, source.point.x + sizeHint * vectorAlong.x, source.point.y + sizeHint * vectorAlong.y);
|
|
82
|
+
}
|
|
83
|
+
else if (source instanceof UnboundedHyperbola2d) {
|
|
84
|
+
const result = [];
|
|
85
|
+
/* COMMENTED CODE FOR LINESTRING APPROXIMATION
|
|
86
|
+
const degreeStep = 10.0;
|
|
87
|
+
const degreeLimit = 80.0;
|
|
88
|
+
for (const signX of [1, -1]) {
|
|
89
|
+
const strokes = [];
|
|
90
|
+
for (const theta = Angle.createDegrees(-degreeLimit);
|
|
91
|
+
theta.degrees < degreeLimit + 1;
|
|
92
|
+
theta.setDegrees(theta.degrees + degreeStep)) {
|
|
93
|
+
const c = signX * theta.cos();
|
|
94
|
+
const s = theta.sin();
|
|
95
|
+
const xy = Point3d.createFrom(source.pointA.plus2Scaled(source.vectorU, 1.0 / c, source.vectorV, s / c));
|
|
96
|
+
strokes.push(Point3d.createFrom(xy));
|
|
97
|
+
}
|
|
98
|
+
result.push(LineString3d.create(strokes));
|
|
99
|
+
}
|
|
100
|
+
*/
|
|
101
|
+
// The bezier branches open on plus and minus u axes, with asymptotes at 45 degree angles in local space
|
|
102
|
+
// Construct a bezier for 180 degrees of unit circle from negative y to plus 1 with (c,s,w)
|
|
103
|
+
// Reverse c and w so its normalized form is (sec, tan, 1)
|
|
104
|
+
// Map those so bezier 0 maps to U-V asymptote, bezier 1 maps to U+v, and bezier 0.5 maps to A
|
|
105
|
+
// but the secants have 0 weight and evaluate at infinity
|
|
106
|
+
// so subdivide to safely within 0..1
|
|
107
|
+
// Repeat with negated sign for U to get the other branch.
|
|
108
|
+
for (const signU of [1, -1]) {
|
|
109
|
+
const poles = [
|
|
110
|
+
Point4d.create(signU * source.vectorU.x + source.vectorV.x, signU * source.vectorU.y + source.vectorV.y, 0, 0),
|
|
111
|
+
Point4d.create(source.center.x, source.center.y, 0, 1),
|
|
112
|
+
Point4d.create(signU * source.vectorU.x - source.vectorV.x, signU * source.vectorU.y - source.vectorV.y, 0, 0),
|
|
113
|
+
];
|
|
114
|
+
const fullBezier = BezierCurve3dH.create(poles);
|
|
115
|
+
if (fullBezier) {
|
|
116
|
+
const branch = fullBezier?.clonePartialCurve(0.05, 0.95);
|
|
117
|
+
result.push(branch);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
else if (source instanceof UnboundedEllipse2d) {
|
|
123
|
+
return Arc3d.create(Point3d.createFrom(source.center), Vector3d.createFrom(source.vectorU), Vector3d.createFrom(source.vectorV));
|
|
124
|
+
}
|
|
125
|
+
else if (source instanceof UnboundedParabola2d) {
|
|
126
|
+
/*
|
|
127
|
+
const halfParabolaPoles = [
|
|
128
|
+
Point4d.create (2 * source.pointA.x, 2 *source.pointA.y, 0, 2),
|
|
129
|
+
Point4d.create (source.vectorU.x, source.vectorU.y, 0, 0),
|
|
130
|
+
Point4d.create (2 * source.vectorV.x, 2 * source.vectorV.y, 0, 0),
|
|
131
|
+
];
|
|
132
|
+
*/
|
|
133
|
+
const point0 = source.center.plus2Scaled(source.vectorU, 1, source.vectorV, 1);
|
|
134
|
+
const point1 = source.center.minus(source.vectorV);
|
|
135
|
+
const point2 = source.center.plus2Scaled(source.vectorU, -1, source.vectorV, 1);
|
|
136
|
+
const poles = [
|
|
137
|
+
Point4d.create(point0.x, point0.y, 0, 1),
|
|
138
|
+
Point4d.create(point1.x, point1.y, 0, 1),
|
|
139
|
+
Point4d.create(point2.x, point2.y, 0, 1),
|
|
140
|
+
];
|
|
141
|
+
const centerBezier = BezierCurve3dH.create(poles);
|
|
142
|
+
if (centerBezier !== undefined)
|
|
143
|
+
return centerBezier.clonePartialCurve(-2, 3);
|
|
144
|
+
}
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=ImplicitCurve2dConverter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImplicitCurve2dConverter.js","sourceRoot":"","sources":["../../../../../src/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,kCAAkC,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IACnC;;;;;;OAMG;IACI,MAAM,CAAC,yCAAyC,CAAC,OAAuB;QAE7E,IAAI,OAAO,YAAY,aAAa,EAAE,CAAC;YACrC,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;YACpC,MAAM,MAAM,GAAG,OAAO,C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AAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YAC/E,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACnD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YAChF,MAAM,KAAK,GAAG;gBACZ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACxC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACxC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;aACzC,CAAC;YAEF,MAAM,YAAY,GAAG,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAClD,IAAI,YAAY,KAAK,SAAS;gBAC5B,OAAO,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACjD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,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 CartesianGeometry\n */\n\nimport { BezierCurve3dH } from \"../../../bspline/BezierCurve3dH\";\nimport { Vector2d } from \"../../../geometry3d/Point2dVector2d\";\nimport { Point3d, Vector3d } from \"../../../geometry3d/Point3dVector3d\";\nimport { Point4d } from \"../../../geometry4d/Point4d\";\nimport { Arc3d } from \"../../Arc3d\";\nimport { CurvePrimitive } from \"../../CurvePrimitive\";\nimport { LineSegment3d } from \"../../LineSegment3d\";\nimport { ImplicitCurve2d } from \"./ImplicitCurve2d\";\nimport { UnboundedCircle2dByCenterAndRadius } from \"./UnboundedCircle2d\";\nimport { UnboundedEllipse2d } from \"./UnboundedEllipse2d\";\nimport { UnboundedHyperbola2d } from \"./UnboundedHyperbola2d\";\nimport { UnboundedLine2dByPointAndNormal } from \"./UnboundedLine2d\";\nimport { UnboundedParabola2d } from \"./UnboundedParabola2d\";\n\n/**\n * Class to convert between `CurvePrimitive` and `ImplicitCurve2d`.\n * @internal\n */\nexport class ImplicitCurve2dConverter {\n /**\n * Return an implicit curve for the XY parts of the given curve3d.\n * * z components of the input curve are completely ignored\n * * input Arc3d can convert to UnboundedEllipse2d or circle\n * * Returned curves are untrimmed, i.e. lines do not record endpoints and arcs have no angle range.\n * @param curve3d curve to convert. Must be a LineSegment3d or Arc3d. Other curve types return `undefined`.\n */\n public static createImplicitCurve2dFromCurvePrimitiveXY(curve3d: CurvePrimitive):\n ImplicitCurve2d | ImplicitCurve2d[] | undefined {\n if (curve3d instanceof LineSegment3d) {\n const pointA = curve3d.startPoint();\n const pointB = curve3d.endPoint();\n return UnboundedLine2dByPointAndNormal.createPointXYPointXY(pointA.x, pointA.y, pointB.x, pointB.y);\n } else if (curve3d instanceof Arc3d) {\n const center = curve3d.center;\n const columnX = curve3d.matrixRef.columnX()\n const columnY = curve3d.matrixRef.columnY()\n if (curve3d.isCircularXY || curve3d.isDegenerateCircle) {\n return UnboundedCircle2dByCenterAndRadius.createXYRadius(\n center.x, center.y, columnX.magnitudeXY(),\n );\n } else {\n return UnboundedEllipse2d.createCenterAndAxisVectors(\n center, Vector2d.createFrom(columnX), Vector2d.createFrom(columnY),\n );\n }\n }\n return undefined;\n }\n /**\n * Create a curve primitive from an implicit curve.\n * @param source the implicit curve(s) to convert.\n * @param sizeHint for unbounded curves, the size hint is used when creating a curve primitive. Larger values create a\n * longer curve primitive. Ignored for bounded curves. Default is 10.\n */\n public static createCurvePrimitiveFromImplicitCurve(\n source: ImplicitCurve2d | ImplicitCurve2d[], sizeHint: number = 10,\n ): CurvePrimitive | CurvePrimitive[] | undefined {\n if (Array.isArray(source)) {\n const result: CurvePrimitive[] = [];\n for (const s of source) {\n const c = this.createCurvePrimitiveFromImplicitCurve(s);\n if (c === undefined) {\n // ignore it\n } else if (c instanceof CurvePrimitive) {\n result.push(c);\n } else if (Array.isArray(c)) {\n for (const c1 of c)\n result.push(c1);\n }\n }\n return result;\n }\n // source is a single curve\n if (source instanceof UnboundedCircle2dByCenterAndRadius) {\n return Arc3d.createXY(Point3d.createFrom(source.center), source.radius);\n } else if (source instanceof UnboundedLine2dByPointAndNormal) {\n const vectorAlong = source.vectorAlongLine();\n return LineSegment3d.createXYXY(\n source.point.x - sizeHint * vectorAlong.x, source.point.y - sizeHint * vectorAlong.y,\n source.point.x + sizeHint * vectorAlong.x, source.point.y + sizeHint * vectorAlong.y,\n );\n } else if (source instanceof UnboundedHyperbola2d) {\n const result: CurvePrimitive[] = [];\n /* COMMENTED CODE FOR LINESTRING APPROXIMATION\n const degreeStep = 10.0;\n const degreeLimit = 80.0;\n for (const signX of [1, -1]) {\n const strokes = [];\n for (const theta = Angle.createDegrees(-degreeLimit);\n theta.degrees < degreeLimit + 1;\n theta.setDegrees(theta.degrees + degreeStep)) {\n const c = signX * theta.cos();\n const s = theta.sin();\n const xy = Point3d.createFrom(source.pointA.plus2Scaled(source.vectorU, 1.0 / c, source.vectorV, s / c));\n strokes.push(Point3d.createFrom(xy));\n }\n result.push(LineString3d.create(strokes));\n }\n */\n // The bezier branches open on plus and minus u axes, with asymptotes at 45 degree angles in local space\n // Construct a bezier for 180 degrees of unit circle from negative y to plus 1 with (c,s,w)\n // Reverse c and w so its normalized form is (sec, tan, 1)\n // Map those so bezier 0 maps to U-V asymptote, bezier 1 maps to U+v, and bezier 0.5 maps to A\n // but the secants have 0 weight and evaluate at infinity\n // so subdivide to safely within 0..1\n // Repeat with negated sign for U to get the other branch.\n for (const signU of [1, -1]) {\n const poles = [\n Point4d.create(signU * source.vectorU.x + source.vectorV.x, signU * source.vectorU.y + source.vectorV.y, 0, 0),\n Point4d.create(source.center.x, source.center.y, 0, 1),\n Point4d.create(signU * source.vectorU.x - source.vectorV.x, signU * source.vectorU.y - source.vectorV.y, 0, 0),\n ];\n const fullBezier = BezierCurve3dH.create(poles);\n if (fullBezier) {\n const branch = fullBezier?.clonePartialCurve(0.05, 0.95);\n result.push(branch);\n }\n }\n return result;\n } else if (source instanceof UnboundedEllipse2d) {\n return Arc3d.create(\n Point3d.createFrom(source.center),\n Vector3d.createFrom(source.vectorU),\n Vector3d.createFrom(source.vectorV),\n );\n } else if (source instanceof UnboundedParabola2d) {\n /*\n const halfParabolaPoles = [\n Point4d.create (2 * source.pointA.x, 2 *source.pointA.y, 0, 2),\n Point4d.create (source.vectorU.x, source.vectorU.y, 0, 0),\n Point4d.create (2 * source.vectorV.x, 2 * source.vectorV.y, 0, 0),\n ];\n */\n const point0 = source.center.plus2Scaled(source.vectorU, 1, source.vectorV, 1);\n const point1 = source.center.minus(source.vectorV);\n const point2 = source.center.plus2Scaled(source.vectorU, -1, source.vectorV, 1);\n const poles = [\n Point4d.create(point0.x, point0.y, 0, 1),\n Point4d.create(point1.x, point1.y, 0, 1),\n Point4d.create(point2.x, point2.y, 0, 1),\n ];\n\n const centerBezier = BezierCurve3dH.create(poles);\n if (centerBezier !== undefined)\n return centerBezier.clonePartialCurve(-2, 3);\n }\n return undefined;\n }\n}\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module CartesianGeometry
|
|
3
|
+
*/
|
|
4
|
+
import { Point2d, Vector2d } from "../../../geometry3d/Point2dVector2d";
|
|
5
|
+
import { XAndY } from "../../../geometry3d/XYZProps";
|
|
6
|
+
import { ImplicitCurve2d } from "./ImplicitCurve2d";
|
|
7
|
+
import { UnboundedLine2dByPointAndNormal } from "./UnboundedLine2d";
|
|
8
|
+
/**
|
|
9
|
+
* Internal class for a complete circle in the xy plane, with center and radius stored.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare class UnboundedCircle2dByCenterAndRadius extends ImplicitCurve2d {
|
|
13
|
+
/** The circle's center. */
|
|
14
|
+
center: Point2d;
|
|
15
|
+
/** The circle radius. */
|
|
16
|
+
radius: number;
|
|
17
|
+
private constructor();
|
|
18
|
+
/** Return a clone of this circle. */
|
|
19
|
+
clone(): UnboundedCircle2dByCenterAndRadius;
|
|
20
|
+
/** Return a clone of this circle, with radius negated. */
|
|
21
|
+
cloneNegateRadius(): UnboundedCircle2dByCenterAndRadius;
|
|
22
|
+
/**
|
|
23
|
+
* Create an ImplicitCircle2d from XY parts of its center and its radius.
|
|
24
|
+
* @param centerX x coordinate of center
|
|
25
|
+
* @param centerY y coordinate of center
|
|
26
|
+
* @param radius circle radius
|
|
27
|
+
* @returns newly created circle object
|
|
28
|
+
*/
|
|
29
|
+
static createXYRadius(centerX: number, centerY: number, radius: number): UnboundedCircle2dByCenterAndRadius;
|
|
30
|
+
/**
|
|
31
|
+
* Create an ImplicitCircle2d from an xy object and a radius.
|
|
32
|
+
* * Zero radius is valid.
|
|
33
|
+
* * The input coordinates are copied -- the center is NOT captured.
|
|
34
|
+
* @param center xy coordinates of center
|
|
35
|
+
* @param radius circle radius
|
|
36
|
+
* @returns newly created circle object
|
|
37
|
+
*/
|
|
38
|
+
static createPointRadius(center: XAndY, radius: number): UnboundedCircle2dByCenterAndRadius;
|
|
39
|
+
/**
|
|
40
|
+
* Returns gradient of the implicit function.
|
|
41
|
+
* @param xy space point
|
|
42
|
+
* @returns squared distance to center minus squared radius.
|
|
43
|
+
*/
|
|
44
|
+
functionValue(xy: XAndY): number;
|
|
45
|
+
/**
|
|
46
|
+
* Returns gradient of the implicit function.
|
|
47
|
+
* @param xy space point
|
|
48
|
+
*/
|
|
49
|
+
gradient(xy: XAndY): Vector2d;
|
|
50
|
+
/**
|
|
51
|
+
* Emit circle points for which a vector to the space point is perpendicular to the circle.
|
|
52
|
+
* * For a non-zero radius circle, there are two perpendiculars. The one on the side of the space point is emitted first.
|
|
53
|
+
* * For a zero radius circle, the vector from center to the space point is the only perpendicular.
|
|
54
|
+
* @param spacePoint the space point.
|
|
55
|
+
* @handler the handler to receive all the points on the curve and radians where perpendicular happens.
|
|
56
|
+
*/
|
|
57
|
+
emitPerpendiculars(spacePoint: Point2d, handler: (curvePoint: Point2d, radians: number | undefined) => any): void;
|
|
58
|
+
/**
|
|
59
|
+
* Returns true if the circle radius is near zero.
|
|
60
|
+
*/
|
|
61
|
+
isDegenerate(): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Test if the centers and radii of two circles are close.
|
|
64
|
+
* @param other second circle
|
|
65
|
+
* @returns true if identical to tolerance.
|
|
66
|
+
*/
|
|
67
|
+
isSameCircle(other: UnboundedCircle2dByCenterAndRadius, negatedRadiiAreEqual: boolean): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Compute intersections with another circle.
|
|
70
|
+
* @param other second circle
|
|
71
|
+
* @return array of 0, 1, or 2 points of intersection
|
|
72
|
+
*/
|
|
73
|
+
intersectCircle(other: UnboundedCircle2dByCenterAndRadius): Point2d[];
|
|
74
|
+
/**
|
|
75
|
+
* Compute intersections with a line
|
|
76
|
+
* @param line the line.
|
|
77
|
+
* @return array of 0, 1, or 2 points of intersection
|
|
78
|
+
*/
|
|
79
|
+
intersectLine(line: UnboundedLine2dByPointAndNormal): Point2d[];
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=UnboundedCircle2d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnboundedCircle2d.d.ts","sourceRoot":"","sources":["../../../../../src/curve/internalContexts/geometry2d/UnboundedCircle2d.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,OAAO,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