BIM Objects Role

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

BIM Objects Role

Post by damian »

Hi:

I am fighting with the Role property.

My requirements are:

['Floor', 'Wall', 'Ceiling', 'Roof'] and ['Door', 'Window', 'GlassDoor', 'TubularDayligthDome', 'TubularDayligthDiffuser']

The existing Role lists in Arch Workbench are surprising, because some list are short like Walls and Windows, and others list are large like Roof that has even with the role 'Electric Equipment'.

First question: How can I take (translate) the roles ['Floor', 'Ceiling'] and ['GlassDoor', 'TubularDayligthDome', 'TubularDayligthDiffuser'] with the Arch Objects Structure, Roof, Wall, and Window

Second question: is it possible a revision of the roles list?

Thank you
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: BIM Objects Role

Post by damian »

The gbXML Schema fits in naturally for me

http://www.gbxml.org/schema_doc/6.01/Gr ... ml#Link35C
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM Objects Role

Post by yorik »

Basically the role is only used for IFC export at the moment. We can add more roles, but that will not be used for anything so far, and we must make sure that it can translate to a correspnding IFC object.

Of course we could add gbXML definitions (we will have to at some point), but we should see how to do the correspondance with IFC too.
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: BIM Objects Role

Post by damian »

Yes. The IFC translation. I need to study IFC schema ...

For the moment I resolve my issue importing the Arch modules in my custom InitGui.py and appending new values to ArchWall.Roles ...

I'll also use roles with an exporter

Thank you
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM Objects Role

Post by yorik »

If you want to add a few extra roles to Arch Walls (or any other Arch objects), it works like this:

- All arch objects receive a basic set of roles (defined in ArchComponents.py line 29). At the moment all these roles exist in IFC.
- Some Arch objects redefine (restrict) the available Roles list for their particular purposes (for example ArchWall.py line 39)
- You can add new roles there
- If you do so, you must also alter the importIFC around line 946. Currently if an object has a "Role" property, that role is used to construct the Ifc entity name to export. If we introduce new roles that are not part of IFC, we must introduce another system. The best way for me would be to check if the role exists in IFC, and if not, fall back on the object type (line 950). I'm not sure if IfcOpenShell can help us there (check if some name entity name exists), I'll have a look. Once this problem is solved, then we can easily introduce more roles everywhere.
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: BIM Objects Role

Post by damian »

Hello:

Thank Yorik for your explanations.
yorik wrote:role is used to construct the Ifc entity name to export
Okey, I now see the correspondence between Role and IFC entity ("class of information defined by common attributes and constraints").

I am mixing concepts. I'll explain it better with and example:

The entity IfcWall corresponds with the FreeCAD Role Wall (entity - role).

It exists a type called ifcWallTypeEnum (different types of walls that can further specify an ifcWall or ifcWallType).

I was expecting that the Role property allows me a higher level of specification (similar to the types enumerated in ifcWallTypeEnum), but Role property is not designed for this purpose.

No problem. I have good solutions for this issue. Of course I resign to modify unilaterally the role lists and other brilliant ideas.
yorik wrote:we can easily introduce more roles everywhere
I am working with the BIM workbench and feeling that it is a complete set of tools. For the moment I don't need too much improvements.

Yorik, excuse me for the poor explanation but I am arriving to the ifc schema.

Perhaps at the end of the year I'll have a few lines of code and we will discuss it.

The objective is to export a freeCAD building to OpenStudio, and of course using four different formats: energyplus, openstudio, ifcopenshell, and gbXML.

See you.
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM Objects Role

Post by yorik »

damian wrote:The objective is to export a freeCAD building to OpenStudio, and of course using four different formats: energyplus, openstudio, ifcopenshell, and gbXML.
Yes I want to dig into this too. Too much to be done! :)
Post Reply