mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 18:16:20 +00:00
Fixes from code review.
This commit is contained in:
committed by
Thomas Krijnen
parent
bc5e33489e
commit
32f5c459c1
@@ -952,19 +952,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBoundingBox* l, TopoDS_Shape&
|
|||||||
const double dy = l->YDim() * getValue(GV_LENGTH_UNIT);
|
const double dy = l->YDim() * getValue(GV_LENGTH_UNIT);
|
||||||
const double dz = l->ZDim() * getValue(GV_LENGTH_UNIT);
|
const double dz = l->ZDim() * getValue(GV_LENGTH_UNIT);
|
||||||
|
|
||||||
BRepPrimAPI_MakeBox builder(dx, dy, dz);
|
|
||||||
gp_Pnt corner;
|
gp_Pnt corner;
|
||||||
IfcGeom::Kernel::convert(l->Corner(), corner);
|
IfcGeom::Kernel::convert(l->Corner(), corner);
|
||||||
|
BRepPrimAPI_MakeBox builder(corner, dx, dy, dz);
|
||||||
|
|
||||||
gp_Trsf trsf;
|
shape = builder.Solid();
|
||||||
gp_Dir axis1 (1.,0.,0.);
|
|
||||||
gp_Dir axis3 (0.,0.,1.);
|
|
||||||
gp_Ax3 ax3 (corner, axis3, axis1);
|
|
||||||
trsf.SetTransformation(ax3);
|
|
||||||
trsf.Invert();
|
|
||||||
|
|
||||||
// IfcBoundingBox.Corner has unit scale factor
|
|
||||||
shape = builder.Solid().Moved(trsf);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user