|
|
|
@ -282,7 +282,7 @@ namespace netgen
|
|
|
|
|
double surfacecont = 0;
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
rebuild->Apply(shape);
|
|
|
|
|
for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
|
|
|
|
|
{
|
|
|
|
@ -313,7 +313,7 @@ namespace netgen
|
|
|
|
|
cout << endl << "- repairing faces" << endl;
|
|
|
|
|
|
|
|
|
|
Handle(ShapeFix_Face) sff;
|
|
|
|
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
rebuild->Apply(shape);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -370,7 +370,7 @@ namespace netgen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
rebuild->Apply(shape);
|
|
|
|
|
for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
|
|
|
|
|
{
|
|
|
|
@ -387,7 +387,7 @@ namespace netgen
|
|
|
|
|
cout << endl << "- fixing small edges" << endl;
|
|
|
|
|
|
|
|
|
|
Handle(ShapeFix_Wire) sfw;
|
|
|
|
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
rebuild->Apply(shape);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -454,7 +454,7 @@ namespace netgen
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
BuildFMap();
|
|
|
|
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
rebuild->Apply(shape);
|
|
|
|
|
|
|
|
|
|
for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
|
|
|
|
@ -482,7 +482,7 @@ namespace netgen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
rebuild->Apply(shape);
|
|
|
|
|
for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
|
|
|
|
|
{
|
|
|
|
@ -608,7 +608,7 @@ namespace netgen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
rebuild->Apply(shape);
|
|
|
|
|
for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
|
|
|
|
|
{
|
|
|
|
@ -653,7 +653,7 @@ namespace netgen
|
|
|
|
|
TopoDS_Solid solid = TopoDS::Solid(exp0.Current());
|
|
|
|
|
TopoDS_Solid newsolid = solid;
|
|
|
|
|
BRepLib::OrientClosedSolid (newsolid);
|
|
|
|
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
// rebuild->Apply(shape);
|
|
|
|
|
rebuild->Replace(solid, newsolid);
|
|
|
|
|
TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_COMPSOLID);//, 1);
|
|
|
|
@ -1076,7 +1076,7 @@ namespace netgen
|
|
|
|
|
TopoDS_Solid solid = TopoDS::Solid(exp0.Current());
|
|
|
|
|
TopoDS_Solid newsolid = solid;
|
|
|
|
|
BRepLib::OrientClosedSolid (newsolid);
|
|
|
|
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
|
|
|
|
rebuild->Replace(solid, newsolid);
|
|
|
|
|
|
|
|
|
|
TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_SHAPE, 1);
|
|
|
|
@ -1408,10 +1408,10 @@ namespace netgen
|
|
|
|
|
static Timer timer_getnames("LoadOCC-get names");
|
|
|
|
|
|
|
|
|
|
// Initiate a dummy XCAF Application to handle the STEP XCAF Document
|
|
|
|
|
static Handle_XCAFApp_Application dummy_app = XCAFApp_Application::GetApplication();
|
|
|
|
|
static Handle(XCAFApp_Application) dummy_app = XCAFApp_Application::GetApplication();
|
|
|
|
|
|
|
|
|
|
// Create an XCAF Document to contain the STEP file itself
|
|
|
|
|
Handle_TDocStd_Document step_doc;
|
|
|
|
|
Handle(TDocStd_Document) step_doc;
|
|
|
|
|
|
|
|
|
|
// Check if a STEP File is already open under this handle, if so, close it to prevent
|
|
|
|
|
// Segmentation Faults when trying to create a new document
|
|
|
|
@ -1441,8 +1441,8 @@ namespace netgen
|
|
|
|
|
timer_transfer.Stop();
|
|
|
|
|
|
|
|
|
|
// Read in the shape(s) and the colours present in the STEP File
|
|
|
|
|
Handle_XCAFDoc_ShapeTool step_shape_contents = XCAFDoc_DocumentTool::ShapeTool(step_doc->Main());
|
|
|
|
|
Handle_XCAFDoc_ColorTool step_colour_contents = XCAFDoc_DocumentTool::ColorTool(step_doc->Main());
|
|
|
|
|
Handle(XCAFDoc_ShapeTool) step_shape_contents = XCAFDoc_DocumentTool::ShapeTool(step_doc->Main());
|
|
|
|
|
Handle(XCAFDoc_ColorTool) step_colour_contents = XCAFDoc_DocumentTool::ColorTool(step_doc->Main());
|
|
|
|
|
|
|
|
|
|
TDF_LabelSequence step_shapes;
|
|
|
|
|
step_shape_contents->GetShapes(step_shapes);
|
|
|
|
@ -1567,10 +1567,10 @@ namespace netgen
|
|
|
|
|
OCCGeometry *occgeo;
|
|
|
|
|
occgeo = new OCCGeometry;
|
|
|
|
|
// Initiate a dummy XCAF Application to handle the IGES XCAF Document
|
|
|
|
|
static Handle_XCAFApp_Application dummy_app = XCAFApp_Application::GetApplication();
|
|
|
|
|
static Handle(XCAFApp_Application) dummy_app = XCAFApp_Application::GetApplication();
|
|
|
|
|
|
|
|
|
|
// Create an XCAF Document to contain the IGES file itself
|
|
|
|
|
Handle_TDocStd_Document iges_doc;
|
|
|
|
|
Handle(TDocStd_Document) iges_doc;
|
|
|
|
|
|
|
|
|
|
// Check if a IGES File is already open under this handle, if so, close it to prevent
|
|
|
|
|
// Segmentation Faults when trying to create a new document
|
|
|
|
@ -1596,8 +1596,8 @@ namespace netgen
|
|
|
|
|
reader.Transfer(iges_doc);
|
|
|
|
|
|
|
|
|
|
// Read in the shape(s) and the colours present in the IGES File
|
|
|
|
|
Handle_XCAFDoc_ShapeTool iges_shape_contents = XCAFDoc_DocumentTool::ShapeTool(iges_doc->Main());
|
|
|
|
|
Handle_XCAFDoc_ColorTool iges_colour_contents = XCAFDoc_DocumentTool::ColorTool(iges_doc->Main());
|
|
|
|
|
Handle(XCAFDoc_ShapeTool) iges_shape_contents = XCAFDoc_DocumentTool::ShapeTool(iges_doc->Main());
|
|
|
|
|
Handle(XCAFDoc_ColorTool) iges_colour_contents = XCAFDoc_DocumentTool::ColorTool(iges_doc->Main());
|
|
|
|
|
|
|
|
|
|
TDF_LabelSequence iges_shapes;
|
|
|
|
|
iges_shape_contents->GetShapes(iges_shapes);
|
|
|
|
@ -1667,7 +1667,7 @@ namespace netgen
|
|
|
|
|
// Fixed a bug in the OpenCascade XDE Colour handling when
|
|
|
|
|
// opening BREP Files, since BREP Files have no colour data.
|
|
|
|
|
// Hence, the face_colours Handle needs to be created as a NULL handle.
|
|
|
|
|
occgeo->face_colours = Handle_XCAFDoc_ColorTool();
|
|
|
|
|
occgeo->face_colours = Handle(XCAFDoc_ColorTool)();
|
|
|
|
|
occgeo->face_colours.Nullify();
|
|
|
|
|
occgeo->changed = 1;
|
|
|
|
|
occgeo->BuildFMap();
|
|
|
|
|