Fixed issue when trying to apply deferred loading for edges or vertexes.
const Standard_Boolean theToCopyData) const
{
Handle(RWMesh_TriangulationSource) aMesh = Handle(RWMesh_TriangulationSource)::DownCast(theMesh);
+ if (aMesh.IsNull())
+ {
+ Message::SendWarning("Only triangulation loading is supported.");
+ return false;
+ }
if (theNbTris >= 1)
{
aMesh->ResizeEdges(theNbTris, theToCopyData);
const Standard_Integer theEdge) const
{
Handle(RWMesh_TriangulationSource) aMesh = Handle(RWMesh_TriangulationSource)::DownCast(theMesh);
+ if (aMesh.IsNull())
+ {
+ Message::SendWarning("Only triangulation loading is supported.");
+ return 0;
+ }
if (theEdge < 1 || theEdge > theMesh->NbNodes())
{
return 0;
{
return false;
}
- Handle(RWMesh_TriangulationSource) aDestTriangulation =
- Handle(RWMesh_TriangulationSource)::DownCast(theDestTriangulation);
- if (aDestTriangulation.IsNull())
- {
- return false;
- }
- if (myReader->Load(this, aDestTriangulation, theFileSystem))
+ if (myReader->Load(this, theDestTriangulation, theFileSystem))
{
return true;
}