Test module ifc_query from github:DURAARK/pyIfcExtract
-
- Posts: 5
- Joined: Tue Oct 31, 2017 3:07 pm
Re: Test module ifc_query from github:DURAARK/pyIfcExtract
this is a sample file that i want to extract its properties
- Attachments
-
- 2x3Mohamed.ifc
- (12.65 KiB) Downloaded 43 times
Re: Test module ifc_query from github:DURAARK/pyIfcExtract
wall = 40.5, 0.666667, 20
I'm not sure, This extract's data is correct.
unit in this IFC file is 'FOOT'
I'm not sure, This extract's data is correct.
unit in this IFC file is 'FOOT'
Code: Select all
import ifcopenshell
testFile = 'D:\\temp\\2x3Mohamed.ifc'
ifc_file = ifcopenshell.open(testFile)
products = ifc_file.by_type("IfcWall")
wall1 = products[0]
# wall1.attribute_name(1)
shape = getattr(wall1,'Representation')
repr = getattr(shape,'Representations')
ExtrudedSolids=getattr(repr[1],'Items')
solid1 = ExtrudedSolids[0]
Area = getattr(solid1,'SweptArea')
XDim = getattr(Area,'XDim')
YDim = getattr(Area,'YDim')
Depth = getattr(solid1,'Depth')
Msg('%g, %g, %g\n'%(XDim , YDim ,Depth ))
"""
40.5, 0.666667, 20
"""
Re: Test module ifc_query from github:DURAARK/pyIfcExtract
+1 IfcOpenShell should be used.chakkree wrote: ↑Thu Nov 02, 2017 3:07 pmI' think ifcOpenShell can be used instead.Mohamed Safaa wrote: ↑Thu Nov 02, 2017 9:54 am Hello, i want to know how to get the attributes like height, width and length using pyIfcExtract ?
Can you upload IFC sample file that you want to get attributes?
on an multilayered wall this might not what one really would like to have ...
BTW: Mohamend, a tip for further questions on the forum.Iif your question is not related to the topic it is better to open a new topic.