Skip to content

Commit e4fdfd2

Browse files
committed
Apply length unit to IfcCylindricalSurface Radius. Fixes IfcOpenShell#553
1 parent bf16239 commit e4fdfd2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ifcgeom/IfcGeomShapes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCylindricalSurface* l, TopoDS_
11131113

11141114
// IfcElementarySurface.Position has unit scale factor
11151115
#if OCC_VERSION_HEX < 0x60502
1116-
face = BRepBuilderAPI_MakeFace(new Geom_CylindricalSurface(gp::XOY(), l->Radius())).Face().Moved(trsf);
1116+
face = BRepBuilderAPI_MakeFace(new Geom_CylindricalSurface(gp::XOY(), l->Radius() * getValue(GV_LENGTH_UNIT))).Face().Moved(trsf);
11171117
#else
1118-
face = BRepBuilderAPI_MakeFace(new Geom_CylindricalSurface(gp::XOY(), l->Radius()), getValue(GV_PRECISION)).Face().Moved(trsf);
1118+
face = BRepBuilderAPI_MakeFace(new Geom_CylindricalSurface(gp::XOY(), l->Radius() * getValue(GV_LENGTH_UNIT)), getValue(GV_PRECISION)).Face().Moved(trsf);
11191119
#endif
11201120
return true;
11211121
}

0 commit comments

Comments
 (0)