Commit Graph

57 Commits

Author SHA1 Message Date
marioalexis
60dfd2552b Draft: Replace Part.getSortedClusters by Part.sortEdges in draftify function 2020-12-29 23:21:33 -03:00
Yorik van Havre
e672aa26b4 Draft: Small layer improvements
- Added 'Print Line Color' property
- Added 'Add new layer' context menu action to layers group
2020-12-15 16:43:33 +01:00
Yorik van Havre
115963d79e Merge pull request #4100 from marioalexis84/draft-upgrade
Draft: Improve makeWires in upgrade function
2020-12-14 11:59:21 +01:00
luz paz
2a8c1271d5 Draft: fix header uniformity + trailing whitespace
[skip ci]
2020-12-11 13:19:49 +01:00
marioalexis
c9d1d0c462 Draft: Improve makeWires in upgrade function 2020-12-09 15:21:33 -03:00
marioalexis
8e080f1dac Draft: Some fixes in upgrade function. bug #0004460, fixes #0004462, #0004080 2020-11-24 22:08:06 -03:00
Yorik van Havre
c4d42a1f74 Draft: Fixed bug in SVG projection fill 2020-11-19 13:53:44 +01:00
Yorik van Havre
9a3fcfd8ca Arch: fixed placement of Space label on TD pages 2020-10-26 10:35:40 +01:00
Yorik van Havre
1a2b75ab03 Draft: allow to scale imageplanes 2020-10-20 13:31:40 +02:00
vocx-fc
39744ce987 Draft: split svg.get_svg into subfunctions (2)
Define a subfunction to process Draft "Dimension" (v0.18)
or "LinearDimension" (v0.19) objects.
2020-10-19 13:23:04 +02:00
vocx-fc
8187cbee19 Draft: split svg.get_svg into subfunctions
Define a subfunction to process `Part.Shape` objects.
2020-10-19 13:23:04 +02:00
vocx-fc
f136ee844d Draft: move svg subfunctions to svgshapes.py module 2020-10-19 13:23:04 +02:00
vocx-fc
ebc50e03ed Draft: move svg subfunctions to svgtext.py module 2020-10-19 13:23:04 +02:00
vocx-fc
f54761510c Draft: fix mismatch of argument in get_dxf function
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
(c79f890).
2020-10-12 11:48:26 +02:00
vocx-fc
6379d802b1 Draft: split svg.get_path function for paths that are BSplines
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`.
2020-09-21 14:25:03 +02:00
vocx-fc
f2d10669e5 Draft: svg, move test so the code is less indented
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.
2020-09-21 14:25:03 +02:00
vocx-fc
8e69b05e9d Draft: split svg.get_path into smaller readable functions
Split the SVG string for circular and elliptical paths.
2020-09-21 14:25:03 +02:00
vocx-fc
2f48f1caba Draft: split svg.get_text into smaller readable functions
Split the code for SVG string that will be displayed
for TechDraw pages; also split the header for other cases.
2020-09-21 14:25:03 +02:00
vocx-fc
0739ffa58e Draft: clean up SVG processing code, add comments
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.
2020-09-21 14:25:03 +02:00
vocx-fc
dea7f5d638 Draft: Drawing is still used in get_dxf function 2020-09-21 14:25:03 +02:00
vocx-fc
c79f890112 Draft: move getDXF to draftfunctions submodule
Update the appropriate interface in `Draft.py`.
2020-09-16 13:09:13 +02:00
carlopav
6f2691631c Draft: fixed obj.TypeId output after utils.get_type() change
.


.
2020-09-09 14:13:29 +02:00
Roy-043
7f415b4b58 Update scale.py 2020-09-09 14:12:43 +02:00
vocx-fc
5cf799dd85 Draft: rename svg parameter to fillspaces (lowercase) 2020-09-09 12:53:54 +02:00
vocx-fc
b835e5f29d Draft: replace FreeCAD with App for consistency 2020-09-09 12:53:54 +02:00
vocx-fc
7627d0b81a 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
db947e3513 Draft: Fix wire placement issue if Copy=False. 2020-09-08 16:16:16 +02:00
vocx-fc
a1ce2389d3 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
91a23e4a40 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
6503d9351d 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
9542e1b508 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
fa1a77f21f 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
4a765e12a5 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
07245dbf00 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
10f839782d Draft: check GUI before touching the ViewObject in cut 2020-05-18 12:17:59 +02:00
carlopav
125d0ca84d 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
1f88ef3a6f Draft: split array function from Draft.py 2020-05-15 14:43:26 +02:00
carlopav
eb59836ae8 Draft: updated ocumentation of Draft Scale function 2020-05-15 14:43:26 +02:00
carlopav
5e8f94d7d6 Draft: split sub_object_move from Draft.py 2020-05-15 14:43:26 +02:00
carlopav
59c0bf1c38 Draft: split sub_object_move from Draft.py 2020-05-15 14:43:26 +02:00
vocx-fc
f1fe97e96a 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
81d559fcc2 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
130d8413bf Draft: split extrude from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
7683fdf220 Draft: split downgrade from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
f959812327 Draft: split cut from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
52d4749bac Draft: split upgrade from Draft.py
.
2020-05-04 10:51:08 +02:00
carlopav
b2180873a1 Draft: split draftify from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
223c81a4f9 Draft: split fuse from Draft.py
.
2020-05-04 10:51:08 +02:00
carlopav
bedb026c17 Draft: split heal from Draft.py 2020-05-04 10:51:08 +02:00
carlopav
fd6d3da0be Draft: split mirror from Draft.py
.
2020-05-04 10:51:08 +02:00