Commit Graph

1842 Commits

Author SHA1 Message Date
luz.paz
76a77e4f88 [skip ci] Fix typos
Found via 
```
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-03-24 11:14:24 +01:00
vocx-fc
a150b3048d Draft: use functions from the utils module, not DraftGui
These functions were moved from DraftGui to individual
modules precisely to make them easy to import.
Otherwise we have to import the entire DraftGui module
which creates dependency problems when we want to use
some functions without the graphical interface.
2020-03-23 12:14:58 +01:00
vocx-fc
791f799626 Draft: update unit test for new gui_trackers module 2020-03-23 12:14:33 +01:00
vocx-fc
439d021dd7 Draft: Snapper class with new gui_trackers module
Also change the imports in `DraftFillet.py`
and `DraftEdit.py` so the trackers are found.
2020-03-23 12:14:33 +01:00
vocx-fc
b38dcd9ff6 Draft: move DraftTrackers to another module.
Properly import the tracker classes. Avoid star imports,
and use the classes prefixed with the name of the module.
The BIM Workbench also has to be updated to use the new
module.
```
import draftguitools.gui_trackers as DraftTrackers
```
2020-03-23 12:14:33 +01:00
vocx-fc
69af481235 Draft: update unit test for gui_snapper 2020-03-20 08:11:04 -03:00
vocx-fc
699624fd26 Draft: move DraftSnap to another module
And do not load the `Snapper` in `DraftGui`.
The Snapper should be initialized by the module
that imports `DraftGui`, most probably `DraftTools`
or even by the `InitGui` of the workbench.
2020-03-20 08:11:04 -03:00
vocx-fc
d80ee4a820 Draft: properly import the Snapper class
Avoid star imports, and prepend the module name,
`DraftSnap.Snapper()`.
2020-03-20 08:11:04 -03:00
vocx-fc
f1a3e14226 Draft: move snap commands to an individual module
This way we remove lines from `DraftTools.py`
and we can more easily identify where the snapping
commands are defined.
2020-03-20 08:11:04 -03:00
UR-0
bb1c5cde7f DRAFT: import DXF version R12 minimalistic file with legacy importer 2020-03-19 12:21:39 -03:00
vocx-fc
c629bf2fad Draft, Arch: coding conventions for the workbench 2020-03-19 12:20:03 -03:00
vocx-fc
9eeceb4f28 Draft: improve the README files with links 2020-03-19 12:11:16 -03:00
vocx-fc
054ce9a540 Draft: recompute before using radial dimension in the unit test
This solves a small bug in the radial dimension
unit test introduced in 81c2896928, where a circle shape
is used before it is recomputed.

```
drafttests/test_creation.DraftCreation.test_dimension_radial
```
2020-03-19 12:10:56 -03:00
triplus
c676a817b8 Draft - enable toggle grid command in edit mode
Some people would like to have more control over draft grid visibility  while in Sketcher edit mode.  Hence this PR enables the usage of Draft ToggleGrid  command in Sketcher edit mode.

Forum discussion:
https://forum.freecadweb.org/viewtopic.php?f=34&t=43265&start=20#p374747
2020-03-12 09:26:48 -03:00
vocx-fc
e41915e638 Draft: add new viewprovider icon for radius dimension
If it is a linear dimension show the older icon;
if it is a radius or diameter dimension show a new icon.

These three modes use the same Proxy class
and the same viewprovider class. Depending on the linked geometry
one icon or the other will be shown.
2020-03-12 09:12:11 -03:00
vocx-fc
3e3ed47367 Draft: add new viewprovider icons for specific objects
When there are many Draft objects in the tree view
the icon can be used to tell different objects apart quickly.
One icon is used for objects that are "straight lines",
whose Proxy is of type `Line`, `Wire` or `Polyline`; another icon
for "regular geometrical" shapes of type `Rectangle` or `Polygon`;
and another icon for "curved" objects of type `Circle`,
`Ellipse`, `BSpline`, `BezCurve`, or `Fillet`.

Other objects use the older default icon.
2020-03-12 09:12:11 -03:00
carlopav
8fd55eb6ff [Draft] Remove AddPoint and DelPoint commands from UI
[Draft] Edit: Remove Bezcurve interface from Edit Ui


[Draft] Edit: cleanup


small improvement to tooltip
2020-03-12 09:11:34 -03:00
carlopav
e79c1e6c99 [Draft] Uniform length and xyz inputfield behaviour
Single returnPressed to accept point if cursor is parallel to xyz axis for bot setfocus on x and on length inputfields.
[Draft] Edit_updated tooltip


[Draft] DraftGui Further cleanup and bugfix
2020-03-12 09:11:34 -03:00
carlopav
f5f43913e0 [Draft] DraftGui and DraftEdit Cleanup to remove AddPoint & DelPoint
Lines to be deleted in DraftGui in the future, are now commented.
2020-03-12 09:11:34 -03:00
carlopav
6182aea46b [Draft] DraftGui Bugfix on selecting inputfields
https://forum.freecadweb.org/viewtopic.php?f=23&t=43145&p=367517#p367517
2020-03-12 09:11:34 -03:00
vocx-fc
215c29caf1 Draft: implement unit test for angular dimension
Previously the `makeAngularDimension` function produced
error messages in the report view due to internal rounding
of `App::PropertyAngles`.
This was fixed in `Base::Quantity`, which now supports
Python's `__round__` function.
2020-03-12 09:06:11 -03:00
vocx-fc
81c2896928 Draft: implement unit test for radial dimension 2020-03-12 09:06:11 -03:00
vocx-fc
422d5f9d1f Draft: cleanup of unit tests code 2020-03-12 09:06:11 -03:00
vocx-fc
efd5367d94 Draft: unit test for arc by 3 points 2020-03-12 09:06:11 -03:00
vocx-fc
fb4a992ce0 Draft: add script to produce a test file as example
The test script can be run by the program's executable
or run as a macro.
```
freecad draft_test_objects.py
```

It can also be used as a Python module within the program
to create a test file on demand.
```
import drafttests.draft_test_objects as dt
dt.create_test_file()
```

The produced test file will be added in a different commit
once this commit is merged.
The idea is to have a test file created by a certain
stable version of the master branch. Then as the code
continues to change and grow, this file can be opened
with future versions of the program to test for compatibility
and regressions.
2020-03-12 09:06:11 -03:00
Syres916
11a13d6843 [Draft] Orthoarray Task Panel Fix Z interval 2020-03-06 18:05:14 -03:00
luz.paz
b3e42d103d [skip ci] fix follow-up typos 2020-03-06 14:50:35 +01:00
luz.paz
180805c55e Fix typos
Found via  
```
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-03-06 14:50:35 +01:00
Yorik van Havre
0c1289282b Merged latest translations from crowdin 2020-03-05 11:58:03 -03:00
vocx-fc
13fd3470f7 Draft: Draft_Arc_3Points using the new arc function
Instead of creating the arc directly in the GuiCommand
it calls the new `make_arc_3point` function.
2020-03-05 09:03:02 -03:00
vocx-fc
a8712edb54 Draft: arc by 3 points function
Previously, the arc was entirely created in the GuiCommand
definition. The code to create only the arc is placed inside
a module so that the function can be used in scripting
from the terminal, without a graphical interface.
2020-03-05 09:03:02 -03:00
vocx-fc
b38ba6e11d Draft: lowercase use_link option for arrays
Inside the class `_DraftLink` the `onDocumentRestored` function
tests for the existence of the old attribute `useLink`. If it is
present, it uses it to define the new variable name `use_link`.
This is done use Python naming conventions.
The old `useLink` is deleted so it is not longer saved
together with the object when the document is saved.
2020-03-04 09:58:56 -03:00
carlopav
432ae7c797 [Draft] Edit bugfix: closed wire check for point lying in the face plane
https://forum.freecadweb.org/viewtopic.php?f=23&t=43414&p=372524#p372524
2020-03-03 21:27:31 +01:00
vocx-fc
b1a71f4a53 Draft: new Draft_OrthoArray command
It replaces the older `Draft_Array` command, and provides
a task panel to select the properties, similar to the
`Draft_PolarArray` and `Draft_CircularArray` commands.

It can also create `App::Links` directly from this task
panel, so it also replaces the `Draft_LinkArray`
introduced by the LinkMerge.
2020-03-03 21:27:31 +01:00
Syres916
b73cc1ac30 [Draft] Change boolean If statement 2020-03-02 12:08:53 -03:00
Syres916
edc7e3ed8c [Draft] WireToBSpline Fix makeWire Placement
See discussion https://forum.freecadweb.org/viewtopic.php?f=23&t=43184
2020-03-02 12:08:53 -03:00
Syres916
f043f465c2 [Draft] WireToBSpline Fix Placement of makeWire
See Discussion https://forum.freecadweb.org/viewtopic.php?f=23&t=43184
2020-03-02 12:08:53 -03:00
vocx-fc
25a2837bbe Draft: upgrade patterns to PlainSVG and 96dpi 2020-03-02 11:50:49 -03:00
vocx-fc
08471b59b4 Draft: ugrade icons to PlainSVG and 96dpi 2020-03-02 11:50:49 -03:00
vocx-fc
b8f459db3e Draft: translate functions with the context set to Draft 2020-03-02 11:45:27 -03:00
vocx-fc
9dc24a9d4d Draft, Arch: group the array tools 2020-03-02 11:41:22 -03:00
vocx-fc
a76bc63e4d Draft: angle dimension icon saved as plain SVG
As discussed in the previous request, the icon
is saved as Plain SVG, meaning that Inkscape-specific tags
are removed. This is better for compatibility purposes
for use with other SVG editors and viewers.
2020-02-15 19:33:23 +01:00
vocx-fc
802ca4e0cb Draft: new view provider icon for the angle dimension
The linear and radial dimensions use the same Proxy class,
but the angular dimension uses a different Proxy class.
To recognize quickly in the tree view the different
types of dimensions, we provide a new icon.

The icon is inspired on the `Draft_Dimension.svg` and
`TechDraw_AngleDimensions.svg` icons.
2020-02-15 13:07:38 +01:00
paullee0
97c40204a4 [ArchWall, DraftGeomUtils] fix bug: ArchWall with Offset Attribute set and based on Sketch fails at some cases
DraftGeomUtils.offsetWire() supports ArchWall Offset setting inherently now.

Discussion:
https://forum.freecadweb.org/viewtopic.php?f=23&t=42933
2020-02-10 11:19:47 +01:00
carlopav
136c7c32de [Draft] Move and rotate bugfix to handle App::DocumentGroup
Bugfix, ref https://forum.freecadweb.org/viewtopic.php?f=23&t=43061
2020-02-10 11:16:34 +01:00
vocx-fc
3ed0df5a54 Draft: override text in dimension only when GUI is up 2020-02-10 11:14:01 +01:00
vocx-fc
814c97b70d Draft: standardized module to build messages 2020-02-10 11:12:45 +01:00
vocx-fc
a80ba25896 Draft: disable the excessive output in the ToDo class 2020-02-10 11:09:10 +01:00
vocx-fc
01df7c0a63 Draft: added init_tools to create the toolbars 2020-02-10 11:02:28 +01:00
vocx-fc
0cb62a9e4f Draft: explicitly import modules in the initialization
Also other small fixes: cleanup for getting the icon
of the workbench; we don't need to test for PySide because
it should already exist as part of the system
for the entire interface to work; cleanup of the printing
functions.
2020-02-10 11:02:28 +01:00