mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
occt7.2.0: some diff to make netgen work with occt7.2.0
This commit is contained in:
parent
d55ad61323
commit
e16c76c7b3
@ -26,9 +26,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OCC_VERSION_HEX < 0x070000
|
#if OCC_VERSION_HEX < 0x070000
|
||||||
#else
|
// pass
|
||||||
|
#elif OCC_VERSION_HEX < 0x070200
|
||||||
#include "StlTransfer.hxx"
|
#include "StlTransfer.hxx"
|
||||||
#include "TopoDS_Iterator.hxx"
|
#include "TopoDS_Iterator.hxx"
|
||||||
|
#else
|
||||||
|
#include "TopoDS_Iterator.hxx"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace netgen
|
namespace netgen
|
||||||
@ -170,7 +173,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
|||||||
{
|
{
|
||||||
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
||||||
if ( BRep_Tool::Degenerated(edge) )
|
if ( BRep_Tool::Degenerated(edge) )
|
||||||
rebuild->Remove(edge, false);
|
rebuild->Remove(edge);
|
||||||
}
|
}
|
||||||
shape = rebuild->Apply(shape);
|
shape = rebuild->Apply(shape);
|
||||||
}
|
}
|
||||||
@ -239,7 +242,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
|||||||
cout << "(natural bounds added)" <<endl;
|
cout << "(natural bounds added)" <<endl;
|
||||||
TopoDS_Face newface = sff->Face();
|
TopoDS_Face newface = sff->Face();
|
||||||
|
|
||||||
rebuild->Replace(face, newface, Standard_False);
|
rebuild->Replace(face, newface);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the original colour of the face to the newly created
|
// Set the original colour of the face to the newly created
|
||||||
@ -258,7 +261,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
|||||||
{
|
{
|
||||||
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
||||||
if ( BRep_Tool::Degenerated(edge) )
|
if ( BRep_Tool::Degenerated(edge) )
|
||||||
rebuild->Remove(edge, false);
|
rebuild->Remove(edge);
|
||||||
}
|
}
|
||||||
shape = rebuild->Apply(shape);
|
shape = rebuild->Apply(shape);
|
||||||
}
|
}
|
||||||
@ -322,7 +325,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
|||||||
if(replace)
|
if(replace)
|
||||||
{
|
{
|
||||||
TopoDS_Wire newwire = sfw->Wire();
|
TopoDS_Wire newwire = sfw->Wire();
|
||||||
rebuild->Replace(oldwire, newwire, Standard_False);
|
rebuild->Replace(oldwire, newwire);
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete sfw; sfw = NULL;
|
//delete sfw; sfw = NULL;
|
||||||
@ -352,7 +355,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
|||||||
cout << "removing degenerated edge " << emap.FindIndex(edge)
|
cout << "removing degenerated edge " << emap.FindIndex(edge)
|
||||||
<< " from vertex " << vmap.FindIndex(TopExp::FirstVertex (edge))
|
<< " from vertex " << vmap.FindIndex(TopExp::FirstVertex (edge))
|
||||||
<< " to vertex " << vmap.FindIndex(TopExp::LastVertex (edge)) << endl;
|
<< " to vertex " << vmap.FindIndex(TopExp::LastVertex (edge)) << endl;
|
||||||
rebuild->Remove(edge, false);
|
rebuild->Remove(edge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -370,7 +373,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
|||||||
{
|
{
|
||||||
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
||||||
if ( BRep_Tool::Degenerated(edge) )
|
if ( BRep_Tool::Degenerated(edge) )
|
||||||
rebuild->Remove(edge, false);
|
rebuild->Remove(edge);
|
||||||
}
|
}
|
||||||
shape = rebuild->Apply(shape);
|
shape = rebuild->Apply(shape);
|
||||||
}
|
}
|
||||||
@ -496,7 +499,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
|||||||
{
|
{
|
||||||
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
||||||
if ( BRep_Tool::Degenerated(edge) )
|
if ( BRep_Tool::Degenerated(edge) )
|
||||||
rebuild->Remove(edge, false);
|
rebuild->Remove(edge);
|
||||||
}
|
}
|
||||||
shape = rebuild->Apply(shape);
|
shape = rebuild->Apply(shape);
|
||||||
}
|
}
|
||||||
@ -537,7 +540,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
|||||||
BRepLib::OrientClosedSolid (newsolid);
|
BRepLib::OrientClosedSolid (newsolid);
|
||||||
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
||||||
// rebuild->Apply(shape);
|
// rebuild->Apply(shape);
|
||||||
rebuild->Replace(solid, newsolid, Standard_False);
|
rebuild->Replace(solid, newsolid);
|
||||||
TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_COMPSOLID);//, 1);
|
TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_COMPSOLID);//, 1);
|
||||||
// TopoDS_Shape newshape = rebuild->Apply(shape);
|
// TopoDS_Shape newshape = rebuild->Apply(shape);
|
||||||
shape = newshape;
|
shape = newshape;
|
||||||
@ -959,7 +962,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
|||||||
TopoDS_Solid newsolid = solid;
|
TopoDS_Solid newsolid = solid;
|
||||||
BRepLib::OrientClosedSolid (newsolid);
|
BRepLib::OrientClosedSolid (newsolid);
|
||||||
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
||||||
rebuild->Replace(solid, newsolid, Standard_False);
|
rebuild->Replace(solid, newsolid);
|
||||||
|
|
||||||
TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_SHAPE, 1);
|
TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_SHAPE, 1);
|
||||||
shape = newshape;
|
shape = newshape;
|
||||||
|
Loading…
Reference in New Issue
Block a user