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 #ifdef BENTLEY_WIN32
11 #pragma warning (push)
12 #pragma warning (default : 4266) // NEEDS WORK -- warnings about missing virtuals?
13 #endif
20 {
22 double fraction0;
23 double fraction1;
27 GEOMDLLIMPEXP PartialCurveDetail (ICurvePrimitiveP _parentCurve, double _fraction0, double _fraction1, int64_t userData);
30 GEOMDLLIMPEXP PartialCurveDetail ();
32 GEOMDLLIMPEXP PartialCurveDetail (ICurvePrimitiveP _parentCurve, DSegment1dCR interval, int64_t userData = 0);
35 GEOMDLLIMPEXP PartialCurveDetail (PartialCurveDetailCR parent, double f0, double f1);
38 GEOMDLLIMPEXP bool ParentFractionToChildFraction (double parentFraction, double &childFraction) const;
40 GEOMDLLIMPEXP double ChildFractionToParentFraction (double f) const;
42 GEOMDLLIMPEXP bool IsSingleFraction () const;
44 GEOMDLLIMPEXP void UpdateFraction1AndUserData (double f1, int64_t newData)
45  {
46  fraction1 = f1;
47  userData = newData;
48  }
49 };
57 {
61 double fraction;
63 DPoint3d point;
67 size_t numComponent;
71 double a;
74 GEOMDLLIMPEXP CurveLocationDetail ();
77 GEOMDLLIMPEXP CurveLocationDetail (ICurvePrimitiveCP _curve, size_t _numComponent = 1);
80 GEOMDLLIMPEXP CurveLocationDetail (ICurvePrimitiveCP _curve, double _fraction, DPoint3dCR _point);
83 GEOMDLLIMPEXP CurveLocationDetail (ICurvePrimitiveCP _curve, double _fraction, DPoint3dCR _point, size_t _componentIndex, size_t _numComponent, double _componentFraction);
86 GEOMDLLIMPEXP CurveLocationDetail (ICurvePrimitiveCP _curve, double _fraction, DPoint3dCR _point, size_t _componentIndex, size_t _numComponent, double _componentFraction, double _a);
89 GEOMDLLIMPEXP bool UpdateIfCloser (CurveLocationDetailCR otherDetail);
92 GEOMDLLIMPEXP double SetDistanceFrom (DPoint3dCR refPoint);
95 GEOMDLLIMPEXP void SetMaxDistance ();
98 GEOMDLLIMPEXP void SetDistance (double value);
101 GEOMDLLIMPEXP void SetSingleComponentData ();
104 GEOMDLLIMPEXP void SetSingleComponentFractionAndA (double fraction, double a);
107 GEOMDLLIMPEXP double Distance (CurveLocationDetailCR other) const;
110 GEOMDLLIMPEXP bool Interpolate (bvector<double> const &param, double &result) const;
113 GEOMDLLIMPEXP ValidatedDRay3d PointAndUnitTangent () const;
116 GEOMDLLIMPEXP bool TryFractionToPoint (DPoint3dR xyz, DVec3dR dXdf) const;
119 GEOMDLLIMPEXP bool TryComponentFractionToPoint (DPoint3dR xyz, DVec3dR dXdf) const;
123 GEOMDLLIMPEXP bool AlmostEqualPoint (CurveLocationDetailCR other) const;
132 GEOMDLLIMPEXP ValidatedCurveLocationDetail Interpolate (double fraction, CurveLocationDetailCR dataB) const;
136 GEOMDLLIMPEXP void SetFractionFromComponentFraction (double componentFraction, size_t componentIndex, size_t numComponent);
140 GEOMDLLIMPEXP void SetComponentFractionFromFraction (double globalFraction, size_t numComponent);
143 GEOMDLLIMPEXP static void SortByCurveAndFraction (bvector<CurveLocationDetail> &detail);
144 };
150 {
151 public:
155 GEOMDLLIMPEXP CurveLocationDetailPair ();
157 GEOMDLLIMPEXP CurveLocationDetailPair (CurveLocationDetailCR _detailA, CurveLocationDetailCR _detailB);
159 GEOMDLLIMPEXP CurveLocationDetailPair (CurveLocationDetailCR _detailA);
161 GEOMDLLIMPEXP CurveLocationDetailPair (ICurvePrimitiveCP curve, double fraction0, DPoint3dCR point0);
163 GEOMDLLIMPEXP CurveLocationDetailPair (ICurvePrimitiveCP curve, double fraction0, DPoint3dCR point0,
164  size_t componentIndex, size_t numComponent, double componentFraction);
166 GEOMDLLIMPEXP CurveLocationDetailPair
167  (
168  ICurvePrimitiveCP curve0, double a0,
169  ICurvePrimitiveCP curve1, double a1
170  );
173 CurveLocationDetailPair (ICurvePrimitiveCP curve, double fraction0, DPoint3dCR point0, double fraction1, DPoint3dCR point1);
176 GEOMDLLIMPEXP bool SameCurveAndFraction ();
179 GEOMDLLIMPEXP void Set (double fraction0, DPoint3dCR point0, double a0, double fraction1, DPoint3dCR point1, double a1);
181 GEOMDLLIMPEXP void Set (ICurvePrimitiveP curveA, ICurvePrimitiveP curveB);
184 GEOMDLLIMPEXP DSegment3d GetDSegment3d () const;
187 GEOMDLLIMPEXP double DistanceSquared () const;
190 GEOMDLLIMPEXP double DeltaZ () const;
194 GEOMDLLIMPEXP double Distance () const;
197 static GEOMDLLIMPEXP void DeltaZExtremes (bvector<CurveLocationDetailPair> const &pairs, size_t &iMin, size_t &iMax);
200 static GEOMDLLIMPEXP void SplitByDeltaZ (bvector<CurveLocationDetailPair> const &pairs, double splitDistance,
203 };
216 {
217 public:
225  {
226  private:
227  friend struct SolidLocationDetail;
228  ptrdiff_t m_index0;
229  ptrdiff_t m_index1;
230  ptrdiff_t m_index2;
231  public:
233  GEOMDLLIMPEXP FaceIndices (ptrdiff_t index0, ptrdiff_t index1, ptrdiff_t index2);
235  GEOMDLLIMPEXP FaceIndices ();
237  GEOMDLLIMPEXP static FaceIndices Cap0 ();
239  GEOMDLLIMPEXP static FaceIndices Cap1 ();
241  GEOMDLLIMPEXP void Set (ptrdiff_t index0, ptrdiff_t index1, ptrdiff_t index2);
243  GEOMDLLIMPEXP void SetCap0 ();
245  GEOMDLLIMPEXP void SetCap1 ();
248  GEOMDLLIMPEXP ptrdiff_t Index0 () const;
250  GEOMDLLIMPEXP ptrdiff_t Index1 () const;
252  GEOMDLLIMPEXP ptrdiff_t Index2 () const;
255  GEOMDLLIMPEXP void SetIndex0 (ptrdiff_t value);
257  GEOMDLLIMPEXP void SetIndex1 (ptrdiff_t value);
259  GEOMDLLIMPEXP void SetIndex2 (ptrdiff_t value);
263  GEOMDLLIMPEXP bool IsCap0 () const;
265  GEOMDLLIMPEXP bool IsCap1 () const;
267  GEOMDLLIMPEXP bool IsCap () const;
269  GEOMDLLIMPEXP bool Is (ptrdiff_t index0, ptrdiff_t index1, ptrdiff_t index2) const ;
271  GEOMDLLIMPEXP bool Is (ptrdiff_t index0, ptrdiff_t index1) const ;
272  };
275 private:
276 double m_uParameter;
277 double m_vParameter;
278 double m_parameter;
279 DPoint3d m_xyz;
280 DVec3d m_uDirection;
281 DVec3d m_vDirection;
282 FaceIndices m_faceIndices;
284 int m_parentId;
286 double m_a;
288 public:
291 GEOMDLLIMPEXP SolidLocationDetail ();
293 GEOMDLLIMPEXP SolidLocationDetail (int parentId, double s);
296 GEOMDLLIMPEXP SolidLocationDetail (int parentId, double s, DPoint3dCR xyz);
299 GEOMDLLIMPEXP SolidLocationDetail (int parentId, double s, DPoint3dCR xyz, double u, double v, DVec3dCR uVector, DVec3dCR vVector);
302 GEOMDLLIMPEXP void Init ();
305 GEOMDLLIMPEXP void SetFaceIndices (ptrdiff_t _id0, ptrdiff_t _id1, ptrdiff_t _id2);
308 GEOMDLLIMPEXP void SetFaceIndices01 (ptrdiff_t _id0, ptrdiff_t _id1);
311 GEOMDLLIMPEXP void SetFaceIndices (SolidLocationDetail::FaceIndices const &indices);
315 GEOMDLLIMPEXP static const int PrimaryIdCap = -1;
318 GEOMDLLIMPEXP void SetCapSelector (int id);
321 GEOMDLLIMPEXP int GetParentId () const;
323 GEOMDLLIMPEXP void SetParentId (int id);
326 GEOMDLLIMPEXP int GetPrimarySelector () const;
328 GEOMDLLIMPEXP int GetSecondarySelector () const;
331 GEOMDLLIMPEXP SolidLocationDetail::FaceIndices GetFaceIndices () const;
333 GEOMDLLIMPEXP double GetPickParameter () const;
336 GEOMDLLIMPEXP DPoint3d GetXYZ () const;
339 GEOMDLLIMPEXP DPoint2d GetUV () const;
341 GEOMDLLIMPEXP double GetU ();
343 GEOMDLLIMPEXP double GetV ();
345 GEOMDLLIMPEXP double GetA ();
347 GEOMDLLIMPEXP DVec3d GetUDirection () const;
350 GEOMDLLIMPEXP DVec3d GetVDirection () const;
353 GEOMDLLIMPEXP void SetUV (double u, double v, DVec3dCR uDirection, DVec3dCR vDirection);
355 GEOMDLLIMPEXP void SetUV (DPoint2dCR xyz);
357 GEOMDLLIMPEXP void SetU (double u);
359 GEOMDLLIMPEXP void SetV (double v);
361 GEOMDLLIMPEXP void SetA (double a);
365 GEOMDLLIMPEXP void SetXYZ (DPoint3dCR xyz);
367 GEOMDLLIMPEXP void SetUDirection (DVec3d dXdu);
369 GEOMDLLIMPEXP void SetVDirection (DVec3d dXdv);
371 GEOMDLLIMPEXP void SetPickParameter (double f);
374 GEOMDLLIMPEXP bool IsCapSelect (int &capId) const;
377 GEOMDLLIMPEXP static bool cb_compareLT_parameter
378 (
379 SolidLocationDetail const &dataA,
380 SolidLocationDetail const &dataB
381 );
390 GEOMDLLIMPEXP static bool IsCap0 (int selector0, int selector1);
392 GEOMDLLIMPEXP static bool IsCap1 (int selector0, int selector1);
395 GEOMDLLIMPEXP void TransformInPlace (TransformCR transform);
399 GEOMDLLIMPEXP bool MapPickParameterFractionToRange (DRange1dCR range);
401 GEOMDLLIMPEXP bool UpdateIfSmallerA (SolidLocationDetailCR source);
402 };
406 /*=================================================================================**/
410 struct ICurvePrimitiveInfo : public IRefCounted {};
411 typedef RefCountedPtr<ICurvePrimitiveInfo> ICurvePrimitiveInfoPtr;
413 /*=================================================================================**/
418  {
419  size_t m_readIndex;
420  double m_fraction;
421  GEOMDLLIMPEXP FacetEdgeLocationDetail (size_t readIndex, double fraction);
422  GEOMDLLIMPEXP FacetEdgeLocationDetail ();
423  };
425 /*=================================================================================**/
431 {
432 private:
433 double m_tolerance;
434 double m_arcAngle; // (if this is positive) turns larger than this become arcs.
435 double m_chamferAngle; // (if this is positive) "outer chamfers" are created with this max angle.
436 double m_offsetDistance;
437 bool m_forceClosure;
438 bool m_unusedBool[8];
439 double m_unusedDouble[8];
440 int m_bCurvePointsPerKnot; // When offsetting bspline, number of points requested per knot interval.
441 int m_bCurveMethod; // 0=default=MX spline fit. 1=greville absisae with current knots.
442 int m_unusedInt[6];
443 public:
444 GEOMDLLIMPEXP CurveOffsetOptions (double offsetDistance); // construct with default options.
446 GEOMDLLIMPEXP void SetTolerance (double tol);
447 GEOMDLLIMPEXP void SetOffsetDistance (double distance);
448 GEOMDLLIMPEXP void SetArcAngle (double valueRadians);
449 GEOMDLLIMPEXP void SetChamferAngle (double value);
450 GEOMDLLIMPEXP void SetForceClosure (bool value);
451 GEOMDLLIMPEXP void SetBCurvePointsPerKnot (int n);
452 GEOMDLLIMPEXP void SetBCurveMethod (int n);
453 GEOMDLLIMPEXP double GetTolerance () const;
454 GEOMDLLIMPEXP double GetOffsetDistance () const;
455 GEOMDLLIMPEXP double GetArcAngle () const;
456 GEOMDLLIMPEXP double GetChamferAngle () const;
457 GEOMDLLIMPEXP bool GetForceClosure () const;
458 GEOMDLLIMPEXP int GetBCurvePointsPerKnot () const;
459 GEOMDLLIMPEXP int GetBCurveMethod () const;
460 };
463 //=================================================================================
466 //=================================================================================
468 {
469 private:
470 double m_equalPointTolerance;
471 double m_maxDirectAdjust;
472 double m_maxAdjustAlongCurve;
473 bool m_removePriorGapPrimitives;
474 double m_unusedDouble[10];
475 int m_unusedInt[10];
476 bool m_unusedBool[10];
477 public:
478 GEOMDLLIMPEXP CurveGapOptions (); // default options (1e-7, 1e-4,1e-3)
479 GEOMDLLIMPEXP CurveGapOptions (double m_equalPointTolerance, double maxDirectAdjust, double maxAdjustAlongCurve);
482 GEOMDLLIMPEXP void SetEqualPointTolerance (double value);
484 GEOMDLLIMPEXP void SetMaxDirectAdjustTolerance (double value);
486 GEOMDLLIMPEXP void SetMaxAdjustAlongCurve (double value);
488 GEOMDLLIMPEXP void SetRemovePriorGapPrimitives (bool value);
491 GEOMDLLIMPEXP double GetEqualPointTolerance () const;
493 GEOMDLLIMPEXP double GetMaxDirectAdjustTolerance () const;
495 GEOMDLLIMPEXP double GetMaxAdjustAlongCurve () const;
497 GEOMDLLIMPEXP bool GetRemovePriorGapPrimitives () const;
500 };
508  {
509  CURVE_CURVE_BLEND_BisectorParabola, // for parabola with axis that bisects the angle between the defining lines
510  CURVE_CURVE_BLEND_VerticalAxisParabola, // parabola with vertical axis
511  };
515  {
520  };
522 // Area analysis generates (a) an integer property at each leaf level face, (b) a true/false from that int.
523 // At higher level, BoolSelect gives choices of interpretation of the collection.
525  {
526  BoolSelect_Parity = 0, // XOR of leaf-level bools
527  BoolSelect_Union = 2, // UNION of leaf level bools
528  BoolSelect_Summed_Parity = 3, // XOR of leaf level integers
529  BoolSelect_Summed_Positive = 4, // Positive sum of leaf level integers
530  BoolSelect_Summed_NonZero = 5, // Nonzero sum of leaf level integers
531  BoolSelect_Summed_Negative = 6, // Negative sum of leaf level integers.
532  BoolSelect_FromStructure = 1000 // Dictated by structure of supplied data.
533  };
538 {
541 };
545  {
549  };
555 struct LocalRange
563 {
564 Transform m_localToWorld;
565 Transform m_worldToLocal;
569 GEOMDLLIMPEXP DPoint3d RangeFractionToLocal (double x, double y, double z) const;
571 GEOMDLLIMPEXP DPoint3d RangeFractionToWorld (double x, double y, double z) const;
572 GEOMDLLIMPEXP void InitNullRange ();
575 GEOMDLLIMPEXP LocalRange (TransformCR localToWorld, TransformCR worldToLocal, DRange3dCR localRange);
577 GEOMDLLIMPEXP LocalRange (TransformCR localToWorld, TransformCR worldToLocal, DRange3dCR localRange, DRange3dCR worldRange);
578 // Initialize with identity transforms and empty range
579 GEOMDLLIMPEXP LocalRange ();
580 GEOMDLLIMPEXP bool InitFromPrincipalAxesOfPoints (bvector<DPoint3d> const &xyz);
581 GEOMDLLIMPEXP bool InitFromPrincipalAxesOfPoints (bvector<DPoint4d> const &xyzw);
582 // Return 0 if space point is in or on the range.
583 // Otherwise return shortest distanced to any point of the range.
584 GEOMDLLIMPEXP double DistanceOutside (DPoint3dCR spacePoint) const;
585 };
590 {
592 double m_a;
593 GEOMDLLIMPEXP TaggedLocalRange (size_t indexA, size_t indexB, double a = 0.0);
594 // sort an array of TaggedLocalRanges by increasing "a" value.
595 static GEOMDLLIMPEXP void SortByA (bvector<TaggedLocalRange> &data);
596 // Compute and save distance from the range to space point.
597 void GEOMDLLIMPEXP SetDistanceOutside (DPoint3dCR spacePoint);
598 };
602 {
606  (
607  CurveLocationDetailCR curveDetail,
608  SolidLocationDetailCR solidDetail
609  )
610  : m_curveDetail (curveDetail), m_solidDetail(solidDetail)
611  {}
612 };
616 {
617 public:
619 static const int Unbounded = 0;
621 static const int Triangle = 1;
623 static const int UnitSquare = 2;
625 static const int CenteredSquare = 3;
628 static const int UnitCircle = 4;
630 private:
631  int m_selector; // one of the constants UVBoundarySelect::Unbounded, UVBoundarySelect::Triangle, UVBoundarySelect::Square, UVBoundarySelectUnitCircle
632 public:
634 UVBoundarySelect (int select);
637 bool IsInOrOn (double u, double v) const;
640 bool IsInOrOn (DPoint2dCR uv) const;
642 };
647 {
649 {
655 };
656 protected:
658 bool m_xyOnly;
661 public:
663 GEOMDLLIMPEXP CurveKeyPointCollector ();
665 GEOMDLLIMPEXP void EnableKeyPointType (KeyPointType selector, bool value);
668 GEOMDLLIMPEXP void EnableSingleKeyPointType (KeyPointType selector);
671 GEOMDLLIMPEXP void SetXYOnly (DMatrix4dCR worldToLocal);
673 GEOMDLLIMPEXP bool NeedKeyPointType (KeyPointType selector) const;
675 GEOMDLLIMPEXP bool GetWorldToLocal (DMatrix4dR worldToLocal) const;
678 virtual void AnnouncePoint (CurveLocationDetailCR worldDetail, KeyPointType selector);
680 };
685 {
686 private:
687 CurveLocationDetail m_closestPoint;
688 DPoint3d m_worldBiasPoint;
690 public:
693 (
694 DPoint3dCR biasPoint
695 );
697 GEOMDLLIMPEXP virtual void AnnouncePoint (CurveLocationDetailCR worldDetail, KeyPointType selector) override;
699 GEOMDLLIMPEXP bool GetResult (CurveLocationDetailR detail, KeyPointType &selector) const;
700 };
704 #ifdef BENTLEY_WIN32
705 #pragma warning (pop)
706 #endif
Definition: CurveDetails.h:509
Definition: CurveDetails.h:648
Definition: CurveDetails.h:516
double componentFraction
fraction within the indexed part.
Definition: CurveDetails.h:69
void SetRemovePriorGapPrimitives(bool value)
Set max motion along a curve.
bool IsCapSelect(int &capId) const
Ask if the selectors identify a cap.
static const int Triangle
Restrict U,V, U+V between 0 and 1 – i.e. triangle in UV space.
Definition: CurveDetails.h:621
void SetU(double u)
Set u.
CurveLocationDetail detailB
Definition: CurveDetails.h:153
void SetMaxDistance()
set distance to very large value.
FaceIndices is a triple of integers identifying a face within a solid primitive.
Definition: CurveDetails.h:224
bool GetResult(CurveLocationDetailR detail, KeyPointType &selector) const
Access the saved detail.
double ChildFractionToParentFraction(double f) const
map a local fraction into the parent fraction.
static bool IsCap1(int selector0, int selector1)
Ask if a selector pair is the end cap.
SolidLocationDetail::FaceIndices GetFaceIndices() const
return a structure with all selector indices.
void SetFractionFromComponentFraction(double componentFraction, size_t componentIndex, size_t numComponent)
Set the componentIndex, numComponent, componentFraction, and fraction.
int64_t userData
Definition: CurveDetails.h:24
bool GetRemovePriorGapPrimitives() const
RefCountedPtr< struct ICurvePrimitive > ICurvePrimitivePtr
Definition: GeomApi.h:112
double DistanceOutside(DPoint3dCR spacePoint) const
static void SortByCurveAndFraction(bvector< CurveLocationDetail > &detail)
Sort to gather CurveLocationDetail's with same curve, and then by fraction within those curves...
Detail data for a point along a curve, allowing indexing into a subcomponent.
Definition: CurveDetails.h:56
double GetU()
query the u parameter
void SetEqualPointTolerance(double value)
Set gap size that does not need to be corrected.
double GetA()
query the a parameter
void SetForceClosure(bool value)
void SetUDirection(DVec3d dXdu)
Set the u direction vector.
DVec3d GetVDirection() const
Return v direction vector.
long long int64_t
Definition: Bentley.r.h:94
ValidatedValue< CurveLocationDetail > ValidatedCurveLocationDetail
Definition: GeomApi.h:357
bool AlmostEqualPoint(CurveLocationDetailCR other) const
test if point coordinates are AlmostEqual
Definition: CurveDetails.h:531
bool IsInOrOn(double u, double v) const
test containment
struct DMatrix4d const & DMatrix4dCR
Definition: msgeomstructs_typedefs.h:97
double GetMaxAdjustAlongCurve() const
void TransformInPlace(TransformCR transform)
TransformInPlace points and vectors by the transform.
double GetMaxDirectAdjustTolerance() const
struct DVec3d & DVec3dR
Definition: msgeomstructs_typedefs.h:89
Definition: CurveDetails.h:653
Definition: CurveDetails.h:527
void SetBCurvePointsPerKnot(int n)
double Distance(CurveLocationDetailCR other) const
Return distance between point fields of this and other.
Definition: Bentley.r.h:30
static const int UnitSquare
Restrict U,V between 0 and 1 – i.e. unit square in UV space.
Definition: CurveDetails.h:623
Special case of CurveKeyPointCollector – save only the closest point to the bias point...
Definition: CurveDetails.h:684
bool NeedKeyPointType(KeyPointType selector) const
Ask if a particular KeyPointType is requested.
Default constructor (all indices zero)
Detail structure for combined data on a curve and a surface or solid.
Definition: CurveDetails.h:601
struct SolidLocationDetail::FaceIndices const * FaceIndicesCP
Definition: CurveDetails.h:384
double m_a
Definition: CurveDetails.h:592
double a
Context specific.
Definition: CurveDetails.h:71
struct SolidLocationDetail::FaceIndices * FaceIndicesP
Definition: CurveDetails.h:386
struct ICurvePrimitive * ICurvePrimitiveP
Definition: msgeomstructs_typedefs.h:166
LocalRange with size_t and double tags (e.g.
Definition: CurveDetails.h:589
bool SameCurveAndFraction()
Return true if the two details are for (bitwise) identical curve and fraction.
DPoint3d GetXYZ() const
Return the pick coordinates.
DRange3d m_worldRange
Definition: CurveDetails.h:567
CurvePrimitivePtrPair(ICurvePrimitivePtr curveA, ICurvePrimitivePtr curveB)
Enumeration of simple uv boundary rules.
Definition: CurveDetails.h:615
void EnableSingleKeyPointType(KeyPointType selector)
Indicate keypoint preference, and suppress all others.
void SetIndex0(ptrdiff_t value)
Set the first index.
Default construtor.
Enumeration of variants of blend calculations.
Definition: CurveDetails.h:507
Definition: CurveDetails.h:530
Detail data for an interval of a parent curve.
Definition: CurveDetails.h:19
SolidLocationDetail m_solidDetail
Definition: CurveDetails.h:604
double GetPickParameter() const
Return the parameter along the pick ray.
size_t m_readIndex
Definition: CurveDetails.h:419
CurveLocationDetail detailA
Definition: CurveDetails.h:539
size_t componentIndex
index of components within curve
Definition: CurveDetails.h:65
void InitNullRange()
Initialize with identity transforms and an empty range.
struct DRange1d const & DRange1dCR
Definition: msgeomstructs_typedefs.h:102
size_t m_indexA
Definition: CurveDetails.h:591
bool UpdateIfCloser(CurveLocationDetailCR otherDetail)
conditional replace candidate, with minDistance update if needed.
int GetPrimarySelector() const
Return the primary selector.
void SetFaceIndices(ptrdiff_t _id0, ptrdiff_t _id1, ptrdiff_t _id2)
Set all face selectors.
struct SolidLocationDetail::FaceIndices const & FaceIndicesCR
Definition: CurveDetails.h:383
void SetV(double v)
Set v.
void SetArcAngle(double valueRadians)
DRange3d m_localRange
Definition: CurveDetails.h:566
DSegment3d GetDSegment3d() const
assemble points from detailA, detailB into a DSegment3d.
TaggedLocalRange(size_t indexA, size_t indexB, double a=0.0)
ICurvePrimitivePtr curveB
Definition: CurveDetails.h:547
bool TryComponentFractionToPoint(DPoint3dR xyz, DVec3dR dXdf) const
Try to evaluate the referenced curve at the detail's component fraction.
static bool cb_compareLT_parameter(SolidLocationDetail const &dataA, SolidLocationDetail const &dataB)
std::sort comparator for sort by parameter ...
void SetDistanceOutside(DPoint3dCR spacePoint)
Transform m_worldToLocal
Definition: CurveDetails.h:565
CurveLocationDetail detailB
Definition: CurveDetails.h:539
RefCountedPtr< ICurvePrimitiveInfo > ICurvePrimitiveInfoPtr
Definition: CurveDetails.h:411
Definition: CurveDetails.h:651
ICurvePrimitivePtr parentCurve
Definition: CurveDetails.h:21
Definition: CurveDetails.h:517
Definition: CurveDetails.h:514
double fraction
fraction from curve start to end
Definition: CurveDetails.h:61
void SetComponentFractionFromFraction(double globalFraction, size_t numComponent)
Set the componentIndex, numComponent, componentFraction, and fraction.
CurveOffsetOptions(double offsetDistance)
double fraction1
Definition: CurveDetails.h:23
DVec3d GetUDirection() const
Return u direction vector.
Definition: CurveDetails.h:652
void SetUV(double u, double v, DVec3dCR uDirection, DVec3dCR vDirection)
Set the u,v, and direction vectors.
bool IsCap0() const
Ask if this is the special index pair for start cap.
struct DSegment1d const & DSegment1dCR
Definition: msgeomstructs_typedefs.h:144
void SetXYZ(DPoint3dCR xyz)
Set the point coordinates.
void SetFaceIndices01(ptrdiff_t _id0, ptrdiff_t _id1)
Set all face selectors.
double GetV()
query the v parameter
void SetA(double a)
Set a.
void SetTolerance(double tol)
Definition: CurveDetails.h:519
void Set(double fraction0, DPoint3dCR point0, double a0, double fraction1, DPoint3dCR point1, double a1)
update fractions, points, and a
struct SolidLocationDetail::FaceIndices & FaceIndicesR
Definition: CurveDetails.h:385
ValidatedDRay3d PointAndUnitTangent() const
Try to evalute the point and unit tangent at the detail's fraction.
bool m_xyOnly
Definition: CurveDetails.h:658
Definition: CurveDetails.h:510
bool MapPickParameterFractionToRange(DRange1dCR range)
Treat current pick parameter as fractions in new interval.
bool ParentFractionToChildFraction(double parentFraction, double &childFraction) const
(attempt to) map a parent fraction back to the child interval. This fails if the child is a single po...
UVBoundarySelect(int select)
constructor with enumerated
Interface implemented to hold additional information about curve primitive.
Definition: CurveDetails.h:410
CurveAndSolidLocationDetail(CurveLocationDetailCR curveDetail, SolidLocationDetailCR solidDetail)
Definition: CurveDetails.h:606
Pair of CurveLocationDetail structs, as produced by curve-curve intersection code.
Definition: CurveDetails.h:149
virtual void AnnouncePoint(CurveLocationDetailCR worldDetail, KeyPointType selector) override
Announce a keypoint in world form. Derived class override captures as needed.
options to control joints among offset curves
Definition: CurveDetails.h:430
size_t m_indexB
Definition: CurveDetails.h:591
Definition: CurveDetails.h:518
Detail data for pick on solid primitive.
Definition: CurveDetails.h:215
DPoint3d point
curve coordinates
Definition: CurveDetails.h:63
struct DRange3d const & DRange3dCR
Definition: msgeomstructs_typedefs.h:108
Collector object for various searches.
Definition: CurveDetails.h:646
Definition: CurveDetails.h:532
Null constructor.
DPoint2d GetUV() const
Return u,v parameter information.
virtual void AnnouncePoint(CurveLocationDetailCR worldDetail, KeyPointType selector)
Announce a keypoint in world form. Derived class override captures as needed.
static void SplitByDeltaZ(bvector< CurveLocationDetailPair > const &pairs, double splitDistance, bvector< CurveLocationDetailPair > *pairA, bvector< CurveLocationDetailPair > *pairB)
distribute all pairs with deltaZ less than or equal to split distance in pairA, others in pairB...
struct CurveLocationDetail & CurveLocationDetailR
Definition: msgeomstructs_typedefs.h:167
ICurvePrimitiveCP curve
Containing curve.
Definition: CurveDetails.h:59
ValidatedValue< DRay3d > ValidatedDRay3d
Definition: GeomApi.h:360
struct DMatrix4d & DMatrix4dR
Definition: msgeomstructs_typedefs.h:97
void SetOffsetDistance(double distance)
void SetCap1()
set both indices as the special end cap indices
struct DPoint2d const & DPoint2dCR
Definition: msgeomstructs_typedefs.h:78
void Set(ptrdiff_t index0, ptrdiff_t index1, ptrdiff_t index2)
Set both indices.
static void DeltaZExtremes(bvector< CurveLocationDetailPair > const &pairs, size_t &iMin, size_t &iMax)
return the index (or SIZE_MAX) of the pair with min and max deltaZ
CurveLocationDetail m_curveDetail
Definition: CurveDetails.h:603
Transform m_localToWorld
Definition: CurveDetails.h:564
Definition: CurveDetails.h:529
struct DPoint3d & DPoint3dR
Definition: msgeomstructs_typedefs.h:79
void SetChamferAngle(double value)
bvector< CurvePrimitivePtrPair > CurvePrimitivePtrPairVector
Definition: CurveDetails.h:550
void SetParentId(int id)
Set the parent id.
void SetMaxDirectAdjustTolerance(double value)
Set max allowable motion of line and linestring endpoints.
options to gap closure
Definition: CurveDetails.h:467
A range with transforms between local and world coordinates.
Definition: CurveDetails.h:562
void SetMaxAdjustAlongCurve(double value)
Set max motion along a curve.
bool m_needKeyPointType[10]
Definition: CurveDetails.h:657
bool IsCap1() const
Ask if this is the special index pair for end cap.
static const int UnitCircle
Restrict U,V to unit circle {U^2 + V^2 < 1}.
Definition: CurveDetails.h:628
Initialize with EndPoint, Perpendicular, and BreakPoint. KeyPoint types and no projection.
void UpdateFraction1AndUserData(double f1, int64_t newData)
Definition: CurveDetails.h:44
struct Transform const & TransformCR
Definition: msgeomstructs_typedefs.h:134
int GetBCurveMethod() const
ICurvePrimitivePtr geometry
Definition: CurveDetails.h:540
bool InitFromPrincipalAxesOfPoints(bvector< DPoint3d > const &xyz)
void EnableKeyPointType(KeyPointType selector, bool value)
Indicate keypoint preference.
CurveLocationDetail detailA
Definition: CurveDetails.h:152
Constructor for null pointer, 01 interval, 0 userdata.
double GetChamferAngle() const
struct SolidLocationDetail const & SolidLocationDetailCR
Definition: msgeomstructs_typedefs.h:186
int GetParentId() const
Return the parent id.
void SetCapSelector(int id)
Set selectors for cap id (typically 0 or 1)
struct CurveLocationDetail const & CurveLocationDetailCR
Definition: msgeomstructs_typedefs.h:167
ICurvePrimitivePtr curveA
Definition: CurveDetails.h:546
Definition: CurveDetails.h:650
double fraction0
Definition: CurveDetails.h:22
double GetOffsetDistance() const
struct ICurvePrimitive const * ICurvePrimitiveCP
Definition: msgeomstructs_typedefs.h:166
void SetXYOnly(DMatrix4dCR worldToLocal)
Request projection to XY plane.
ptrdiff_t Index2() const
Query the third index.
readIndex and fraction for a position along an edge of a facet in a mesh.
Definition: CurveDetails.h:417
bool GetForceClosure() const
bool UpdateIfSmallerA(SolidLocationDetailCR source)
bool Interpolate(bvector< double > const &param, double &result) const
Use the componentIndex and componentFraction to interpolate doubles.
Definition: CurveDetails.h:654
Construct as null state.
static FaceIndices Cap0()
Return the special (constant) face indices for the start cap of swept primitives. ...
int GetBCurvePointsPerKnot() const
CurveKeyPoint_ClosestPointCollector(DPoint3dCR biasPoint)
Constructor. Initialize as invalid closest point.
Definition: Bentley.r.h:29
Start and end points of a line segment.
Definition: dsegment3d.h:16
void SetSingleComponentData()
copy fraction to componentFraction and set component index and count for single component.
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
void SetCap0()
Set both indices as the special start cap indices.
double DeltaZ() const
return signed z change between points.
double m_fraction
Definition: CurveDetails.h:420
DMatrix4d m_worldToLocal
Definition: CurveDetails.h:659
void SetDistance(double value)
set distance field ({a})
void SetPickParameter(double f)
set the pick fraction.
DPoint3d RangeFractionToWorld(double x, double y, double z) const
Return the world coordinates of a point given by fractional position in the range.
double DistanceSquared() const
return squared distance between points.
Definition: CurveDetails.h:528
bool Is(ptrdiff_t index0, ptrdiff_t index1, ptrdiff_t index2) const
Ask if the indices match a particular triple;.
static void SortByA(bvector< TaggedLocalRange > &data)
struct DVec3d const & DVec3dCR
Definition: msgeomstructs_typedefs.h:89
double GetTolerance() const
double SetDistanceFrom(DPoint3dCR refPoint)
set xyz distance from point.
bool IsCap() const
Ask if this is either of the start or end caps.
Pair of curve primitives (e.g. for use in bvector)
Definition: CurveDetails.h:544
DPoint3d RangeFractionToLocal(double x, double y, double z) const
Return the local coordinates of a point given by fractional position in the range.
size_t numComponent
number of indexed components.
Definition: CurveDetails.h:67
void SetIndex1(ptrdiff_t value)
Set the second index.
void SetSingleComponentFractionAndA(double fraction, double a)
Set fraction and a fields from parameters. Make the component fraction match. Set componentIndex and ...
void SetBCurveMethod(int n)
Definition: CurveDetails.h:524
static FaceIndices Cap1()
Return the special (constant) face indices for the end cap of swept primitives.
struct PartialCurveDetail const & PartialCurveDetailCR
Definition: msgeomstructs_typedefs.h:171
ptrdiff_t Index0() const
Query the first index.
int GetSecondarySelector() const
Return the secondary selector.
static const int PrimaryIdCap
Special value for primary id of cap faces.
Definition: CurveDetails.h:315
bool GetWorldToLocal(DMatrix4dR worldToLocal) const
Query the worldTolocal matrix.
Definition: CurveDetails.h:526
double GetEqualPointTolerance() const
bool IsSingleFraction() const
Test if the partial curve fraction range is a single fraction.
Detail about a computed blend.
Definition: CurveDetails.h:537
double Distance() const
return distance between points.
static const int Unbounded
No boundary implied.
Definition: CurveDetails.h:619
A 3d low and high corner pair for range boxes.
Definition: drange3d.h:20
double GetArcAngle() const
bool TryFractionToPoint(DPoint3dR xyz, DVec3dR dXdf) const
Try to evaluate the referenced curve at the detail's fraction.
void SetIndex2(ptrdiff_t value)
Set the third index.
static const int CenteredSquare
Restrict U,V between -1 and 1 – i.e. square centered at origin, side length 2.
Definition: CurveDetails.h:625
static bool IsCap0(int selector0, int selector1)
Ask if a selector pair is the start cap.
void Init()
Initialize to zeroed state.
ptrdiff_t Index1() const
Query the second index.
4x4 matrix used for perspective (homogeneous coordinate) calculations.
Definition: dmatrix4d.h:18
void SetVDirection(DVec3d dXdv)
Set the v direction vector.

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