Commit Graph

48 Commits

Author SHA1 Message Date
9128155de3 UI: Dont abbriviate location & rotation
This resolves one of the last few areas where we still use inappropriate 
abbreviations. Reading abbreviated words is usually slower, because 
users must parse, guess and translate the words. Using abbreviations 
such as 'rot' is also especially bad since it's a word in itself too.

The main advantage of abbreviations is that they are faster to *write*, 
which just isn't a concern for text in the UI.
2020-07-02 16:10:58 -04:00
590710871b PDT: Fix Library path issue, Add Trig Waves Functions
An issue occurred if you opened Blender with a new file where the
Parts Library path pointed relative to the Blender App, not the working
directory, so was not found.

The Parts Library file is now moved to the Parts Library Menu, so must
be set for new .blend files. Existing .blend files are not affected by
this change.

Error message altered to reflect the option of having this Parts Library
live anywhere.

New Feature: Add Trig Waves Functions

Requires the user to select an existing object in the Trig menu.
2020-05-12 00:25:54 +02:00
1bd7fdc6ac PDT: Update version info 2020-03-28 18:59:12 +01:00
487be08699 PDT: Move tangent module to PDT subdirectory 2020-03-28 18:56:32 +01:00
c06f76b012 PDT: Revise Docstrings
Made functions more understandable by improving DocStrings
2020-03-28 18:56:27 +01:00
ee577f162d PDT: Allow User to Move Empties (enhancement)
This enhancement allows users to move Empties, so they can be used as a parent
object for other objects. Allows movement by Delta, Direction and Absolute.
2020-03-28 18:56:16 +01:00
4f3a6cafc0 PDT: Revise Tangent Functions
This commit is still WIP.

Added Enumerator for Tangent Types, refactored code, revised DocStrings.

This section of PDT still requires extensive testing, currently underway, but not complete.
2020-03-28 18:55:55 +01:00
f58fe4df0d PDT: Further Expansion of Tangent System
This is still WIP.

Further expand options to work in any plane and from selected vertices.
DocStrings Added. Code refactored.

Further testing is still required before this can be released for general use.
2020-03-28 18:55:43 +01:00
1d5837400d PDT: Add user-requested Tangent Functions (new feature)
This Branch is WIP, still in development and not yet suitable for a release.

This process will add the ability to draw tangents from a point to an arc, or circle.
It will also add the ability to draw tangents, both inner and outer, between two arcs.
Arc centres and radii can be manually input into the UI, or set from three vertices that
lie on an imaginary arc. Tangent functions have their own PDT Sub-menu.

This commit only works in Front view, to get the maths right, later commits will expand
this into any view orientation, using existing PDT code.

This commit does not contain DocStrings for the new pdt_tangent.py file, these will
also follow in a later commit.

It is recommended that this commit is not used in a production environment. Once
complete, a new version Branch will be added, at this point the code will reach Alpha
status and be appropriate for extensive user testing.
2020-03-28 18:55:24 +01:00
9d8aeccfe3 PDT: Add Local View Options (enhancement)
Add local view orientation options to Delta & Direction options for all functions.
2020-03-28 18:55:14 +01:00
4015cd1425 PDT: Placing new vertex by Absolute (fix)
Minor error, there is no need to check for vertex type if adding a new vertex
by absolute coordinates.
2020-03-28 18:55:04 +01:00
bb977fbc72 Update 'bl_info' use 'doc_url' instead of 'wiki_url' 2020-03-05 12:14:43 +11:00
d0f9f5a507 PDT: Trivial fixes to PDT Command Help
Modified help information in PDT Command when user enters ?, or "help".
Added Wiki URL and some minor changes.
2020-02-05 21:53:22 +01:00
90b46441d5 PDT: Various improvements to help avoid user error
In certain circumstances, where the user has unwisely set inappropriate inputs,
modes of operation, or other settings, some errors were not trapped. This fixes those
making the system more "User Proof". A new exception was added if the user works
in an inappropriate feature setting, like Face mode when Vertex mode is required.
2020-02-05 13:42:04 +01:00
b652724b15 PDT: Fix Library Error when not in Object Mode
Attempts to Append, or Link Objects, Collections, or Materials when not in Object
mode resulted in a system error. This is now trapped as an Add-on error and
reported to the User.
2020-02-05 12:28:12 +01:00
f4f651c1e9 PDT: Fix Small Error in Absolute based Functions
This fixes a small obscure error in Absolute mode whereby Bmesh was not
always found if Absolute mode was used.

