Python - findAt(...) command
Python - findAt(...) command
(OP)
Hi,
just in few steps (python drives me crazy again
):
>>> 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?
just in few steps (python drives me crazy again
>>> 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?





RE: Python - findAt(...) command
-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 !
RE: Python - findAt(...) command
-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.