Commit Graph

84 Commits

Author SHA1 Message Date
Abdullah Tahiri
9f15372d86 Sketcher: Default Shortcuts
===========================

Following:
https://forum.freecadweb.org/viewtopic.php?p=539914#p539914

Following requests from OpenBrain and ChrisB:
https://forum.freecadweb.org/viewtopic.php?p=540015#p540015

Following request from M4X:

Recomendation to use "L" and "I" for vertical and horizontal distance constraints and "R" for radius.

https://forum.freecadweb.org/viewtopic.php?p=540049#p540049

https://forum.freecadweb.org/viewtopic.php?p=540011#p540011
2021-10-16 09:23:22 +02:00
Abdullah Tahiri
8242c68509 Sketcher: Copy and Array tool Snap at 5 degrees using CTRL 2021-10-12 09:41:58 +02:00
wmayer
94516cb0a6 Sketcher: [skip ci] fix -Wunused-lambda-capture 2021-10-06 19:46:57 +02:00
Abdullah Tahiri
e953c8e0e6 Sketcher: user addSelections for group selection in SketcherTools 2021-10-06 13:44:06 +02:00
wmayer
3edea9891f Sketcher: [skip ci] remove superfluous QT_TRANSLATE_NOOP from Sketcher commands 2021-09-29 15:46:06 +02:00
FreeCAD-Tools
1d1c126407 Update CommandSketcherTools.cpp 2021-09-27 15:59:31 +03:00
Abdullah Tahiri
4847d5cab3 Sketcher: Rectangular Array Snap mode
=====================================

Rectangular Array gets a snap mode every 10 degrees when pressing CTRL (for consistency with Multiline arc, which also snaps using CTRL).

Request:
https://forum.freecadweb.org/viewtopic.php?p=535691#p535691
2021-09-25 21:58:14 +02:00
donovaly
b841321fb4 [Sketch] fix menu entry wording
all other menu entries use lower case letters, thus do so also for the new tool
2021-06-21 13:56:23 +02:00
Abdullah Tahiri
e7e1db28f2 Sketcher: UI toolbar/menu remove axes alignment 2021-06-20 06:16:33 +02:00
wmayer
f66bc8fc90 Gui: use public methods in Command sub-classes 2021-04-21 19:34:50 +02:00
wmayer
24b446c9f7 Sketcher: fixes #0004303: Three choices in a Sketcher menu each with the same Ctrl+Shift+E 'address' 2021-02-28 13:14:48 +01:00
Abdullah Tahiri
436a807c87 Sketcher: command to select partially redundant constraints 2021-01-23 07:53:28 +01:00
Abdullah Tahiri
e0bd53bcdf Sketcher: add command to select malformed constraints 2021-01-06 13:54:00 +01:00
Abdullah Tahiri
219e984418 Sketcher: rewrite Cmd to select DoFs using SolverGeometryExtensions framework 2020-12-19 11:58:54 +01:00
luz paz
7bf395bda6 Sketcher: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the Sketcher Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
Abdullah Tahiri
0a83c8d6f3 Sketcher: Fix select associated constraints when drawhandler active 2020-11-07 20:18:14 +01:00
Chris Hennes
4daf73c61a Release handler in commands where not needed
Fixes #0004478: Active constraint tool blocks sidebar tasks from working.

Many commands are interrupted by the existence of a handler. Rather than having these commands silently cancel, purge the handler if a command executes that does not need it.

When right-clicking on an item in the Constraint Task sidebar, any current operation is cancelled and the FreeCAD selection is synced with the selected items in the constraints QListWidget. This allows all of the menu items in the context menu to function properly: if the selection is not synced, anything that relies on the FreeCAD selection (like Delete) will sillently fail.
2020-11-07 20:17:19 +01:00
wmayer
731f89ccbf Sketcher: [skip ci] do not create dialog on heap if not needed to improve exception-safety and reduce possible memory leaks 2020-10-22 16:01:22 +02:00
vocx-fc
3ce832896d Sketcher: clean up the sketcher tools tooltips
Also clean up linespacing and whitespaces to make the code more
readable. Extremely long lines are broken to be 80 to 100 characters
long when possible.

'DrawSketchHandlerCopy' and 'DrawSketchHandlerRectangularArray'
are de-indented so that they start at column 1.
2020-10-22 14:53:52 +02:00
vocx-fc
5001a80d81 Sketcher: new icons for two existing commands
New SVG icons, `Sketcher_DeleteConstraints`, `Sketcher_DeleteGeometry`
for two commands which previously used the very simple icon
`Element_SelectionTypeInvalid` (a single red X).

