CurveVector.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 // @addtogroup BentleyGeom_PolymorphicCurves ICurvePrimitive
12 
13 
14 
15 
16 
17 
18 
19 #ifdef BENTLEY_WIN32
20 #pragma warning (push)
21 #pragma warning (default : 4266) // NEEDS WORK -- warnings about missing virtuals?
22 #endif
24 
25 
78 struct CurveVector : RefCountedBase, bvector<ICurvePrimitivePtr>
79 {
80 public:
81 
82 
83 
84 
87  {
105  };
106 
109  {
111  INOUT_In = 1,
114  };
115 
117 private:
118  virtual void MakeClassAbstract() = 0;
119 public:
120 public:
121 
125 GEOMDLLIMPEXP BoundaryType GetBoundaryType () const;
127 GEOMDLLIMPEXP bool IsOpenPath () const;
129 GEOMDLLIMPEXP bool IsClosedPath () const;
131 GEOMDLLIMPEXP bool IsParityRegion () const;
133 GEOMDLLIMPEXP bool IsUnionRegion () const;
135 GEOMDLLIMPEXP bool IsAnyRegionType () const;
136 
138 GEOMDLLIMPEXP bool AreStartEndAlmostEqual () const;
139 
141 GEOMDLLIMPEXP bool IsEllipticDisk (DEllipse3dR ellipse) const;
142 
144 GEOMDLLIMPEXP bool IsPhysicallyClosedPath () const;
145 
150 GEOMDLLIMPEXP bool IsRectangle (TransformR localToWorld, TransformR worldToLocal) const;
151 
152 
154 GEOMDLLIMPEXP bool SwapAt (size_t index0, size_t index1);
155 
157 GEOMDLLIMPEXP void SwapContents (CurveVectorR other);
158 
159 
161 GEOMDLLIMPEXP static CurveVectorPtr Create (BoundaryType boundaryType);
162 
164 GEOMDLLIMPEXP static CurveVectorPtr Create (BoundaryType boundaryType, ICurvePrimitivePtr primitive);
165 
167 GEOMDLLIMPEXP CurveVectorPtr Clone () const;
168 
172 GEOMDLLIMPEXP CurveVectorPtr CloneDereferenced (bool allowExtrapolation = false, bool maximumDeref = true) const;
173 
175 GEOMDLLIMPEXP CurveVectorPtr CloneWithFillets (double radius) const;
176 
188 GEOMDLLIMPEXP CurveVectorPtr CloneWithGapsClosed (CurveGapOptionsCR options) const;
189 
191 GEOMDLLIMPEXP size_t AddPrimitives (CurveVectorCR source);
192 
194 GEOMDLLIMPEXP void Add (ICurvePrimitivePtr child);
196 GEOMDLLIMPEXP void Add (CurveVectorPtr child);
197 
198 
200 GEOMDLLIMPEXP CurveVectorPtr CloneWithBlends (BlendType, double radiusA, double radiusB) const;
205 
208 GEOMDLLIMPEXP CurveVectorPtr AreaOffset (CurveOffsetOptionsCR options) const;
209 
212 GEOMDLLIMPEXP size_t CountPrimitivesOfType (ICurvePrimitive::CurvePrimitiveType targetType) const;
213 
214 
217 GEOMDLLIMPEXP CurveVectorPtr CloneWithSplits (CurveVectorCR splitterCurves, bool primitivesOnly = false);
218 
220 GEOMDLLIMPEXP void AppendSplitCurvesByRegion (CurveVectorCR region, CurveVectorP insideCollector, CurveVectorP outsideCollector, CurveVectorP onCollector);
222 GEOMDLLIMPEXP void AppendSplitCurvesByPlane (DPlane3dCR plane, CurveVectorP belowCollector, CurveVectorP aboveCollector, CurveVectorP onCollector);
223 
224 
226 GEOMDLLIMPEXP CurveVectorPtr CloneWithExplodedLinestrings () const;
227 
228 
229 
230 
236 GEOMDLLIMPEXP bool WireCentroid (double &length, DPoint3dR centroid) const;
237 
246 GEOMDLLIMPEXP bool CentroidNormalArea (DPoint3dR centroid, DVec3dR normal, double &area) const;
247 
250 GEOMDLLIMPEXP bool ComputeSecondMomentAreaProducts (DMatrix4dR products) const;
251 
259  (
260  DRay3dCR rotationAxis,
261  TransformR rotationToWorld,
262  DMatrix4dR products
263  ) const;
264 
272  (
273  DRay3dCR rotationAxis,
274  TransformR rotationToWorld,
275  DMatrix4dR products
276  ) const;
277 
280 GEOMDLLIMPEXP bool ComputeSecondMomentWireProducts (DMatrix4dR products) const;
281 
288 GEOMDLLIMPEXP bool CentroidAreaXY (DPoint3dR centroid, double &area) const;
289 
296 GEOMDLLIMPEXP DRange1d ProjectedParameterRange (DRay3dCR ray) const;
297 
298 
299 
300 
326 (
327 LocalCoordinateSelect frameType,
328 TransformR localToWorld,
329 TransformR worldToLocal,
330 DRange3dR localRange
331 ) const;
332 
333 
337 GEOMDLLIMPEXP bool GetAnyFrenetFrame (TransformR frame) const;
338 
350 GEOMDLLIMPEXP bool GetAnyFrenetFrame (TransformR frame, int searchPreference) const;
351 
352 
353 
362 GEOMDLLIMPEXP bool TryUVFractionToXYZ
363  (
364  double uFraction,
365  double vFraction,
366  DPoint3dR xyz,
367  DVec3dR dXdu,
368  DVec3dR dXdv
369  ) const;
370 
371 
372 
373 
383 GEOMDLLIMPEXP static CurveVectorPtr CreateLinear (bvector<DPoint3d> const&points,
385  bool forceXYOrientation = false);
386 
397 GEOMDLLIMPEXP static CurveVectorPtr CreateLinear (
398  DPoint3dCP points,
399  size_t numPoints,
401  bool forceXYOrientation = false);
402 
413 GEOMDLLIMPEXP static CurveVectorPtr CreateLinear (
414  DPoint2dCP points,
415  size_t numPoints,
417  bool forceXYOrientation = false);
418 
432 GEOMDLLIMPEXP static CurveVectorPtr CreateRectangle(double x0, double y0, double x1, double y1, double z,
434 
436 GEOMDLLIMPEXP static CurveVectorPtr Create (bvector<DSegment3d> const &segments);
437 
438 
439 
450 GEOMDLLIMPEXP static CurveVectorPtr CreateDisk (DEllipse3dCR arc, BoundaryType boundaryType = CurveVector::BOUNDARY_TYPE_Outer, bool forceXYOrientation = false);
451 
455 GEOMDLLIMPEXP static CurveVectorPtr Create (ICurvePrimitivePtr child, BoundaryType boundaryType = CurveVector::BOUNDARY_TYPE_Open);
456 
457 
458 
468 GEOMDLLIMPEXP CurveVectorPtr CloneAsBsplines () const;
469 
470 
480 GEOMDLLIMPEXP CurveVectorPtr Stroke (IFacetOptionsR options) const;
481 
486 GEOMDLLIMPEXP void AddStrokePoints (bvector <DPoint3d> &points, IFacetOptionsR options) const;
487 
494 GEOMDLLIMPEXP bool CollectLinearGeometry (bvector <bvector<bvector<DPoint3d>>> &regionsPoints) const;
495 
496 
502 GEOMDLLIMPEXP bool AddSpacedPoints (bvector<double> const &distances, bvector<CurveLocationDetail> &locations) const;
503 
504 
505 
506 
507 
509 GEOMDLLIMPEXP BentleyStatus ToBsplineCurve (MSBsplineCurveR curve) const;
511 GEOMDLLIMPEXP MSBsplineCurvePtr GetBsplineCurve () const;
512 
513 
514 
515 
517 GEOMDLLIMPEXP bool ClosestPointBounded (DPoint3dCR spacePoint, CurveLocationDetailR location) const;
519 GEOMDLLIMPEXP bool ClosestPointBounded (DPoint3dCR spacePoint, CurveLocationDetailR location, bool extend0, bool extend1) const;
520 
522 GEOMDLLIMPEXP bool ClosestPointBoundedXY (DPoint3dCR spacePoint, DMatrix4dCP worldToLocal, CurveLocationDetailR location) const;
523 
525 GEOMDLLIMPEXP bool ClosestPointBoundedXY (DPoint3dCR spacePoint, DMatrix4dCP worldToLocal, CurveLocationDetailR location, bool extend0, bool extend1) const;
531 GEOMDLLIMPEXP CurveVector::InOutClassification ClosestCurveOrRegionPoint (DPoint3dCR spacePoint, DPoint3dR curveOrRegionPoint) const;
532 
535 GEOMDLLIMPEXP void AnnounceKeyPoints
536 (
537 DPoint3dCR spacePoint,
538 CurveKeyPointCollector &collector,
539 bool extend0,
540 bool extend1
541 ) const;
542 
546 GEOMDLLIMPEXP bool GetStartEnd (DPoint3dR pointA, DPoint3dR pointB) const;
547 
553 GEOMDLLIMPEXP bool GetStartEnd (DPoint3dR pointA, DPoint3dR pointB, DVec3dR unitTangentA, DVec3dR unitTangentB) const;
554 
557 GEOMDLLIMPEXP bool GetStartPoint (DPoint3dR point) const;
558 
560 GEOMDLLIMPEXP double Length () const;
561 
563 GEOMDLLIMPEXP double Length (RotMatrixCP worldToLocal) const;
564 
566 GEOMDLLIMPEXP double FastLength () const;
567 
569 GEOMDLLIMPEXP double MaxGapWithinPath () const;
570 
571 
573 GEOMDLLIMPEXP double FastMaxAbs () const;
574 
576 GEOMDLLIMPEXP bool IsSameStructure (CurveVectorCR other) const;
577 
581 GEOMDLLIMPEXP bool IsSameStructureAndGeometry (CurveVectorCR other, double tolerance = 0.0) const;
582 
584 GEOMDLLIMPEXP bool GetRange (DRange3dR range) const;
589 GEOMDLLIMPEXP bool GetRange (DRange3dR range, TransformCR transform) const;
590 
597 GEOMDLLIMPEXP bool IsPlanar (TransformR localToWorld, TransformR worldToLocal, DRange3dR range) const;
598 
599 
606 GEOMDLLIMPEXP bool IsPlanarWithDefaultNormal (TransformR localToWorld, TransformR worldToLocal, DRange3dR range, DVec3dCP normal) const;
607 
608 
609 
610 
611 
613 GEOMDLLIMPEXP size_t CyclicIndex (int index) const;
615 GEOMDLLIMPEXP ICurvePrimitivePtr GetCyclic (ptrdiff_t index) const;
616 
619 GEOMDLLIMPEXP size_t CurveLocationDetailIndex (CurveLocationDetail const& location) const;
620 
623 GEOMDLLIMPEXP size_t FindIndexOfPrimitive (ICurvePrimitiveCP primitive) const;
624 
626 GEOMDLLIMPEXP CurveVectorPtr FindParentOfPrimitive (ICurvePrimitiveCP primitive) const;
627 
630 GEOMDLLIMPEXP int CurveLocationDetailCompare (CurveLocationDetail const& location0, CurveLocationDetail const& location1) const;
631 
633 GEOMDLLIMPEXP double ResolveTolerance (double tolerance) const;
634 
639 GEOMDLLIMPEXP void FindPrimitivesWithNearbyStartEnd (bvector<CurveLocationDetail> &data, DPoint3dCR xyz, double tolerance) const;
640 
641 
642 
643 
645 GEOMDLLIMPEXP CurveVectorPtr CloneBetweenCyclicIndexedFractions (int index0, double fraction0, int index1, double fraction1) const;
646 
648 GEOMDLLIMPEXP CurveVectorPtr CloneBetweenDirectedFractions (int index0, double fraction0, int index1, double fraction1, bool allowExtrapolation) const;
649 
651 GEOMDLLIMPEXP CurveVectorPtr CloneReversed () const;
652 
666 GEOMDLLIMPEXP CurveVectorPtr GenerateAllParts (int indexA, double fractionA, int indexB, double fractionB) const;
667 
669 GEOMDLLIMPEXP bool ContainsNonLinearPrimitive () const;
670 
671 
678 GEOMDLLIMPEXP void AppendCurvePlaneIntersections (DPlane3dCR plane, bvector<CurveLocationDetailPair> &intersections, double tolerance = 0.0) const;
679 
685 GEOMDLLIMPEXP bool AppendClosedCurvePlaneIntersections (DPlane3dCR plane, bvector<CurveLocationDetailPair> &intersections, double tolerance = 0.0) const;
686 
692 GEOMDLLIMPEXP ICurvePrimitivePtr PlaneSection (DPlane3dCR plane, double tolerance = 0.0) const;
693 
698 
702 (
703 DRay3dCR ray,
704 SolidLocationDetailR hitDetail
705 ) const;
706 
707 
708 
710 GEOMDLLIMPEXP bool TransformInPlace (TransformCR transform);
711 
716 GEOMDLLIMPEXP bool ReverseCurvesInPlace ();
717 
718 
722 GEOMDLLIMPEXP void ConsolidateAdjacentPrimitives ();
723 
728 GEOMDLLIMPEXP void ConsolidateAdjacentPrimitives (bool doSimplifyLinestrings);
729 
732 GEOMDLLIMPEXP void SimplifyLinestrings (double distanceTol, bool eliminateOverdraw, bool wrap);
733 
748 GEOMDLLIMPEXP bool FixupXYOuterInner (bool fullGeometryCheck = false);
749 
754 GEOMDLLIMPEXP double ReorderForSmallGaps ();
755 
758 GEOMDLLIMPEXP CurveVectorPtr AssembleChains ();
759 
760 
761 
766 GEOMDLLIMPEXP static CurveVectorPtr AreaUnion (CurveVectorCR regionA, CurveVectorCR regionB, CurvePrimitivePtrPairVector *newToOld = NULL);
767 
772 GEOMDLLIMPEXP static CurveVectorPtr AreaDifference (CurveVectorCR regionA, CurveVectorCR regionB, CurvePrimitivePtrPairVector *newToOld = NULL);
773 
778 GEOMDLLIMPEXP static CurveVectorPtr AreaIntersection (CurveVectorCR regionA, CurveVectorCR regionB, CurvePrimitivePtrPairVector *newToOld = NULL);
779 
784 GEOMDLLIMPEXP static CurveVectorPtr AreaParity (CurveVectorCR regionA, CurveVectorCR regionB, CurvePrimitivePtrPairVector *newToOld = NULL);
785 
786 
787 
788 
789 
795 GEOMDLLIMPEXP static CurveVectorPtr AreaAnalysis
796  (CurveVectorCR region, AreaSelect select1, BoolSelect select2, bool reverse);
797 
801 GEOMDLLIMPEXP static CurveVectorPtr ReduceToCCWAreas (CurveVectorCR regionA);
802 
803 
805 GEOMDLLIMPEXP static CurveVectorPtr CreateXYHatch (
806 CurveVectorCR boundary,
807 DPoint3dCR startPoint,
808 double angleRadians,
809 double spacing,
810 int selection = 0
811 );
812 
824 GEOMDLLIMPEXP static CurveVectorPtr CreateSpiralLineToLineShift
825 (
826 int transitionType,
827 DPoint3dCR pointA,
828 DPoint3dCR shoulderB,
829 DPoint3dCR shoulderC,
830 DPoint3dCR pointD
831 );
832 
840 (
841 DPoint3dCR xyz0,
842 DPoint3dCR xyz1,
843 DPoint3dCR xyz2,
844 double arcRadius,
845 double spiralLength
846 );
847 
860 (
861 DPoint3dCR primaryPoint0,
862 DPoint3dCR primaryPoint1,
863 DPoint3dCR primaryPoint2,
864 double primaryRadius,
865 double primarySpiralLength,
866 double offsetDistance
867 );
868 
869 
870 }; // CurveVector
871 
872 
873 
876 
878 {
879 private: CurveCurve (); // static class, no instances allowed.
880 public:
889 static GEOMDLLIMPEXP void IntersectionsXY
890 (
891 CurveVectorR intersectionA,
892 CurveVectorR intersectionB,
893 CurveVectorR curveA,
894 CurveVectorR curveB,
895 DMatrix4dCP pWorldToLocal
896 );
905 static GEOMDLLIMPEXP void IntersectionsXY
906 (
907 CurveVectorR intersectionA,
908 CurveVectorR intersectionB,
909 ICurvePrimitiveP curveA,
910 ICurvePrimitiveP curveB,
911 DMatrix4dCP pWorldToLocal,
912 bool extend = false
913 );
914 
923 static GEOMDLLIMPEXP void IntersectionsXY
924 (
925 CurveVectorR intersectionA,
926 CurveVectorR intersectionB,
927 ICurvePrimitiveR curveA,
928 CurveVectorR curveB,
929 DMatrix4dCP pWorldToLocal
930 );
931 
935 static GEOMDLLIMPEXP void IntersectionRotatedRay
936 (
937 bvector<CurveLocationDetail>&intersectionA,
938 bvector<CurveLocationDetail>&intersectionB,
939 ICurvePrimitiveCP curveA,
940 TransformCR worldToLocal,
941 DRay3dCR rayB
942 );
943 
950 static GEOMDLLIMPEXP void CloseApproach
951 (
952 CurveVectorR pointsOnA,
953 CurveVectorR pointsOnB,
954 ICurvePrimitiveP curveA,
955 ICurvePrimitiveP curveB,
956 double maxDist = DBL_MAX
957 );
958 
963 static GEOMDLLIMPEXP bool ClosestApproachNewton (
964  ICurvePrimitiveCR curveA,
965  ICurvePrimitiveCR curveB,
966  double &fractionA,
967  double &fractionB,
968  DPoint3dR xyzA,
969  DPoint3dR xyzB
970  );
971 
978 void CloseApproach
979 (
980 CurveVectorR pointsOnA,
981 CurveVectorR pointsOnB,
982 CurveVectorCR chainA,
983 CurveVectorCR chainB,
984 double maxDist
985 );
986 
993 static GEOMDLLIMPEXP bool ClosestApproach
994 (
995 CurveLocationDetailR pointOnA,
996 CurveLocationDetailR pointOnB,
997 ICurvePrimitiveP curveA,
998 ICurvePrimitiveP curveB
999 );
1000 
1007 static GEOMDLLIMPEXP bool ClosestApproach
1008 (
1009 CurveLocationDetailR pointOnA,
1010 CurveLocationDetailR pointOnB,
1011 CurveVectorCR chainA,
1012 CurveVectorCR chainB
1013 );
1014 
1015 
1016 
1030 static GEOMDLLIMPEXP bool IsSinglePointPair
1031 (
1032 CurveVectorR intersectionA,
1033 CurveVectorR intersectionB,
1034 size_t i,
1035 double &fractionA,
1036 DPoint3dR pointA,
1037 double &fractionB,
1038 DPoint3dR pointB
1039 );
1040 
1052 static GEOMDLLIMPEXP bool IsSinglePointPair
1053 (
1054 CurveVectorR intersectionA,
1055 CurveVectorR intersectionB,
1056 size_t i,
1057 CurveLocationDetailR detailA,
1058 CurveLocationDetailR detailB
1059 );
1060 
1062 static GEOMDLLIMPEXP bool IsContained
1063 (
1064 CurveVectorR intersectionA,
1065 CurveVectorR intersectionB,
1066 size_t i,
1067 size_t j,
1068 bool considerSinglePoints,
1069 bool considerIntervals
1070 );
1071 
1072 
1073 
1082 static GEOMDLLIMPEXP bool GetPartialCurveDetailPair
1083 (
1084 CurveVectorR intersectionA,
1085 CurveVectorR intersectionB,
1086 size_t i,
1087 PartialCurveDetailR detailA,
1088 PartialCurveDetailR detailB
1089 );
1090 
1091 
1095 {
1098 };
1099 
1106 static GEOMDLLIMPEXP void CollectFilletArcs
1107 (
1108 ICurvePrimitiveR curveA,
1109 ICurvePrimitiveR curveB,
1110 double radius,
1111 bool extend,
1113 );
1114 
1121 static GEOMDLLIMPEXP void CollectFilletArcs
1122 (
1123 CurveVectorCR chainA,
1124 CurveVectorCR chainB,
1125 double radius,
1126 bool extend,
1128 );
1129 
1131 static GEOMDLLIMPEXP void CollectBlends
1132 (
1133 ICurvePrimitiveR curveA,
1134 ICurvePrimitiveR curveB,
1135 BlendType blendType,
1136 double distanceA,
1137 double distanceB,
1138 bool extend,
1139 bvector<BlendDetail> &blendCurves
1140 );
1141 
1143 static GEOMDLLIMPEXP void CollectBlends
1144 (
1145 CurveVectorCR chainA,
1146 CurveVectorCR chainB,
1147 BlendType blendType,
1148 double distanceA,
1149 double distanceB,
1150 bool extend,
1151 bvector<BlendDetail> &blendCurves
1152 );
1153 
1157 static GEOMDLLIMPEXP bool TransverseRegionIntersectionSegments
1158 (
1159 CurveVectorCR regionA,
1160 CurveVectorCR regionB,
1161 bvector<DSegment3d> &segments
1162 );
1163 
1165 static GEOMDLLIMPEXP void IntersectRotatedCurveSpaceCurve
1166 (
1167 TransformCR worldToLocal,
1168 CurveVectorCR rotatedCurve,
1169 ICurvePrimitiveCR spaceCurve,
1172 );
1173 };
1174 
1175 
1176 
1190 {
1192 private:
1193 CurveLocationDetail m_curveDetail;
1194 int32_t m_pathIndex; // index to the parent path.
1195 double m_pathDistance; // distance along path.
1196 public:
1198 GEOMDLLIMPEXP PathLocationDetail ();
1199 
1201 GEOMDLLIMPEXP PathLocationDetail (PathLocationDetail const &other);
1202 
1204 GEOMDLLIMPEXP PathLocationDetail (CurveLocationDetailCR curveDetail, int pathIndex = -1, double distance = DBL_MAX);
1206 GEOMDLLIMPEXP PathLocationDetail (CurveLocationDetailCR curveDetail, size_t pathIndex, double distance = DBL_MAX);
1207 
1209 GEOMDLLIMPEXP PathLocationDetail (double distance);
1210 
1211 GEOMDLLIMPEXP PathLocationDetail FractionToPositionLocationDetail (double f, bool evaluateDistance = true) const;
1213 GEOMDLLIMPEXP DPoint3d Point () const;
1215 GEOMDLLIMPEXP DPoint3d PointAndUnitTangent (DVec3dR unitTangent) const;
1217 GEOMDLLIMPEXP CurveLocationDetail GetCurveLocationDetail () const;
1218 
1219 
1221 GEOMDLLIMPEXP bool HasCurve () const;
1223 GEOMDLLIMPEXP double DistanceToPoint (PathLocationDetail const &other) const;
1225 GEOMDLLIMPEXP double DistanceToPoint (DPoint3dCR xyz) const;
1227 GEOMDLLIMPEXP double DistanceSquaredToPoint (DPoint3dCR xyz) const;
1229 GEOMDLLIMPEXP double DistanceFromPathStart () const;
1231 static GEOMDLLIMPEXP bool IsLessThan_ByPathDistance (PathLocationDetail const &dataA, PathLocationDetail const &dataB);
1232 
1233 };
1234 
1243 struct CurveVectorWithDistanceIndex : RefCountedBase
1244 {
1245 private:
1246 
1247 struct PathEntry : PathLocationDetail
1248 {
1249 double m_projectedDistance;
1250 DRange3d m_range;
1251 PathEntry (PathLocationDetail const &pathDetail, double projectedDistance, DRange3dCR range)
1252  : PathLocationDetail (pathDetail),
1253  m_projectedDistance (projectedDistance),
1254  m_range(range)
1255  {
1256  }
1257 PathEntry (double distance) : PathLocationDetail (distance), m_projectedDistance (distance) {}
1258 // @param projected true for m_projectedDistance, false for m_pathDistance;
1259 double GetDistance (bool projected) const;
1261 static GEOMDLLIMPEXP bool IsLessThan_ByPathDistanceXY (PathEntry const &dataA, PathEntry const &dataB);
1262 static GEOMDLLIMPEXP bool IsLessThan_ByPathDistance (PathEntry const &dataA, PathEntry const &dataB);
1263 
1264 };
1265 
1266 CurveVectorPtr m_curveVector; // must be referenced to be sure curvePrimitiveCP in detail data is valid.
1267 bvector<PathEntry> m_locations;
1268 CurveVectorPtr m_savedPrimitives; // Ptr's to extension primitives.
1269 
1270 RotMatrix m_worldToViewRotMatrix;
1271 RotMatrix m_viewToWorldRotMatrix;
1272 RotMatrix m_flattenToView; // Scale (1,0,0) * m_worldToViewRotMatrix;
1273 DMatrix4d m_worldToView;
1274 
1275 
1277 bool AppendPrimitive (ICurvePrimitivePtr const &source);
1278 
1280 void AppendPrimitives (CurveVectorCR source);
1281 
1283 void ClearCurves ();
1284 
1286 void Init (RotMatrixCR worldToView);
1290 explicit CurveVectorWithDistanceIndex (RotMatrix worldToView);
1294 
1296 bool SearchByDistanceFromPathStart
1297 (
1298 RotMatrixCP flatten,
1299 double targetDistance,
1300 PathLocationDetail &detail
1301 ) const;
1302 
1303 
1304 
1305 
1306 public:
1307 
1311 static GEOMDLLIMPEXP CurveVectorWithDistanceIndexPtr Create (RotMatrix worldToView);
1314 static GEOMDLLIMPEXP CurveVectorWithDistanceIndexPtr Create ();
1315 
1317 GEOMDLLIMPEXP bool IsEmpty () const;
1318 
1319 
1324 GEOMDLLIMPEXP void SetPath (CurveVectorPtr &path);
1325 
1331 GEOMDLLIMPEXP bool SetExtendedPath
1332 (
1333 CurveVectorPtr &path,
1334 double extensionDistance,
1335 PathLocationDetail &boundedStart,
1336 PathLocationDetail &boundedEnd,
1337 bool measureExtensionInView = false,
1338 double maxExtensionFactor = 4.0
1339 );
1341 GEOMDLLIMPEXP double TotalPathLength () const;
1342 
1344 GEOMDLLIMPEXP double TotalPathLengthXY () const;
1345 
1347 GEOMDLLIMPEXP PathLocationDetail AtStart () const;
1349 GEOMDLLIMPEXP PathLocationDetail AtEnd () const;
1350 
1352 GEOMDLLIMPEXP double DistanceBetweenPointsXY (DPoint3dCR xyzA, DPoint3dCR xyzB) const;
1353 
1354 
1356 GEOMDLLIMPEXP bool SearchByDistanceFromPathStart
1357 (
1358 double targetDistance,
1359 PathLocationDetail &detail
1360 ) const;
1361 
1364 GEOMDLLIMPEXP bool SearchByDistanceFromPathStartXY
1365 (
1366 double targetDistanceXY,
1367 PathLocationDetail &detail
1368 ) const;
1369 
1372 (
1373 DPoint3dCR spacePoint,
1374 bool computeDistanceAlong
1375 ) const;
1376 
1380 GEOMDLLIMPEXP bool SearchFirstIntersectionWithCircleXY
1381 (
1382 PathLocationDetail const &startLocation,
1383 double signedRadius,
1384 PathLocationDetail &intersectionLocation
1385 ) const;
1386 
1388 GEOMDLLIMPEXP bool DistanceXYFromPathStart
1389 (
1390 PathLocationDetail const &detail,
1391 double &distance
1392 ) const;
1393 
1394 
1395 
1396 };
1397 
1398 
1399 
1400 
1401 
1402 
1404 
1405 #ifdef BENTLEY_WIN32
1406 #pragma warning (pop)
1407 #endif
size_t FindIndexOfPrimitive(ICurvePrimitiveCP primitive) const
return index of primitive in vector (only valid for a vector that is a single open or closed path)...
struct DVec3d const * DVec3dCP
Definition: msgeomstructs_typedefs.h:89
struct MSBsplineCurve & MSBsplineCurveR
Definition: msgeomstructs_typedefs.h:139
struct RotMatrix const * RotMatrixCP
Definition: msgeomstructs_typedefs.h:135
MSBsplineCurvePtr GetBsplineCurve() const
Represent a curve vector that denotes an open or closed path as a single bspline curve.
static void CloseApproach(CurveVectorR pointsOnA, CurveVectorR pointsOnB, ICurvePrimitiveP curveA, ICurvePrimitiveP curveB, double maxDist=DBL_MAX)
Find points (or intervals!!!) where curveA and curveB have close approach.
bool IsClosedPath() const
Query: Is this (single) closed path?
struct PartialCurveDetail & PartialCurveDetailR
Definition: msgeomstructs_typedefs.h:171
size_t CountPrimitivesOfType(ICurvePrimitive::CurvePrimitiveType targetType) const
Count primitives of specified type.
DPoint3d Point() const
Query xyz coordinates.
Curves should join head to tail in a single closed path; this area is expected to be an inner loop...
Definition: CurveVector.h:98
Center, reference vectors, and angular range for elliptic arc.
Definition: dellipse3d.h:19
size_t CyclicIndex(int index) const
return mod of index with vector length, properly corrected for negatives.
bool IsPlanar(TransformR localToWorld, TransformR worldToLocal, DRange3dR range) const
Test if the contained curves are planar.
Definition: CurveVector.h:113
PathLocationDetail FractionToPositionLocationDetail(double f, bool evaluateDistance=true) const
double ResolveTolerance(double tolerance) const
return larger of given tolerance and default tolerance based on FastMasAbs of contents ...
bool ReverseCurvesInPlace()
Recursively reverse.
static CurveVectorPtr AreaParity(CurveVectorCR regionA, CurveVectorCR regionB, CurvePrimitivePtrPairVector *newToOld=NULL)
Return a curve vector containing the parity of input areas.
DRange1d ProjectedParameterRange(DRay3dCR ray) const
Return the range of ray parameters when contents of the CurveVector are projected to a ray...
size_t AddPrimitives(CurveVectorCR source)
recurse through source. append all leaf primitives to this. Return number added.
RefCountedPtr< struct ICurvePrimitive > ICurvePrimitivePtr
Definition: GeomApi.h:112
bool CollectLinearGeometry(bvector< bvector< bvector< DPoint3d >>> &regionsPoints) const
Add all strokes from the structure.
static void IntersectRotatedCurveSpaceCurve(TransformCR worldToLocal, CurveVectorCR rotatedCurve, ICurvePrimitiveCR spaceCurve, bvector< CurveLocationDetail > &detailA, bvector< CurveLocationDetail > &detailB)
Compute intersections of (a) a curve rotated around an axis and (b) a space curve.
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
double DistanceBetweenPointsXY(DPoint3dCR xyzA, DPoint3dCR xyzB) const
projected distance between points
CurveVectorPtr CloneWithBlends(BlendType, double radiusA, double radiusB) const
return a (deep) clone with fillets inserted between successive curves.
void SetPath(CurveVectorPtr &path)
Announce the path to be indexed.
CurveVectorPtr Stroke(IFacetOptionsR options) const
Return a "deep copy" with primitives replaced by strokes.
void SimplifyLinestrings(double distanceTol, bool eliminateOverdraw, bool wrap)
Inplace update to consolidate colinear interior points of linestrings.
bool IsAnyRegionType() const
Query: is this any closed area type (single, parity, union)
double TotalPathLength() const
Return complete path length.
static operations on curves.
Definition: CurveVector.h:877
CurveVectorPtr CloneWithExplodedLinestrings() const
Return a curve vector that is a clone, but with all polylines split into individual line segments...
CurveVector::InOutClassification PointInOnOutXY(DPoint3dCR xyz) const
Test if a point is in, on, or outside when looking at xy plane.
CurveVectorPtr CloneOffsetCurvesXY(CurveOffsetOptionsCR options)
return a (deep) clone with all curves offset by signed distance.
struct DVec3d & DVec3dR
Definition: msgeomstructs_typedefs.h:89
bool ComputeSecondMomentDifferentialAreaRotationProducts(DRay3dCR rotationAxis, TransformR rotationToWorld, DMatrix4dR products) const
Return the moment products [xx,xy,xz,xw; etc] of the area as a differential rotational slice...
bool IsSameStructure(CurveVectorCR other) const
Recursive check for structural match (tree structure and leaf type) with the other curve vector...
bool SearchByDistanceFromPathStartXY(double targetDistanceXY, PathLocationDetail &detail) const
Return detailed curve location for the position at targetDistance along the curve, measuring in path distance.
static bool ClosestApproachNewton(ICurvePrimitiveCR curveA, ICurvePrimitiveCR curveB, double &fractionA, double &fractionB, DPoint3dR xyzA, DPoint3dR xyzB)
Run a Newton iteration from given start positions to search for a close approach point.
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
static bool IsContained(CurveVectorR intersectionA, CurveVectorR intersectionB, size_t i, size_t j, bool considerSinglePoints, bool considerIntervals)
Test if interval i is contained in interval j.
CurveVectorPtr CloneAsBsplines() const
Return a "deep copy" with primitives replaced by bsplines The tree upper levels of the tree structure...
static bool IsLessThan_ByPathDistance(PathLocationDetail const &dataA, PathLocationDetail const &dataB)
Comparison using only the stored distance.
BoundaryType GetBoundaryType() const
Return the type code indicating whether the vector is a path, outer boundary, inner boundary...
ICurvePrimitivePtr PlaneSection(DPlane3dCR plane, double tolerance=0.0) const
Compute intersections of closed CurveVector with a plane and organize as start end pairs by parity ru...
struct ICurvePrimitive * ICurvePrimitiveP
Definition: msgeomstructs_typedefs.h:166
double MaxGapWithinPath() const
Maximum gap distance between end of primitive and start of its successor within Open, outer, or Inner loop.
PathLocationDetail AtEnd() const
Return the final location.
ICurvePrimitivePtr GetCyclic(ptrdiff_t index) const
return child at cyclic index, propertly corrected for negatives.
RefCountedPtr< RefCountedMSBsplineCurve > MSBsplineCurvePtr
Definition: GeomApi.h:116
void ConsolidateAdjacentPrimitives()
Inplace update to consolidate contiguous parts.
BlendType
Enumeration of variants of blend calculations.
Definition: CurveDetails.h:507
void AppendCurvePlaneIntersections(DPlane3dCR plane, bvector< CurveLocationDetailPair > &intersections, double tolerance=0.0) const
Compute simple points of intersection of the curve with a plane.
bool HasCurve() const
Test if there is a curve.
CurveVectorPtr CloneWithGapsClosed(CurveGapOptionsCR options) const
return a (deep) clone with endpoint gaps closed.
Definition: CurveVector.h:112
static CurveVectorPtr CreateXYHatch(CurveVectorCR boundary, DPoint3dCR startPoint, double angleRadians, double spacing, int selection=0)
Return a curve vector (of type BOUNDARY_TYPE_None) containing hatch sticks.
RefCountedPtr< struct CurveVector > CurveVectorPtr
Definition: GeomApi.h:113
InOutClassification
Classification of a point wrt a closed shape.
Definition: CurveVector.h:108
bool GetStartPoint(DPoint3dR point) const
Return start point of the primitive (or first primitive in deep search)
struct RotMatrix const & RotMatrixCR
Definition: msgeomstructs_typedefs.h:135
struct CurveVector const & CurveVectorCR
Definition: msgeomstructs_typedefs.h:172
bool IsPhysicallyClosedPath() const
Query: Is this a nominally open path but with matching start and end?
int int32_t
Definition: Bentley.r.h:92
double TotalPathLengthXY() const
Return complete path length as flattened into the view.
bool CentroidNormalArea(DPoint3dR centroid, DVec3dR normal, double &area) const
Return the centroid, normal and area of the curve vector.
double DistanceToPoint(PathLocationDetail const &other) const
distance between points of this and other detail.
CurveVectorPtr CloneBetweenDirectedFractions(int index0, double fraction0, int index1, double fraction1, bool allowExtrapolation) const
Return a new vector containing curves from index0,fraction0 to index1,fraction1 with the (signed int!...
struct CurveGapOptions const & CurveGapOptionsCR
Definition: msgeomstructs_typedefs.h:163
struct Transform & TransformR
Definition: msgeomstructs_typedefs.h:134
void Add(ICurvePrimitivePtr child)
add single curve primitive
bool IsEllipticDisk(DEllipse3dR ellipse) const
Query: Is this an outer loop with an ellipse as its only curve?
PathLocationDetail()
Constructor – all zeros except pathIndex is -1.
Context for searching a path by "distance along" Position along the path is described by a CurveLocat...
Definition: CurveVector.h:1243
bool ContainsNonLinearPrimitive() const
Return true if CurveVector has a component that is not a line or linestring.
#define NULL
Definition: Bentley.h:157
double DistanceFromPathStart() const
Queryt the stored distance to path start. Note that this is not a recompute – just a member access...
static CurveVectorPtr Create(BoundaryType boundaryType)
Create a curve vector with given boundary type and no members.
AreaSelect
Definition: CurveDetails.h:514
int CurveLocationDetailCompare(CurveLocationDetail const &location0, CurveLocationDetail const &location1) const
return 0 of locations are equal, -1 if location 0 is less than location 1, and 1 if location 0 > loca...
CurveLocationDetail detailB
Definition: CurveVector.h:1096
bool WireCentroid(double &length, DPoint3dR centroid) const
Return the centroid of the contained curves, considered as wires.
CurvePrimitiveType
Enumeration of possible curve primitive types.
Definition: CurvePrimitive.h:53
static void IntersectionRotatedRay(bvector< CurveLocationDetail > &intersectionA, bvector< CurveLocationDetail > &intersectionB, ICurvePrimitiveCP curveA, TransformCR worldToLocal, DRay3dCR rayB)
Collect apparent intersections between rotating curves and a ray.
size_t CurveLocationDetailIndex(CurveLocationDetail const &location) const
return index of curve location detail in vector (only valid for a vector that is a single open or clo...
friend struct CurvePrimitiveChildCurveVector
Definition: CurveVector.h:116
CurveVectorPtr CloneDereferenced(bool allowExtrapolation=false, bool maximumDeref=true) const
Return a "deep copy" with PartialCurve primitives replaced by full curves.
bool ComputeSecondMomentWireProducts(DMatrix4dR products) const
Return the area, centroid, orientation, and principal moments, treating this as a wire...
struct IFacetOptions & IFacetOptionsR
Definition: msgeomstructs_typedefs.h:162
LocalCoordinateSelect
Definition: msgeomstructs_typedefs.h:231
bool ComputeSecondMomentDifferentialWireRotationProducts(DRay3dCR rotationAxis, TransformR rotationToWorld, DMatrix4dR products) const
Return the moment products [xx,xy,xz,xw; etc] of the wire as a differential rotational contribution...
static CurveVectorPtr ConstructSpiralArcSpiralTransition(DPoint3dCR xyz0, DPoint3dCR xyz1, DPoint3dCR xyz2, double arcRadius, double spiralLength)
Return a curveVector with spiral-arc-spiral transtion between two lines, subject to: ul> li>specified...
static CurveVectorPtr AreaAnalysis(CurveVectorCR region, AreaSelect select1, BoolSelect select2, bool reverse)
Return a curve vector containing the "inside" areas by various conditions.
bool TransformInPlace(TransformCR transform)
Apply a transform to all contained curves.
struct DEllipse3d & DEllipse3dR
Definition: msgeomstructs_typedefs.h:114
static bool IsSinglePointPair(CurveVectorR intersectionA, CurveVectorR intersectionB, size_t i, double &fractionA, DPoint3dR pointA, double &fractionB, DPoint3dR pointB)
Convenience function for extracting single point intersection from the output of CurveCurveIntersecti...
Expected to contain (only) multiple CurveVectors, all of which are either BOUNDARY_TYPE_Open or BOUND...
Definition: CurveVector.h:101
static bool TransverseRegionIntersectionSegments(CurveVectorCR regionA, CurveVectorCR regionB, bvector< DSegment3d > &segments)
Determine the line of intersection of the planes of the two containing planes.
CurveVectorPtr CloneInLocalCoordinates(LocalCoordinateSelect frameType, TransformR localToWorld, TransformR worldToLocal, DRange3dR localRange) const
Return curve copy and transforms for a local coordinate system related to the curves.
struct DRange3d & DRange3dR
Definition: msgeomstructs_typedefs.h:108
struct CurveVector * CurveVectorP
Definition: msgeomstructs_typedefs.h:172
RefCountedPtr< struct CurveVectorWithDistanceIndex > CurveVectorWithDistanceIndexPtr
Definition: GeomApi.h:114
static CurveVectorPtr AreaUnion(CurveVectorCR regionA, CurveVectorCR regionB, CurvePrimitivePtrPairVector *newToOld=NULL)
Return a curve vector containing the union of input areas.
bool AreStartEndAlmostEqual() const
Query: Does this have start and end points and are the points almost equal?
void AppendSplitCurvesByPlane(DPlane3dCR plane, CurveVectorP belowCollector, CurveVectorP aboveCollector, CurveVectorP onCollector)
Return curves (not regions) that are below, above, and on a plane.
static void CollectBlends(ICurvePrimitiveR curveA, ICurvePrimitiveR curveB, BlendType blendType, double distanceA, double distanceB, bool extend, bvector< BlendDetail > &blendCurves)
Compute all possible blend curves between pairs of curves from two sources.
BentleyStatus
Definition: Bentley.h:208
bool DistanceXYFromPathStart(PathLocationDetail const &detail, double &distance) const
! Given a path location, find the projected curve distance from the path start.
Curves should join head to tail in a single path. The path is not expected to be closed.
Definition: CurveVector.h:94
CurveVectorPtr FindParentOfPrimitive(ICurvePrimitiveCP primitive) const
Search the tree (below the calling instance) for the curve vector which is the immediate parent of gi...
struct DRange3d const & DRange3dCR
Definition: msgeomstructs_typedefs.h:108
Collector object for various searches.
Definition: CurveDetails.h:646
CurveVectorPtr AssembleChains()
Join curve primitives head to tail.
static CurveVectorPtr AreaDifference(CurveVectorCR regionA, CurveVectorCR regionB, CurvePrimitivePtrPairVector *newToOld=NULL)
Return a curve vector containing the difference of input areas.
bool IsEmpty() const
Return true if there are no curves.
struct ICurvePrimitive & ICurvePrimitiveR
Definition: msgeomstructs_typedefs.h:166
bool GetAnyFrenetFrame(TransformR frame) const
Deep search for any curve primitive that has a well defined coordinate frame.
bool IsUnionRegion() const
Query: is this a collection of areas with union rules?
struct CurveLocationDetail & CurveLocationDetailR
Definition: msgeomstructs_typedefs.h:167
bool GetStartEnd(DPoint3dR pointA, DPoint3dR pointB) const
Return first/last among children.
bool GetRange(DRange3dR range) const
Return the xyz range of contained curves.
struct DMatrix4d & DMatrix4dR
Definition: msgeomstructs_typedefs.h:97
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 void IntersectionsXY(CurveVectorR intersectionA, CurveVectorR intersectionB, CurveVectorR curveA, CurveVectorR curveB, DMatrix4dCP pWorldToLocal)
Collect apparent intersections between curves as viewed in XY plane, optionally after a transform...
A Bentley supplied implementation std::vector.
Definition: stdcxx/bvector.h:77
bool ClosestPointBounded(DPoint3dCR spacePoint, CurveLocationDetailR location) const
Search for the closest point on any contained curve.
struct DPlane3d const & DPlane3dCR
Definition: msgeomstructs_typedefs.h:113
struct DPoint3d & DPoint3dR
Definition: msgeomstructs_typedefs.h:79
bool IsRectangle(TransformR localToWorld, TransformR worldToLocal) const
Query: Is this a rectangle?
static CurveVectorPtr CreateDisk(DEllipse3dCR arc, BoundaryType boundaryType=CurveVector::BOUNDARY_TYPE_Outer, bool forceXYOrientation=false)
Create a (deep) curve vector structure for a complete elliptic (circular) disk.
Definition: CurveVector.h:110
DEllipse3d arc
Definition: CurveVector.h:1097
static bool GetPartialCurveDetailPair(CurveVectorR intersectionA, CurveVectorR intersectionB, size_t i, PartialCurveDetailR detailA, PartialCurveDetailR detailB)
Convenience function for extracting PartialCurveDetail data from two arrays returned by CurveCurve::I...
struct ICurvePrimitive const & ICurvePrimitiveCR
Definition: msgeomstructs_typedefs.h:166
bool CentroidAreaXY(DPoint3dR centroid, double &area) const
Return the centroid and area of the curve vector as viewed in the xy plane.
struct SolidLocationDetail & SolidLocationDetailR
Definition: msgeomstructs_typedefs.h:186
A 1d interval with low and high values.
Definition: DRange1d.h:41
struct DMatrix4d const * DMatrix4dCP
Definition: msgeomstructs_typedefs.h:97
bool IsSameStructureAndGeometry(CurveVectorCR other, double tolerance=0.0) const
Recursive check for match (tree structure.
CurveVectorPtr CloneWithSplits(CurveVectorCR splitterCurves, bool primitivesOnly=false)
Return a curve vector that is a clone, but with all primitives split at intersections with any splitt...
CurveVector::InOutClassification ClosestCurveOrRegionPoint(DPoint3dCR spacePoint, DPoint3dR curveOrRegionPoint) const
Search for closest point on curve.
BoundaryType
Classification of expected structure within a CurveVector.
Definition: CurveVector.h:86
struct CurveVector & CurveVectorR
Definition: msgeomstructs_typedefs.h:172
struct Transform const & TransformCR
Definition: msgeomstructs_typedefs.h:134
CurveVectorPtr GenerateAllParts(int indexA, double fractionA, int indexB, double fractionB) const
Return a CurveVector (BOUNDARY_TYPE_None) which is a collection of open CurveVectors that collectivel...
static bool ClosestApproach(CurveLocationDetailR pointOnA, CurveLocationDetailR pointOnB, ICurvePrimitiveP curveA, ICurvePrimitiveP curveB)
Find a single point where curveA and curveB have closest approach.
static CurveVectorPtr CreateSpiralLineToLineShift(int transitionType, DPoint3dCR pointA, DPoint3dCR shoulderB, DPoint3dCR shoulderC, DPoint3dCR pointD)
Return a curveVector with spiral transition between two lines, with shoulder points controlling the s...
bool ClosestPointBoundedXY(DPoint3dCR spacePoint, DMatrix4dCP worldToLocal, CurveLocationDetailR location) const
Search for the closest point on any contained curve, using only xy (viewed) coordinates.
no specific properties expected for contained curves or points.
Definition: CurveVector.h:92
struct CurveLocationDetail const & CurveLocationDetailCR
Definition: msgeomstructs_typedefs.h:167
A PathLocationDetail is a detailed description of where a point is along multi-curve path...
Definition: CurveVector.h:1189
void AppendSplitCurvesByRegion(CurveVectorCR region, CurveVectorP insideCollector, CurveVectorP outsideCollector, CurveVectorP onCollector)
Return curves (not regions) that are inside, outside, or on a region.
bool AddSpacedPoints(bvector< double > const &distances, bvector< CurveLocationDetail > &locations) const
Compute points at (many) specified distances along the (many) curves in the CurveVector.
bool SearchFirstIntersectionWithCircleXY(PathLocationDetail const &startLocation, double signedRadius, PathLocationDetail &intersectionLocation) const
! Start at specified location.
struct ICurvePrimitive const * ICurvePrimitiveCP
Definition: msgeomstructs_typedefs.h:166
CurveLocationDetail GetCurveLocationDetail() const
Query CurveLocationDetail with fractional position for queries.
bool TryUVFractionToXYZ(double uFraction, double vFraction, DPoint3dR xyz, DVec3dR dXdu, DVec3dR dXdv) const
convert u,v fraction to xyz and derivatives.
Expected to contain (only) multiple CurveVectors, all of which have area.
Definition: CurveVector.h:104
double ReorderForSmallGaps()
Reorder curve primitives to produce small head-to-tail gaps.
bool SetExtendedPath(CurveVectorPtr &path, double extensionDistance, PathLocationDetail &boundedStart, PathLocationDetail &boundedEnd, bool measureExtensionInView=false, double maxExtensionFactor=4.0)
Announce the path to be indexed.
CurveVectorPtr CloneReversed() const
Return a new curve vector that has all components reversed.
struct CurveOffsetOptions const & CurveOffsetOptionsCR
Definition: msgeomstructs_typedefs.h:170
struct DEllipse3d const & DEllipse3dCR
Definition: msgeomstructs_typedefs.h:114
Definition: CurveVector.h:111
bool ComputeSecondMomentAreaProducts(DMatrix4dR products) const
Return the area, centroid, orientation, and principal moments, treating this as a thin planar sheet...
Detail about a computed fillet.
Definition: CurveVector.h:1094
pointer data()
Definition: stdcxx/bvector.h:322
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
PathLocationDetail AtStart() const
Return the start location.
bool IsPlanarWithDefaultNormal(TransformR localToWorld, TransformR worldToLocal, DRange3dR range, DVec3dCP normal) const
Test if the contained curves are planar.
static CurveVectorPtr ReduceToCCWAreas(CurveVectorCR regionA)
Return a curve vector containing only clockwise areas.
static CurveVectorPtr AreaIntersection(CurveVectorCR regionA, CurveVectorCR regionB, CurvePrimitivePtrPairVector *newToOld=NULL)
Return a curve vector containing the intersection of input areas.
double FastLength() const
Sum lengths of contained curves, using fast method that may overestimate the length but is reasonable...
ICurvePrimitive::CurvePrimitiveType HasSingleCurvePrimitive() const
Return true if the curve vector has a single element and that element is a primitive.
CurveVectorPtr CloneWithFillets(double radius) const
return a (deep) clone with fillets inserted between successive curves.
CurveVector::InOutClassification RayPierceInOnOut(DRay3dCR ray, SolidLocationDetailR hitDetail) const
Test for a ray hit in the curve vector's planar region.
struct DRay3d const & DRay3dCR
Definition: msgeomstructs_typedefs.h:120
static CurveVectorWithDistanceIndexPtr Create()
Constructor for xy viewing.
Curves should join head to tail in a single closed path; this area expected to be an outer (or only) ...
Definition: CurveVector.h:96
void AddStrokePoints(bvector< DPoint3d > &points, IFacetOptionsR options) const
Add stroke points form all children to output.
bool FixupXYOuterInner(bool fullGeometryCheck=false)
Update order, boundary type, and direction of contained loops.
bool SwapAt(size_t index0, size_t index1)
Swap the entries at given indices. Return false if either index is out of bounds. ...
double FastMaxAbs() const
Return a fast estimate of the maximum absoluted value in any coordinate. This will examine all curves...
DPoint3d PointAndUnitTangent(DVec3dR unitTangent) const
Query xyz coordinates and normalized tangent vector. (This reevaluates the curve) ...
struct DPoint2d const * DPoint2dCP
Definition: msgeomstructs_typedefs.h:78
CurveVectorPtr CloneBetweenCyclicIndexedFractions(int index0, double fraction0, int index1, double fraction1) const
Return a new vector containing curves from index0,fraction0 to index1,fraction1 with the (signed int!...
PathLocationDetail SearchClosestPointBounded(DPoint3dCR spacePoint, bool computeDistanceAlong) const
! Search for curve point closest to given space point.
CurveVectorPtr AreaOffset(CurveOffsetOptionsCR options) const
return a (deep) clone with all areas increased or decreased according to the offset distance...
double Length() const
Sum lengths of contained curves.
BoolSelect
Definition: CurveDetails.h:524
bool AppendClosedCurvePlaneIntersections(DPlane3dCR plane, bvector< CurveLocationDetailPair > &intersections, double tolerance=0.0) const
Compute intersections of closed CurveVector with a plane and organize as start end pairs by parity ru...
static CurveVectorPtr CreateLinear(bvector< DPoint3d > const &points, BoundaryType boundaryType=CurveVector::BOUNDARY_TYPE_Open, bool forceXYOrientation=false)
Create a linestring or polygon from xyz data.
static CurveVectorPtr CreateRectangle(double x0, double y0, double x1, double y1, double z, BoundaryType boundaryType=CurveVector::BOUNDARY_TYPE_Outer)
Create a rectangle from xy corners.
BentleyStatus ToBsplineCurve(MSBsplineCurveR curve) const
Represent a curve vector that denotes an open or closed path as a single bspline curve.
bool IsParityRegion() const
Query: Is this a collection of loops with parity rules?
static CurveVectorPtr ConstructSpiralArcSpiralTransitionPseudoOffset(DPoint3dCR primaryPoint0, DPoint3dCR primaryPoint1, DPoint3dCR primaryPoint2, double primaryRadius, double primarySpiralLength, double offsetDistance)
Construct a spiral-arc-spiral transition that is an (approximate) offset of a primary transition...
double DistanceSquaredToPoint(DPoint3dCR xyz) const
distance squared to given point.
static void CollectFilletArcs(ICurvePrimitiveR curveA, ICurvePrimitiveR curveB, double radius, bool extend, bvector< FilletDetail > &arcs)
compute all possible fillet arcs between primitives.
CurveVectorPtr Clone() const
Return a "deep copy".
A 3d low and high corner pair for range boxes.
Definition: drange3d.h:20
void SwapContents(CurveVectorR other)
Swap bvectors and type.
CurveLocationDetail detailA
Definition: CurveVector.h:1096
void FindPrimitivesWithNearbyStartEnd(bvector< CurveLocationDetail > &data, DPoint3dCR xyz, double tolerance) const
Search for children whose start or end is close to a search point.
A CurveVector is a collection of curve primitives.
Definition: CurveVector.h:78
bool IsOpenPath() const
Query: Is this an open path?
4x4 matrix used for perspective (homogeneous coordinate) calculations.
Definition: dmatrix4d.h:18

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