zeffii / mesh_tiny_cad

a tiny set of unmissable CAD functions ( VTX, XALL ...) for Blender

Home Page:http://zeffii.github.io/mesh_tiny_cad/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

re: e2f

meta-androcto opened this issue · comments

hi, i notice a crash/bug in edge to face where if the user selects an edge on the same vertical plane as the face, there's a crash/error reported:

Traceback (most recent call last):
  File "...\scripts\addons\mesh_tiny_cad\E2F.py", line 86, in execute
    extend_vertex(self)
  File "...\mesh_tiny_cad\E2F.py", line 63, in extend_vertex
    new_vertex = verts.new(new_co)
TypeError: verts.new(co)

location: <unknown location>:-1

thanks

That must mean the edge never intersects the plane of the face, not a scenario i would use the operator on -- I can implement a fallback

The failing scenario is something like this..
image
The edge being extended towards the face lies on the same plane as the selected face, the same exception would happen if the edge was on a plane parallel to the selected face.

image

I can do a number of things here, my preference goes to a warning stating:

Edge2Face expects the edge to intersect at one point on the plane of the selected face. You're  
seeing this warning because mathutils.geometry.intersect_line_plane is being called on an edge/face  
combination that has no clear intersection point ( both points of the edge either touch the same  
plane as the Face or they lie in a plane that is offset along the face's normal )  

i've commited a fix (rather ..code that mitigates the error being thrown... )

will try to push to Blender.org soon.

users will now see this error if an edge never intersects the face:

image

the message in orange will display briefly in the warning/info report section of the header