These icons clarify that the commands are used to delete
the constraints and the geometry, respectively.
2020-10-01 09:59:26 +02:00
vocx-fc
5c14c8f3fa Sketcher: move icons to tools subdirectory
Add the icon path to the workbench's `InitGui.py`.
2020-10-01 09:59:26 +02:00
wmayer
e2d0bf2c3a Sketcher: [skip ci] fix computing of hotspot of XPM icons on Windows/macOS
Add a cross to copy and array icons.
2020-09-27 12:06:26 +02:00
wmayer
2453a50aba Coverity: Structurally/Logically dead code 2020-07-20 17:34:28 +02:00
luz.paz
7008cf92de Sketcher: [skip ci] fix header uniformity
This PR fixes header uniformity across all Sketcher WB files
2019-12-22 01:00:29 +01:00
wmayer
d488218701 [skip ci] fix more -Wgnu-zero-variadic-macro-arguments 2019-11-17 19:11:08 +01:00
wmayer
84648aea62 improve strict ISO C++11 (-Wpedantic) 2019-10-14 10:54:57 +02: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
b1dd1e61a7 force strict ISO C++ (-Wpedantic)
for Fem, Import, PartDesign, Robot, Sketcher, TechDraw
2019-09-18 14:18:07 +02:00
wmayer
209128d6fc fix possible memory leak 2019-09-15 21:10:51 +02:00
Zheng, Lei
0f66755843 Sketcher: fix external editing 2019-08-17 15:32:50 +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
luz.paz
16809ceb4a Crowdin: fix grammatical error + whitespace
https://crowdin.com/translate/freecad/569/en-fi#6498705
2019-05-02 13:34:39 -03:00
Abdullah Tahiri
62e721e8fd Sketcher: GUI PCH 2019-05-02 07:12:51 +02:00
triplus
92efd5fbe9 Improved icon themes support 2019-02-13 10:42:46 -02:00
wmayer
7c7f9c11d1 fix possible crashes in sketcher commands due to wrong casts 2018-10-04 19:45:20 +02:00
Abdullah Tahiri
779b4f641d Sketcher: Automatic redundant removal mechanism
===============================================

It is a long felt need that redundant constraints are not generated while autoconstraining.

The solver sketcher in v0.17 is überpicky with redundants due to the new popularity contest algorithm. The former behaviour is exhacerbated.

This new mode enables automatic redundant constraint removal.

In UI operations IN EDIT MODE, upon detection of redundancy by the solver, the Sketcher will remove all redundant constraints detected by that solve.

This makes the sketcher much less annoying.

How to test this?

The easiest example is to create a vertical line. Then make the endpoints symmetric with respect to the horizontal axis. Without this mode,
the vertical constraint and the symmetry constraint are redundant. With this mode, the vertical constraint gets automatically removed by the Sketcher.
2018-08-26 20:54:01 +02:00
Abdullah Tahiri
d78b5874da Sketcher: UI command to delete all the constraints at once 2018-07-29 13:44:09 +02:00
Abdullah Tahiri
6a4cd63510 Sketcher: Fix deleteall crash 2018-06-10 19:57:42 +02:00
Abdullah Tahiri
fbf5114073 Sketcher: New tool bar icon under the copy command to move 2018-05-31 14:35:54 +02:00
Abdullah Tahiri
ab5a22883d Sketcher: DoF finder command while using the default SparseQR
=============================================================

- Modification to transparently switch from SparseQR to DenseQR and back to SparseQR when using the DoF finder command.
- Command Tools dof finder command name change
2018-05-31 11:40:40 +02:00
Abdullah Tahiri
f60873bae6 Sketcher: New Command to select geometric elements with dependent parameters 2018-05-31 11:39:41 +02:00
wmayer
3431a6d10f check for selected sub-elements in sketcher copy function 2018-03-17 13:50:07 +01:00
luz.paz
69216f3604 sWhatsThis fixes
ref: https://forum.freecadweb.org/viewtopic.php?f=10&t=26687
2018-01-31 19:07:07 +01:00
Abdullah Tahiri
1ec828936c Sketcher: Delete all geometry menu command (in sketcher tools) 2017-11-06 14:18:12 +01:00
wmayer
a2bfe1bbe1 check for correct selection in Symmetry and Array sketcher commands 2017-09-27 19:12:30 +02:00
Abdullah Tahiri
58210251ca Refactoring solve+recompute and reinstating initial solve+recompute behaviour 2017-08-19 17:14:27 +02:00
wmayer
5661d91371 fixes #0002710: Freecad doesn't show sketch elements added when overconstrained
issue #0002836: Crash in sketcher
2017-08-19 17:14:27 +02:00
Abdullah Tahiri
058d01f612 fixes #0002499 2017-06-01 07:47:31 +02:00
wmayer
a0aa4fdfef Some fixes of pr 538
fix -Wreturn-type
homogenous naming style
use official spelling of B-spline
2017-02-21 13:30:43 +01:00