14 #pragma warning (push)
15 #pragma warning (default : 4266) // NEEDS WORK -- warnings about missing virtuals?
93 GEOMDLLIMPEXP
void SetTag (
int tag);
97 virtual void MakeClassAbstract() = 0;
224 double fractionA,
double fractionB);
240 double startCurvature,
303 double startCurvature,
488 GEOMDLLIMPEXP
bool Length (
double &length)
const;
503 GEOMDLLIMPEXP
bool FastLength (
double &length)
const;
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;
752 GEOMDLLIMPEXP
bool WireCentroid (
double &length,
DPoint3dR centroid,
double fraction0 = 0.0,
double fraction1 = 1.0)
const;
765 bool includeStartPoint =
true,
766 double startFraction = 0.0,
767 double endFraction = 1.0
793 #pragma warning (pop)
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...
Definition: CurvePrimitive.h:77
bool GetBreakFraction(size_t breakFractioniIndex, double &fraction) const
Return the fractional postion of a point where the curve's continuity has a break.
Definition: CurvePrimitive.h:66
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.
Definition: CurvePrimitive.h:57
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.
Definition: CurvePrimitive.h:65
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
Definition: CurvePrimitive.h:60
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.
Definition: CurvePrimitive.h:59
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
Definition: CurvePrimitive.h:62
static ICurvePrimitivePtr CreateChildCurveVector_SwapFromSource(CurveVectorR source)
Create a child vector; contents of source are taken, source itself is cleared.
Definition: CurvePrimitive.h:61
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.
Definition: CurvePrimitive.h:63
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.