The name of the argument, `projection`, in the old function
is incorrect; it should be `direction`, which was the original
argument's name when this method was split into its own module
(6c00fcf).
If it's not a circle nor ellipse nor straight line
convert the curve to BSpline. Move into a subfunction.
Improve a few varible names to be more verbose, like `vertex`
and `edge`.
The angle between the curve and plane is tested for being coplanar,
0 or 180 degrees. The negative test is done earlier so that the
return is done earlier, and the rest of the code is not indented.
For the try-except blocks we should trap a specific `Exception`,
not just any type. It seems string handling was an issue
with Python 2, so the string needed UTF8 decoding.
When the software no longer supports Python 2, these
blocks can be removed.
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.
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.
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.
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.
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.
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.
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`.
.
.
.
.