Query on automation - Identifying circular curves on bodies

We have a requirement to model spider beams in the padeye plates of a pendant chain.
As the process is fairly repetetive, we are looking to automate the process.

For Eg:


The attached screen shot has 3 padeye holes and we need to create spider beams on either side of each padeye. Thus, we need to create spider beams for 6 circular curves altogether.

As of now, we manually collect the curve IDs and execute the below script to create vertex, mesh vertex, assign material properties and create block/spiderbeam/nodeset.

#Inputs to be updated
curveList = [‘785’,‘791’,‘827’,‘828’,‘784’,‘790’,‘826’,‘825’,‘817’,‘823’,‘795’,‘796’,‘816’,‘822’,‘794’,‘793’,‘713’,‘714’,‘762’,‘761’,‘715’,‘716’,‘764’,‘763’,‘736’,‘742’,‘746’,‘745’,‘737’,‘743’,‘748’,‘747’,‘656’,‘662’,‘698’,‘697’,‘657’,‘663’,‘700’,‘699’,‘688’,‘694’,‘666’,‘665’,‘689’,‘695’,‘667’,‘668’]
vertexColor = ‘green’
startVertex = cubit.get_last_id(“vertex”)
startBlock = 301
startNodeSet = 501

vertex = startVertex
block = startBlock
nodeset = startNodeSet
#For each curve in curvelist
for curve in curveList:
cubit.cmd('create vertex center curve ‘+curve+’ color '+vertexColor)
cubit.cmd('mesh vertex '+str(vertex))
cubit.cmd('block ‘+str(block)+’ joint vertex '+str(vertex)+‘spider curve ‘+curve+’ element type BEAM’)
cubit.cmd(‘block ‘+str(block)+’ element type BEAM’)
cubit.cmd(‘block ‘+str(block)+’ material “structural_beam”’)
cubit.cmd(‘block ‘+str(block)+’ beam_type general section_integration off’)
cubit.cmd(‘block ‘+str(block)+’ beam_dimensions 0.1 1 1 1 1’)
cubit.cmd('nodeset ‘+str(nodeset)+’ vertex '+str(vertex))
#Incrementing the vertex, block and node values
vertex = vertex+1
block = block+1
nodeset = nodeset + 1

If we can identify the circular curves on the padeye using some cubit/python commands, the entire process can be executed without any manual intervention. Please provide suggestions on how to accomplish the same.

I have done this in the past by creating a group containing the curves and then iterating on the group.

radius = 6.25
tolerance = .05
command = f"group ‘tmp_curve’ equals curve with radius > {radius-tolerance} and radius < {radius+tolerance}"
cubit.cmd(command)
group_id = cubit.get_id_from_name(‘tmp_curve’)
spider_curves = cubit.get_group_curves(group_id)
draw_cmd = "highlight curve " + " ".join([str(c) for c in spider_curves])
cubit.cmd(draw_cmd)
cubit.flush_graphics()

In this example, I used a python list comprehension to show iteration, but you could just as easily do

for curve in spider_curves:
# do operations

You still may want to do a draw or a highlight to show the curves prior to creating the spiders.

@greg, would you do this differently?

@karl, Thanks for your suggestions.