gp_GTrsf on a shape and on subshapes


Here is my problem:

I made a GTransform (non isothropic scaling) on a complex shape "aShape" which is well made by Cascade. Then, Through OCAF, I have attributes associated with subshapes (Faces and Edges) of "aShape". Creating a new OCAF document, I wanted to retrieve attributes from the original document and copy it to the new one.

In order to do that, I tried to perform the same GTransform on the complex shape and on each subshape (faces and edges).

The problem is that a GTransform on a complex shape has not the same result on faces and edges belonging to it. (For instance, a scaling on a planar surface produces a B-Spline surface).

If someone has a solution, it will help me a lot.


Hervé Legrand's picture

good question !
But i have no idea !!!!!

T'es ouf dans ta tête mon cousin ?

Stephane Routelous's picture

basically, a GTransform is a transformation modifying the geometry. For example, if you scale a sphere to ( 1,1,1.5), it is not a sphere anymore.
It is the reason why you are getting a bspline in your case.
In the past, I used the GTrsf transformations, and it didn't work well in all case.
As workaround, before the transforamtion, I converted the shapes into bspline-based shapes ( using BRepBuilderAPI_NurbsConvert ), and gtansform it.