
Thu, 10/29/2020 - 17:07
Hi everyone,
We would like to get some help from you guys.
We tried with the below code to set naming for TopoDS_Shell and TopoDS_Solid, it working for TopoDS_Solid, but it not working for TopoDS_Shell. Please let us know, is there any other way to set a name for TopoDS_Shell and TopoDS_Solid
if (sh.ShapeType() == TopAbs_SHELL)
{
const TopoDS_Shell& shell = TopoDS::Shell(sh);
Handle(StepRepr_RepresentationItem) shellRepresentationItem = STEPConstruct::FindEntity(style.FinderProcess(), shell);
if (!shellRepresentationItem.IsNull())
{
const Handle(TCollection_HAsciiString)& solidId = new TCollection_HAsciiString("shellTest");
shellRepresentationItem->SetName(solidId);
}
}
else if (sh.ShapeType() == TopAbs_SOLID)
{
const TopoDS_Solid& solid = TopoDS::Solid(sh);
Handle(StepRepr_RepresentationItem) shellRepresentationItem = STEPConstruct::FindEntity(style.FinderProcess(), solid);
if (!shellRepresentationItem.IsNull())
{
const Handle(TCollection_HAsciiString)& solidId = new TCollection_HAsciiString("solidTest");
shellRepresentationItem->SetName(solidId);
}
}