mirror of
https://github.com/NGSolve/netgen.git
synced 2025-04-10 23:27:28 +05:00
* OpenCascade geometry broken by changes in the NetgenGeometry memory leak fix.
* This commit makes the required changes to get it working again
This commit is contained in:
parent
323a425673
commit
0ca9193607
@ -21,7 +21,7 @@ extern "C" int Ng_occ_Init (Tcl_Interp * interp);
|
|||||||
|
|
||||||
namespace netgen
|
namespace netgen
|
||||||
{
|
{
|
||||||
extern NetgenGeometry * ng_geometry;
|
extern AutoPtr<NetgenGeometry> ng_geometry;
|
||||||
extern AutoPtr<Mesh> mesh;
|
extern AutoPtr<Mesh> mesh;
|
||||||
|
|
||||||
char * err_needsoccgeometry = (char*) "This operation needs an OCC geometry";
|
char * err_needsoccgeometry = (char*) "This operation needs an OCC geometry";
|
||||||
@ -55,7 +55,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
#ifdef OCCGEOMETRY
|
#ifdef OCCGEOMETRY
|
||||||
int showvolume;
|
int showvolume;
|
||||||
OCCGeometry * occgeometry = dynamic_cast<OCCGeometry*> (ng_geometry);
|
OCCGeometry * occgeometry = dynamic_cast<OCCGeometry*> (ng_geometry.Ptr());
|
||||||
|
|
||||||
showvolume = atoi (Tcl_GetVar (interp, "::occoptions.showvolumenr", 0));
|
showvolume = atoi (Tcl_GetVar (interp, "::occoptions.showvolumenr", 0));
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ namespace netgen
|
|||||||
int argc, tcl_const char *argv[])
|
int argc, tcl_const char *argv[])
|
||||||
{
|
{
|
||||||
#ifdef OCCGEOMETRY
|
#ifdef OCCGEOMETRY
|
||||||
OCCGeometry * occgeometry = dynamic_cast<OCCGeometry*> (ng_geometry);
|
OCCGeometry * occgeometry = dynamic_cast<OCCGeometry*> (ng_geometry.Ptr());
|
||||||
|
|
||||||
static char buf[1000];
|
static char buf[1000];
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
@ -149,7 +149,7 @@ namespace netgen
|
|||||||
int argc, tcl_const char *argv[])
|
int argc, tcl_const char *argv[])
|
||||||
{
|
{
|
||||||
#ifdef OCCGEOMETRY
|
#ifdef OCCGEOMETRY
|
||||||
OCCGeometry * occgeometry = dynamic_cast<OCCGeometry*> (ng_geometry);
|
OCCGeometry * occgeometry = dynamic_cast<OCCGeometry*> (ng_geometry.Ptr());
|
||||||
|
|
||||||
stringstream str;
|
stringstream str;
|
||||||
if (argc >= 2)
|
if (argc >= 2)
|
||||||
@ -568,7 +568,7 @@ namespace netgen
|
|||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCGeometry * occgeometry = dynamic_cast<OCCGeometry*> (ng_geometry);
|
OCCGeometry * occgeometry = dynamic_cast<OCCGeometry*> (ng_geometry.Ptr());
|
||||||
if (!occgeometry)
|
if (!occgeometry)
|
||||||
{
|
{
|
||||||
Tcl_SetResult (interp, (char *)"Ng_SurfaceMeshSize currently supports only OCC (STEP/IGES) Files", TCL_STATIC);
|
Tcl_SetResult (interp, (char *)"Ng_SurfaceMeshSize currently supports only OCC (STEP/IGES) Files", TCL_STATIC);
|
||||||
@ -941,7 +941,7 @@ namespace netgen
|
|||||||
|
|
||||||
VisualScene * OCCGeometryRegister :: GetVisualScene (const NetgenGeometry * geom) const
|
VisualScene * OCCGeometryRegister :: GetVisualScene (const NetgenGeometry * geom) const
|
||||||
{
|
{
|
||||||
OCCGeometry * geometry = dynamic_cast<OCCGeometry*> (ng_geometry);
|
OCCGeometry * geometry = dynamic_cast<OCCGeometry*> (ng_geometry.Ptr());
|
||||||
if (geometry)
|
if (geometry)
|
||||||
{
|
{
|
||||||
vsoccgeom.SetGeometry (geometry);
|
vsoccgeom.SetGeometry (geometry);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user