scale a topods_shape

I have a create a sphere solid or any TopoDS_Shape , how to scale
it up or down using a factor ?
Any function available similar to 'Scale' available for 'Geom_surface' class

thanks in advance

Rob Bachrach's picture

Look at BRepBuilderAPI_Transform. You can create a scaling transform (gp_Trsf) with a scale factor and a point about which the scaling should occur.

Stephane Routelous's picture

take care, BRepBuilderAPI_Transform only works fine with scale when the scale factor is the same on all axis ( scalex = scaley = scalez )
if you have a deforming transformation, use BRepBuilderAPI_GTransform instead.

HTH,

Stephane