Comments (3)
Details:
- When the input CurveVector is a closed region, we already have ClipPlaneSet::ClipPlanarRegion. Given a region input, it returns a single region output.
- When the input CurveVector is open, the result can be multiple (disjoint) CurveVectors. What is the preferred return type for this?
- I've seen disjoint curves packaged into one CurveVectorPtr that has
BOUNDARY_TYPE_None
, however the doc for this enum type discourages this, preferring insteadbvector<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. - The problem with returning a CurveVectorPtr per clipped open curve piece is that there is no record of the provenance of that piece in the context of the original open curve, e.g., the fractional parameter span of the clipped piece in the original curve's [0,1] parameter space. This is why I like
CurveLocationDetailPair
, an array of which is returned byClipPlaneSet::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 bvector of the clipped pieces by callingCurveVector::CloneBetweenDirectedFractions(detail0, detail1)
on eachCurveLocationDetailPair
.
- I've seen disjoint curves packaged into one CurveVectorPtr that has
- When the input CurveVector is open, we also have the option to ignore certain ClipPlanes in the clipper. I believe there are a couple of flags on the clipper (or clip plane) that determine this. There should be methods on ClipPlane that return visibility flags or some such. At the least, we should honor plane visibility and skip those that are hidden/invisible. We could also provide an input flag to ignore them and clip to all planes. Again, look for precedent in the API.
- So I propose two new methods:
- Main method:
void ClipCurveVector(CurveVectorCR curve, bvector<CurveVectorPtr>& clippedCurves) const
calls the existingClipPlanarRegion
method ifCurveVector::IsAnyRegionType()
is true, otherwise the new open method (below). - Open method:
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 ifopenCurve.IsAnyRegionType()
returns true; otherwise, callsAppendCrossings
+CloneBetweenDirectedFractions
as described above. Note: this method should handle input of non-region boundaryType, i.e., Open or None.
- Main method:
from imodel-native.
In imodel-native, there's a variant of CloneBetweenDirectedFractions
which takes curve details. I should add that when I do the port to MS.
from imodel-native.
imodel-native PR
#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)
iTwin PR
iTwin/itwinjs-core#5804
from imodel-native.
Related Issues (20)
- Presentation: Properties not set as merged when one of the values is NULL HOT 1
- Unable to sort nodes by system properties `ECClassId` and `ECInstanceId` HOT 2
- Presentation: Library fails to produce content for specific elements
- Presentation: Support filtering hierarchy levels that use `parent` ECExpression symbol
- Presentation: Models tree duplicates Subject nodes when requesting with hierarchy level size limit
- Presentation: Missing distinct values when used with `ContentInstancesOfSpecificClasses.handlePropertiesPolymorphically` attribute
- Presentation: Crash when creating a content descriptor
- Presentation: Label overrides specified in hierarchy rules don't take precedence over (default) supplemental ones
- Presentation: Large amounts of logs block the main thread
- Stop using private `Logger` members in native addon tests
- Clean up native geomlibs deprecated API
- Presentation: Support units / renderers / editors on ECStruct and ECArray properties
- Presentation: Requesting hierarchy level descriptor for `Subject` child nodes returns one for `Category` class
- Crash when logging during app exit HOT 1
- Presentation: Crash when serializing fields
- Presentation: Crash when creating content descriptor for a class grouping node
- Presentation: Crash when evaluating ECExpression with non-existing property reference
- Presentation.getManager().getContent() hangs backend after db edit operations HOT 10
- Flaky `Logger doesn't block main thread while emitting worker thread logs` test
- Sentry crash report: EXCEPTION_ACCESS_VIOLATION_WRITE HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imodel-native.