mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
* Finish mapping Qto_PileBaseQuantities * Finish mapping IfcPipeSegmentBaseQuantities * Finish mapping IfcVehicleBaseQuantities * Finish mapping Qto_OpeningElementBaseQuantities * Finish mapping Qto_PlateBaseQuantities * Finish Qto_MarineFacilityBaseQuantities * Finish Qto_FacilityPartBaseQuantities * Finish Qto_ProjectionElementBaseQuantities * Better syntax
This commit is contained in:
committed by
Dion Moult
parent
59f74eaf8e
commit
5d516154b1
@@ -3,39 +3,39 @@ mapper = {
|
|||||||
'GrossWeight' : None,
|
'GrossWeight' : None,
|
||||||
},
|
},
|
||||||
'Qto_PlateBaseQuantities' : {
|
'Qto_PlateBaseQuantities' : {
|
||||||
'Width' : None,
|
'Width' : "get_height",
|
||||||
'Perimeter' : None,
|
'Perimeter' : "get_gross_perimeter",
|
||||||
'GrossArea' : None,
|
'GrossArea' : "get_gross_footprint_area",
|
||||||
'NetArea' : None,
|
'NetArea' : "get_net_footprint_area",
|
||||||
'GrossVolume' : None,
|
'GrossVolume' : "get_gross_volume",
|
||||||
'NetVolume' : None,
|
'NetVolume' : "get_net_volume",
|
||||||
'GrossWeight' : None,
|
'GrossWeight' : None,
|
||||||
'NetWeight' : None,
|
'NetWeight' : None,
|
||||||
},
|
},
|
||||||
'Qto_OpeningElementBaseQuantities' : {
|
'Qto_OpeningElementBaseQuantities' : {
|
||||||
'Width' : None,
|
'Width' : "get_length",
|
||||||
'Height' : None,
|
'Height' : "get_opening_height",
|
||||||
'Depth' : None,
|
'Depth' : "get_opening_depth",
|
||||||
'Area' : None,
|
'Area' : "get_opening_mapping_area",
|
||||||
'Volume' : None,
|
'Volume' : "get_net_volume",
|
||||||
},
|
},
|
||||||
'Qto_MarineFacilityBaseQuantities' : {
|
'Qto_MarineFacilityBaseQuantities' : {
|
||||||
'Length' : None,
|
'Length' : "get_length",
|
||||||
'Width' : None,
|
'Width' : "get_width",
|
||||||
'Height' : None,
|
'Height' : "get_height",
|
||||||
'Area' : None,
|
'Area' : "get_net_footprint_area",
|
||||||
'Volume' : None,
|
'Volume' : "get_net_volume",
|
||||||
},
|
},
|
||||||
'Qto_ChillerBaseQuantities' : {
|
'Qto_ChillerBaseQuantities' : {
|
||||||
'GrossWeight' : None,
|
'GrossWeight' : None,
|
||||||
},
|
},
|
||||||
'Qto_PileBaseQuantities' : {
|
'Qto_PileBaseQuantities' : {
|
||||||
'Length' : None,
|
'Length' : "get_length",
|
||||||
'CrossSectionArea' : None,
|
'CrossSectionArea' : "get_cross_section_area",
|
||||||
'OuterSurfaceArea' : None,
|
'OuterSurfaceArea' : "get_outer_surface_area",
|
||||||
'GrossSurfaceArea' : None,
|
'GrossSurfaceArea' : "get_gross_surface_area",
|
||||||
'GrossVolume' : None,
|
'GrossVolume' : "get_gross_volume",
|
||||||
'NetVolume' : None,
|
'NetVolume' : "get_net_volume",
|
||||||
'GrossWeight' : None,
|
'GrossWeight' : None,
|
||||||
'NetWeight' : None,
|
'NetWeight' : None,
|
||||||
},
|
},
|
||||||
@@ -46,9 +46,9 @@ mapper = {
|
|||||||
'GrossWeight' : None,
|
'GrossWeight' : None,
|
||||||
},
|
},
|
||||||
'Qto_VehicleBaseQuantities' : {
|
'Qto_VehicleBaseQuantities' : {
|
||||||
'Length' : None,
|
'Length' : "get_length",
|
||||||
'Width' : None,
|
'Width' : "get_width",
|
||||||
'Height' : None,
|
'Height' : "get_height",
|
||||||
},
|
},
|
||||||
'Qto_PipeFittingBaseQuantities' : {
|
'Qto_PipeFittingBaseQuantities' : {
|
||||||
'Length' : None,
|
'Length' : None,
|
||||||
@@ -81,15 +81,15 @@ mapper = {
|
|||||||
'GrossWeight' : None,
|
'GrossWeight' : None,
|
||||||
},
|
},
|
||||||
'Qto_FacilityPartBaseQuantities' : {
|
'Qto_FacilityPartBaseQuantities' : {
|
||||||
'Length' : None,
|
'Length' : "get_length",
|
||||||
'Width' : None,
|
'Width' : "get_width",
|
||||||
'Height' : None,
|
'Height' : "get_height",
|
||||||
'Area' : None,
|
'Area' : "get_net_footprint_area",
|
||||||
'Volume' : None,
|
'Volume' : "get_net_volume",
|
||||||
},
|
},
|
||||||
'Qto_ProjectionElementBaseQuantities' : {
|
'Qto_ProjectionElementBaseQuantities' : {
|
||||||
'Area' : None,
|
'Area' : "get_net_side_area",
|
||||||
'Volume' : None,
|
'Volume' : "get_net_volume",
|
||||||
},
|
},
|
||||||
'Qto_SignBaseQuantities' : {
|
'Qto_SignBaseQuantities' : {
|
||||||
'Height' : None,
|
'Height' : None,
|
||||||
@@ -138,13 +138,12 @@ mapper = {
|
|||||||
'NetArea' : "get_net_footprint_area",
|
'NetArea' : "get_net_footprint_area",
|
||||||
},
|
},
|
||||||
'Qto_PipeSegmentBaseQuantities' : {
|
'Qto_PipeSegmentBaseQuantities' : {
|
||||||
'Length' : None,
|
'Length' : "get_length",
|
||||||
'GrossCrossSectionArea' : None,
|
'GrossCrossSectionArea' : None,
|
||||||
'NetCrossSectionArea' : None,
|
'NetCrossSectionArea' : "get_cross_section_area",
|
||||||
'OuterSurfaceArea' : None,
|
'OuterSurfaceArea' : "get_outer_surface_area",
|
||||||
'GrossWeight' : None,
|
'GrossWeight' : None,
|
||||||
'NetWeight' : None,
|
'NetWeight' : None,
|
||||||
'FootPrintArea' : None,
|
|
||||||
},
|
},
|
||||||
'Qto_HumidifierBaseQuantities' : {
|
'Qto_HumidifierBaseQuantities' : {
|
||||||
'GrossWeight' : None,
|
'GrossWeight' : None,
|
||||||
@@ -243,9 +242,9 @@ mapper = {
|
|||||||
'GrossWeight' : None,
|
'GrossWeight' : None,
|
||||||
},
|
},
|
||||||
'Qto_SlabBaseQuantities' : {
|
'Qto_SlabBaseQuantities' : {
|
||||||
'Width' : "get_height",
|
'Width' : "get_width",
|
||||||
'Length' : "get_length",
|
'Length' : "get_length",
|
||||||
'Depth' : "get_width",
|
'Depth' : "get_height",
|
||||||
'Perimeter' : "get_gross_perimeter",
|
'Perimeter' : "get_gross_perimeter",
|
||||||
'GrossArea' : "get_gross_footprint_area",
|
'GrossArea' : "get_gross_footprint_area",
|
||||||
'NetArea' : "get_net_footprint_area",
|
'NetArea' : "get_net_footprint_area",
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ Also GrossWallArea and NetWallArea need bounding object so for the moment is sti
|
|||||||
GrossFloorArea: following the definition, it should exclude the wall claddings, but for now, this is not considered into the calculation.
|
GrossFloorArea: following the definition, it should exclude the wall claddings, but for now, this is not considered into the calculation.
|
||||||
NetFloorArea: it doesn't count the following entities contained in the spatial entity: IfcColumn and IfcWall. Just add other entities into 'get_net_floor_area' if it's needed
|
NetFloorArea: it doesn't count the following entities contained in the spatial entity: IfcColumn and IfcWall. Just add other entities into 'get_net_floor_area' if it's needed
|
||||||
NetVolume: like NetFloorArea, it doesn't count the following entities contained in the spatial entity: IfcColumn and IfcWall
|
NetVolume: like NetFloorArea, it doesn't count the following entities contained in the spatial entity: IfcColumn and IfcWall
|
||||||
|
Also, the entire IfcColumn (or IfcWall) object volume is substracted, so it should be better to substract only the shared volume between IfcSpace and IfcColumn. Look at todo list
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -36,4 +37,7 @@ REMAINING TODO FUNCTIONS
|
|||||||
IfcSpace - NetPerimeter
|
IfcSpace - NetPerimeter
|
||||||
IfcSpace - GrossWallArea
|
IfcSpace - GrossWallArea
|
||||||
IfcSpace - NetWallArea
|
IfcSpace - NetWallArea
|
||||||
|
IfcSpace - Calculate only shared volume between IfcColumn and IfcSpace
|
||||||
|
IfcPipeSegment - Gross cross section area
|
||||||
|
Qto_PipeFittingBaseQuantities - Basically all quantities because the object can not be straight
|
||||||
|
|
||||||
|
|||||||
@@ -138,6 +138,24 @@ class QtoCalculator:
|
|||||||
"""
|
"""
|
||||||
return (Vector(o.bound_box[1]) - Vector(o.bound_box[0])).length
|
return (Vector(o.bound_box[1]) - Vector(o.bound_box[0])).length
|
||||||
|
|
||||||
|
def get_opening_height(self, obj):
|
||||||
|
if self.is_opening_horizontal(obj):
|
||||||
|
return self.get_width(obj)
|
||||||
|
else:
|
||||||
|
return self.get_height(obj)
|
||||||
|
|
||||||
|
def get_opening_depth(self, obj):
|
||||||
|
if self.is_opening_horizontal(obj):
|
||||||
|
return self.get_height(obj)
|
||||||
|
else:
|
||||||
|
return self.get_width(obj)
|
||||||
|
|
||||||
|
def get_opening_mapping_area(self, obj):
|
||||||
|
if self.is_opening_horizontal(obj):
|
||||||
|
return self.get_net_footprint_area(obj)
|
||||||
|
else:
|
||||||
|
return self.get_net_side_area(obj)
|
||||||
|
|
||||||
def get_finish_ceiling_height(self, obj):
|
def get_finish_ceiling_height(self, obj):
|
||||||
space_height = self.get_height(obj)
|
space_height = self.get_height(obj)
|
||||||
floor_height = self.get_finish_floor_height(obj)
|
floor_height = self.get_finish_floor_height(obj)
|
||||||
@@ -1063,6 +1081,13 @@ class QtoCalculator:
|
|||||||
else:
|
else:
|
||||||
return "x"
|
return "x"
|
||||||
|
|
||||||
|
def is_opening_horizontal(self, o):
|
||||||
|
x = (Vector(o.bound_box[4]) - Vector(o.bound_box[0])).length
|
||||||
|
y = (Vector(o.bound_box[3]) - Vector(o.bound_box[0])).length
|
||||||
|
z = (Vector(o.bound_box[1]) - Vector(o.bound_box[0])).length
|
||||||
|
|
||||||
|
return z < x and z < y
|
||||||
|
|
||||||
def delete_mesh(self, mesh):
|
def delete_mesh(self, mesh):
|
||||||
mesh.user_clear()
|
mesh.user_clear()
|
||||||
bpy.data.meshes.remove(mesh)
|
bpy.data.meshes.remove(mesh)
|
||||||
|
|||||||
Reference in New Issue
Block a user