Help with a NURBS BREP appreciated:)
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
Comments
Can you share the python script that created this ifc file?
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...)
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.
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.
#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.#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.
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.
Thank you:)
I will explore further your suggestion, and the search engine in github/sourcegraph was completely new to me:)
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
If you do enough googling. :)
From: https://hujb2000.gitbooks.io/ifcspecification/content/en/implementation/frequently_asked_questions.html
Example: http://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcGeometricRepresentationSubContext.htm
Another example: http://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcSIUnit.htm

