TIG,
this is the typo
minX=py.x
needs to be changed to
minX=pt.x
Thanks
TIG,
this is the typo
minX=py.x
needs to be changed to
minX=pt.x
Thanks
Thanks TIG for the help.
There was one small typo, which I edited.
The text file is always saved to directory not in the active model path.
Need to verify that, But the main functionality works like a charm.
Trying it on bigger models and will then update back.
Thanks Again
@tig said:
Assuming your face is an orthogonal rectangle then the dX=bb.width and dY=bb.height [oddly the 'Z-height' in the SKP is called the 'bb.depth' !]
Unfortunately your explanation is illogical.
Points 1 and 4 are dX apart [without recourse to finding their coordinates at all!]
Points 1 and 4 are definitely dX apart but may not be in the same Y coordiante.
If the face is not flat or orthogonal or a rectangle then the issue is more complex but still solvable...
As I mentioned in my first post, the face can be of any shape.
Please explain a little better...
I guess this new image will clear the question. Sorry for the confusion.
There are 2 faces in the XY plane in the image. The first face on the left, I need dX and dY between point 1 and 4. In the second face on the right, I need dX and dY between points 1 and 6. The faces can be of any shape and have as many edges as possible.
But the common thing is that all faces are in XY plane. So I need to find the edge/line that is at the bottom of the face and pick the 2 points attached to line to get the dX and dY.
Thanks for the quick reply.
There is no selection of faces. All the faces have to be written out. So your code should work.
dX and dY in my case are not the width and height of the face.
Basically I need these 3 steps:
Need to do this for all the faces in the model
Hi All,
I am looking for a plugin/script to loop through all the faces (All faces are in XY plane), get the 2 extreme points on the bottom edge of the face and give the distance between the 2 points.
I need to write this output to a text file in this format
Face No, dX, dY.
1, 0.5, 2
I have attached an image that might help show what is required.
The face may be of any shape. The arrows are to show the direction to measure dX and dY. All faces on either side of the reference line (white in middle of image) will need to be calculated in that direction. The green colour dots indicate the points. There can be intermediate points on the lower line of each face, but I need to pick only the extreme points on that line for dX and dY
Is this possible?
Thanks in advance