mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
OCC: Set BC Names/Materials only when available
This commit is contained in:
parent
e68333ee00
commit
41e62e58a4
@ -417,15 +417,15 @@ namespace netgen
|
|||||||
&& (geom.face_colours->GetColor(face,XCAFDoc_ColorSurf,face_colour)))
|
&& (geom.face_colours->GetColor(face,XCAFDoc_ColorSurf,face_colour)))
|
||||||
{
|
{
|
||||||
mesh.GetFaceDescriptor(facenr).SetSurfColour(Vec3d(face_colour.Red(),face_colour.Green(),face_colour.Blue()));
|
mesh.GetFaceDescriptor(facenr).SetSurfColour(Vec3d(face_colour.Red(),face_colour.Green(),face_colour.Blue()));
|
||||||
mesh.GetFaceDescriptor(facenr).SetBCName(&geom.fnames[facenr-1]);
|
|
||||||
mesh.GetFaceDescriptor(facenr).SetBCProperty(facenr);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mesh.GetFaceDescriptor(facenr).SetSurfColour(Vec3d(0.0,1.0,0.0));
|
mesh.GetFaceDescriptor(facenr).SetSurfColour(Vec3d(0.0,1.0,0.0));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(geom.fnames.Size()>=facenr)
|
||||||
mesh.GetFaceDescriptor(facenr).SetBCName(&geom.fnames[facenr-1]);
|
mesh.GetFaceDescriptor(facenr).SetBCName(&geom.fnames[facenr-1]);
|
||||||
mesh.GetFaceDescriptor(facenr).SetBCProperty(facenr);
|
mesh.GetFaceDescriptor(facenr).SetBCProperty(facenr);
|
||||||
}
|
|
||||||
// ACHTUNG! STIMMT NICHT ALLGEMEIN (RG)
|
// ACHTUNG! STIMMT NICHT ALLGEMEIN (RG)
|
||||||
|
|
||||||
|
|
||||||
@ -1471,6 +1471,7 @@ namespace netgen
|
|||||||
(*testout) << mesh->LineSegment(i) << endl;
|
(*testout) << mesh->LineSegment(i) << endl;
|
||||||
|
|
||||||
for (int i = 0; i < mesh->GetNDomains(); i++)
|
for (int i = 0; i < mesh->GetNDomains(); i++)
|
||||||
|
if(geom.snames.Size())
|
||||||
mesh->SetMaterial( i+1, geom.snames[i] );
|
mesh->SetMaterial( i+1, geom.snames[i] );
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user