Ejemplo n.º 1
0
bool IfcGeom::Kernel::convert(const IfcSchema::IfcGeometricSet* l, IfcRepresentationShapeItems& shapes) {
    IfcEntityList::ptr elements = l->Elements();
    if ( !elements->size() ) return false;
    bool part_succes = false;
    const IfcGeom::SurfaceStyle* parent_style = get_style(l);
    for ( IfcEntityList::it it = elements->begin(); it != elements->end(); ++ it ) {
        IfcSchema::IfcGeometricSetSelect* element = *it;
        TopoDS_Shape s;
        if (convert_shape(element, s)) {
            part_succes = true;
            const IfcGeom::SurfaceStyle* style = 0;
            if (element->is(IfcSchema::Type::IfcPoint)) {
                style = get_style((IfcSchema::IfcPoint*) element);
            } else if (element->is(IfcSchema::Type::IfcCurve)) {
                style = get_style((IfcSchema::IfcCurve*) element);
            } else if (element->is(IfcSchema::Type::IfcSurface)) {
                style = get_style((IfcSchema::IfcSurface*) element);
            }
            shapes.push_back(IfcRepresentationShapeItem(s, style ? style : parent_style));
        }
    }
    return part_succes;
}
Ejemplo n.º 2
0
	int operator()(const IfcEntityList::ptr& i) const { return i->size(); }