Commit Graph

1799 Commits

Author SHA1 Message Date
paullee0
f77a6949c9 [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
b44031df60 [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
6a66044c21 Draft: override text in dimension only when GUI is up 2020-02-10 11:14:01 +01:00
vocx-fc
107a945ccc Draft: standardized module to build messages 2020-02-10 11:12:45 +01:00
vocx-fc
fd533c74ba Draft: disable the excessive output in the ToDo class 2020-02-10 11:09:10 +01:00
vocx-fc
ccebb92258 Draft: added init_tools to create the toolbars 2020-02-10 11:02:28 +01:00
vocx-fc
a083fea057 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
donovaly
24ec114cb8 remove program-specific SVG namespaces
while fixing a SVG export issue for techDraw I noticed that some SVG files have program-dependent (and thus not clean) code in it. These are traces of the programs Sodipodi and Inkscape, like e.g. this line:
inkscape:export-filename="/home/yorik/PartDesign_Groove.png

This is unnecessary and FC should not use program-dependent code in the SVG but use instead plain SVG strictly following the SVG specification.

This PR transforms the few affected SVGs to a plain version.
2020-02-07 07:34:49 -05:00
vocx-fc
5e253f6310 Draft: add README files to explain the new structure 2020-02-05 10:59:28 +01:00
Syres916
b90d181188 [Draft] Bugfix for new users opening Shapestring
See Discussion : https://forum.freecadweb.org/viewtopic.php?f=23&t=42808
2020-02-05 10:51:12 +01:00
carlopav
2e4ce2f220 [Draft] Toolbar, remove option from preferences 2020-02-05 10:50:03 +01:00
vocx-fc
f86980e0b1 Draft: disable the Toolbar mode of Gui commands
The `Taskview` mode (value 1) is set fixed in `DraftGui.py`
even if the widget shows the other value `Toolbar` (value 0),
as this mode is unmaintained and obsolete.
At the same time, clarify the behavior with a new tooltip.
2020-02-05 10:50:03 +01:00
triplus
ac3d5b1633 Draft - Toolbar mode input size issue
https://forum.freecadweb.org/viewtopic.php?f=34&t=42782
2020-02-05 10:48:27 +01:00
Yorik van Havre
ee10405140 Draft: Use proper multi-line text editor for Draft Text tool 2020-01-29 14:27:01 +01:00
M G Berberich
15bef3283f [Draft]fix circular array python2
There was semantic change of the division operator ‘/’
from python2 to python3. This fix makes the circular array
work with python2 correctly.
See PEP 238
2020-01-29 09:33:24 +01:00
carlopav
21f8b80f55 [Draft] Context menu bugfix
If "Line" is not translated, the menu is not appended
2020-01-29 09:32:52 +01:00
vocx-fc
8eb56228cf Draft: plane proxy by default saves the state and view 2020-01-28 11:59:36 +01:00
carlopav
5e22086d71 [Draft] Autogroup bugfix 2020-01-27 10:12:02 +01:00
carlopav
c5f2845eb5 [Draft] Reorganize menu & toolbars
According to what experimented in BIM WB.
2020-01-27 10:06:33 +01:00
UR-0
7b511d49cb Draft: ShapeStringTaskPanel add parameter DontUseNativeFontDialog 2020-01-22 10:25:13 +01:00
carlopav
8cdf9ee534 [Draft] Edit addpoint with both chamfer and fillet enabled 2020-01-22 10:19:39 +01:00
carlopav
50897a55f5 [Draft] Edit, bugfix on addpoint to filleted polyline 2020-01-22 10:19:39 +01:00
carlopav
78252e959a [Draft] Autogroup: better support for App::Link
https://forum.freecadweb.org/viewtopic.php?f=23&t=40400&start=30#p360248
Reference to forum topic.
small fix


small fix
2020-01-18 17:51:21 +01:00
carlopav
ec57ffd875 Merge remote-tracking branch 'upstream/master' into DraftModifiersAppPart 2020-01-16 14:30:10 +01:00
Yorik van Havre
3f30f8b345 Merge branch 'master' into DraftModifiersAppPart 2020-01-16 14:26:45 +01:00
wmayer
099cc2c59e Draft: only try to import FreeCADGui, coin and QtGui if FreeCAD.GuiUp is true 2020-01-15 12:24:18 +01:00
vocx-fc
d8fd4b2f9c Draft: move translate function to translate module
The translate mechanism in Draft depends on the `QtCore`
`translate` function. This is defined in its own module
so that `DraftGui.py` is not as big and hard to manage.

Other modules in Draft can import the translate function
without needing to import the entire interface, which
often causes errors and circular dependencies.

We can import `QtCore.QT_TRANSLATE_NOOP` at the top level
in `Draft.py` because it does not depend on the graphical
interface.
2020-01-15 10:05:52 +01:00
Yorik van Havre
9ed1c1b281 Merge branch 'master' into DraftModifiersAppPart 2020-01-14 12:50:43 +01:00
vocx-fc
abd31f0b2b Draft: move todo static class to the todo module
The todo class in `DraftGui.py` can be placed in its
own module so that `DraftGui.py` isn't as big
and hard to maintain.
2020-01-14 12:49:29 +01:00
carlopav
f21c387b04 [Draft] Autogroup changes to include App::Part
[Draft] merged with recent changes


[Draft] App part support small fix
2020-01-13 23:13:38 +01:00
Bernd Hahnebach
41cf28d1fb Draft: SVG import, encode fix 2020-01-10 12:39:33 +01:00
carlopav
6e70467335 Merge remote-tracking branch 'upstream/master' into DraftModifiersAppPart 2020-01-10 10:36:34 +01:00
vocx-fc
60d81151d7 Draft: test_offset, test wire and closed shape (rectangle) 2020-01-10 10:09:22 +01:00
paullee0
0f38aad7ba [DraftGeomUtils] OffsetWire() to accept input as Face as previously did.
Forum Discussion -
https://forum.freecadweb.org/viewtopic.php?f=23&t=42282&p=359233#p359233
2020-01-10 10:08:00 +01:00
vocx-fc
4d956930f5 Draft: new module for GUI utility functions
Many auxiliary tools used by `Draft.py` can be defined
in another module. Many functions are moved to this module
so that `Draft.py` isn't as big and hard to maintain.

The following is a list o functions that were moved:
`get3DView`, `autogroup`, `dimSymbol`, `dimDash`,
`removeHidden`, `formatObject`, `getSelection`,
`getSelectionEx`, `select`, `loadTexture`.

Moreover, many of these functions were renamed
to comply better with PEP8 guidelines,
particularly the use of `snake_case`. For example,
`get3DView` is now `get_3d_view`.

Aliases are provided for the old names so that
other functions and classes that depend on these
won't break. The new names should be the official
programming interface, while the old names
should be deprecated at some point in the future.
2020-01-10 10:04:07 +01:00
carlopav
516cb397c6 [Draft] get_group_contents removed App::Part
Removed App::Part from get_group_contents because it result in double movements of Part objects
2020-01-09 14:45:58 +01:00
carlopav
0ab2826123 Merge branch 'master' into DraftModifiersAppPart
merged upstream master and resolved conflicts
2020-01-09 14:42:58 +01:00
paullee0
7acfb3b0f3 [ DraftGeomUtils ] - Fix Indent as commented on Github 2020-01-08 15:22:54 +01:00
paullee0
4818fc4ab4 [DraftGeomUtils] - Add per edge Align support
Per edge align feature
- OffsetWire() function is per-edge-aware of aligns information (alignList) for offsettg individual edge
- Instead of using dvec which universally offseting all edge consistently, it calculate vector per edge for offseting
- 2 modes of 'offsetting' to get 2 'offseted' wires from a basewire taking into per-each align info

It accept a normal info to make e.g. all wires in a Sketch gain consistent direction, instead of calculating from indiviual wires
2020-01-08 15:22:54 +01:00
carlopav
a4df2a1319 [Draft] Edit cleanup
[Draft] Edit further cleanup
2020-01-08 15:20:36 +01:00
carlopav
441a186ce4 [Draft] Edit: add support for arc editing in App::Part 2020-01-08 15:20:36 +01:00
carlopav
b6423863cb [Draft] Edit: improved context menu and fix for arc editing
[Draft] Edit small bugfix
2020-01-08 15:20:36 +01:00
carlopav
9870ec27b1 [Draft] Edit bugfix
Fixed contemporary editing of Draft and Part objects.
Implemented better showTrackers and hideTrackers functions.
2020-01-08 15:20:36 +01:00
carlopav
5a63ad51b1 [Draft] Edit cleanup
Cleaned up imports a suggested by @vocx.
Also cleaned up various things inside the tool.
[Draft] Edit small change in imports


[Draft] Edit updated documentation
2020-01-08 15:20:36 +01:00
carlopav
b189fd6450 [Draft] Edit: set shortcut to D,E
Changed subelement highlight to S,E
[Draft] Edit bugfix


bugfix
2020-01-08 15:20:36 +01:00
carlopav
7e50cc7c7a [Draft] Edit: context menu for Bezcurve editing 2020-01-08 15:20:36 +01:00
carlopav
d3b9aeb7f6 [Draft] Edit bugfix
traker was not updated if endEditing function was called by numericInput
2020-01-08 15:20:36 +01:00
carlopav
e238a4b9fc [Draft] Context menu for EditTrackers
Initial support for context menu.
Menu is triggered by Alt+Click or by pressin E Key.
Menu is customized on the clicked object.
Supported functions ATM: addPoint, deletePoint.
2020-01-08 15:20:36 +01:00
vocx-fc
7721ca0157 Draft: new module for utility functions
Many auxiliary tools used by `Draft.py` can be defined
in another module. Many functions are moved to this module
so that `Draft.py` isn't as big and hard to maintain.

The following is a list of functions and attributes that were moved:
`stringencodecoin`, `arrowtypes`, `typecheck`,
`getParamType`, `getParam`, `setParam`, `precision`,
`tolerance`, `epsilon`, `getRealName`, `getType`,
`getObjectsOfType`, `isClone`, `getGroupNames`,
`ungroup`, `shapify`, `getGroupContents`,
`printShape`, `compareObjects`, `loadSvgPatterns`,
`svgpatterns`, `getMovableChildren`, `getWindows`,
`utf8_decode`.

Moreover, many of these functions were renamed
to comply better with PEP8 guidelines, particularly
the use of `snake_case`. For example, `getGroupNames`
is now `get_group_names`; `getMovableChildren`
is now `get_movable_children`.

Aliases are provided for the old names so that
other functions and classes that depend on these
won't break. The new names should be the official
programming interface, while the old names
should be deprecated at some point in the future.
2020-01-08 15:16:55 +01:00
vocx-fc
ab6976c5db Draft: add new command for Draft CircularArray
Added object, viewprovider, icon; gui command definition, task panel,
add command to InitGui; add callbacks, and delay system.
2020-01-08 15:16:07 +01:00