diff --git a/src/ifcgeom/IfcGeomHelpers.cpp b/src/ifcgeom/IfcGeomHelpers.cpp index 6c1480d8e7..326d460f4c 100644 --- a/src/ifcgeom/IfcGeomHelpers.cpp +++ b/src/ifcgeom/IfcGeomHelpers.cpp @@ -140,7 +140,8 @@ bool IfcGeom::convert(const Ifc2x3::IfcCartesianTransformationOperator3D::ptr l, if ( l->hasAxis3() ) IfcGeom::convert(l->Axis3(),axis3); else axis3 = axis1.Crossed(axis2); const gp_Ax3 ax3 (origin,axis3,axis1); - trsf.SetTransformation(ax3); + trsf.SetTransformation(ax3); + trsf.Invert(); if ( l->hasScale() ) trsf.SetScaleFactor(l->Scale()); CACHE(IfcCartesianTransformationOperator3D,l,trsf) return true; @@ -153,6 +154,7 @@ bool IfcGeom::convert(const Ifc2x3::IfcCartesianTransformationOperator2D::ptr l, if ( l->hasAxis1() ) IfcGeom::convert(l->Axis1(),axis1); const gp_Ax2d ax2d (gp_Pnt2d(origin.X(),origin.Y()),gp_Dir2d(axis1.X(),axis1.Y())); trsf.SetTransformation(ax2d); + trsf.Invert(); if ( l->hasScale() ) trsf.SetScaleFactor(l->Scale()); CACHE(IfcCartesianTransformationOperator2D,l,trsf) return true; diff --git a/src/ifcgeom/IfcGeomObjects.cpp b/src/ifcgeom/IfcGeomObjects.cpp index 912e86f08c..6d5b5b9d7b 100644 --- a/src/ifcgeom/IfcGeomObjects.cpp +++ b/src/ifcgeom/IfcGeomObjects.cpp @@ -159,7 +159,8 @@ IfcGeomObjects::IfcGeomObject* _get() { // Has the list of IfcProducts for this representation been initialized? if ( ! entities ) { - if ( shaperep->RepresentationIdentifier() != "Body" ) { + if ( shaperep->RepresentationIdentifier() != "Body" && + shaperep->RepresentationIdentifier() != "Facetation" ) { _nextShape(); continue; } @@ -219,7 +220,7 @@ IfcGeomObjects::IfcGeomObject* _get() { if ( (openings && openings->Size()) || use_world_coords ) { if ( shape ) delete shape; - TopoDS_Shape temp_shape (shapes); + TopoDS_Shape temp_shape = shapes.Moved(gp_Trsf()); try { if (openings && openings->Size()) IfcGeom::convert_openings(entity,openings,temp_shape,trsf); } catch( IfcParse::IfcException& e ) {Ifc::LogMessage("Warning",e.what()); } diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index 243945f69c..529f66d2d7 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -212,7 +212,7 @@ bool IfcGeom::convert(const Ifc2x3::IfcMappedItem::ptr l, TopoDS_Shape& shape) { trsf2 = trsf2_2d; } if ( ! IfcGeom::convert_shape(map->MappedRepresentation(),shape) ) return false; - shape.Move(trsf2 * trsf1); + shape = shape.Moved(trsf2 * trsf1); return !shape.IsNull(); } bool IfcGeom::convert(const Ifc2x3::IfcShapeRepresentation::ptr l, TopoDS_Shape& shape) { diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index c0cd39d158..edacb470e4 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -111,7 +111,7 @@ bool IfcGeom::convert(const Ifc2x3::IfcTrimmedCurve::ptr l, TopoDS_Wire& wire) { if ( i->is(Ifc2x3::Type::IfcCartesianPoint) && trim_cartesian ) { IfcGeom::convert(reinterpret_pointer_cast(i), pnt1 ); trimmed1 = true; - } else if ( i->is(Ifc2x3::Type::IfcParameterValue) ) { + } else if ( i->is(Ifc2x3::Type::IfcParameterValue) && !trim_cartesian ) { const float value = *reinterpret_pointer_cast(i)->wrappedValue(); flt1 = value * parameterFactor; trimmed1 = true; @@ -125,12 +125,14 @@ bool IfcGeom::convert(const Ifc2x3::IfcTrimmedCurve::ptr l, TopoDS_Wire& wire) { BRepBuilderAPI_MakeEdge e (curve,pnt1,pnt2); w.Add(e.Edge()); trimmed2 = true; - } else if ( i->is(Ifc2x3::Type::IfcParameterValue) && trimmed1 ) { + break; + } else if ( i->is(Ifc2x3::Type::IfcParameterValue) && !trim_cartesian && trimmed1 ) { const float value = *reinterpret_pointer_cast(i)->wrappedValue(); float flt2 = value * parameterFactor; BRepBuilderAPI_MakeEdge e (curve,flt1,flt2); w.Add(e.Edge()); trimmed2 = true; + break; } } if ( trimmed2 ) wire = w.Wire(); diff --git a/src/ifcgeom/IfcRegister.h b/src/ifcgeom/IfcRegister.h index 58703f7e7c..be851e1581 100644 --- a/src/ifcgeom/IfcRegister.h +++ b/src/ifcgeom/IfcRegister.h @@ -50,8 +50,8 @@ SHAPE(IfcMappedItem); SHAPE(IfcPolygonalBoundedHalfSpace); SHAPE(IfcHalfSpaceSolid); -FACE(IfcArbitraryClosedProfileDef); FACE(IfcArbitraryProfileDefWithVoids); +FACE(IfcArbitraryClosedProfileDef); FACE(IfcRectangleProfileDef); FACE(IfcIShapeProfileDef); FACE(IfcCShapeProfileDef);