Commit Graph

14 Commits

Author SHA1 Message Date
Roy-043
cf3ff11555 Draft: fix Dim Auto Flip Tex angle checks
When checking angles Dim Auto Flip Text did not consider that angles can be almost -180 degrees and should then be treated the same as 180 degree angles.
2025-03-30 14:01:10 +02:00
Roy-043
acda4a6a74 Draft: Implement Dim Auto Flip Text
Fixes #19993.

* To determine the `FlipText` value the normal (either the working plane Z axis or its reverse) and the working plane X axis are used.
* A new fine-tuning parameter `DimAutoFlipText` can be used to disable the functionality. Its default value is `True`.
* The `FlipText` property did not work for angular dimensions and the `TextSpacing` property of angular dimensions was not multiplied by `ScaleMultiplier`. This has been corrected.
2025-03-08 15:30:31 +01:00
Roy-043
5d04562e0e Draft: Fix messages that only worked for objects supplied as strings
Some error messages would only work if objects were supplied as strings. These would fail if objects were passed (as objects) that had already been deleted.
2024-02-03 19:38:49 +01:00
Kevin Martin
2b9fa18b68 Eliminate many "doing what you told me to" messages
These messages were perhaps originally intended as a debuggin aid but now add clutter to the output panes. Remaining messges are mostly the result of methods to display attributes of an object (which one could call from the Python console) or actually provide some information which would not be obvious from the circumstances
2024-02-02 08:58:45 -05:00
Roy-043
2aaaa8ebae Fix error in make_dimension.py 2023-10-23 20:24:30 +02:00
Roy-043
d065f13f67 Draft: Updates related to the PlaneGui class (step 2)
Related issue:
#5603.

Additionally:
Fixed the issue where the texts of Arch_Space objects were not exported to DXF.
2023-10-23 16:25:12 +02:00
luzpaz
5f07b4999d Draft: fix typos 2023-02-15 13:13:29 +00:00
Chris Hennes
34a7fc95d8 [Draft] Eliminate default value modification 2021-10-11 21:28:55 -05:00
Yorik van Havre
abee35f38a Draft: Fixed broken translations everywhere 2021-02-12 14:44:58 +01:00
vocx-fc
a82d6b9801 Draft: add modules of draftmake to the proper Doxygen group
This includes `make_arc_3points`, `make_array`, `make_bezcurve`,
`make_block`, `make_bspline`, `make_circle`, `make_circulararray`,
`make_clone`, `make_copy`, `make_dimension`, `make_drawingview`,
`make_ellipse`, `make_facebinder`, `make_fillet`, `make_label`,
`make_line`, `make_orthoarray`, `make_patharray`, `make_point`,
`make_pointarray`, `make_polararray`, `make_polygon`,
`make_rectangle`, `make_shape2dview`, `make_shapestring`,
`make_sketch`, `make_text`, `make_wire`, `make_wpproxy`.

These are added to the `draftmake` Doxygen group
so that the functions contained in each module are listed
appropriately in the automatically generated documentation.
2020-07-17 13:01:45 +02:00
luz.paz
ef37cc3930 Fix typos [skip-ci]
Found via codespell v1.18.0.dev0  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-06-29 20:52:23 +02:00
vocx-fc
a531cc2c98 Draft: new make_radial_dimension function for more precision
A single `make_dimension` handles three types of dimensions,
(1) simple linear, (2) linear linked to an object, and (3) linked
to a circular edge.

So, we provide a new function, `make_radial_dimension_obj`,
to handle the third case. In this way we can check the input
parameters much better.

We adjust the `Draft_Dimension` Gui Command accordingly.
2020-06-17 12:53:29 +02:00
vocx-fc
2cb2b10d8f Draft: new make_linear_dimension functions for more precision
A single `make_dimension` handles three types of dimensions,
(1) simple linear, (2) linear linked to an object, and (3) linked
to a circular edge.

So, we provide two new functions, `make_linear_dimension`
and `make_linear_dimension_obj`, to handle the first two cases.
In this way we can check the input parameters much better.

We adjust the `Draft_Dimension` Gui Command accordingly.
2020-06-17 12:53:29 +02:00
vocx-fc
93f1e87bc0 Draft: move make_dimension function to its own module
Previously the `make_dimension` and `make_angular_dimension`
functions were in `draftobjects/dimension.py`.
Now they are moved to `draftmake/make_dimension.py`.

The original `makeAngularDimension` function requires angles
in radians which is counterintuitive for most cases. Also
the order is `[big, small]`.

The new function `make_angular_dimension` accepts angles
in degrees, and the order is `[small, big]`. The older
function is retained for compatibility purposes.

Also perform several improvements such as PEP8 cleanup,
writing complete docstrings, type checking the input arguments,
and depreacting the older call.

The `Draft.py` module, Gui Command, unit test, and test script
are updated accordingly.
2020-06-17 12:53:29 +02:00