Solid object after transformation?


I am just starting with OpenCASCADE, and I love it but I still have a lot to learn. Right now, I am trying to create a general ellipsoid by scaling the three axes of a solid sphere, with a transformation. However, although it works, I end up with just the shell of the ellipsoid and I need it to be solid, since I want to do CSG with it afterwards.

Here's my code:

TopoDS_Shape sphere=Sphere(0,0,0,1); //radius 1, centered at origin
gp_GTrsf trsf;
gp_Mat rot(r1, 0, 0, 0, r2, 0, 0, 0, r3); //scale factors
trsf.SetTranslationPart(gp_XYZ(x0,y0,z0)); //center

BRepBuilderAPI_GTransform myBRepTransformation(sphere,trsf);
TopoDS_Shape result = myBRepTransformation.Shape();

How can I get a solid ellipsoid instead?



stigk's picture

Sorry, I was too hasty in my conclusions. It appears that I did something wrong while applying a texture to the CGS object and it looked like it was hollow... All fine now.