Importing STEP geometry and linking it to an IFC Product #3724
Replies: 1 comment
-
What did not work in this case?
Not so easily. They share the same foundation and conceptually remain incredibly similar, but there's also deviations, sometimes subtle, sometimes rather large. E.g step uses multiple inheritance, in IFC this has been flattened to a single inheritance tree. IFC has added various parametric cross section profiles. These kind of differences. So in your approach when you read the .stp file using opencascade and then serialize to ifc using ifcopenshell there is a reinterpretation happening twice. But there is something else. AdvancedBrep representations have never really worked well in industry, because a lot of the implementations are mesh based so implementing the kind of surface parametrization required for AdvBrep is quite some effort, for little to gain, because shapes in AEC are typically so simple. And then there is yet something else. IFC likes to think of itself as a semantic standard. So if you put an explicit brep in there it's not as descriptive as a procedural geometry (e.g an extrusion with boolean subtractions). This depends on the kind of element though. This is very much the case for e.g walls and columns, but less so for furniture.
Depends on preferences I guess. In many cases the high level api calls will take care of things you wouldn't easily think of your self such as representation contexts and what not. In other cases they are indeed roughly equivalent.
The attributes are here https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcShapeRepresentation.htm#8.18.3.17.3-Attributes Unfortunately the python code base is not really type aware. All help welcome here #1507 #3306
What output do you get actually? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am an experienced programmer, but new to the Ifc world.
I would like to use IfcOpenShell to create products with custom geometries programmatically, yielding in the end an IFC file with a scene of objects.
In this objective, I am now evaluating the options IfcOpenShell offers. I have found the example where the shape_builder can be used to create a custom geometry from simple elements such as extrusion (the table example).
Now, I am a bit lost in my new test : Importing a STEP geometry, getting the shape, and creating a representation from it, then linking it to an IfcProduct.
I must say I've tried a lot of combinations but I do not find useful information in the IfcOpenShell documentation.
My STEP geometry for testing is a sphere.
My questions :
run
method and the other methods called directly (for example, model.createIfcShapeRepresentation). It seems it's sometimes available in both options ? Which one is preferrable ?I know it's a lot of questions but it's a mess in my head these days, I am sure I am missing something, probably by laying out these interrogations it may be clear to you what's wrong with my approach.
The code
Thanks a lot for your help and time and all the best in the meantime.
Loïc
Beta Was this translation helpful? Give feedback.
All reactions