Commit Graph

350 Commits

Author SHA1 Message Date
0penBrain
fece0f2dfc [Sketcher] Move general settings widget enable/disable logic in TaskSketcherGeneral so ...
... all options are freely accessible in the preferences editor ...
 ... eg. no need to check 'Show Grid' to customize grid size or snap
 Also remove the sparse automatical saving to preferences from sketcher Task pane ...
 ... (some settings were saved, some not)
2020-05-27 19:25:47 +02:00
Abdullah Tahiri
b8e41e99e3 Sketcher: Root point selected when endpoint in external geometry point
======================================================================

fixes #3831

Solver Interface getPointId method is only intended for normal geometry, and returns -1 if geoid is out of range, which was misinterpreted as root point selection.
2020-05-26 14:14:00 +02:00
wmayer
ed04d40e2b Sketcher: modify PR 3201 a bit
+ remove unneeded class members from EditData class
+ do not include ui-header from within header files
+ fix possible memory leak in EditDatumDialog
+ when canceling dialog make sure sketch will be updated
2020-03-19 13:45:52 +01:00
0penBrain
d520de1aba [Sketcher] Constraint driving/driven status integration in dimension edition dialog
This integrates the ability to manage dimensional constraint driving/driven status
 in the constraint edition dialog box.
 It adds a checkbox in the dialog to show/select whether a constraint is driving or
 driven. When the constraint value is modified, it is automatically set as driving.
 Main focus is to allow to edit name (alias) of reference (driven) constraints
 directly in the constraint edition box.

 Resolves #3793, #3978
2020-03-19 13:45:52 +01:00
Zheng, Lei
e4978be7a4 App: add new convenient class SubObjectT
Derived from App::DocumentObjectT to add support of sub object

Also some minor changes to App::DocumentObjectT

Changed Gui::SelectionChanges to make use of SubObjectT
2020-02-11 15:40:27 -05:00
wmayer
e1b3ec41b6 Sketcher: add option to disable leaving sketch with Esc button 2020-02-09 13:52:09 +01:00
wmayer
7064ebc581 Sketcher: [skip ci] explicit command to stop current operation
Fore more details: https://forum.freecadweb.org/viewtopic.php?f=3&t=42207
2020-02-06 15:55:00 +01:00
triplus
5eb1ca4308 Sketcher - improve text readability on dark themes
https://forum.freecadweb.org/viewtopic.php?f=34&t=40493
2020-01-27 10:08:07 +01:00
wmayer
13b6961943 Sketcher: [skip ci] force redraw after using rubberband selection 2019-12-27 21:18:27 +01:00
wmayer
c16c7eda27 Base: [skip ci] make UnitSystem an enum class 2019-12-21 10:10:19 +01:00
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
wmayer
d488218701 [skip ci] fix more -Wgnu-zero-variadic-macro-arguments 2019-11-17 19:11:08 +01:00
luz.paz
044213d6ad Source typo fix (includes file rename) 2019-10-05 13:19:32 -04:00
luz.paz
fb32601746 Fix various (doxy) typos and whitespace issues
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml`
2019-10-03 07:57:13 +02:00
wmayer
169eacf1ab fix crash when switching to fullscreen, back to normal and closing the sketcher 2019-09-30 23:55:11 +02:00
wmayer
b1dd1e61a7 force strict ISO C++ (-Wpedantic)
for Fem, Import, PartDesign, Robot, Sketcher, TechDraw
2019-09-18 14:18:07 +02:00
DeepSOIC
b5ff5ca388 fix Show-related imports 2019-09-14 12:17:01 +02:00
DeepSOIC
4dad9f32ab Sketcher: try fix crash when returning to PartDesign 2019-09-09 12:34:55 +02:00
wmayer
b14cf8a00d extend convertTo function to also support SbRotation/Base::Rotation 2019-09-06 21:29:51 +02:00
DeepSOIC
2b4182e281 Sketcher: fix unnecessary filtering objects for TempoVis
TempoVis now should take care of it.

This was originally done to stop Drawing and TechDraw views pop up when closing a sketch the drawing depends on.
Now, TempoVis show_xxx and hide_xxx methods should auto filter out objects that are not in 3d view.
2019-09-04 11:37:48 -03:00
DeepSOIC
ec7c18bef3 Gui: add tags for TempoVis
Tags can be used to identify TV instances in the stack.  This is mostly for add-ons, for Part-o-magic in particular, who may want to insert some visibility automation in specific places in the stack.
2019-09-04 11:37:48 -03:00
DeepSOIC
d33c7b724c Sketcher: add property to allow another workbench for sketch editing
+ use TempoVis for changing the workbench
2019-09-04 11:37:48 -03:00
luz.paz
7af7c10cf1 Fix misc. typos, whitespace, and http:// to https:// issues 2019-09-03 11:11:43 -03:00
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