Determine wall thickness from geometry

I currently use material layers thicknesses to determine wall total thickness but sometimes authoring tool write a material list or a simple material. Thickness data is nowhere. The only way I see to retrieve thickness is to compute it from geometry. Has anyone done this before or know a good algorithm to do this ?
I was thinking of projecting wall on an horizontal plane then try somehow to compute thickness or average thickness.

Comments

  • Yeah - it's a tricky one!

    See relevant discussion: https://github.com/IfcOpenShell/IfcOpenShell/issues/898

    See heuristic method I've come up with, not perfect, but a starting point: https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.6.0/src/ifcblenderexport/blenderbim/bim/qto.py#L4 - I've tested it on a series of models and seem to get relatively good results on simple geometry.

    And see some fundamental issues in how buildingSMART specifies quantity data: https://forums.buildingsmart.org/t/when-is-a-door-not-a-door-choosing-the-correct-entity-classification-for-quantity-take-off/2857/2

    Cyril
  • edited July 29

    @Moult said:
    See heuristic method I've come up with, not perfect, but a starting point: https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.6.0/src/ifcblenderexport/blenderbim/bim/qto.py#L4 - I've tested it on a series of models and seem to get relatively good results on simple geometry.

    Bounding box is a good start. Moreover luckily ArchiCAD the one which sometime do not export layer for a single layered wall do export multiple representations including BoundingBox :

    As IfcBoundingBox is clearly defined. On ifc import it is probably more consistent than taking the min(x,y,z) length as it is in local coordinates. I am just not sure for an IfcSlab/IfcRoof if it is still YDim or rather ZDim.
    My current to be tested solution for the moment (obj is a FreeCAD object) :

        def guess_thickness(self, obj, ifc_entity):
            if obj.Material:
                thickness = getattr(obj.Material, "TotalThickness", 0)
                if thickness:
                    return thickness
            if not ifc_entity.Representation:
                return 0
            if ifc_entity.IsDecomposedBy:
                thicknesses = []
                for aggregate in ifc_entity.IsDecomposedBy:
                    thickness = 0
                    for related in aggregate.RelatedObjects:
                        thickness += self.guess_thickness(obj, related)
                    thicknesses.append(thickness)
                return max(thicknesses)
            for representation in ifc_entity.Representation.Representations:
                if representation.RepresentationIdentifier == "Box" and representation.RepresentationType == "BoundingBox":
                    if self.is_wall_like(obj.IfcType):
                        return representation.Items[0].YDim * self.fc_scale * self.ifc_scale
                    elif self.is_slab_like(obj.IfcType):
                        return representation.Items[0].ZDim * self.fc_scale * self.ifc_scale
                    else:
                        return 0
            bbox = self._part_by_brep(ifc_entity).BoundBox
            if self.is_wall_like(obj.IfcType):
                return bbox.YLength
            elif self.is_slab_like(obj.IfcType):
                return bbox.ZLength
            return 0
    
        @staticmethod
        def is_wall_like(ifc_type):
            return ifc_type in ("IfcWall", "IfcWallStandardCase", "IfcCurtainWall")
    
        @staticmethod
        def is_slab_like(ifc_type):
            return ifc_type in ("IfcSlab", "IfcSlabStandardCase", "IfcRoof")
    
  • Bounding box for wall is not relevant as you may have L shaped walls. ArchiCad limit wall shape to straight segment, but it is not expected by ifc.

  • @stephen_l you're absolutely correct - it is a quick heuristic which works with the majority of commonly used BIM programs, though. It should be possible to allow users to override it if they know more information about the authoring program.

  • @stephen_l said:
    Bounding box for wall is not relevant as you may have L shaped walls. ArchiCad limit wall shape to straight segment, but it is not expected by ifc.

    Another approach using axis (width perpendicular on xy plane) might be good for L shaped wall as even Revit export it but it doesn't work for slabs/roofs.

  • edited July 30

    Ifc standard allow wall profile / height / width-thickness to vary along axis, and even "free form" representations using brep to support organic shapes / slant. It also handle multiple geometry on composite walls ...
    Axis / footprint representation are not required (@Moult correct me if i'm wrong)
    So from standard it is not possible to retrieve any dimension in reliable way on many "not so edge cases" and trying to guess size from geometry is a slow process.

    Instead of such slow "guess" and maybe return wrong value approach, would handle transfert for such parameters using a propertyset so it is fast and 100% reliable.
    Ifc standard lack of proper parameter interchange common definition, but at least it it possible to implement it through propertysets.

  • Current archipack implementation to retrieve wall thickness from random footprint (entire level at once) rely on 3 steps - 2d to 3d workflow.
    1. Monotonize get the rid of crossing / different thickness / complex shapes, result is expected to be a set of linear polygons (including P shaped).
    2. Find axis and thickness using a polygon skeleton analysis - same kind of algo than for roof shapes.
    3. Snap start and end wall segments to neighboors, to fix wall intersection shape when not crossing at 90°.

  • @stephen_l you are right - axis / footprint are optional.

Sign In or Register to comment.