Closed dassaf4 closed 1 year ago
Details:
BOUNDARY_TYPE_None
, however the doc for this enum type discourages this, preferring instead bvector<CurveVectorPtr>
. This kind of rules out one method for both open and closed inputs, unless we want to return the single closed result as the only entry in the bvector, which I guess could work. But at the very least, it means a new method, because we cannot change the signature of the existing one.CurveLocationDetailPair
, an array of which is returned by ClipPlaneSet::AppendCrossings
---each entry in this array describes a pair of locations on the input curve representing the start and end of a clipped piece. If you have such an array, you can easily build up a bvectorCurveVector::CloneBetweenDirectedFractions(detail0, detail1)
on each CurveLocationDetailPair
.void ClipCurveVector(CurveVectorCR curve, bvector<CurveVectorPtr>& clippedCurves) const
calls the existing ClipPlanarRegion
method if CurveVector::IsAnyRegionType()
is true, otherwise the new open method (below).bool ClipOpenPath(CurveVectorCR openCurve, bvector<CurveVectorPtr>* pClippedCurves = nullptr, bvector<CurveLocationDetailPair>* pClippedDetails = nullptr) const
. Both optional returned arrays should be sorted by the original open path's global parameterization, or if boundaryType None, by the ordering of its primitives. Return false if openCurve.IsAnyRegionType()
returns true; otherwise, calls AppendCrossings
+ CloneBetweenDirectedFractions
as described above. Note: this method should handle input of non-region boundaryType, i.e., Open or None.In imodel-native, there's a variant of CloneBetweenDirectedFractions
which takes curve details. I should add that when I do the port to MS.
imodel-native PR https://github.com/iTwin/imodel-native/pull/353 (merged)
imodel02 PR https://dev.azure.com/bentleycs/iModelTechnologies/_git/imodel02/pullrequest/351921 (merged) https://dev.azure.com/bentleycs/iModelTechnologies/_git/imodel02/pullrequest/352640 (merged)
power-platform PR and PBI https://dev.azure.com/bentleycs/PowerPlatform/_workitems/edit/1238279 https://dev.azure.com/bentleycs/PowerPlatform/_git/PPBase/pullrequest/351920 (merged)
For imodel02 (connectors).