Commit Graph

2302 Commits

Author SHA1 Message Date
Uwe
d4c60abf70 [Sketcher] fix icon name
- fix a FIXME, Sketcher_CreateEllipse depicts already the right thing, it just has to be renamed
2022-07-29 01:26:00 +02:00
Uwe
03041f0aff [Sketcher] [skip CI] CommandCreateGeo: code style fix
- the MSVC IDE had problems with this, thus apply our .clang style
2022-07-27 16:05:39 +02:00
0penBrain
dbe8f47d93 [BUGFIX] Sketcher: fix icon normal/construction toggling when commands used in custom toolbar
Fixes #7064
2022-07-27 14:28:54 +02:00
wmayer
d344ccc4eb Sketcher: [skip ci] Fix several clazy issues:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Unused QString [-Wclazy-unused-non-trivial-variable]
* Missing emit keyword on signal call [-Wclazy-incorrect-emit]
* Don't call QList::operator[]() on temporary [-Wclazy-detaching-temporary]
* Use multi-arg instead [-Wclazy-qstring-arg]
* Maybe you meant to call ViewProvider2DObjectGrid::onChanged() instead [-Wclazy-skipped-base-method]
2022-07-25 12:56:09 +02:00
Uwe
003757176c Mod: remove some more superfluous Boolean checks 2022-07-19 02:40:59 +02:00
Uwe
88a06f8f10 Mod: remove some unnecessary nullptr checks 2022-07-18 12:58:12 +02:00
Uwe
16c86a6d08 [Sketch] remove superfluous nullptr checks 2022-07-18 02:51:49 +02:00
wmayer
b48f7229a3 Sketch: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 12:41:53 +02:00
wmayer
732e6d9cee Sketch: [skip ci] fix -Wsign-compare 2022-07-11 11:08:52 +02:00
Ajinkya Dahale
1f4e6ad899 [Sketcher] Do regular drag for small B-splines
Here, "small" means that the number of poles of the spline is so low that moving
any piece of the curve without changing shape would require moving all the
poles. In that case the rest of the algorithm in `initBSplinePieceMove()` only
complicates the matter.
2022-07-07 08:17:20 +02:00
Ajinkya Dahale
a88f69a9f0 [Sketcher] Only move one piece of B-spline when dragging 2022-07-02 07:35:30 +02:00
Abdullah Tahiri
19a69df0fc Sketcher: Bug fix
https://forum.freecadweb.org/viewtopic.php?p=606581&sid=70cfe557d7d1985e45ea1b298282c759#p606581
2022-07-01 13:56:16 +02:00
Abdullah Tahiri
2326186428 Sketcher: Bug fix SolverGeometryExtension
=========================================

Index access at zero size vector cause due to incorrect check.
2022-06-30 13:58:21 +02:00
Abdullah Tahiri
9763ed29e2 Split DSHs from CommandCreateGeo 2022-06-28 19:29:47 +02:00
Abdullah Tahiri
19230c83ef Remove obsolete DSH Tools - CloseShape and ConnectLines 2022-06-28 19:29:35 +02:00
Abdullah Tahiri
3678a525a2 DrawSketchHandler: Cursor rework and preselect at point functionalities 2022-06-28 19:29:19 +02:00
Abdullah Tahiri
2cf0c49955 DrawSketchHandler: mechanism to update the cursor 2022-06-28 19:29:07 +02:00
Abdullah Tahiri
f16c3f36a9 DrawSketchHandler: Functions to draw cursor position and direction 2022-06-28 19:28:56 +02:00
Abdullah Tahiri
b80cd6a417 DrawSketchHandler: refactor crosshairCursor
======================================================

-DrawSketchHandler manages both cursor bitmap setting and unsetting
2022-06-28 19:28:18 +02:00
Abdullah Tahiri
c6459bb7d3 Utils refactor w/o commandcreategeo 2022-06-28 19:28:06 +02:00
Abdullah Tahiri
9da0f369b1 Utils: Conversion from 2d vector into XY plane 3d vector 2022-06-28 19:27:46 +02:00
Abdullah Tahiri
3cd34e1c38 Sketcher-Utils: vector of smart pointers to vector of pointers 2022-06-28 19:27:37 +02:00
Abdullah Tahiri
bae8050fac Sketcher-Utils: Refactor common code up 2022-06-28 19:27:20 +02:00
Paddle
f99abec58e Sketcher: Create Geometry ConstraintToAttachment function 2022-06-28 19:27:04 +02:00
Abdullah Tahiri
80cd03cded Sketcher: Cleanup obsolete DrawSketchHandlers 2022-06-28 19:22:58 +02:00
Abdullah Tahiri
df50dca01b PythonConverter-Sketcher: A class to convert sketcher geometries and constraints into the commands to generate them
===================================================================================================================

This class does not currently support all sketcher geometry and constraints, but it supports the most common types.
2022-06-28 18:59:06 +02:00
Abdullah Tahiri
c6aa3c91e6 ViewProviderSketch: Cursor movement and preselection at sketch coordinates
===============================================================================

- Support to programatically move the cursor to sketch coordinates
- Support to try preselection at a given sketch coordinates
2022-06-28 18:58:47 +02:00
Abdullah Tahiri
473c2efc38 Sketcher: SketchObject - Add ability to diagnose constraint redundancy before addition
======================================================================================

It preserves the SketchObject properties. Therefore it does not trigger any property update, redraws, ...
2022-06-28 18:58:15 +02:00
Abdullah Tahiri
f2c1f35aaf Sketcher: SolverGeometryExtension and sketch parameter information improvements
===============================================================================

* SolverGeometryExtension is extended to:
- Enable to determine whether the x or the y of a point is a dependent or independent parameter
- Extend SolverExtension to provide information on individual edge parameters
- Convenience access to DoF status

* Sketch (solver interface) is extended to store geometry parameter dependency state, for these reasons:

Geometry and Constraint solver information is generated when performing a full solve() [QR decomposition + minimization(e.g. DogLeg)].

Constraint information remains in the sketch object (not SketchObject, but sketch), which is then retrieved by SketchObject.

Geometry information is incorporated to the deep copy of Geometry that the sketch object comprises. However, this information is only
available outside the sketch object, if the Geometry property of SketchObject is assigned. This is always the situation after a successful
full solve. However, it is not the case in a successful temporary minimal diagnosis (here succesful relates to conflicting/redundant constraints and
convergence).

The lightweight solution is to keep a (shallow) copy of the SolverGeometryExtensions (shared pointer) to be retrieved by GeoId, which is what is provided.
2022-06-28 18:57:17 +02:00
Abdullah Tahiri
8ee773362e Sketcher: Fix warning not all enum handled in switch 2022-06-26 06:39:10 +02:00
Abdullah Tahiri
073bf3215c Sketcher: Constraints - add ability to generate constraint type string 2022-06-25 19:18:15 +02:00
andrea
93525ff7eb removed references to OCC<7 2022-06-25 14:29:24 +02:00
Yorik van Havre
830b3944db Merge pull request #7067 from Kuzma30/add_ts
Crowdin Add "new" WB to translations.
2022-06-24 13:50:43 +02:00
mosfet80
620c273c4e Boost version <=1.60 is never used in freecad 0.20 (#7038)
* Boost version 1.60 is never used in freecad 0.20
2022-06-24 02:20:26 +02:00
Ajinkya Dahale
00e7eae6f8 [Sketcher] Use more segments while drawing splines
B-Splines can have an arbitrary number of pieces. Using the same number of
segments to draw a multi-piece spline can make the curve blocky.

This commit only changes the behavior in edit-mode.
2022-06-23 14:35:33 +02:00
marioalexis
51f3727d3c Sketcher: Use PyObject_IsTrue in combination with conditional ternary operator 2022-06-22 19:50:03 -04:00
Kuzemko Alexsandr
e678620cbd Crowdin Update .ts files with current source. 2022-06-21 17:31:06 +03:00
Uwe
68a499574a [Sketch] remove unnecessary Boolean comparisons 2022-06-19 18:35:52 +02:00
Kuzemko Alexsandr
c2cfccf268 Crowdin Add some menu text for translation. 2022-06-12 13:02:41 -04:00
Yorik van Havre
baa1105a53 Merged crowdin translations 2022-06-12 11:56:37 +02:00
Yorik van Havre
19ffd1ca94 Merged crowdin translations 2022-06-10 11:03:57 +02:00
Yorik van Havre
fa9c78611e Updated ts files 2022-06-10 10:29:18 +02:00
Yorik van Havre
68e8c19aaf Merged crowdin translations 2022-06-09 13:40:35 +02:00
Chris Hennes
c9cffae11d Sketcher: Tweak pluralization of DoF 2022-06-08 09:16:48 -05:00
Yorik van Havre
2e4dcfc22a Generated ts files 2022-06-08 12:32:59 +02:00
Yorik van Havre
b06f247f9f Merged crowdin translations 2022-06-08 12:28:54 +02:00
Yorik van Havre
b9b21ddac5 Merged crowdin translations 2022-06-07 13:34:53 +02:00
Kuzemko Alexsandr
eff8ecaafc Crowdin Run update.ts with latest source code. 2022-06-07 13:15:44 +03:00
Ajinkya Dahale
6e97e9570c [Sketcher] Add missing newline 2022-06-04 22:35:55 +02:00
Yorik van Havre
e8f1bde367 Merged crowdin translations 2022-06-03 11:26:35 +02:00