Replace the findAt tupple with sets in python

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Replace the findAt tupple with sets in python

Abaqus Users mailing list
Hi All
 

 in many functions, such as seed edges, the command looks like
 

 mdb.models['Model-1'].parts['Bil'].seedEdgeBySize(constraint=FINER,
     deviationFactor=0.1, edges=
     mdb.models['Model-1'].parts['Bil'].edges.findAt(((0.0025, 0.0025, 0.0),
 
     )), minSizeFactor=0.1, size=0.000125)
 

 but the findAt functions is not the nicest command ,and does not guarantee to get the edge correctly. But inside the function a tuple is expected that the findAt can provide it. but I can not replace it with an edge set call out like
 

 mdb.models['Model-1'].parts['Bil'].sets[edgesets].edge[0]

 

 how could I convert it to a tuple ? is there a way?
 

Reply | Threaded
Open this post in threaded view
|

Re: Replace the findAt tupple with sets in python

Abaqus Users mailing list
you need to define a set that contains just that edge, then you can use the set directly for edges=
Reply | Threaded
Open this post in threaded view
|

Re: Replace the findAt tupple with sets in python

Abaqus Users mailing list
In reply to this post by Abaqus Users mailing list
Someone wrote:
> mdb.models['Model-1'].parts['Bil'].sets[edgesets].edge[0]
>
> how could I convert it to a tuple ? is there a way?


Try
tuple([ mdb.models['Model-1'].parts['Bil'].sets[edgesets].edge[0] ])
!


tuple() expects a sequence of any kind as an argument and gives back a tuple
created out of the given sequence.


Hannes Kuhnert
Reply | Threaded
Open this post in threaded view
|

RE: Replace the findAt tupple with sets in python

Abaqus Users mailing list
In reply to this post by Abaqus Users mailing list
First, you can take a look at other functions (e.g., *.edges.getByBoundingBox(…)) to see if they will help identify the edge set of interest. Second, you can build your own tuple (or list). For example: index = mdb.models[‘Model-1’].parts[‘Bil’].sets[edgesets].edges[0].index edges = p.edges[index:index+1] Regards, Dave Lindeman