This became apparent if no object was selected and an attempt was made
to add a new vertex, or extrude vertices.

Other checks did not trap for this error. These traps were originally
stored in the individual functions, now all traps are  moved to the
command parse function.
2020-02-04 22:21:09 +01:00
ae250bd102 PDT: Fix Small Error in New Vertex Absolute
Fixed a small error in New Vertex placed at Absolute Coordinates.
This error was very hard to detect and only occurs in very odd circumstances
It no longer occurs, a similar error might have also occurred with Extrude Vertices
to Absolute location, this fix also prevents that.
2020-02-04 22:20:51 +01:00
2155cafcab PDT: Update version to v1.2.1 2020-02-04 14:29:26 +01:00
1a6900ade7 PDT: Docstring fixes and a small bug fix
All Docstrings have been examined for typos and format, etc.

Small code change to set Selection Mode to "SEL" if operation is not
"C" or "P" to avoid possible errors when using other operations.
2020-02-04 14:25:53 +01:00
6837f76f35 PDT: Fix Cursor Placement with new empty file 2020-02-04 02:13:28 +01:00
d4c1e6cdc1 PDT: Move stray files from add-on root folder
The error likely came about because we first commit files to @clockmender's
upstream github repo and then use git format-patch to create patches which
are then applied to the blender add-on repo with:

`git-am -3 --rerere-autoupdate foo.patch`.

Here, the issue seems to be that we've renamed files in the upstream github
repo, but that I then failed to first create and commit empty files with
the same name in the precision_drawing_tools/ repo, which meant that git
did the best it could and added them to the root of the blender add-ons
repo since the files didn't exist in the add-on repo index when they were
added.
2020-02-03 11:33:42 +01:00
730eb38bcd PDT: Final Check Commit of v1.2.0 for Blender-2.82
This concludes the refactor of the functions and operations in v1.1.8.

Overall, no significant new features were added, but several inaccuracies
and corner cases were fixed during the refactor and docstring review.
2020-02-01 16:44:11 +01:00
83ad65d377 PDT: Update Docstrings per Design Spec Document 2020-02-01 16:44:06 +01:00
0e4dd304d6 PDT: Rename more variables for readability 2020-02-01 16:44:02 +01:00
ff37747efc PDT: Update Pivot Point on Move (bugfix)
Make sure Pivot Point is updated when moved.
2020-02-01 16:43:25 +01:00
88b2feac55 PDT: Add undo option to Operators 2020-02-01 16:42:39 +01:00
877308f917 PDT: Refactor per Pylint suggestions + readability
- Remove unused imports
- Add comments where appropriate
- Improve readability of variable names
- Re-implement a couple of functions using dictionaries instead of if-statements
- Results of Pylint & Black operations, plus some fixes to code.
2020-02-01 16:42:29 +01:00
7805692b57 PDT: Fix Command Maths Exit
Maths Operations did not exit on completion, resulting in possible selection errors.
2020-02-01 16:42:16 +01:00
7597a8b66d Add System Input Rounding
Applies system rounding to inputs as defined in Add-on Preferences.

Default is 5 places of decimal, values taken from UI, or by calculation are
rounded before command is submitted.
2020-02-01 16:42:03 +01:00
4d0298a3f9 PDT: Refactor - Stage 4
- Check Object Mode is either EDIT or OBJECT as appropriate.
- Change If loop to check command values - error if D, E, For M commands.
- Remove surplus command check in command_maths function.
- Added import of exceptions file.
- Check for Mesh Objects in Object or Edit Mode first and exit with error
  message if not.
- Some minor changes for obscure failures in unusual circumstances.
- Fixes and changes to code to correct minor errors and remove unnecessary
  checks.
- Refactored Command File structure.
- Add more checks to Fillet Operation to check selection and make sure
  current selected vertices/edges are always used. Previous version could
  use wrong selection if Bmesh SelectHistory was in place for Faces, or Edges.
