TopoDS_Shape not transient?

Hi, I'm new to OCC and I'm getting compiler errors in this line:

Handle(TopoDS_Shape) aShape;

It seems that TopoDS_Shape can't be used with a handle, probably because the class doesn't inherit from Standard_Transient. But in the paragraph 5.2.1 of the Foundation Classes Guide there is this piece of code to create a persistent shape from a transient shape:

Handle(TopoDS_Shape) aShape
PTColStd_TransientPersistentMap aMap;
Handle(PTopoDS_HShape)aPShape = MgtBRep::Translate
(aShape, aMap,MgtBRepAbs_WithoutTriangle);

Is this a wrong example?
I'm trying to use a handle to a TopoDS_Shape to put it in a TColStd_HSequenceOfTransient to keep track of them... I'd like to use a single collection for geometric and topological entities and this is ok for Geom2d_Geometry objects, and looking at figure 1 of that same chapter (5. Data Storage) it should work for TopoDS_Shape too... is my only solution to use a different collection for them like the TopTools_HSequenceOfShape?

Fabio

Forum supervisor's picture

Hello Fabio,

Thank you for informing us about this inconsistency which is a mistake in the Foundation Classes User's Guide. The TopoDS_Shape class does not inherit from Standard_Transient and thus relevant variables should be declared without Handle(). This mistake will be corrected in the next release of the User's Guide.

Sincerely Yours,
Open CASCADE Support Team