Modifying geometry of a shape based on a modification of a sub-shape


Given the CAD file of a vessel (see attached picture), I wanted to know if it is possible to modify the radius and length of the cylinder that is the principal component of the vessel. If so, is there any way of adapting the position of all the other elements to the new size of the cylinder? I mean, if we reduce or increase the radius of the cylinder the elements that are positioned over it should be rotated and translated in order to keep constant their polar coordinates regarding the center of the cylinder.

I hope you can answer my question.

Thank you in advance.

Mikhail Sazonov's picture


There is no ready to use solution. It is too specific in order to exist. It is needed to develop a new algorithm to solve this task.


Adriana Costas's picture

Thanks for your quick response, Mikhail. Yes, of course, I was not expecting a ready to use solution. I only need to know if there exist some available functionalities that can facilitate my work or if I have to implement it from scratch. For example:
- Would it possible to change the radius and length of a cylinder (TopoDS_Shape)?
- Would it be possible to compute the relative position of the elements regarding a coordinate system placed at a reference point of the cylinder?
- Would it be possible to transform them regarding this coordinate system?


Mikhail Sazonov's picture

Hi Adriana,

> - Would it possible to change the radius and length of a cylinder (TopoDS_Shape)?

You are not permitted changing the contents of a shape. Instead, you should create a new shape with changed some of its subshapes. So, for example, if you want to change some face in a solid, you should create a new [modified] face, and then create a new solid from all of its old faces except the changed one + the new face. Of course, you should also take care of the new face connectivity with other faces via the common edges.

It is not possible to answer your questions in two phrases. If you need help in your development with OCCT, please feel free to apply to our customer support.

Best regards,