Hello, I have made the following CAD Functions node in AN (that being what I currently understand how to do):
I would like to make this into an Add-on, titled something like “Precision Modelling Tools”, or similar. But I have no idea how to go about this. What I want is to have the various operator buttons and input boxes available in the 3D window when editing a mesh.
As far as the node is concerned, it does not require AN to be executing, has no inputs and no outputs. Examples of what it does would be “Place Cursor at a known XYZ”, “Move Cursor a delta amount from Selected Vertex”, Extrude a Vertex by a Distance at an Angle", “Place Cursor at Intersection of two Edges” etc. The user simply clicks the appropriate button to activate the command.
There are 4 input boxes, for Angle, XYZ Coord, Delta & Command (I=Loc is just for my information and is not used), but it would be nice if the XYZ, Delta and Command where just key-ins. So the user might select a vertex, key “e” to extrude, or click an “Extrude” button, then key, for example
i=2,56 meaning extrude 2 units at 56 degrees in the chosen plane, this would be followed by more similar commands, like
d=2,,4 (meaning delta values), so the vertex is extruded around a given “path” to form an edge loop, but not necessarily a face. If this is not possible, the command could be entered in the command box and is executed when
Return is pressed. Angle needs to be stored as a variable as the system can measure angles between vertices and use them to move, or extrude, vertices.
A further enhancement would be just to click a single “Cursor Move” button then key
a=2,1,4 meaning absolute coordinates of 2,1,4 in XYZ, or
i=2,78. Maybe the
= sign can be omitted, so the key-in would just be something like
a,,4 meaning XYZ = 0,0,4.
So, some questions; Is this possible in Blender 2.8, How would I go about it? How do I make an Add-on that users can easily load into Blender? I have written all the code necessary to drive the functions, much of which uses Numpy routines for speed and efficiency, particularly the intersect routines, I just don’t know how to make this a vanilla Blender Add-on.
These tools are intended to improve the precision modelling facilities in Blender and make it more “CAD-Friendly”, or that might be written as “Designer-Friendly”. Ultimately I should like to see these tools in vanilla Blender to attract Designers away from expensive CAD software.
Here is a part made very quickly and accurately in Blender using the tools in my node:
Thanks for any thoughts and help, Clock.
PS. I have renamed this thread now that I have found out how to do this…