CAD Addon: Edge Tools (blender 2.6x)

Seems absolutely correct then. I don’t know why I thought yesterday that it was flawed.

I think you put the finger on the wound! about what RickyBlender was saying: people that complains of lack of precision. Probably it is because the remove doubles. Imagine two quad faces and removedoubles welding two vertices and breaking the coplanarity of that vertex with the rest of the quad in one of them. That can be the problem that people was talking perhaps. Then we will need a better removedoubles.

currently bpy.ops.mesh.remove_doubles(limit=0.0001)
but that could probably be set to 1.0e-6.

But if anyone has geometry like verts so close to eachother at that resolution, then they should consider working on a different scale. Updated the download link

Imagine you are creating a room and you are a newbie. You create a plane and you say this is one of the walls on the room. Now you create another plane 90 degrees rotated from first one (instead extruding the first one) and now you go and place without using snap tool your two walls sufficiently near to make it like it was a room. You at this moment have two planes in 90 degrees. But now you learn about remove doubles option in blender forum and you go back and select the two edges where the two planes meet and weld the vertices. Just now the two planes are no more in 90 degrees. And worst, if you only weld one vertex on each plane you have the two walls have their vertices no more in coplanar each one of them. I think this was the problem people was complaining as Ricky said: that their quads lost the coplanarity. That is something to expect of the way RemoveDoubles works, not a fault in Blender. RemoveDoubles welds to center probably and then the vertices move from the plane they are in each face.

i found one thread on teh subject or precision

but certain this is not the only one!

sorry i loss a file with lot’s of link a few months ago !

happy 2.5

yep. newcomers should not be expecting to do very accurate things while they learn the basics.

Man… Math is much more easy than he does on that post (I also was wondering what the drawing was like you Ricky). He don’t explains what exactly was the error but probably some error in his code. I think he is explaining that he has a cube and he wants to know if a plane cuts it and where. The only thing he needs to do is:
For each edge on the object imagine that the edge extends like a ray and calculate the intersection of ray with a plane; it will be a vertex on the plane. Then he must to test if that vertex is between the two vertex of the edge to know if the plane cuts the edge.

i’m certain he found a solution for this which was a long time ago!

but he was working on a script and one of the problem which may have been in other threads too is that this limitatons of 7 digits comes up more often then you think after dong a few math operations when getting data from vertex and mesh
and it can leasd to large errors in the end!

but you simply have to be aware of this limitations with blender which does not exist in CAD system!

happy 2.5

Ok. this conversation is no longer about the script and is purely about the precision of blender math engine. Maybe you two can start a new thread dedicated to it instead of going totally off topic here. While i appreciate the topic, i’d like to keep this thread for either code examples of how to make the script better, or support questions / bug reports.

Please guys…

Yes. Back to edge intersections now.

Nice script :slight_smile:

can you show a pic for each of the cases in first post!

i don’t really see how the last one can work !

if you select two edges in a cube like the 2 diagonal and try to weld in the middle it does not work!

is it because there are more then 2 edges selected ?

i tried to show the lenght of the added segment and it does not give same value then in the console?
is this normal

by the way do you know where to change the color for the lenght of edges in viewport ?

happy 2.5

Thanks metalliandy! enjoy and please report bugs if they arise so i may jump up and down on them.

RickyBlender, yep only select two edges at a time. (for now) . I don’t know what you mean with the length of the added segment displaying a confusing value. show me a screenshot. 3dView Edge length , Yeah… i too wish that soon the colour parameter can be part of the theme in preferences, edge length is so hard to read.

I just made a video… but maybe it’s too fast.
I used blender to edit the video - first time ever using the sequence editor. nice. very nice.

ok the video is a little too fast !

you did that with blender can you explain how cause this is as on screen how can you capture the screenas video ?

when you go into edit mode you can in N panel see the lenght of edges if you set it
or faces area
but when i do that i don’t see the same lenght on console that you print or in the N panel when i select the extended edge

happy 2.5

show me a screenshot of the confusing output.
I will replace the video soon.

here is pic showing the n panel and the console output

in console output you give the lenght of the added edge i guess

which cannot be shows in viewport !

Thanks happy 2.5

def isPointOnEdge(point, A, B):
    eps = ((mDist(A, B) - mDist(point,B)) - mDist(A,point))
    if eps < 0: eps = -eps
    if eps < VTX_PRECISION: return True
        print('distance is ' + str(eps))
        return False

If the new vertex (point) does not already rest on the edge (AB), then distance reflects how far away it is. It’s a debug-statement that i will eventually remove once enough people have stress tested it.

video updated, check first post

Nice, your Video! (will try later …)

Nice add-on zeffii. Thank you. :slight_smile: