multidim component check

This commit is contained in:
Joachim Schoeberl 2011-09-06 15:26:14 +00:00
parent 4f766a4075
commit e652bae19e
2 changed files with 12 additions and 2 deletions

View File

@ -92,8 +92,18 @@ namespace netgen
return res; return res;
} }
virtual int GetNumMultiDimComponents ()
{
return 1;
}
void SetMultiDimComponent (int mc) void SetMultiDimComponent (int mc)
{ multidimcomponent = mc; } {
if (mc >= GetNumMultiDimComponents()) mc = GetNumMultiDimComponents()-1;
if (mc < 0) mc = 0;
multidimcomponent = mc;
}
}; };
} }

View File

@ -10,6 +10,6 @@ solid cutplane = plane (0.5, 0, 0; -1, 0, 0);
solid right = cube and cutplane; solid right = cube and cutplane;
solid left = cube and not cutplane; solid left = cube and not cutplane;
tlo right -col=[1,0,0]; tlo right -col=[1,0,0] -material=copper;
tlo left -col=[0,0,1]; tlo left -col=[0,0,1];