How to clone a new copy of origin object

Hi,

If I have a object created like:
Handle(AIS_Point) myPt = new AIS_Point;

Now, how can I create a new one from myPt like
Handle(AIS_Point) myNewPt = myPt->XXX(). is XXX function exist or is there any other methods to do this.

any ideas are appreciate.
Lugi.C

Jérome Dufaure's picture

Hello
I have read the AIS_Point.cdl file and for me to create an AIS_Point you can write Handle(AIS_Point) myPt = new AIS_Point(ageomPoint);
Where ageomPoint is a point from geom.
Good Luck
jerome

Lugi.C's picture

Thanks.
Lugi.C

Jérome Dufaure's picture

You can use the method SetComponent like this.
Handle(AIS_Point) myPt = new AIS_Point();
myPt->SetComponent(ageomPoint);
jerome