Commit Graph

327 Commits

Author SHA1 Message Date
Zheng, Lei
7128cf7989 Sketcher: fix lost of constraint in undo/redo 2019-08-30 14:57:41 +02:00
Zheng, Lei
d4ac072306 Gui: support in-place editing
The link support means that an object can now appear in more than one
places, and even inside a document different from its own. This patch
adds support for in-place editing, meaning that the object can be edited
at correct place regardless where it is.

See [here](https://git.io/fjPIk) for more info about the relavent APIs.

This patch includes two example of modifications to support in-place
editing. One is the ViewProviderDragger, which simply adds the dragger
node to editing root node by calling
View3DInventorViewer::setupEditingRoot(dragger). The other much more
complex one is ViewProviderSketch which calls setupEditingRoot(0) to
transfer all its children node into editing root. ViewProviderSketch
also includes various modifications to command invocation, because we
can no longer assume the active document is the owner of the editing
object.

This patch also includes necessary modification of the 'Show' module to
support in-place editing.
2019-08-17 15:08:32 +02:00
Zheng, Lei
5214f5b7ce Gui: add coinRemoveAllChildren to work around Coin3D bug
See bug description:
https://bitbucket.org/Coin3D/coin/pull-requests/119/fix-sochildlist-auditing/diff

Because of path based rendering (SoFCPathAnnotation) in mouse over
highlight, this bug causes crash more frequently here comparing to
upstream.

All C++ calling of SoGroup::removeAllChildren() is replaced by
Gui::coinRemoveAllChildren(), and python code is fixed by monkey
patching SoGroup.removeAllChildren() in FreeCADGuiInit.py.
2019-08-17 14:52:11 +02:00
Abdullah Tahiri
4dd484bd7e Sketcher: ViewProvider representation of deactivated constraints 2019-06-22 08:26:31 +02:00
SmallSharky
3511f61672 [Sketcher] Fix initial autoconstraints behavior 2019-05-18 11:54:37 +02:00
wmayer
c1bc6421ef fix Sketcher build failure 2019-05-16 12:46:02 +02:00
Abdullah Tahiri
62e721e8fd Sketcher: GUI PCH 2019-05-02 07:12:51 +02:00
luz.paz
b7b433e461 Misc. typo and whitespace fixes
Found via `codespell`
2019-04-30 10:15:59 -03:00
Abdullah Tahiri
23f0be2129 Sketcher: Comment out very specific debug code 2019-04-24 17:56:37 +02:00
triplus
66527b2c4f Fix for build failure on Ubuntu 16.04 2019-03-31 11:32:06 +02:00
Abdullah Tahiri
bbdbcc487b Sketcher: Fix bug in curvature graph
====================================

https://forum.freecadweb.org/viewtopic.php?f=3&t=34979&p=295324#p295324
2019-03-31 11:12:05 +02:00
wmayer
f2447f5781 fixes 0003130: FreeCAD 0.17 Qt5 bugs with external display 2019-03-14 19:28:11 +01:00
wmayer
ba96c0773a PVS: V688 A local variable possesses the same name as one of the class members, which can result in a confusion 2019-03-13 11:58:43 +01:00
wmayer
4bacf5b2f6 fixes 0003840: Sketcher WB: units not completely hidden 2019-02-16 14:10:37 +01:00
Abdullah Tahiri
f2b67883c9 Sketcher: Respect general autoconstraints setting on sketch creation
====================================================================

fixes #3727

https://www.freecadweb.org/tracker/view.php?id=3727

https://forum.freecadweb.org/viewtopic.php?f=3&t=32761
2018-12-17 18:44:56 +01:00
Abdullah Tahiri
77a8154f02 Sketcher: Do not recompute on geometry deletion
fixes #3642
2018-12-15 16:38:54 +01:00
luz.paz
cfbfa9dc6b Misc. typo, grammar, and whitespace fixes
[skip ci]
2018-11-27 15:02:58 -03:00
wmayer
a0795e1236 improve whitespaces 2018-11-19 10:03:50 +01:00
Abdullah Tahiri
434ce91e8d Sketcher: Improving group constraint preselection
=================================================

the position obtained from the SoPath of the picked point when entering
the combined icon object is not the center of the icon, what leads to
wrong preselection or no preselection at all.

This commit uses the translation of the Constraint node, which is the same that
is used to locate the constraint icons on the screen in the first place.
2018-11-18 12:03:13 +01:00
Abdullah Tahiri
21f2e79021 Sketcher: Refactor code relating to dimensional constraint checks 2018-11-04 14:41:20 -03:00
wmayer
2f500f4987 fix freeze when editing empty sketch 2018-10-04 00:34:06 +02:00
Abdullah Tahiri
5d2b512665 Sketcher: Grid visualization improvement
========================================

Now the Grid is calculated based on the maximum semiaxis length. Grid is recalculated on every redraw of the Sketcher.
2018-10-02 20:59:29 +02:00
Abdullah Tahiri
7078f9206e Sketcher: Axes visualization improvement
========================================

Axes size was bounded to the boundingbox of the underlaying 2D shape. However, this does not even get updated in no update mode and provides unreliable values.

The axes calculation now:
- is coded to be the same size and fully symmetric.
- is coded to be minimum 100 mm semiaxis, which gives a good impresion for empty sketches with default zoom.
- is coded to grow with the largest of the semiaxes.

fixes #3334
2018-10-02 20:59:10 +02:00
Markus Lampert
9109272d9e Set focus to sketcher window when a new handler is activated to ensure proper handling of keys, espcially Escape. 2018-09-11 07:30:43 +02:00
wmayer
e02f5fae7c handle case if a B-spline is straight and thus maximum curvature is zero 2018-08-26 19:17:16 +02:00
Markus Lampert
e13c09235f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
Abdullah Tahiri
3d000b2615 Sketcher: ViewProvider representation of the Diameter Constraint 2018-07-30 00:47:23 +02:00
luz.paz
9bd704d320 Misc. code comment typo fixes
Found via `codespell -q 3 -I ../fc-word-whitelist.txt --skip="*.ts,*.po,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./.git,./src/zipios++"`
2018-07-27 10:39:43 -03:00
hokieengr
faf9278500 Fixed default HideUnits option to FALSE 2018-07-23 12:44:26 -03:00
hokieengr
9066b354c5 Added code to strip units from display string 2018-07-23 12:44:26 -03:00
hokieengr
0fb8306380 WIP. Moving to other machine. 2018-07-23 12:43:46 -03:00
hokieengr
504e75d441 WIP. Added logic to not hide non-base units. 2018-07-23 12:43:46 -03:00
hokieengr
8662d1af1b WIP. Moved code to hide units to seperate function 2018-07-23 12:43:46 -03:00
hokieengr
2a2324d7f5 WIP. Added logic to hide units on distance dimensions.
More of a prototype than anything else right now. Will find a better way to add this functionality to the rest of Sketcher.
2018-07-23 12:41:14 -03:00
JimStar
8a8348e72b Extended global marker size to be used for Sketcher 2018-07-11 21:22:28 -03:00
Abdullah Tahiri
0b4a2d2937 Sketcher: Do not update point height when highlighted i.e. (pre)selected 2018-06-02 16:44:57 +02:00
Abdullah Tahiri
f8e3f0ce3e Sketcher: Extend existing rendering order for lines to points 2018-05-31 14:31:29 +02:00
wmayer
37411e0a7b fix string 2018-05-31 13:27:38 +02:00
Abdullah Tahiri
d75be1cd03 Sketcher: Support for clickable DoFs to launch DoF finder 2018-05-31 11:40:28 +02:00
luz.paz
68c4b22315 Source typos fixes 2018-05-11 10:02:56 -03:00
Abdullah Tahiri
e14f284cba Sketcher: Bug fix not updating constraints on switch of virtual space 2018-01-26 17:04:28 +01:00
Abdullah Tahiri
471c0a4a2c Sketcher: Enable switching of virtual space in ViewProvider 2018-01-26 17:03:16 +01:00
Abdullah Tahiri
5e11e37712 Sketcher: Python Interface for Constraint Virtual Space
=======================================================

set/get/toggle python interface to enable to set the virtual space status of a constraint via SketchObject.
2018-01-26 17:02:46 +01:00
Abdullah Tahiri
804bbbc9cd Sketcher: Enable Virtual space updates on the View Provider
===========================================================

Basic initial working implementation to hide constraints.
2018-01-26 17:02:22 +01:00
Abdullah Tahiri
66f29c52ad Sketcher: Fix normal rendering when full-constraint
fixes #3320
2018-01-23 16:57:33 +01:00
wmayer
c65585ccaf improve whitespace, fix const correctness 2018-01-23 00:40:41 +01:00
Abdullah Tahiri
46aa2c6356 Sketcher: Change nomenclature relating to Block constraint 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
470913434a Sketcher: Blocked constraint viewprovider rendering 2018-01-22 22:52:56 +01:00
wmayer
ee0b91961b improve whitespaces 2018-01-13 15:49:39 +01:00
Abdullah Tahiri
40459e73cd Sketcher: Remove errors in reporting view while deleting
=======================================================

fixes #2275

https://freecadweb.org/tracker/view.php?id=2275

Deletion of coincidents rely on selected vertex. The original code was trying to delete a coincident without checking whether one was there.

The implementation now relies on checking whether a coincident is present.
2018-01-13 15:47:02 +01:00