CAD Addon: Edge Tools (blender 2.6x)


(zeffii) #1

The latest stable version of this addon is included in addons_contrib.

These tools now have their own GitHub page:github.com/zeffii/Blender_CAD_utils
I would like to suggest reading the documentation on github as it’s more up to date, and easier to edit than this thread. The latest development version can be downloaded from github as a zip

The tinyCAD Addon contains all of the following scripts:

  • autoVTX
  • XALL (intersect all selected edges)
  • V2X (place new vertex at intersection)
  • BIX (generates the Bisector edge of 2 selected edges)
  • CCEN (3d cursor to center of circle, when 3 vertices of an incomplete circle can be selected)

Installation:

  • Unpack or drag just the folder mesh_tinyCAD into addons or a folder called addons_contrib.
    - In preferences > Addons you will locate it in the Mesh category, it’s called “mesh tinyCAD”.
  • enable or install permanently.

(Michael W) #2

Hm, maybe you could explain more about what they do… I’m sure it’s obvious to you, but I have no idea from the names…


(zeffii) #3

heh, should be more clear now.


(LiquidApe) #4

those look terribly useful!


(RickyBlender) #5

did a test in Z plane with 2 edges almost at 90 degrees and did not work !

any idea what i did wrong here
version 708

happy 2.5


(zeffii) #6

nope, which of the 3 scripts did you invoke, and if you have a console open did the script print any output to it? also, post the blend so i can have a look (no pictures please)


(bat3a) #7

nice script, so whats wrong with the combining them if you have a scripting problem tell and maybe i can help :slight_smile:


(Bao2) #8

I would call them “Edges V intersection” “Edges T intersection” “Edges X intersection”
And never three scripts, just one script that adds this three options to the Ctrl+E edges menu in edit mode


(RickyBlender) #9

i got a problem with my opening on 708 since i got an update from Quick video
i will probably clear this this weekend hope it has nothing to do with this!

but here is the message i get

    bpy.utils.addon_enable mesh_extend_to_projected_intersection_v01a

difference is4.01832816885
The intersection seems to lie on 1 or 2 edges already, use exten
d to edge or slice isntead

i used the first script in addons

does this work in 3D or only in 2D?

i’ll try to upload file later on this night or may be tomorrow morning
and PM you

Thanks happy 2.5


(zeffii) #10

Thank you Sir! I’d like to make one script called something like tinyCAD_EdgeTools.py which when enabled adds all three menu items to the Specials Menu at once. At present, all three scripts repeat a large portion of their code in each script. Moving them to one script would make maintaining the code easier. I’ll have a dig around tomorrow, but if you have a tip or two, or maybe code snippets i would certainly welcome them.

Enjoy.


(zeffii) #11

The error message seems to me pretty clear, look at the images that accompany each script. It looks like in the situation of this error message that you will want to use mesh_extend_to_edge_intersection_v01m.py . But it’s possible my code is doing something i didn’t intend. Will have to wait for your blend, seems interesting.

yes, should work in 3d but your geometry will need to be really clean :slight_smile: tolerance is 1.2e-6

Those sound like reasonable and quite descriptive menu names. Obviously i don’t want these to be separate scripts, but at the moment my FU is still weak.


(PKHG) #12

Hi zeffi,
you know about mathutils.geometry ?

E.g. there are LineIntersect and LineIntersect2D

And I would only add the intersection point IF LineIntersect does not return None :wink: (first script)


(zeffii) #13

PKHG, yeah i am aware of LineIntersect and LineIntersect2D, i will work on optimizing the code to use them soon. That will probably include removing unnecessary computation too. Any other problems let me know!


(zeffii) #14

ok cool, making multiple menu entries using one script seems easy enough, my prototype seems to work. expect an update within not too long.


(RickyBlender) #15

it would be nice if you can
to make it 3D by using Mathutil

also may be add a note in script to say that the precision is limited to 7 digits
cause blender internal is limited to that precision!
cause this was the subject of many discussion on precision in 2.49!
and peoples in CAD world are not used being limited to 7 digits!

another feature may be
i remember in 2.49 there was a script to check if points are co planar
don’t know if you can add this feature to your script too
it would be a nice complementery function i guess

one suggestion here
not certain but i think because you have 3 functions here for edges
then may be instead of having 3 addons use only one addons for edges
and add the options in a menu in the operator’s panel may be
that way it would be faster to select whatever function you need i guess!

thanks & happy 2.5


(zeffii) #16

RickyBlender, i replied to your PM. but will add it here as it might help others.

OK. i have failed in describing exactly which functions do what.
You will be glad to know that the script is not broken. :slight_smile:

if you want to extend an edge towards a point that lies on another edge

  • choose Extend Towards Edge intersection.

if you want to slice two edges that intersect, (boolean)

  • use Slice

if you want two edges to both be extended towards their intersection (if they intersect)

  • use projected intersection

It is 3D already. Really. As for precision perhaps if i use mathutils i may be able to increase precision, this is a valid concern. (i have formal CAD training, this makes me sympathize with any tolerance issues raised)

CoPlanar, i wrote code a while back that checks this, but not implemented it, i think there is also mathutl module that does this… i’ll have to think about it. trig still confuses me a little.

In the last hour I wrote the first prototype to combine multiple menu items from one script.

EDIT:
a note about the precision, someone correct me if i’m ignorant of some fact.
The tolerance affects, in the case of my code, the amount of ‘leeway’ that i’m giving the user. I think at present the script is as precise as blender can expect from the engine. The tolerance is really for allowing ‘not so ultra precision’ geometry to use this script. if your geometry is super accurate, the script is just as happy and doesn’t to my knowledge (or understanding) reduce accuracy.


(Axon D) #17

Hi! this is very cool stuff. I expected this kind of tool in blender long ago. Very nice!

Now, this may be too early to bring this but its just an idea.

You said you want to make one addon with three different operators. But could this be one MODAL operator? It could evaluates the selection context and/or (in ambivalent situation) be explicitly oriented with X, T or V key.
And, the second edge(cause you need two) could be pointed at after, rather than selected before.
These two behaviour would bring a syntactic and fast workflow; how blender is generaly designed.

I know that this might represent much more work. I just want to feed some ideas for what is already very promising.

Good work!


(Axon D) #18

And for the question of precision needed for the script to work. Some tools use a zdepth or something like that to determine a point in space. Snap to face (acient retopo), griese pencil and maybe others. These tools use the depth from the point of view to determine coordinates of the operation. This could solve some situations like when edges are not exactly on the same plane.

Just ideas again.

bye!


(Guran) #19

Reminds about the 2.4x script Geom Tool which has been really helpful in some special cases. Bringing the same functions to Blender 2.5 is great, thanks!

http://blenderartists.org/forum/showthread.php?t=81876


(RickyBlender) #20

PRECISION CAD
well some peoples use and need like high precison in 0.000001 let say
then this cannot be done in blender unless you change the scale but no diretcly form the default scale which is limited at 0.001

i’v seen other threads discussing this effect and it can create a lot of problems of precision if you use the values from blender defautl scale
cause they are limtied to 7 digits!

i think a warning at beginning to indicate this would clarify things for peoples interested and coming from a CAD world
i was hoping that in 2.5 we would have been able to change this and have more then 7 digits of precision
but it would probably also reduce the response time from blender!

happy 2.5