Commit Graph

27 Commits

Author SHA1 Message Date
vocx-fc
623cd5df35 Draft: activate new array make functions
They are made available in the `Draft` namespace,
and are also used in the unit tests, the test script,
and the GuiCommands.
2020-05-18 12:42:10 +02:00
vocx-fc
79927f3504 Draft: restructure the draft test script
Add new function `_create_objects`.

Change annotations to use `App::Annotation` instead of `Draft Text`.
2020-05-18 12:41:24 +02:00
vocx-fc
604de5c5b2 Draft: update snake_case for unit tests
Also fix the name of certain functions.

Do not import `DraftFillet` any more as it's just kept
for compatibility purposes.

Do not test OCA nor AirfoilDAT as it's very improbable
that these formats will gain more support any time soon.
2020-05-15 14:44:48 +02:00
vocx-fc
45bc9233c7 Draft: use snake case functions in draft_test_objects script 2020-05-15 14:44:48 +02:00
vocx-fc
da8380a8c8 Draft: small additions to the draft_test_object script
Move the docstring, set the frame as a private function,
and set `MakeFace` to `False`.

Use user's home directory to create the file. Move the order of
the parameters of the function.
2020-05-15 14:44:48 +02:00
vocx-fc
7ff41b51a9 Draft: remove old DraftFillet class, and make it a redirect
Remove the make function that creates the old object,
its corresponding Gui Command, and the old `DraftFillet.Fillet`
proxy class, which now is a redirection to the new `Fillet`
class defined in `draftobjects.fillet`.

Also change the unit test, and the `draft_test_object` script
to run `Draft.make_fillet`.
2020-05-13 11:37:56 +02:00
vocx-fc
d3d52c57b4 Draft: move arc_3points to the make package
Also import it in the `Draft` namespace so that is available
as `Draft.make_arc_3points`.

Use this new function in the unit test `drafttests.test_creation`,
in the GuiCommand `draftguitools.gui_arcs`, and in the
`draft_test_objects` script.
2020-05-12 10:00:41 +02:00
vocx-fc
2e11a3f788 Draft: update description of drafttests package 2020-05-06 12:46:24 +02:00
vocx-fc
65acf43391 Draft: circulararray, clean up imports, docstrings, and checks 2020-04-08 11:08:29 +02:00
vocx-fc
d40bf0d5e8 Draft: moved some unit tests to TestDraftGui
Those unit tests that are registered in `Init.py` will always run,
while those that are registerd in `InitGui.py` will only run
when the graphical interface is available.

This allows us to more clearly distinguish functions that
should be able to run always, from those that may run only
when the interfce is available.
2020-04-08 11:07:51 +02:00
vocx-fc
b74841a5b1 Draft: Coin (Pivy) tests only when the graphical interface is up 2020-04-08 11:07:51 +02:00
vocx-fc
855dc4c989 Draft: docstrings for the submodules 2020-04-07 18:12:06 +02:00
vocx-fc
3f726f662f Draft: update unit test for gui_edit 2020-04-06 12:51:55 +02:00
vocx-fc
7ec5d58d0b Draft: update unit test for gui_selectplane 2020-03-31 12:00:38 +02:00
vocx-fc
d38390db1e Draft: update unit test for new gui_trackers module 2020-03-23 12:14:33 +01:00
vocx-fc
6a92cb968d Draft: update unit test for gui_snapper 2020-03-20 08:11:04 -03:00
vocx-fc
e836811e3c Draft: improve the README files with links 2020-03-19 12:11:16 -03:00
vocx-fc
33092ce82c Draft: recompute before using radial dimension in the unit test
This solves a small bug in the radial dimension
unit test introduced in 7917b82c09, 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
vocx-fc
7a622e7021 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
07a0bdcabe Draft: implement unit test for radial dimension 2020-03-12 09:06:11 -03:00
vocx-fc
8c08fb27fb Draft: cleanup of unit tests code 2020-03-12 09:06:11 -03:00
vocx-fc
9c6162f88c Draft: unit test for arc by 3 points 2020-03-12 09:06:11 -03:00
vocx-fc
85bce262b4 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
luz.paz
ebe194a9e9 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
vocx-fc
60d81151d7 Draft: test_offset, test wire and closed shape (rectangle) 2020-01-10 10:09:22 +01:00
luz.paz
8cfa85cf18 Draft: [skip ci] Fix header uniformity
This PR fixes header uniformity across all Draft files
2019-12-27 00:16:12 +01:00
vocx-fc
2a4fb552ec Draft: move the TestDraft unit tests to separate modules
This results in better organization of the tests,
avoiding extremely big files.
2019-12-17 15:06:36 -03:00