Personal tools
You are here: Home Forum Use Stable selection of generated solid in TUI

Stable selection of generated solid in TUI

Up to Use

Stable selection of generated solid in TUI

Posted by Jens F. Acker at February 12. 2018

I created a geometry for a screw with Salome and want to make the construction parameter dependent. I let Salome generate a python script and I changed nearly everything to parameter-dependent values. But I ran into a problem with the object ID of a solid created by a cutout operation.

This following script segment creates a circle, extrudes it into a cylinder mantle and makes the gives it a thickness. From this two grooves will be cut out, which result into a irregular wedge shape, which I need and the rest.

Vertex_4 = geompy.MakeVertex(0, 0, (L-d_L)/2)
Circle_1 = geompy.MakeCircle(Vertex_4, OZ, r)
Extrusion_1 = geompy.MakePrismVecH(Circle_1, OZ, d_L)
Thickness_1 = geompy.MakeThickSolid(Extrusion_1, s, [])
Cutout = geompy.MakeCutList(Thickness_1, [Lower_Groove, Upper_Groove], True)
[Solid_5] = geompy.SubShapes(Cutout, [64])

The number 64 ist hard coded, but as I was changing the script, I noticed, that the correct number changed, too.

How do I determine the correct ID number in a stable way? I know somewhat where parts of it are located and am confident to compute at least one point coordinate inside or one the surface of it.

If there is an example file solving a simmilar problem, then I would also be fine with it.

Re: Stable selection of generated solid in TUI

Posted by Saint Michael at February 12. 2018
Powered by Ploneboard
Document Actions