extended AIS_SHAPE

Hi all,
I juste created my own AIS_Shape classes, extended AIS_SHAPE,
(init(), compute()...)
That works fine.
I need to get the TopoDS_Shape of those My_AIS_Shapes (MyAIS->Shape()), in order to proceed boolean operation on them.
But the methode ->Shape() just return nothing on my own My_AIS_Shape classes...
Anyone knows a solution ?

thanx

Patrik Mueller's picture

Hi,

have you tried to overwrite Shape()? As far as I know AIS_SHAPE stores the shape in the myshape member so try to get it.

HTH,

Patrik

PLN's picture

Thank you.
I think I should do something like that, but I don't know exactely how.
I mean... how can I translate the QuadrangleSet of MyAisShape into a TopoDS_Shape suitable for boolean operation ?

Patrik Mueller's picture

Hm...
no I see the problem: you can't get a TopoDS_Shape if you only have Graphic3D elements like QuadrangleSet in your AIS_Object. So I would do the following with the Shape() method:
build a TopoDS_Compound containing all your Quadrangles converted to TopoDS_Faces and return the Compound.
Take the Positions from the Quadrangle points (I think Graphic3D vertices or so) and build gp_Pnts from it. With them you can build the TopoDS_Faces!

HTH,

Patrik

PLN's picture

Ok I got you !

I thought about something like that (but I wasn't sure how to do so...)
I'm affraid I'll loose perfs rebuilding TopoDs_compound
(performance was the reason of using extended AIS_Shape).
But i'll try.
Thank's a lot Patrik !