mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
* Colour based boundary condition assignment now independent of OpenCascade function calls
* This functionality can now be used on all netgen geometry and mesh types (if supported by the respective geometry module)
This commit is contained in:
parent
45e71b854e
commit
3f2adbf5c9
@ -778,7 +778,7 @@ menu .ngmenu.special
|
|||||||
.ngmenu.special add command -label "Helmholtz Mesh grading" \
|
.ngmenu.special add command -label "Helmholtz Mesh grading" \
|
||||||
-command { Ng_HelmholtzMesh; }
|
-command { Ng_HelmholtzMesh; }
|
||||||
.ngmenu.special add command -label "Colour-based boundary conditions" \
|
.ngmenu.special add command -label "Colour-based boundary conditions" \
|
||||||
-command { Ng_OCCAutoColourBcProps; redraw }
|
-command { Ng_AutoColourBcProps; redraw }
|
||||||
|
|
||||||
|
|
||||||
# menu .mbar.stl.menu
|
# menu .mbar.stl.menu
|
||||||
|
35
ng/ngpkg.cpp
35
ng/ngpkg.cpp
@ -24,9 +24,10 @@ The interface between the GUI and the netgen library
|
|||||||
|
|
||||||
#ifdef OCCGEOMETRY
|
#ifdef OCCGEOMETRY
|
||||||
#include <occgeom.hpp>
|
#include <occgeom.hpp>
|
||||||
#include "../libsrc/occ/occauxfunctions.hpp"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "../libsrc/meshing/bcfunctions.hpp"
|
||||||
|
|
||||||
#include <incvis.hpp>
|
#include <incvis.hpp>
|
||||||
#include <visual.hpp>
|
#include <visual.hpp>
|
||||||
|
|
||||||
@ -1566,39 +1567,19 @@ namespace netgen
|
|||||||
// Philippose - 10/03/2009
|
// Philippose - 10/03/2009
|
||||||
// TCL interface function for the Automatic Colour-based
|
// TCL interface function for the Automatic Colour-based
|
||||||
// definition of boundary conditions for OCC Geometry
|
// definition of boundary conditions for OCC Geometry
|
||||||
int Ng_OCCAutoColourBcProps (ClientData clientData,
|
int Ng_AutoColourBcProps (ClientData clientData,
|
||||||
Tcl_Interp * interp,
|
Tcl_Interp * interp,
|
||||||
int argc, tcl_const char *argv[])
|
int argc, tcl_const char *argv[])
|
||||||
{
|
{
|
||||||
#ifdef OCCGEOMETRY
|
|
||||||
|
|
||||||
if(!mesh.Ptr())
|
if(!mesh.Ptr())
|
||||||
{
|
{
|
||||||
Tcl_SetResult (interp, (char *)"Ng_OCCAutoColourBcProps: Valid netgen mesh required...please mesh the OCC Geometry first", TCL_STATIC);
|
Tcl_SetResult (interp, (char *)"Ng_AutoColourBcProps: Valid netgen mesh required...please mesh the Geometry first", TCL_STATIC);
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!occgeometry)
|
AutoColourBcProps(*mesh, "netgen.ocf");
|
||||||
{
|
|
||||||
Tcl_SetResult (interp, (char *)"Ng_OCCAutoColourBcProps: Currently supports only OCC (STEP/IGES) Geometry", TCL_STATIC);
|
|
||||||
return TCL_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(occgeometry->face_colours.IsNull())
|
|
||||||
{
|
|
||||||
Tcl_SetResult (interp, (char *)"Ng_OCCAutoColourBcProps: No colour data detected in the current OCC Geometry", TCL_STATIC);
|
|
||||||
return TCL_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
OCCAutoColourBcProps(*mesh, *occgeometry, "netgen.ocf");
|
|
||||||
|
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
#else
|
|
||||||
|
|
||||||
Tcl_SetResult (interp, (char *)"Ng_OCCAutoColourBcProps currently supports only OCC (STEP/IGES) Geometry", TCL_STATIC);
|
|
||||||
return TCL_ERROR;
|
|
||||||
|
|
||||||
#endif // OCCGEOMETRY
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -4986,7 +4967,7 @@ namespace netgen
|
|||||||
(ClientData)NULL,
|
(ClientData)NULL,
|
||||||
(Tcl_CmdDeleteProc*) NULL);
|
(Tcl_CmdDeleteProc*) NULL);
|
||||||
|
|
||||||
Tcl_CreateCommand (interp, "Ng_OCCAutoColourBcProps", Ng_OCCAutoColourBcProps,
|
Tcl_CreateCommand (interp, "Ng_AutoColourBcProps", Ng_AutoColourBcProps,
|
||||||
(ClientData)NULL,
|
(ClientData)NULL,
|
||||||
(Tcl_CmdDeleteProc*) NULL);
|
(Tcl_CmdDeleteProc*) NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user