Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Python - findAt(...) command

Status
Not open for further replies.

vasekx1

Automotive
Nov 29, 2006
10
Hi,

just in few steps (python drives me crazy again :eek:) ):

>>> selEdges = pEdge.findAt(( (rightEnlPartPoint, leftEnlPartPoint, centerTopRLEdgePoint), ))
>>> thePartEau.seedEdgeBySize(edges=selEdges, size=seedSizeEau/dense_mesh)

errormessages for seedEdgeBySize:
1) found None, expecting tuple - so I enetered a tuple:
>>> thePartEau.seedEdgeBySize(edges=(selEdges,), size=seedSizeEau/dense_mesh)
2) found tuple, expecting Vertex

Everything, which precedes these lines works without any problem. I didn't find any "specialized definition" for Vertex in the case mentioned (edges are obviously required for the used function). I really need a help, please, because I have been stucked on such lines many times, many hours, since started using the python, without finding any useful info in the manual...

Any solution?
 
Replies continue below

Recommended for you

Some remarks:
-1. In this line pEdge.findAt(( (rightEnlPartPoint, leftEnlPartPoint, centerTopRLEdgePoint), )), I think you have an extra "()".
0. I assume pEdge is an EdgeArray object and not an Edge object.
1. You should check that selEdges contains something and it is not None.
2. rightEnlPartPoint, leftEnlPartPoint, centerTopRLEdgePoint must be 3D points , i.e. each must be in format (X,Y,Z)
3. the edges in selEdges should belong to thePartEau
4. You can try to supply one point at a time in .findAt(...) and see if there's a problem only with one of them.
5. you can try something like this:
thePartEau.seedEdgeBySize(edges=thePartEau.edges.findAt((rightEnlPartPoint, leftEnlPartPoint, centerTopRLEdgePoint)), size=seedSizeEau/dense_mesh)
6.good luck ! :)
 
xerf:
-1. if I delete the extra (), I would get a message, that GeomSequence found, expecting I don't know what now...
0. pEdge is defined as "part".edges
1. I have did the check, there was really None in it - I also checked, what findAt does after each step and I found out, that if I have used 2 arguments, it still uses just the first one...
2. each point is in format (x, y, z) - each coordinate is such a composition of other variables, so I defined them before
3. the edges belong to the right part
4., 5., 6. I solved it now, but it's really awful:

>>> selEdges = (pEdge.findAt(( rightEnlPartPoint,)) + pEdge.findAt(( leftEnlPartPoint,)) +
pEdge.findAt(( centerTopRLEdgePoint,)) + pEdge.findAt(( topRightEnlPartPoint,)) +
pEdge.findAt(( topLeftEnlPartPoint,)))
>>> thePartEau.seedEdgeBySize(edges=selEdges, size=seedSizeEau/dense_mesh)

I didn't find any other way, how to make it working, when the syntax in manual doesn't work ;o) Thanks for your suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor