Skip to content
Snippets Groups Projects
Commit 1a3ba478 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

test implementation of get{Vertex,Edge,Face,Region}ForOCCShape

parent d3c49ff9
No related branches found
No related tags found
No related merge requests found
...@@ -1033,8 +1033,8 @@ StringXNumber MeshOptions_Number[] = { ...@@ -1033,8 +1033,8 @@ StringXNumber MeshOptions_Number[] = {
{ F|O, "NewtonConvergenceTestXYZ" , opt_mesh_newton_convergence_test_xyz , 0. , { F|O, "NewtonConvergenceTestXYZ" , opt_mesh_newton_convergence_test_xyz , 0. ,
"Force inverse surface mapping algorithm (Newton-Raphson) to converge in real coordinates (experimental)" }, "Force inverse surface mapping algorithm (Newton-Raphson) to converge in real coordinates (experimental)" },
{ F|O, "Format" , opt_mesh_file_format , FORMAT_AUTO , { F|O, "Format" , opt_mesh_file_format , FORMAT_AUTO ,
"Mesh output format (1=msh, 2=unv, 10=automatic, 19=vrml, 27=stl, 30=mesh, 31=bdf, " "Mesh output format (1=msh, 2=unv, 10=automatic, 19=vrml, 26=pos statistics, 27=stl, "
"32=cgns, 33=med, 40=ply2)" }, "30=mesh, 31=bdf, 32=cgns, 33=med, 39=inp, 40=ply2)" },
{ F|O, "Hexahedra" , opt_mesh_hexahedra , 1. , { F|O, "Hexahedra" , opt_mesh_hexahedra , 1. ,
"Display mesh hexahedra?" }, "Display mesh hexahedra?" },
......
...@@ -614,6 +614,10 @@ class GModel ...@@ -614,6 +614,10 @@ class GModel
int writeOCCSTEP(const std::string &name); int writeOCCSTEP(const std::string &name);
int writeOCCBREP(const std::string &name); int writeOCCBREP(const std::string &name);
int importOCCShape(const void *shape); int importOCCShape(const void *shape);
GVertex *getVertexForOCCShape(const void *shape);
GEdge *getEdgeForOCCShape(const void *shape);
GFace *getFaceForOCCShape(const void *shape);
GRegion *getRegionForOCCShape(const void *shape);
// ACIS Model // ACIS Model
int readACISSAT(const std::string &name); int readACISSAT(const std::string &name);
......
...@@ -1100,6 +1100,30 @@ int GModel::importOCCShape(const void *shape) ...@@ -1100,6 +1100,30 @@ int GModel::importOCCShape(const void *shape)
return 1; return 1;
} }
GVertex* GModel::getVertexForOCCShape(const void *shape)
{
if(!_occ_internals) return 0;
return _occ_internals->getOCCVertexByNativePtr(this, *(TopoDS_Vertex*)shape);
}
GEdge* GModel::getEdgeForOCCShape(const void *shape)
{
if(!_occ_internals) return 0;
return _occ_internals->getOCCEdgeByNativePtr(this, *(TopoDS_Edge*)shape);
}
GFace* GModel::getFaceForOCCShape(const void *shape)
{
if(!_occ_internals) return 0;
return _occ_internals->getOCCFaceByNativePtr(this, *(TopoDS_Face*)shape);
}
GRegion* GModel::getRegionForOCCShape(const void *shape)
{
if(!_occ_internals) return 0;
return _occ_internals->getOCCRegionByNativePtr(this, *(TopoDS_Solid*)shape);
}
#else #else
void GModel::_deleteOCCInternals() void GModel::_deleteOCCInternals()
...@@ -1148,4 +1172,28 @@ int GModel::importOCCShape(const void *shape) ...@@ -1148,4 +1172,28 @@ int GModel::importOCCShape(const void *shape)
return 0; return 0;
} }
GVertex* GModel::getVertexForOCCShape(const void *shape)
{
Msg::Error("Gmsh must be compiled with Open CASCADE support to query OCC shape");
return 0;
}
GEdge* GModel::getEdgeForOCCShape(const void *shape)
{
Msg::Error("Gmsh must be compiled with Open CASCADE support to query OCC shape");
return 0;
}
GFace* GModel::getFaceForOCCShape(const void *shape)
{
Msg::Error("Gmsh must be compiled with Open CASCADE support to query OCC shape");
return 0;
}
GRegion* GModel::getRegionForOCCShape(const void *shape)
{
Msg::Error("Gmsh must be compiled with Open CASCADE support to query OCC shape");
return 0;
}
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment