Isolate (most of the) geometry processing code into separate opencascade kernel

This commit is contained in:
Thomas Krijnen
2019-01-18 11:23:19 +01:00
parent 0072e1f247
commit ad24b6be0f
38 changed files with 678 additions and 491 deletions
@@ -34,7 +34,7 @@ bool OpenCascadeBasedSerializer::ready() {
return succeeded;
}
void OpenCascadeBasedSerializer::write(const IfcGeom::BRepElement<real_t>* o) {
void OpenCascadeBasedSerializer::write(const IfcGeom::NativeElement<real_t>* o) {
TopoDS_Shape compound = o->geometry().as_compound();
if (o->geometry().settings().get(IfcGeom::IteratorSettings::CONVERT_BACK_UNITS)) {
@@ -44,7 +44,8 @@ void OpenCascadeBasedSerializer::write(const IfcGeom::BRepElement<real_t>* o) {
compound = BRepBuilderAPI_Transform(compound, scale, true).Shape();
}
writeShape(compound);
IfcGeom::OpenCascadeShape s(compound);
writeShape(&s);
}
#define RATHER_SMALL (1e-3)