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.