From f6aa7c893030edad90c1a41b9b1e1dba518a7ff9 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 3 Aug 2019 15:43:14 +0200 Subject: [PATCH] Additional merge issues --- src/ifcgeom/kernels/opencascade/IfcGeom.h | 49 ----------------------- src/serializers/GltfSerializer.h | 2 +- 2 files changed, 1 insertion(+), 50 deletions(-) diff --git a/src/ifcgeom/kernels/opencascade/IfcGeom.h b/src/ifcgeom/kernels/opencascade/IfcGeom.h index 594170865d..596ddc6fa2 100644 --- a/src/ifcgeom/kernels/opencascade/IfcGeom.h +++ b/src/ifcgeom/kernels/opencascade/IfcGeom.h @@ -328,55 +328,6 @@ public: std::pair initializeUnits(IfcSchema::IfcUnitAssignment*); - template std::pair _get_surface_style(const IfcSchema::IfcStyledItem* si) { -#ifdef SCHEMA_HAS_IfcStyleAssignmentSelect - IfcEntityList::ptr style_assignments = si->Styles(); - for (IfcEntityList::it kt = style_assignments->begin(); kt != style_assignments->end(); ++kt) { - if (!(*kt)->declaration().is(IfcSchema::IfcPresentationStyleAssignment::Class())) { - continue; - } - IfcSchema::IfcPresentationStyleAssignment* style_assignment = (IfcSchema::IfcPresentationStyleAssignment*) *kt; -#else - IfcSchema::IfcPresentationStyleAssignment::list::ptr style_assignments = si->Styles(); - for (IfcSchema::IfcPresentationStyleAssignment::list::it kt = style_assignments->begin(); kt != style_assignments->end(); ++kt) { - IfcSchema::IfcPresentationStyleAssignment* style_assignment = *kt; -#endif - IfcEntityList::ptr styles = style_assignment->Styles(); - for (IfcEntityList::it lt = styles->begin(); lt != styles->end(); ++lt) { - IfcUtil::IfcBaseClass* style = *lt; - if (style->declaration().is(IfcSchema::IfcSurfaceStyle::Class())) { - IfcSchema::IfcSurfaceStyle* surface_style = (IfcSchema::IfcSurfaceStyle*) style; - if (surface_style->Side() != IfcSchema::IfcSurfaceSide::IfcSurfaceSide_NEGATIVE) { - IfcEntityList::ptr styles_elements = surface_style->Styles(); - for (IfcEntityList::it mt = styles_elements->begin(); mt != styles_elements->end(); ++mt) { - if ((*mt)->declaration().is(T::Class())) { - return std::make_pair(surface_style, (T*) *mt); - } - } - } - } - } - } - - return std::make_pair(0,0); - } - - template std::pair get_surface_style(const IfcSchema::IfcRepresentationItem* representation_item) { - // For certain representation items, most notably boolean operands, - // a style definition might reside on one of its operands. - representation_item = find_item_carrying_style(representation_item); - - if (representation_item->as()) { - return _get_surface_style(representation_item->as()); - } - IfcSchema::IfcStyledItem::list::ptr styled_items = representation_item->StyledByItem(); - if (styled_items->size()) { - // StyledByItem is a SET [0:1] OF IfcStyledItem, so we return after the first IfcStyledItem: - return _get_surface_style(*styled_items->begin()); - } - return std::make_pair(0,0); - } - void purge_cache() { // Rather hack-ish, but a stopgap solution to keep memory under control // for large files. SurfaceStyles need to be kept at all costs, as they diff --git a/src/serializers/GltfSerializer.h b/src/serializers/GltfSerializer.h index 428aa074c8..dc5312d9f1 100644 --- a/src/serializers/GltfSerializer.h +++ b/src/serializers/GltfSerializer.h @@ -43,7 +43,7 @@ public: bool ready(); void writeHeader(); void write(const IfcGeom::TriangulationElement* o); - void write(const IfcGeom::BRepElement* /*o*/) {} + void write(const IfcGeom::NativeElement* /*o*/) {} void finalize(); bool isTesselated() const { return true; } void setUnitNameAndMagnitude(const std::string& /*name*/, float /*magnitude*/) {}