I have a DgnPrimitiveTool derivative that generates solids into a DGN from data in a database as an interpretation of the data.
This tool can generate individual Solid elements using the SolidPrimitive.CreateDgnBox(DgnBoxDetail) function with no problem, but it also need to merge these generated solids where they are next to each other or where they are overlapping before adding the result to the model.
The Modify.BooleanUnion method will do the merge, but it only operates on SolidKernelEntities and not on SolidPrimitives.
So currently my workflow is:
Does anyone know of a bridge to convert a SolidPrimitive to a SolidKernelEntity so that all these conversions can be skipped?
Surely one should be able to just merge SolidPrimitives using Boolean operations, just like one does with CurvePrimitives and CurveVectors using CurveVector.AreaUnion on a CurveVector of type: CurveVector.BoundaryType.UnionRegion?
It feels very inefficient to convert the same thing 4 times to get to an answer, where it could have been:
Any suggestions on simplifying this workflow will be welcome.
Thanks
Francois Grobler
I found what I was looking for.
Again by looking at C++ the API Documentation, I could find the equivalent NET classes.
The missing "bridge" is the Create class which takes a SolidPrimitive and returns a SolidKernelEntity.
So using the Bentley.DgnPlatformNET.Create class one of the conversion steps can be removed.
The workflow is then:
This creates a cleaner flow without having to convert to and from elements.
Hope it helps someone else.
Cheers,Francois Grobler
Answer Verified By: Francois Grobler
Please also notice that: