Making an Add-on for Precision Drawing Tools (CAD)

One thing that is quintessential for CAD in general is Relative Coordinates. That’s usually done in most CAD packages by prefixing your coordinates with “@”, then typing them. With that, the last point specified becomes the zero Cartesian point in the plane and all movements are based off that. Polar coordinates Are done by specifying the length of a line, for example, then adding “<” then the angle. In general.

x,y - absolute Cartesian
@x,y - relative Cartesian
length<angle - absolute polar
@length<angle - relative polar

There are also a series of “standardized commands”, but those are more used for 2D CAD then 3D CAD, which tends to be more clicking and typing values.

4 Likes

I would love to do this, but it is beyond my skill set at the moment, we are only 2 months into me developing an Add-on and I am only too keen to learn how to improve it. I have no working knowledge of coding Gizmos yet, so this is something I will look at.

I could not agree more! In my early CAD days XY= meant absolute, DL= meant Delta, or Relative and DI= meant Directional, or Polar. I am happy with any key combination. A lot of PDT can be omitted by adding these key-ins to standard Blender and I have asked for this and I understand that that will be longer term and is tied up with new snapping routines, etc.

I can adapt PDT so it stores the last position used, but I cannot capture every keystroke for inclusion at the moment, I will need to do a lot more research here and this may be obviated by changes to Blender planned for 2.82?

Thank you both very much for the input here.

Cheers, Clock.

1 Like

Here are some examples of the new Fillet Tool, to be made available in the next release:

You can see Before, selected vertices on left and After on right.

These use the parameters as set in the 4 inputs near to the Tool. I know you can do this with Blender Bevel Tool (CTRL+B), but I like having them here with specific parameters, if you disagree let me know!

A Profile of 0.05 causes this effect:

Cheers, Clock. :cocktail:

6 Likes

I’ll also reference this feature request post as something that could represent a pain point with both developing the add-on and possible attempts to make it work with Blender and/or implementing it.

1 Like

@BrunoDSL Scaling by previous dimension and new required one would be easy to add to PDT:

So Example: two vertices are 10.56mm apart, I want to scale a set of vertices in X only so that this dimension becomes 13.87 my X scale is therefore approximately 1.31344696969697 and Y & Z scales are 1. Is this what you want? If so I can do that as a mockup in a few days time.

Cheers, Clock.

EDIT:

I realise I have to learn how to manage Gizmos very soon…

1 Like

While I have posted in that post adding some pain points, I did not create the post. It’s more a quirk with the units system in Blender, where some dimension values for primitives seem to be hard coded. Creating a plane will always generate a 2x2m plane, unless you have the length units set to adaptive, which causes it to generate a 2x2Km plane, for example.

1 Like

The Blender unit system doesn’t actually change the numbers used to create geometry. It only relates to how numbers are shown in the UI - anything input will always be converted to Blender Units.

1 Like

Maybe it shoud?




1 Like

We have been busy for the next release:

Professional Formatting @ermo has helped me a great deal here!

Docstrings.

Messages in an external file, so they can be translated.

I have also just separated the View Control menu to help with the “Button Explosion” :bomb:

Cheers, Clock. :beers::see_no_evil:

EDIT:

1.1.4 is released, this new stuff in 1.1.5 is not released yet, more checking needed.

11 Likes

And another thing…

The new options in Pivot Point allows you to set the scale factors by comparing a measured distance - the System Dis variable with an input float to set the scale:

Soooooo, if you have measured the separation of two vertices (Set A/D… tools do this) and set the System Dis value, 1.4 in this case, you can then set what you want that dimension to be, 2.0 in this case and the Set Scale by Dist tool then sets your scale factors for you, rather than you doing the maths!

I would love to do this with a Gizmo, I must learn about them next…

Cheers, Clock.

4 Likes

all these notes will then be useful for the manual.

3 Likes

One last change for v.1.1.5:

I have separated out Command Line as a menu, so now to help with “Button Explosion” , you can simply run in command line like the image above.

Cheers, Clock. :hear_no_evil::gun:

EDIT:

Command fg0.1,4,0.5 fillets geometry, rather than vertices only, radius 0.1, 4 segments, profile of 0.5. :bomb:

4 Likes

This might be helpful for you when it gets into master: Fall 2019: Bevel Constant Radius Project. This fixes the issue I’ve had using bevel for things like this-- that the radius of the curve it builds changes based on the angle of the edges.

I have the 2D cases you’re showing here working, and it will probably make it into 2.82, so same release as PDT!

I haven’t tried it out in a while, but your addon is looking awesome!

5 Likes

Could we rename “Delta” to “Relative” so people don’t come in later stating that the add-on doesn’t have a relative mode?

5 Likes

Don’t see why not, I will discuss with my co-developer, but I see no reason why not, I don’t want to upset the people who say “can we have a Delta button” though, so I will find a way that is good for everyone!

EDIT:

He agrees, but we will have Delta in the Tool-tip to keep everyone happy!

4 Likes

Very helpful, having read that thread, thanks for this and thanks for the nice comments!

2 Likes

I think we are going to put the button labels in a file so users can set their own values. This we have done for most error messages, so they can be translated.

Cheers, Clock

1 Like

This is how we will cater for the requirement to have User defined menu labels:


Messages File

54
Menu File

01

19

35

Is this OK? I have shown the actual value and an alternative suggestion after the quote mark.

Cheers, Clock.

4 Likes

So I did this on my project - fillet this corner:

Then 2 hours later and long after I can reasonably use Undo I decide I don’t like that so I do this:

29

Delete the fillet vertices and:

49

Use Intersect to put the corner back:

Hmm can you do this another way? Je ne sais pas

Salut, L’Horloge :mantelpiece_clock:

1 Like

Sure. Would be possible to have that in the add-on settings?

1 Like