Skip to content
Snippets Groups Projects
Commit 4a7a0681 authored by samuel.hayden's avatar samuel.hayden
Browse files

Bounding box can now be set

parent 1b0a23c9
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,6 @@ bool BuildLattice::mergeCells()
fuser.SetTools(_unitCells);
fuser.SetRunParallel(true);
fuser.SetFuzzyValue(1e-4);
fuser.Build();
if (fuser.HasErrors())
......@@ -57,13 +56,13 @@ bool BuildLattice::mergeCells()
return false;
}
fuser.SimplifyResult();
/*fuser.SimplifyResult();
if (fuser.HasErrors())
{
fuser.DumpErrors(std::cout);
_errors.emplace_back(ErrorCodes::FailedToMergeCells);
return false;
}
}*/
_lattice = fuser.Shape();
return true;
}
......
......@@ -28,7 +28,7 @@ protected:
TopoDS_ListOfShape _unitCells;
TopoDS_Shape _tmpUnitCell;
TopoDS_Shape _lattice;
TopoDS_Solid _boundingBox;
TopoDS_Shape _boundingBox;
protected:
bool buildCell(double w, double d, double h, double r);
......@@ -64,6 +64,8 @@ public:
bool buildLattice();
TopoDS_Shape getLattice() { return _lattice; }
void setBoundingBox(const TopoDS_Shape& shape) { _boundingBox = shape; }
bool hasErrors() { return _errors.size() > 0; }
void dumpErrors()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment