Commit Graph

222 Commits

Author SHA1 Message Date
Abdullah Tahiri
00a1aa6225 Part: Geometry - encapsulate construction access 2020-10-25 03:52:51 +01:00
vocx-fc
86bf3f4b1c Sketcher: move other icons into their subdirectories 2020-10-01 09:59:26 +02:00
vocx-fc
c63dd6230f Sketcher: move icons to geometry subdirectory
Add the icon path to the workbench's `InitGui.py`.
2020-10-01 09:59:26 +02:00
vocx-fc
273e6a30ae Sketcher: small style changes to make the lines shorter 2020-10-01 09:59:26 +02:00
Vanuan
65e66c9e62 High DPI support: Convert sketcher cursors to SVG
Remove xpm
2020-08-19 19:59:13 +02:00
0penBrain
fe04d47b4c [Sketcher] Local settings are correctly restored ; fixes #3952,#4058 2020-05-27 19:25:47 +02:00
0penBrain
23e26e2ca6 [Sketcher] 'Avoid redundant autoconstraint' is processed only if 'Autoconstraints' is active 2020-05-27 19:25:47 +02:00
0penBrain
cd788bbd28 [Sketcher] Simplify general settings management 2020-05-27 19:25:47 +02:00
dulouie
134c841e08 Sketcher: fix contraints cmd crosshair color 2020-03-16 09:34:21 +01:00
luz.paz
ebe194a9e9 Fix typos
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,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,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
```
2020-03-06 14:50:35 +01:00
wmayer
56ef40c449 Sketcher: [skip ci] add create polygon command to sketcher menu 2020-02-07 15:28:07 +01: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
luz.paz
ea0868a433 Fix typos and some trailing whitespace
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-12-03 12:22:59 +01:00
wmayer
d488218701 [skip ci] fix more -Wgnu-zero-variadic-macro-arguments 2019-11-17 19:11:08 +01:00
luz.paz
30a717beac Fix typos and misc. formatting [skip ci]
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-21 16:02:23 -03:00
wmayer
31ced049d9 abort hyperbola creation when angles are NaN 2019-10-17 00:22:39 +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
54eda5e755 fix possible memory leak 2019-09-15 21:00:21 +02:00
wmayer
190d351a20 fix crash in polyline tool 2019-09-15 11:03:21 +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
Abdullah Tahiri
7d0f8e2fa9 Sketcher: Polyline snap arc to 45 degrees bug fix
=================================================

fixes #3974

Snapping to 45 degrees during arc creation (hold ctrl during an arc within a polyline), resulted in
reduced precision, because Gui::Command::doCommand %f defaults only to six decimal positions, which is
a poor representation in radians of, for example, 90 degrees.

A work-around could have been to hardcode a higher number of decimals, as in %0.Xf. However, I do not like
such magic numbers.

The solution chosen is to use an App.Quantity object using as units degrees, which leads to no loss of precision.
2019-06-22 17:22:40 +02:00
Abdullah Tahiri
62e721e8fd Sketcher: GUI PCH 2019-05-02 07:12:51 +02: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
triplus
92efd5fbe9 Improved icon themes support 2019-02-13 10:42:46 -02:00
luz.paz
fe39347b05 Typos cont. + whitespace 2019-02-08 11:01:24 -02:00
luz.paz
cb4a0adf71 Misc. typos
Found via `codespell`
2019-02-08 11:01:24 -02:00
luz.paz
f3123b25a4 Crowdin: Sketcher/Gui/CommandCreateGeo.cpp fix typos 2019-01-30 11:08:03 -02:00
luz.paz
ab63398a69 Crowdin: Sketcher/Gui/CommandCreateGeo.cpp typo fix 2019-01-30 11:08:03 -02:00
wmayer
21d01fe6fc Replace Base::Exception with appropriate subclass 2018-11-14 19:27:52 +01:00
Abdullah Tahiri
7abc5fec65 Sketcher: Fillet UI command Improved exception handling 2018-10-28 18:35:41 +01:00
Abdullah Tahiri
af581dc689 Sketcher: GUI command updated to support filleting of bounded curves 2018-10-28 18:34:23 +01:00
Abdullah Tahiri
b3cf67dffe Sketcher: filleting arcofconic-arcofconic command 2018-10-28 18:32:02 +01:00
mwganson
dfdc05f5c5 sketcher: clear selection after failed addExternal geometry to prevent crash 2018-10-05 11:26:07 +02:00
luz.paz
360e581672 Misc. typo and whitespace fixes
ref: https://forum.freecadweb.org/viewtopic.php?f=3&t=30988#p256964
along with other misc. fixes
2018-09-19 17:26:03 +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
3eb5759da5 Sketcher: Improved B-Spline creation 2018-05-31 14:33:58 +02:00
Abdullah Tahiri
4fe44f9e95 Sketcher: Snap polyline arcs to 45 degrees pressing ctrl fixes #3472 2018-05-21 10:45:13 -03:00
Abdullah Tahiri
1c4e586946 Sketcher: fix menu periodic bspline call 2018-04-22 07:39:15 +02:00
Abdullah Tahiri
6b5836dcc7 Sketcher: Bug fix - prevent inter part/body links
=================================================

With the support for external geometry during carbon copy, it was introduced a way for creating inter-part/inter-body links. See:
https://forum.freecadweb.org/viewtopic.php?f=10&t=27700&p=223736#p223736

This commit closes this door, while still allows carbon copy with external geometry support within the same body.
2018-03-30 21:00:24 +02:00
luz.paz
1d5799e5b3 Misc. typos
Inspired by @normandc per https://gitter.im/FreeCAD/FreeCAD?at=5a729c6ece68c3bc742df205
2018-02-07 09:40:03 +01:00
wmayer
76b12d242d fix syntax errors 2018-01-31 20:53:42 +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
19585e6b4b Sketcher: new UI command for arbitrary sides polygon
fixes #1639
2017-12-23 14:45:39 +01:00
Abdullah Tahiri
ea8652f54e Sketcher: Fixing Polyline Arc Endpoint autoconstraints
======================================================

fixes #3091

Autoconstraints did not check whether the arc was CW or CCW, as such the autoconstraint on the second position was sometimes assigned to the start point.
2017-12-07 11:31:35 +01:00
Abdullah Tahiri
f0a4d6a524 Sketcher: Fix Polygon disappearing on creation with autoconstraints on
======================================================================

Fixes #3154

About the fix:
- If a non-zero vector is passed to seekAutoConstraint, it will suggest a vertical/horizontal constraint, which does not
make sense in the construction method.
- Passing a zero vector enables to treat it like a point, so for example point on object will be suggested, but not vertical/horizontal constraints.
2017-12-07 10:59:49 +01:00
Abdullah Tahiri
0f021940b9 Sketcher: BSpline, prevent 0 mm Radius for poles on creation
============================================================

https://forum.freecadweb.org/viewtopic.php?f=10&t=25701
2017-12-07 10:52:28 +01:00
wmayer
794a39684a fix crashes when using sketch tools 2017-11-23 13:22:37 +01:00