2020-02-01 16:41:11 +01:00
0e62a38218 PDT: Refactor - Stage 3 (Pylint & Black runs)
Most of the recommendations from pylint are now done, I have not changed variables
like v in expression [v for v in... as I consider these to be normal coding practice.

Rename pdt_com_functions.py to pdt_command_functions.py

Fix error in Intersect operation if selected vertices resulted in more than
2 edges being selected. Priority is given to two edges as a selection, then to
4 vertices, if the four vertices represent two edges, the intersection point is
at the intersection of the two edges, which might not be the four vertices, if
one of the vertices forms part of two edges that are also selected.

Priority is 2 edges, then 4 vertices selected individually with the mouse.
2020-02-01 16:40:43 +01:00
fccd99b832 PDT: Refactor codebase (stage 1 + 2)
Moved all PDT Design Operations and Tools to Command Line file to de-dupe
code. All can now be called from the command line, e.g. a command of "otc" sets
the active objects Origin To Cursor, etc. Needs extensive further testing to see if all
Operations in all Modes still work exactly as before.
Tools menu split out from PDT Design so it can be minimised when not in use.
2020-02-01 16:40:29 +01:00
7ae27d2b01 PDT: Fix bug in Command Line: New Vertex
Commands like ni20,45 did not work because there were 2 mode == "d" clauses.

Replace one mode == "d" clause with a mode == "i" clause.
2020-01-14 22:32:04 +01:00
2eb5ee12ce PDT: Fix Command Line selection-related bug
Fix bug where if selection was not made by cursor select, an error occurs in
placing cursor, pivot point, adding edges by percentage, etc.
2020-01-14 22:31:09 +01:00
1f39f4234a PDT: Ensure Reset View resets distance correctly 2020-01-14 22:30:11 +01:00
71c8fa1712 PDT: Strip spaces from Command Line input
Also ignores blank commands rather than showing an error message.
2020-01-14 22:29:45 +01:00
9055e26842 PDT: Set Isometric View to Orthographic always 2020-01-14 22:28:24 +01:00
da32625bea PDT: Make Copy Of Pre-Appended Objects
Fix error whereby some appended objects through PDT Library did not get moved to
cursor location.
2020-01-14 22:27:21 +01:00
20598a3ac6 PDT: Re-Arrange Menus to UI Panel Width
The menus now are re-arranged according to the width of the UI.
A cut-off value is set in the Add-on Preferences.

Remove vestiges of automatic UI highlighting experiment.
2020-01-14 22:26:56 +01:00
2af992e518 PDT: Rename various variables for readability 2020-01-14 22:26:04 +01:00
f5e5993595 PDT: Update bl_info version 2020-01-14 22:25:45 +01:00
0d40bb678c PDT: Modify Fillet functionality
This enables two non-connected edges to be filleted. The Process starts with an
intersection of the two edges, then fillets the corner according to input values
in the UI. This option is selected by setting the Int/Fillet checkbox.

The command Line version now takes the `fi...` format to intersect first. e.g.

`fi1.1,6,0.05` performs an intersected fillet of 1.6 units radius, 6 segments,
concave profile.
2020-01-14 22:25:04 +01:00
4795316548 PDT: Add features to Command Line
Add "Re-Run" button to repeat last command line input.
Add "Maths Output" to take result of calculation when the `mo` command is used.
Allow commas in maths operation so calls like `hypot(3,4)` can be used.
2020-01-14 22:24:07 +01:00
39b2f0c3c8 PDT: Fix Pivot Point graphics, revise PDT Design UI
Pivot Point Graphics Fix:

Prior to this commit, Pivot Point Graphics showed at inconsistent sizes in
rotated and orthographic views.
This commit now checks the status of the view and scales the graphics
accordingly.

PDT Design UI panel changes:

Attempt to group related input fields and buttons via boxes.  Feedback
most welcome.
2019-12-27 15:51:56 +01:00
0c2d39adf6 PDT: Minor fixes to Intersect and Delta Move
Intersect Fix:

Changed priorities to give more weight to selection by Vertex than selection
by Edge. Selection by Edge without All/Active will now cause an error if first
vertex of edge is not closest to intersection. This can be overridden by either
setting All/Active, or by working in Vertex mode and ensuring vertex to be
extended is closest to the intersection, when doing both closest vertices is
not required.

Delta Move Fix:

Fixed minor error in Move by Delta operation, when in Object Mode,
Objects were both moved to same location.
2019-12-27 15:49:31 +01:00
a689eabdf5 PDT: Add Reset View functionality
- In orthographic mode, will recenter the view and its distance.
- In non-orthographic mode, will reset to the Blender default view.
- Is hooked up to a button in the PDT View Control UI Panel.
2019-12-15 00:01:32 +01:00
6551aa3ecb PDT: Fix bug in pivot_point.py
PropertyGroup variable wasn't properly instantiated, resulting in an
exception due to a missing PointerProperty.
2019-12-13 08:09:10 +01:00
e7594d45b1 Add Clockmender's Precision Drawing Tools v1.1.5
Accepted for inclusion per T70238
2019-12-09 00:52:27 +01:00