CurvePrimitive.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
11 
12 
13 #ifdef BENTLEY_WIN32
14 #pragma warning (push)
15 #pragma warning (default : 4266) // NEEDS WORK -- warnings about missing virtuals?
16 #endif
18 
19 
20 
21 
49 struct ICurvePrimitive : public RefCountedBase
50 {
51 public:
54  {
67  };
68 
69 
70 
71 
72 
75  {
78  };
79 
81 GEOMDLLIMPEXP bool GetMarkerBit (CurvePrimitiveMarkerBit selector) const;
83 GEOMDLLIMPEXP void SetMarkerBit (CurvePrimitiveMarkerBit selector, bool value);
84 
85 
87 GEOMDLLIMPEXP int64_t GetTag () const;
89 GEOMDLLIMPEXP int GetIntTag () const;
91 GEOMDLLIMPEXP void SetTag (int64_t tag);
93 GEOMDLLIMPEXP void SetTag (int tag);
94 
95 GEOMDLLIMPEXP CurvePrimitiveIdCP GetId() const;
96 private:
97  virtual void MakeClassAbstract() = 0;
98 public:
99 public:
100 
102 GEOMDLLIMPEXP CurvePrimitiveType GetCurvePrimitiveType () const;
103 
104 
105 
106 
108 GEOMDLLIMPEXP bool TryGetLine (DSegment3dR segment) const;
110 GEOMDLLIMPEXP bool TryGetArc (DEllipse3dR arc) const;
111 
113 GEOMDLLIMPEXP DSegment3dCP GetLineCP () const;
115 GEOMDLLIMPEXP bvector<DPoint3d> const* GetLineStringCP () const;
117 GEOMDLLIMPEXP bool TryGetSegmentInLineString (DSegment3dR segment, size_t startPointIndex) const;
118 
120 GEOMDLLIMPEXP bool TryAddLineStringPoint (DPoint3dCR xyz);
121 
123 GEOMDLLIMPEXP DEllipse3dCP GetArcCP () const;
125 GEOMDLLIMPEXP MSBsplineCurveCP GetBsplineCurveCP () const;
127 GEOMDLLIMPEXP MSBsplineCurvePtr GetBsplineCurvePtr () const;
129 GEOMDLLIMPEXP MSBsplineCurveCP GetProxyBsplineCurveCP () const;
131 GEOMDLLIMPEXP MSBsplineCurvePtr GetProxyBsplineCurvePtr () const;
133 GEOMDLLIMPEXP MSInterpolationCurveCP GetInterpolationCurveCP () const;
135 GEOMDLLIMPEXP bvector<DPoint3d> const* GetAkimaCurveCP () const;
137 GEOMDLLIMPEXP bvector<DPoint3d> const* GetPointStringCP () const;
139 GEOMDLLIMPEXP CurveVectorCP GetChildCurveVectorCP () const;
141 GEOMDLLIMPEXP DSpiral2dPlacementCP GetSpiralPlacementCP () const;
143 GEOMDLLIMPEXP PartialCurveDetailCP GetPartialCurveDetailCP () const;
145 GEOMDLLIMPEXP bool TryGetPartialCurveData (double &fractionA, double &fractionB, ICurvePrimitivePtr &parentCurve, int64_t &tag) const;
146 
147 
148 
149 
150 
151 
154 GEOMDLLIMPEXP static ICurvePrimitivePtr CreateLine (DSegment3dCR segment);
155 
159 GEOMDLLIMPEXP static ICurvePrimitivePtr CreateLineString (DPoint3dCP points, size_t nPoints);
160 
163 GEOMDLLIMPEXP static ICurvePrimitivePtr CreateLineString (bvector<DPoint3d> const &points);
164 
167 GEOMDLLIMPEXP static ICurvePrimitivePtr CreateArc (DEllipse3dCR ellipse);
170 GEOMDLLIMPEXP static ICurvePrimitivePtr CreateBsplineCurve (MSBsplineCurveCR curve);
174 
175 
178 GEOMDLLIMPEXP static ICurvePrimitivePtr CreateBsplineCurve (MSBsplineCurvePtr curve);
179 
180 
184 
188 
193 GEOMDLLIMPEXP static ICurvePrimitivePtr CreateAkimaCurve (DPoint3dCP points, size_t nPoints);
197 GEOMDLLIMPEXP static ICurvePrimitivePtr CreatePointString (DPoint3dCP points, size_t nPoints);
200 GEOMDLLIMPEXP static ICurvePrimitivePtr CreatePointString (bvector<DPoint3d> &points);
201 
202 
215 GEOMDLLIMPEXP static ICurvePrimitivePtr CreateRectangle(double x0, double y0, double x1, double y1, double z, int areaSignPreference = 0);
216 
217 
223 GEOMDLLIMPEXP static ICurvePrimitivePtr CreateSpiral (DSpiral2dBaseCR spiral, TransformCR frame,
224  double fractionA, double fractionB);
225 
226 
237  (
238  int transitionType,
239  double startRadians,
240  double startCurvature,
241  double endRadians,
242  double endCurvature,
243  TransformCR frame,
244  double fractionA,
245  double fractionB
246  );
247 
258  (
259  int transitionType,
260  double startRadians,
261  double startRadius,
262  double endRadians,
263  double endRadius,
264  TransformCR frame,
265  double fractionA,
266  double fractionB
267  );
268 
279  (
280  int transitionType,
281  double startRadians,
282  double startRadius,
283  double length,
284  double endRadius,
285  TransformCR frame,
286  double fractionA,
287  double fractionB
288  );
289 
300  (
301  int transitionType,
302  double startRadians,
303  double startCurvature,
304  double length,
305  double endCurvature,
306  TransformCR frame,
307  double fractionA,
308  double fractionB
309  );
318 GEOMDLLIMPEXP static bool CreateSpiralsStartShoulderTarget
319 (
320 int transitionType,
321 DPoint3dCR pointA,
322 DPoint3dCR pointB,
323 DPoint3dCR pointC,
324 ICurvePrimitivePtr &primitiveA,
325 ICurvePrimitivePtr &primitiveB
326 );
327 
336 (
337 int typeCode,
338 DPoint3dCR startPoint,
339 double startRadians,
340 double radiusA,
341 double lengthAB,
342 double radiusB
343 );
344 
351 GEOMDLLIMPEXP static ICurvePrimitivePtr CreatePartialCurve (ICurvePrimitiveP parentCurve, double fraction0, double fraction1, int64_t index = 0);
352 
359 (
360 ICurvePrimitiveCR curveA,
361 double fraction,
362 ICurvePrimitiveCR curveB
363 );
364 
365 
367 GEOMDLLIMPEXP ICurvePrimitivePtr Clone () const;
368 
372 GEOMDLLIMPEXP ICurvePrimitivePtr CloneComponent (ptrdiff_t componentIndex) const;
373 
379 GEOMDLLIMPEXP ICurvePrimitivePtr CloneBetweenFractions (double fractionA, double fractionB, bool allowExtrapolation) const;
380 
384 
388 GEOMDLLIMPEXP ICurvePrimitivePtr CloneDereferenced (bool allowExtrapolation = false, bool maximumDeref = true) const;
389 
391 GEOMDLLIMPEXP static ICurvePrimitivePtr CreateChildCurveVector (CurveVectorPtr source);
396 
397 
398 
399 
404 GEOMDLLIMPEXP bool FractionToPoint (double f, DPoint3dR point) const;
405 
411 GEOMDLLIMPEXP bool FractionToPoint (double f, DPoint3dR point, DVec3dR tangent) const;
412 
423 GEOMDLLIMPEXP bool FractionToPointWithTwoSidedDerivative (double f, DPoint3dR point, DVec3dR derivativeA, DVec3dR derivativeB) const;
424 
425 
432 GEOMDLLIMPEXP bool ComponentFractionToPoint (ptrdiff_t componentIndex, double f, DPoint3dR point) const;
433 
441 GEOMDLLIMPEXP bool ComponentFractionToPoint (ptrdiff_t componentIndex, double f, DPoint3dR point, DVec3dR tangent) const;
442 
443 
444 
449 GEOMDLLIMPEXP bool FractionToPoint (double f, DRay3dR ray) const;
450 
455 GEOMDLLIMPEXP bool FractionToPoint (double f, CurveLocationDetail &detail) const;
456 
457 
464 GEOMDLLIMPEXP bool FractionToPoint (double f, DPoint3dR point, DVec3dR tangent, DVec3dR derivative2) const;
465 
473 GEOMDLLIMPEXP bool FractionToPoint (double f, DPoint3dR point, DVec3dR tangent, DVec3dR derivative2, DVec3dR derivative3) const;
474 
479 GEOMDLLIMPEXP bool FractionToFrenetFrame (double f, TransformR frame) const;
480 
481 
482 
483 
484 
488 GEOMDLLIMPEXP bool Length (double &length) const;
489 
496 GEOMDLLIMPEXP bool Length (RotMatrixCP worldToLocal, double &length) const;
497 
498 
499 
503 GEOMDLLIMPEXP bool FastLength (double &length) const;
504 
505 
507 GEOMDLLIMPEXP bool GetRange (DRange3dR range) const;
509 GEOMDLLIMPEXP bool GetRange (DRange3dR range, TransformCR transform) const;
510 
519 GEOMDLLIMPEXP DRange1d ProjectedParameterRange (DRay3dCR ray, double fraction0, double fraction1) const;
520 
527 GEOMDLLIMPEXP DRange1d ProjectedParameterRange (DRay3dCR ray) const;
528 
532 GEOMDLLIMPEXP double FastMaxAbs () const;
533 
535 GEOMDLLIMPEXP bool IsSameStructure (ICurvePrimitiveCR other) const;
536 
540 GEOMDLLIMPEXP bool IsSameStructureAndGeometry (ICurvePrimitiveCR other, double tolerance = 0.0) const;
541 
549 GEOMDLLIMPEXP size_t NumComponent() const;
550 
551 
552 
554 GEOMDLLIMPEXP bool GetBreakFraction (size_t breakFractioniIndex, double &fraction) const;
556 GEOMDLLIMPEXP bool AdjustFractionToBreakFraction (double fraction, Rounding::RoundingMode mode, size_t &breakIndex, double &adjustedFraction) const;
558 GEOMDLLIMPEXP bool GetMSBsplineCurve (MSBsplineCurveR curve, double fraction0 = 0.0, double fraction1 = 1.0) const;
560 GEOMDLLIMPEXP MSBsplineCurvePtr GetMSBsplineCurvePtr (double fraction0 = 0.0, double fraction1 = 1.0) const;
561 
562 
569 GEOMDLLIMPEXP bool SignedDistanceBetweenFractions (double startFraction, double endFraction, double &signedDistance) const;
570 
578 GEOMDLLIMPEXP bool SignedDistanceBetweenFractions (RotMatrixCP worldToLocal, double startFraction, double endFraction, double &signedDistance) const;
579 
580 
589 GEOMDLLIMPEXP bool PointAtSignedDistanceFromFraction (double startFraction, double signedDistance, bool allowExtension, CurveLocationDetailR location) const;
590 
591 
601 GEOMDLLIMPEXP bool PointAtSignedDistanceFromFraction (RotMatrixCP worldToView, double startFraction, double signedDistance, bool allowExtension, CurveLocationDetailR location) const;
602 
608 GEOMDLLIMPEXP bool ClosestPointBounded (DPoint3dCR spacePoint, double &fraction, DPoint3dR curvePoint) const;
609 
612 GEOMDLLIMPEXP void AnnounceKeyPoints
613 (
614 DPoint3dCR spacePoint,
615 CurveKeyPointCollector &collector,
616 bool extend0,
617 bool extend1
618 ) const;
619 
620 
636 GEOMDLLIMPEXP bool ClosestPointBounded (DPoint3dCR spacePoint, CurveLocationDetailR location, bool extend0, bool extend1) const;
637 
651 GEOMDLLIMPEXP bool ClosestPointBounded (DPoint3dCR spacePoint, CurveLocationDetailR location) const;
652 
653 
654 
659 GEOMDLLIMPEXP bool ClosestPointBoundedXY (DPoint3dCR spacePoint, DMatrix4dCP worldToLocal, CurveLocationDetailR location) const;
660 
661 
668 GEOMDLLIMPEXP bool ClosestPointBoundedXY (DPoint3dCR spacePoint, DMatrix4dCP worldToLocal, CurveLocationDetailR location, bool extend0, bool extend1) const;
669 
674 GEOMDLLIMPEXP bool GetStartEnd (DPoint3dR pointA, DPoint3dR pointB) const;
681 GEOMDLLIMPEXP bool GetStartEnd (DPoint3dR pointA, DPoint3dR pointB, DVec3dR unitTangentA, DVec3dR unitTangentB) const;
682 
685 GEOMDLLIMPEXP bool GetStartPoint (DPoint3dR point) const;
686 
688 GEOMDLLIMPEXP bool TrySetStart (DPoint3dCR xyz);
690 GEOMDLLIMPEXP bool TrySetEnd (DPoint3dCR xyz);
691 
693 GEOMDLLIMPEXP bool IsExtensibleFractionSpace () const;
694 
697 GEOMDLLIMPEXP bool IsMappableFractionSpace () const;
698 
700 GEOMDLLIMPEXP bool IsFractionSpace () const;
701 
702 
705 GEOMDLLIMPEXP bool IsPeriodicFractionSpace(double &period) const;
706 
707 
709 GEOMDLLIMPEXP bool TransformInPlace (TransformCR transform);
710 
712 GEOMDLLIMPEXP bool ReverseCurvesInPlace ();
713 
714 
715 
716 
723 GEOMDLLIMPEXP void AppendCurvePlaneIntersections (DPlane3dCR plane, bvector<CurveLocationDetailPair> &intersections, double tolerance = 0.0) const;
724 
726 GEOMDLLIMPEXP void AppendCurveRangeIntersections
727 (
728 LocalRangeCR range,
729 bvector<PartialCurveDetail> &intersections
730 ) const;
731 
733 GEOMDLLIMPEXP void AppendCurveBilinearPatchIntersections
734 (
735 DBilinearPatch3dCR patch,
737 ) const;
738 
740 GEOMDLLIMPEXP void AppendCurvePlaneIntersections
741 (
742 DPlane3dByVectorsCR plane,
743 UVBoundarySelect bounded,
745 ) const;
746 
752 GEOMDLLIMPEXP bool WireCentroid (double &length, DPoint3dR centroid, double fraction0 = 0.0, double fraction1 = 1.0) const;
753 
754 
755 
764 GEOMDLLIMPEXP bool AddStrokes (bvector <DPoint3d> &points, IFacetOptionsR options,
765  bool includeStartPoint = true,
766  double startFraction = 0.0,
767  double endFraction = 1.0
768  ) const;
770 GEOMDLLIMPEXP size_t GetStrokeCount (IFacetOptionsR options, double startFraction = 0.0, double endFraction = 1.0) const;
771 
778 GEOMDLLIMPEXP static bool AddRuledSurfaceRayIntersections
779  (
781  ICurvePrimitiveCR curveA,
782  ICurvePrimitiveCR curveB,
783  DRay3dCR ray
784  );
785 
786 
787 }; // ICurvePrimitive
788 
789 
791 
792 #ifdef BENTLEY_WIN32
793 #pragma warning (pop)
794 #endif
struct MSBsplineCurve & MSBsplineCurveR
Definition: msgeomstructs_typedefs.h:139
struct RotMatrix const * RotMatrixCP
Definition: msgeomstructs_typedefs.h:135
MSBsplineCurvePtr GetBsplineCurvePtr() const
If this is a bspline primtiive, return ref counted pointer to its curve. Otherwise return NULL...
static ICurvePrimitivePtr CreatePartialCurve(ICurvePrimitiveP parentCurve, double fraction0, double fraction1, int64_t index=0)
Allocate and fill a reference to a portion of a parent curve.
static ICurvePrimitivePtr CreatePointString(DPoint3dCP points, size_t nPoints)
Allocate and fill a new point string.
DRange1d ProjectedParameterRange(DRay3dCR ray, double fraction0, double fraction1) const
Return the range the primitive projected onto a ray.
bool FastLength(double &length) const
Compute a fast approximation of curve length.
bool TrySetEnd(DPoint3dCR xyz)
Modify the end point if possible.
MSBsplineCurvePtr GetProxyBsplineCurvePtr() const
If available, return a(refcounted pointer to) a proxy bspline curve.
static ICurvePrimitivePtr CreateBsplineCurveSwapFromSource(MSBsplineCurveR curve)
Allocate and fill a new bspline curve.
DSpiral2dPlacementCP GetSpiralPlacementCP() const
If this is s a spiral placement return const pointer to its coordinate data. Otherwise return NULL...
CurvePrimitiveMarkerBit
Bit mask for access to selective parts of an integer tag in each curve primitive. ...
Definition: CurvePrimitive.h:74
bool IsExtensibleFractionSpace() const
Test if fractional queries allow extension. When this is true, the CurvePrimitive recognizes fraction...
bool GetBreakFraction(size_t breakFractioniIndex, double &fraction) const
Return the fractional postion of a point where the curve's continuity has a break.
static bool CreateSpiralsStartShoulderTarget(int transitionType, DPoint3dCR pointA, DPoint3dCR pointB, DPoint3dCR pointC, ICurvePrimitivePtr &primitiveA, ICurvePrimitivePtr &primitiveB)
Create a pair of spirals that act like a "fillet" of a corner defined by start, shoulder and target...
RefCountedPtr< struct ICurvePrimitive > ICurvePrimitivePtr
Definition: GeomApi.h:112
bvector< DPoint3d > const * GetPointStringCP() const
If this is a point string, return const pointer to its point array. Otherwise return NULL...
MSBsplineCurveCP GetBsplineCurveCP() const
If this is a bspline primtiive, return const pointer to its curve. Otherwise return NULL...
struct DPoint3d const * DPoint3dCP
Definition: msgeomstructs_typedefs.h:79
Detail data for a point along a curve, allowing indexing into a subcomponent.
Definition: CurveDetails.h:56
size_t GetStrokeCount(IFacetOptionsR options, double startFraction=0.0, double endFraction=1.0) const
Return the number of strokes needed to approximate this curve primitive.
CurveVectorCP GetChildCurveVectorCP() const
If this is a carrier for a curve vector, return const pointer to the vector. Otherwise return NULL...
static ICurvePrimitivePtr CreateAkimaCurve(DPoint3dCP points, size_t nPoints)
Allocate and fill a new akima curve.
long long int64_t
Definition: Bentley.r.h:94
struct DVec3d & DVec3dR
Definition: msgeomstructs_typedefs.h:89
struct DBilinearPatch3d const & DBilinearPatch3dCR
Definition: msgeomstructs_typedefs.h:116
bool IsSameStructure(ICurvePrimitiveCR other) const
Recursive check for structural match (tree structure and leaf type) with the other curve primitive...
bool IsPeriodicFractionSpace(double &period) const
Return true if the curve is part of a (possibly larger) periodic curve.
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
struct MSInterpolationCurve const & MSInterpolationCurveCR
Definition: msgeomstructs_typedefs.h:203
struct LocalRange const & LocalRangeCR
Definition: msgeomstructs_typedefs.h:109
bool TryGetPartialCurveData(double &fractionA, double &fractionB, ICurvePrimitivePtr &parentCurve, int64_t &tag) const
If this is a reference to portion of another curve, return detail data. Otherwise return NULL...
void AppendCurveBilinearPatchIntersections(DBilinearPatch3dCR patch, bvector< CurveAndSolidLocationDetail > &intersections) const
Return intesections of curve primitive with a bilinear patch.
bvector< DPoint3d > const * GetLineStringCP() const
If this is a linestring primitive, return const pointer to its coordinate data array. Otherwise return null.
struct ICurvePrimitive * ICurvePrimitiveP
Definition: msgeomstructs_typedefs.h:166
bool GetStartPoint(DPoint3dR point) const
Return first primitive in a deep search.
RefCountedPtr< RefCountedMSBsplineCurve > MSBsplineCurvePtr
Definition: GeomApi.h:116
bool FractionToFrenetFrame(double f, TransformR frame) const
Evaluate curve point at fractional position within its parameter space.
bool TryAddLineStringPoint(DPoint3dCR xyz)
If this is a linestring, add a point.
ICurvePrimitivePtr CloneComponent(ptrdiff_t componentIndex) const
Return a copy of a component.
Definition: CurvePrimitive.h:64
MSBsplineCurveCP GetProxyBsplineCurveCP() const
If available, return a representative bspline curve.
struct MSInterpolationCurve const * MSInterpolationCurveCP
Definition: msgeomstructs_typedefs.h:203
Enumeration of simple uv boundary rules.
Definition: CurveDetails.h:615
void AppendCurveRangeIntersections(LocalRangeCR range, bvector< PartialCurveDetail > &intersections) const
Return intesections of curve primitive with a range box.
size_t NumComponent() const
Return the number of components that can be parameterized.
struct PartialCurveDetail const * PartialCurveDetailCP
Definition: msgeomstructs_typedefs.h:171
RefCountedPtr< struct CurveVector > CurveVectorPtr
Definition: GeomApi.h:113
bool FractionToPoint(double f, DPoint3dR point) const
Evaluate curve fractional position within its parameter space.
struct DEllipse3d const * DEllipse3dCP
Definition: msgeomstructs_typedefs.h:114
struct CurveVector const & CurveVectorCR
Definition: msgeomstructs_typedefs.h:172
bool IsFractionSpace() const
Test if this is a curve (i.e. not a child vector or point string)
struct Transform & TransformR
Definition: msgeomstructs_typedefs.h:134
static ICurvePrimitivePtr CreateSpiralBearingCurvatureBearingCurvature(int transitionType, double startRadians, double startCurvature, double endRadians, double endCurvature, TransformCR frame, double fractionA, double fractionB)
Allocate and fill a spiral curve.
static ICurvePrimitivePtr CreateInterpolationCurveSwapFromSource(MSInterpolationCurveR fitCurve)
Allocate and fill a new interpolation curve.
bool PointAtSignedDistanceFromFraction(double startFraction, double signedDistance, bool allowExtension, CurveLocationDetailR location) const
Attempt to move a specified distance from given fraction.
bool TryGetSegmentInLineString(DSegment3dR segment, size_t startPointIndex) const
If this is a linestring and index is valid, get the (single) indexed segment.
void AnnounceKeyPoints(DPoint3dCR spacePoint, CurveKeyPointCollector &collector, bool extend0, bool extend1) const
Search for various keypoints (as requested by the collector) During recursion, extension bits are cha...
static ICurvePrimitivePtr CreateRectangle(double x0, double y0, double x1, double y1, double z, int areaSignPreference=0)
Create a rectangle from xy corners.
CurvePrimitiveType
Enumeration of possible curve primitive types.
Definition: CurvePrimitive.h:53
int GetIntTag() const
Get the Int64 tag (cast to int)
Definition: CurvePrimitive.h:56
bool TransformInPlace(TransformCR transform)
Transform in place.
static ICurvePrimitivePtr CreateLine(DSegment3dCR segment)
Allocate and fill a new line segemnt.
struct IFacetOptions & IFacetOptionsR
Definition: msgeomstructs_typedefs.h:162
static ICurvePrimitivePtr CreateChildCurveVector_CopyFromSource(CurveVectorCR source)
Create child vector, making deep copy of the source.
static ICurvePrimitivePtr CreateSpiralBearingCurvatureLengthCurvature(int transitionType, double startRadians, double startCurvature, double length, double endCurvature, TransformCR frame, double fractionA, double fractionB)
Allocate and fill a spiral curve.
double FastMaxAbs() const
Return a representative large coordinate.
struct DSegment3d & DSegment3dR
Definition: msgeomstructs_typedefs.h:115
bool IsSameStructureAndGeometry(ICurvePrimitiveCR other, double tolerance=0.0) const
Recursive check for match (tree structure.
struct DEllipse3d & DEllipse3dR
Definition: msgeomstructs_typedefs.h:114
struct MSBsplineCurve const & MSBsplineCurveCR
Definition: msgeomstructs_typedefs.h:139
struct DRange3d & DRange3dR
Definition: msgeomstructs_typedefs.h:108
bvector< DPoint3d > const * GetAkimaCurveCP() const
If this is an Akima curve, return const pointer to its array of fit points (with extra points at each...
int64_t GetTag() const
Get the Int64 tag ...
MSInterpolationCurveCP GetInterpolationCurveCP() const
If this is an Interpolation curve, return const pointer to its coordinate data. Otherwise return NULL...
static ICurvePrimitivePtr CreateSpiralBearingRadiusBearingRadius(int transitionType, double startRadians, double startRadius, double endRadians, double endRadius, TransformCR frame, double fractionA, double fractionB)
Allocate and fill a spiral curve.
DSegment3dCP GetLineCP() const
If this is a line primitive, return const pointer to its coordinate data. Otherwise return NULL...
bool TryGetArc(DEllipse3dR arc) const
If this is a line primitive, copy its coordinate data to a DEllipse3d.
void SetTag(int64_t tag)
Set the Int64 tag.
Collector object for various searches.
Definition: CurveDetails.h:646
CurvePrimitiveType GetCurvePrimitiveType() const
Return the integer type code for the curve primitive type.
static ICurvePrimitivePtr CreateChildCurveVector(CurveVectorPtr source)
Create a curve primitive with (ref coutnted pointer to preexisting refcounted child.
struct DSegment3d const * DSegment3dCP
Definition: msgeomstructs_typedefs.h:115
struct CurveLocationDetail & CurveLocationDetailR
Definition: msgeomstructs_typedefs.h:167
static ICurvePrimitivePtr CreateInterpolationCurve(MSInterpolationCurveCR fitCurve)
Allocate and fill a new interpolation curve.
bool TryGetLine(DSegment3dR segment) const
If this is a line primitive, copy its coordinate data to a DSegment3d.
struct DPlane3d const & DPlane3dCR
Definition: msgeomstructs_typedefs.h:113
void SetMarkerBit(CurvePrimitiveMarkerBit selector, bool value)
Set the specified marker bit on or off.
struct DPoint3d & DPoint3dR
Definition: msgeomstructs_typedefs.h:79
bool GetMSBsplineCurve(MSBsplineCurveR curve, double fraction0=0.0, double fraction1=1.0) const
Initialize an MSBsplineCurve form of the curve.
DEllipse3dCP GetArcCP() const
If this is an arc primitive, return const pointer to its coordinate data. Otherwise return NULL...
bool FractionToPointWithTwoSidedDerivative(double f, DPoint3dR point, DVec3dR derivativeA, DVec3dR derivativeB) const
Evaluate curve fractional position within its parameter space.
struct ICurvePrimitive const & ICurvePrimitiveCR
Definition: msgeomstructs_typedefs.h:166
static ICurvePrimitivePtr CreateBsplineCurve(MSBsplineCurveCR curve)
Allocate and fill a new bspline curve.
ICurvePrimitivePtr CloneBetweenFractions(double fractionA, double fractionB, bool allowExtrapolation) const
Return a copy of a subset.
bool SignedDistanceBetweenFractions(double startFraction, double endFraction, double &signedDistance) const
Return distance between fractions.
bool GetMarkerBit(CurvePrimitiveMarkerBit selector) const
Ask if specified marker bit is on or off.
struct DSegment3d const & DSegment3dCR
Definition: msgeomstructs_typedefs.h:115
A 1d interval with low and high values.
Definition: DRange1d.h:41
struct DMatrix4d const * DMatrix4dCP
Definition: msgeomstructs_typedefs.h:97
static ICurvePrimitivePtr CreateLineString(DPoint3dCP points, size_t nPoints)
Allocate and fill a new linestring.
bool ReverseCurvesInPlace()
reverse the parameterization in place.
static ICurvePrimitivePtr CreateSpiral(DSpiral2dBaseCR spiral, TransformCR frame, double fractionA, double fractionB)
Allocate and fill a spiral curve.
bool WireCentroid(double &length, DPoint3dR centroid, double fraction0=0.0, double fraction1=1.0) const
Return the centroid of (a portion of) the curve.
MSBsplineCurvePtr GetMSBsplineCurvePtr(double fraction0=0.0, double fraction1=1.0) const
Initialize a (ref coutned) MSBsplineCurve form of the curve.
bool Length(double &length) const
Compute curve length.
struct CurveVector & CurveVectorR
Definition: msgeomstructs_typedefs.h:172
struct Transform const & TransformCR
Definition: msgeomstructs_typedefs.h:134
ICurvePrimitive is a (polymorphic) base class for parametric curves – line segemnt, circular/elliptic arc, bspline curve, spiral.
Definition: CurvePrimitive.h:49
Definition: CurvePrimitive.h:76
bool ComponentFractionToPoint(ptrdiff_t componentIndex, double f, DPoint3dR point) const
Evaluate curve fractional position within the parameter space of a component.
ICurvePrimitivePtr CloneDereferenced(bool allowExtrapolation=false, bool maximumDeref=true) const
Return a (deep) clone with all partial curves replaced by complete curves.
DSpiral2dPlacement const * DSpiral2dPlacementCP
Definition: DSpiral2dBase.h:852
struct CurvePrimitiveId const * CurvePrimitiveIdCP
Definition: CurvePrimitiveId.h:16
Definition: CurvePrimitive.h:55
ICurvePrimitivePtr CloneAsSingleOffsetPrimitiveXY(CurveOffsetOptionsCR options) const
Return an offset primitive.
struct MSBsplineCurve const * MSBsplineCurveCP
Definition: msgeomstructs_typedefs.h:139
bool AdjustFractionToBreakFraction(double fraction, Rounding::RoundingMode mode, size_t &breakIndex, double &adjustedFraction) const
Move a fraction to the nearest break fraction.
bool ClosestPointBounded(DPoint3dCR spacePoint, double &fraction, DPoint3dR curvePoint) const
Find the closest point to a space point.
static ICurvePrimitivePtr CreateArc(DEllipse3dCR ellipse)
Allocate and fill a new elliptic arc.
CurvePrimitiveIdCP GetId() const
struct CurveOffsetOptions const & CurveOffsetOptionsCR
Definition: msgeomstructs_typedefs.h:170
struct DEllipse3d const & DEllipse3dCR
Definition: msgeomstructs_typedefs.h:114
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
static ICurvePrimitivePtr CreateChildCurveVector_SwapFromSource(CurveVectorR source)
Create a child vector; contents of source are taken, source itself is cleared.
void AppendCurvePlaneIntersections(DPlane3dCR plane, bvector< CurveLocationDetailPair > &intersections, double tolerance=0.0) const
Return vector of intersections with a plane.
struct DSpiral2dBase const & DSpiral2dBaseCR
Definition: DSpiral2dBase.h:17
struct MSInterpolationCurve & MSInterpolationCurveR
Definition: msgeomstructs_typedefs.h:203
static bool AddRuledSurfaceRayIntersections(bvector< struct SolidLocationDetail > &pickData, ICurvePrimitiveCR curveA, ICurvePrimitiveCR curveB, DRay3dCR ray)
Compute intersections of a ray with a ruled surface between two primitves.
struct DRay3d const & DRay3dCR
Definition: msgeomstructs_typedefs.h:120
struct CurveVector const * CurveVectorCP
Definition: msgeomstructs_typedefs.h:172
PartialCurveDetailCP GetPartialCurveDetailCP() const
If this is a reference to portion of another curve, return detail data. Otherwise return NULL...
static ICurvePrimitivePtr CreatePseudoSpiralPointBearingRadiusLengthRadius(int typeCode, DPoint3dCR startPoint, double startRadians, double radiusA, double lengthAB, double radiusB)
Construct a spiral with start radius, spiral length, and end radius.
bool TrySetStart(DPoint3dCR xyz)
Modify the start point if possible.
static ICurvePrimitivePtr CreateSpiralBearingRadiusLengthRadius(int transitionType, double startRadians, double startRadius, double length, double endRadius, TransformCR frame, double fractionA, double fractionB)
Allocate and fill a spiral curve.
struct DPlane3dByVectors const & DPlane3dByVectorsCR
Definition: msgeomstructs_typedefs.h:118
Definition: CurvePrimitive.h:58
struct DRay3d & DRay3dR
Definition: msgeomstructs_typedefs.h:120
bool IsMappableFractionSpace() const
Test if cloned fractional intervals map linearly back to parent fractions.
bool ClosestPointBoundedXY(DPoint3dCR spacePoint, DMatrix4dCP worldToLocal, CurveLocationDetailR location) const
Find closest point, measuring in xy plane after applying a (possibly perspective) transform to both t...
ICurvePrimitivePtr Clone() const
Return a deep copy.
bool AddStrokes(bvector< DPoint3d > &points, IFacetOptionsR options, bool includeStartPoint=true, double startFraction=0.0, double endFraction=1.0) const
Stroke the curve and add points to the bvector.
static ICurvePrimitivePtr CreateInterpolationBetweenCurves(ICurvePrimitiveCR curveA, double fraction, ICurvePrimitiveCR curveB)
Create a curve that is interpolated between parents.
bool GetStartEnd(DPoint3dR pointA, DPoint3dR pointB) const
return the start and end points of the curve
bool GetRange(DRange3dR range) const
Return range of the primitive.

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.