mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-05 20:06:25 +00:00
Emit an error message on extrusions with negative height or under model precision
This commit is contained in:
@@ -99,10 +99,15 @@
|
|||||||
#include "../ifcgeom/IfcGeom.h"
|
#include "../ifcgeom/IfcGeom.h"
|
||||||
|
|
||||||
bool IfcGeom::Kernel::convert(const IfcSchema::IfcExtrudedAreaSolid* l, TopoDS_Shape& shape) {
|
bool IfcGeom::Kernel::convert(const IfcSchema::IfcExtrudedAreaSolid* l, TopoDS_Shape& shape) {
|
||||||
|
const double height = l->Depth() * getValue(GV_LENGTH_UNIT);
|
||||||
|
if (height < getValue(GV_PRECISION)) {
|
||||||
|
Logger::Message(Logger::LOG_ERROR, "Non-positive extrusion height encountered for:", l);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TopoDS_Shape face;
|
TopoDS_Shape face;
|
||||||
if ( !convert_face(l->SweptArea(),face) ) return false;
|
if ( !convert_face(l->SweptArea(),face) ) return false;
|
||||||
|
|
||||||
const double height = l->Depth() * getValue(GV_LENGTH_UNIT);
|
|
||||||
gp_Trsf trsf;
|
gp_Trsf trsf;
|
||||||
IfcGeom::Kernel::convert(l->Position(),trsf);
|
IfcGeom::Kernel::convert(l->Position(),trsf);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user