Using Python to select all volumes within a radius of a poin

See the attached python script for the radial_selection function. It takes 5 arguments:

geom_type - “volume”, “surface”, “curve”, etc.
axis - The radial axis. “x”, “y”, or “z”.
origin - Location of the axis
r1 - inner radius
r2 - outer radius

So, if I want to select all the volumes within a radius of 10 from the point (20, 20, 0) in the x-y plane, I would do:

radial_selection(“volume”, “z”, [20,20,0], 0, 10)

Also note that this function will add to the current selection (it does not reset the selection). (964 Bytes)