Closed RoyTimmers1980 closed 1 year ago
Which points do you want to get? Triangulated mesh points? Currently, you are iterating over profile points, but there are many possible ways to express the profile, where most of them don't have exact points, but are defined by mathematical curves and compound curves.
Overall placement of the slab is defined as slab.ObjectPlacement
. Bear in mind that placement of the product can have parent placement and you may also need to consider mapped representation transformations.
What are you trying to achieve?
Martin, i'm trying to retrieve the points/coordinates of the slab/wall in the model so i can draw them in AutoCad to proces in our CAD-system
Do you want to draw them as triangulated 3D mesh, or do you want to translate their parametric definition from IFC to AutoCAD?
I want to draw them as 2D polylines in Autocad
See #421 also
As noted in the other issue I think you want to be using the Geometry Engine for this unless: 1) It's a trivial single use case or 2) You have a lot of time to re-interpret all the IFC Geometry concepts, implementors agreements etc
Creating a 2D Projection (Footprint) from a 3D mesh or solid is relatively much easier. We do have some private code to do this.
If you want to live life on the edge we have some new public code that creates 2D Footprints (essentially a collection of 2D Polylines) from the underlying OpenCascade solid/Brep. See this test: https://github.com/xBimTeam/XbimGeometry/blob/579ea9a3916e5849d3aac0edad509c41906949f5/Xbim.Geometry.Engine.Tests/ModelGeometryServiceTests/ProjectionFactoryTests.cs#LL36C27-L36C27
This is in the new netcore geometry engine which is not published yet, but is available from a private nuget repo - or build yourself.
(You can get a Brep file from and Geometry primititive via the ToBRep
property)
Closing
I cannot seem to get the points from a slab wich has a RectangleProfileDef, because i can only get the X and Y dimension from the dataset. Further the location off the slab in the is unclear to me, how can i get the exact location off the slab in het model
This is my code so far: