Commit Graph

33 Commits

Author SHA1 Message Date
vocx-fc
3c2b47e458 Draft: replace FreeCAD with App for consistency 2020-09-09 12:53:54 +02:00
vocx-fc
29a52d0dbc Draft: move getSVG to draftfunctions submodule
Small fixes where the `get_svg` function is used, for example,
in the (obsolete) `DrawingView` class and `Arch_SectionPlane`.

Also update the unit tests accordingly.
2020-09-09 12:53:54 +02:00
Roy-043
48e0b570fc Draft: Fix wire placement issue if Copy=False. 2020-09-08 16:16:16 +02:00
vocx-fc
1d48e9fb47 Draft: add modules of draftfunctions to the proper Doxygen group
This includes `array`, `cut`, `downgrade`, `draftiffy`, `extrude`,
`fuse`, `heal`, `join`, `mirror`, `move`, `offset`, `rotate`,
`scale`, `split` and `upgrade`.

These are added to the `draftfunction` 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
vocx-fc
1c65c7dc92 Draft: add Doxygen strings to the packages' __init__ files
The packages are `draftfunctions`, `draftgeoutils`, `draftguitools`,
`draftmake`, `draftobjects`, `drafttaskpanels`, `drafttests`,
`draftutils`, `draftviewproviders`.
2020-07-17 13:01:45 +02:00
vocx-fc
314637e945 Draft: move grouping functions to draftutils.groups module
These functions were previously in `draftutils.utils`,
and are related to grouping objects and finding objects
inside groups. These include `get_group_names`, `ungroup`,
`get_windows`, `get_group_contents`, `get_movable_children`.
These are imported in the main `Draft.py` module, so compatibility
is retained.

Modules which use these functions are updated; these include
Gui Commands like `Move`, `Rotate`, `Scale`, `AddToGroup`,
as well as objects like `DrawingView` and `Shape2DView`,
and `ViewProviderClone`.
The code inside the `importDXF` module is also updated.

The Arch Workbench uses many of these functions
but it does so from the `Draft` namespace, so these edits
don't change the situation for these commands.
2020-07-13 14:35:38 +02:00
carlopav
e30cf42176 Draft: Draft.move() support new objects (fix #3754)
and small refactor consequent to the introduction of App.ActiveDocument.copyObject support in Draft.makeCopy()
2020-07-07 10:12:49 +02:00
carlopav
7e72d0778d Draft: support for Document.copyObject() API
Now Draft can copy every FreeCAD object that have a shape.
2020-07-07 10:12:49 +02:00
vocx-fc
0f5b61e280 Draft: check GUI in upgrade function before using viewprovider
Also make various improvements in style, PEP8, return value
is now a tuple of lists instead of a list of lists.

Delay the import of other modules like `Part` and `DraftGeomUtils`
using the `LazyLoader` class.

Update the Gui Command as well.
2020-05-18 12:17:59 +02:00
vocx-fc
bb4a7d783c Draft: check GUI in downgrade before using viewprovider
Also make various improvements in style, PEP8, return value
is now a tuple of lists instead of a list of lists.

Update the Gui Command as well.
2020-05-18 12:17:59 +02:00
vocx-fc
cb984ec492 Draft: check GUI before touching the ViewObject in cut 2020-05-18 12:17:59 +02:00
carlopav
0e9d274bf4 Draft: various cleanup
Mainly added an empty line at the end of each file and changed docstrings.
2020-05-15 14:43:26 +02:00
carlopav
d124bfce4a Draft: split array function from Draft.py 2020-05-15 14:43:26 +02:00
carlopav
85de732567 Draft: updated ocumentation of Draft Scale function 2020-05-15 14:43:26 +02:00
carlopav
920512692b Draft: split sub_object_move from Draft.py 2020-05-15 14:43:26 +02:00
carlopav
10efbcb207 Draft: split sub_object_move from Draft.py 2020-05-15 14:43:26 +02:00
vocx-fc
08285a85ec Draft: import the missing Gui module in the mirror function
Otherwise the function will not work in a terminal only session
without the graphical user interface (GUI).

Also small changes for style, documentation,
and removing unused modules.
2020-05-06 12:48:02 +02:00
vocx-fc
909452dc9c Draft: add description of draftfunctions package
These modules provide supporting functions for dealing
with the scripted objects and Gui Commands defined
within the workbench.

If the functions do very basic tasks or are too generic,
they are more appropriate inside the `draftutils` package.

These function are imported in the main `Draft.py` module
so they form part of the public programming interface (API)
of the workbench.

Remove trailing spaces in CMakeLists.txt.
2020-05-06 12:46:24 +02:00
carlopav
f27f038da4 Draft: split extrude from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
40e8eb7b84 Draft: split downgrade from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
f0136fd27d Draft: split cut from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
08448d198e Draft: split upgrade from Draft.py
.
2020-05-04 10:51:08 +02:00
carlopav
c9ce87b5fb Draft: split draftify from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
c567ce10a1 Draft: split fuse from Draft.py
.
2020-05-04 10:51:08 +02:00
carlopav
3c6bc25667 Draft: split heal from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
2d6b7479f0 Draft: split mirror from Draft.py
.
2020-05-04 10:51:08 +02:00
carlopav
9eb59414c1 Draft: split offset from Draft.py
.
2020-05-04 10:51:08 +02:00
carlopav
ff1d0587ff Draft split Split from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
af31394e21 Draft: split scale related functions from Draft.py
.
2020-05-04 10:51:08 +02:00
carlopav
964d8a9851 Draft: split join functions from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
e94be2e542 Draft: split rotate from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
66031c8dbe Draft: split Move from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
0f3e0b0d0d Draft: parent classes of all Draft objects
Add DraftObject and ViewProviderDraft to serve as
the parent classes of all Draft objects
and all Draft view providers.

Inside `Draft.py` we need to import
`_DraftObject` from `draftobjects.base`;
and `_ViewProviderDraft`, `_ViewProviderDraftAlt`,
and `_ViewProviderDraftPart` from `draftviewproviders.view_base`.
.


.


.


.
2020-04-29 11:41:02 +02:00