Sketchup found a quite interesting way to begin to work with IFC:
http://sketchupdate.blogspot.com.br/201 ... tchup.html
http://help.sketchup.com/en/article/3000038
Of course it is pretty simple, you define a component, you give it a type (which can be loaded from a schema), and that type can have properties, which you can fill in. But the simplicity of this is also a strength.
We might think to something similar... A bit like the "Role" property of Arch Structures, but extend it to all Arch objects. IfcOpenshell already has a couple of tools, for example to get all properties supported by a certain IFC type. And with the PropertyMap we'd have an easy way to set these properties...
Anyway, food for thought.
IFC in Sketchup
Re: IFC in Sketchup
Yeah, the properties are exactly what I'm after in FreeCAD. Because in FreeCAD I am able to make lots of funny things having the imported geometry the properties and the strengths of python.
As far as I know there is no "big Arch object" in FreeCAD which is above all others in which properties for all Arch object could be defined. Currently properties must be defined in any Arch object again. Have you ever been thinking of such an object.
bernd
As far as I know there is no "big Arch object" in FreeCAD which is above all others in which properties for all Arch object could be defined. Currently properties must be defined in any Arch object again. Have you ever been thinking of such an object.
bernd
Re: IFC in Sketchup
Actually, internally yes. All "solid" Arch objects (that is, all arch objects that become real building pieces, not the "visual" ones like axes) are derived from a "base" object called Arch Component. Several behaviours (such as the Additions / Subtractions mechanism) are implemented in the ArchComponent, so they are inherited by all Arch objects. Of course the idea is to use that as much as possible (for example I'll implement the materials there too).
I'm thinking since yesterday to that sketchup way... In sketchup it makes much sense because objects are very simple (I'm actually curious as how they export their meshes to IFC), so adding a very simple IFC layer like they did works well... I'm in doubt with what to do in freecad, because the arch WB already "orient" things a lot, which would ideally allow you to forget a bit about the complex IFC structure (I also see that in sketchup things are pretty limited, all the complexity of IFC being in the "relations" you make between elements, and apparently this is not supported ATM.
Anyway, of course any decent IFC exporting app must allow you to access and tweak the whole array of IFC properties... We must attack that at some point.
I'm thinking since yesterday to that sketchup way... In sketchup it makes much sense because objects are very simple (I'm actually curious as how they export their meshes to IFC), so adding a very simple IFC layer like they did works well... I'm in doubt with what to do in freecad, because the arch WB already "orient" things a lot, which would ideally allow you to forget a bit about the complex IFC structure (I also see that in sketchup things are pretty limited, all the complexity of IFC being in the "relations" you make between elements, and apparently this is not supported ATM.
Anyway, of course any decent IFC exporting app must allow you to access and tweak the whole array of IFC properties... We must attack that at some point.
Re: IFC in Sketchup
I was exactly thinking of such object. Yorik, I just should spend more time reading your code I've been defining my properties in wall AND structure. I could have defined my own properties in ArchComponent. It ist just straigth forward and fail-safe.yorik wrote:Actually, internally yes. All "solid" Arch objects (that is, all arch objects that become real building pieces, not the "visual" ones like axes) are derived from a "base" object called Arch Component. Several behaviours (such as the Additions / Subtractions mechanism) are implemented in the ArchComponent, so they are inherited by all Arch objects. Of course the idea is to use that as much as possible (for example I'll implement the materials there too).
+1yorik wrote:Anyway, of course any decent IFC exporting app must allow you to access and tweak the whole array of IFC properties... We must attack that at some point.
Do you know how do I access the properties of an Entity (obj)? The only properties I'm able to access are id, name and type. I try to use ifcopenshell directly but had no success as well. In Allplan I can define as much properties as I want. They are user defined. Solibri viewer does read this user defined properties. I would like to have them in a dictionary in FreeCAD.
bernd
EDIT
started to use git for my own FreeCAD stuff https://github.com/berndhahnebach/FreeC ... s/ifcprop1
Re: IFC in Sketchup
Attached some simple example file. Just a wall. It has dozens of Attributs. I attached a scree in original resolution because of the little script size.
EDIT:
Spitted the pictures in to 2
EDIT:
Spitted the pictures in to 2
- Attachments
-
- screen1.jpg (50.51 KiB) Viewed 7515 times
-
- screen.jpg (86.3 KiB) Viewed 7515 times
-
- export.ifc
- (10.82 KiB) Downloaded 281 times
Re: IFC in Sketchup
JFYI: I made a post in the IfcOpenShell Forum regarding the property access. https://sourceforge.net/p/ifcopenshell/ ... it=25#77ed
Re: IFC in Sketchup
Great!
ne thing I've been thinking, is using the new PropertyMap in Arch objects (the same that is used for materials), it's a simple dictionary key:value, we could have one of those to store custom ifc properties. So you could really override anything for any Arch object. If we can access the schema as in your post, we could have a kind of custom editor for it...
This is actually anotherinteresting idea (custom editors for PropertyMap). I'll make another thread...
ne thing I've been thinking, is using the new PropertyMap in Arch objects (the same that is used for materials), it's a simple dictionary key:value, we could have one of those to store custom ifc properties. So you could really override anything for any Arch object. If we can access the schema as in your post, we could have a kind of custom editor for it...
This is actually anotherinteresting idea (custom editors for PropertyMap). I'll make another thread...
Re: IFC in Sketchup
It ist exactly what I allready did a few days ago ... https://github.com/berndhahnebach/FreeC ... 28214dce1a I only still miss to access the properties. But we'll see what Thomas says ...yorik wrote:Great!
ne thing I've been thinking, is using the new PropertyMap in Arch objects (the same that is used for materials), it's a simple dictionary key:value, we could have one of those to store custom ifc properties. So you could really override anything for any Arch object. If we can access the schema as in your post, we could have a kind of custom editor for it...
This is actually anotherinteresting idea (custom editors for PropertyMap). I'll make another thread...
Yeah, some editor would be really cool.
Re: IFC in Sketchup
got an idea how to import the properties. I'll see if I can came up with something useable ...
Re: IFC in Sketchup
Started to do some property import. The only way I found to access the values in the entities is using the function get.argument()
For the relations instead get.argumet() you used getAttr(r,"RelatingObject"), getAttr(r,"RelatingStructure"), getAttr(r,"RelatedOpeningElement") ... I could not figure out how they do work? lines 160 to 170 in importIFC.py
btw, thanks for information regarding ifcimport.
bernd
For the relations instead get.argumet() you used getAttr(r,"RelatingObject"), getAttr(r,"RelatingStructure"), getAttr(r,"RelatedOpeningElement") ... I could not figure out how they do work? lines 160 to 170 in importIFC.py
btw, thanks for information regarding ifcimport.
bernd