OSArch Community

Help with a NURBS BREP appreciated:)

  1. B

    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

  2. B

  3. T

    Can you share the python script that created this ifc file?

  4. B

    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...)

  5. B

    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.

  6. T

    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.

  7. T
  8. B

    Thank you:)

    I will explore further your suggestion, and the search engine in github/sourcegraph was completely new to me:)

  9. T
  10. T

    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.

  11. T
  12. T

Login or Register to reply.