B
by BIMrookie92 on 11 Aug 2022, edited 14 Aug 2022
#
Hi,
I am trying to create a nurbs brep, using IfcBsplineSurfaceWithWeights (and curves, edges, edgeloops, orientedEdges and the whole shebang:p), but I am not getting it to work using the ifcopenshell api. Attached is the .ifc file.
My question is: In the .ifc file, i realized some attributes are marked with "*" and some with "$". They are both empty attributes (I havent specified them). Does "*" mark mandatory attributes or something, and "$" optional ones? So perhaps when I assign all missing mandatory attributes, it might work?
BR Sondre
T
by theoryshaw on 13 Aug 2022
#
Can you share the python script that created this ifc file?
B
by BIMrookie92 on 13 Aug 2022, edited 13 Aug 2022
#
The code is a bit convulated, since I created the objects in Rhino, and export the relevant info to a Python script via pickle.
The relevant part of the code is attached this comment (not the rhino part nor the creation of a template ifc_file in Python for writing to...)
B
by BIMrookie92 on 13 Aug 2022, edited 13 Aug 2022
#
Hi again, I attached the entire working script; simply change the ifcPath at the top to write to a folder of your choice.
I removed the pickle part and instead assigned the variable content manually, so the code should now work for everyone.
T
by theoryshaw on 14 Aug 2022
#
Not sure this is the answer(s), but worth exploring. When I ran your brepFullScipt it created IFCBSPLINECURVEWITHKNOTS entities with only (8) attributes, when it should have (12). See spec here.
- example:
#49=IFCBSPLINECURVEWITHKNOTS(3,(#44,#45,#46,#47,#48),$,$,$,(3,3,3,1,3,3,3),(0.,0.,0.,5.70132035931548,11.402640718631,11.402640718631,11.402640718631),$);
When I opened the nurbsBrep.ifc file you originally shared above, I see there was 12 attributes, but maybe some of the attributes, assigned a $
value, should be something else.
- example:
#107=IFCBSPLINESURFACEWITHKNOTS(1,2,((#101,#102),(#103,#104),(#105,#106)),$,$,$,$,(1,1),(2,2,2,2),(0.,3.),(0.,0.,11.6593551114915,11.6593551114915),$);
Perhaps see this example, for a clue.
T
by theoryshaw on 14 Aug 2022
#
+2 votes
I like to use searches like these to find examples out in the world, that have used specific entities. Just to get a clue on how they are typically used.
B
by BIMrookie92 on 14 Aug 2022
#
Thank you:)
I will explore further your suggestion, and the search engine in github/sourcegraph was completely new to me:)
T
by theoryshaw on 14 Aug 2022
#
You bet.
In regards to what attributes are 'OPTIONAL', if you go to the following example, it will say 'OPTIONAL' under the type. You can use $
for these attributes. Not sure what the *
is for, however. Still learning.
http://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcAxis2Placement3D.htm

T
by theoryshaw on 14 Aug 2022
#
If you do enough googling. :)
From: https://hujb2000.gitbooks.io/ifcspecification/content/en/implementation/frequently_asked_questions.html
-
Q: What does a dollar character ($) and a star character (*) mean in an IFC file?
-
A: The $ character encodes the indefinite value, i.e. it appears if an optional attribute has not been filled in. (Note, the indefinite value is sometimes also used in the EXPRESS schema of the IFC data model. There it is encoded as “?”, not as “$”.) The * character encodes so-called omitted parameters. These are attributes which are defined as a regular explicit attribute in a supertype but redefined as a derived attribute in a subtype (and the record in the IFC file is an instance of the subtype). More information about the encoding of IFC files can be found in ISO 10303-21.