Commit Graph

53 Commits

Author SHA1 Message Date
wmayer
62dee011ef Sketcher: fix crash when trying to edit malformed sketch
For more details see: https://forum.freecad.org/viewtopic.php?p=745031#p745031
2024-03-05 10:34:01 -06:00
Chris Hennes
1ebcb6c99b Merge pull request #12012 from Ondsel-Development/radius_render_fix
[Sketcher] Improve rendering of arc-angle, line-angle, arc-distances and fix radius
2024-01-22 11:21:53 -06:00
Paddle
a5d980ff59 Sketcher: Edges pattern and width by type. 2024-01-22 11:12:42 -06:00
Paddle
e3860080e5 Sketcher : Distance constraint : introduce arc helpers for conic distances. 2024-01-19 11:50:38 +01:00
Paddle
772d2940bd Sketcher : arc angle render improvement. 2024-01-19 11:13:09 +01:00
Paddle
edc247cd54 Sketcher : improve single line angle rendering. 2024-01-19 11:13:09 +01:00
Paddle
865212fc85 Sketcher Fix radius arc helpers. 2024-01-19 11:13:09 +01:00
Paddle
7baa964dc6 Draw arc helpers for radius constraints. 2024-01-12 19:03:38 -06:00
Paddle
215870ca8c Improve angle constraint rendering. 2024-01-12 19:03:38 -06:00
Florian Foinant-Willig
48dd1614d6 Sketcher: fix one point distance (#11854) 2024-01-05 09:29:28 -06:00
Florian Foinant-Willig
2b12632861 Sketcher: Fix Point to Line Distance 2023-12-20 20:03:13 +01:00
Abdullah Tahiri
c92dcea0eb Sketcher: Move lint comment to right position 2023-12-18 10:55:16 -06:00
Florian Foinant-Willig
d4e5c7e966 Fix isCircleOrArc usage 2023-12-17 16:01:29 +01:00
Abdullah Tahiri
8d00b00c9b Sketcher: Utils/CommandConstraints/EditModeConstraintCoinManager - refactor duplicated code 2023-12-17 16:01:29 +01:00
Florian Foinant-Willig
838802e28d Sketcher: Arc to arc or circle distance constraint 2023-12-17 16:01:29 +01:00
Paddle
ef2a723a32 Draw arc helpers for radius constraints. 2023-11-24 15:07:35 +01:00
Paddle
74a01c0d1b Improve angle constraint rendering. 2023-11-24 15:07:35 +01:00
Chris Hennes
590fb19f31 Merge pull request #10978 from FlachyJoe/modernize-type-check
Modernize type and derived type checking
2023-11-06 10:44:32 -06:00
Abdullah Tahiri
533250bc34 Sketcher Gui: clang-tidy diagnostic errors 2023-11-05 07:11:57 +01:00
Florian Foinant-Willig
c0e8fa1e75 Sketcher: modernize type checking 2023-10-23 18:09:23 +02:00
pre-commit-ci[bot]
e92ed45df9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
bdieterm
177a86e6e0 Sketcher: fix segfault on distance constraints without SecondPos 2023-08-29 16:24:15 -05:00
Florian Foinant-Willig
9681ad595b Sketcher: Point to Circle Distance Constraints (#9559) 2023-08-28 10:58:09 -05:00
luzpaz
5b698e6b68 Fix various typos 2023-08-13 08:17:01 -07:00
andrea
18e1883284 removed coin<3 references 2023-08-04 21:19:29 -06:00
Abdullah Tahiri
4b5a796a67 Sketcher: Fix bug angle via point visualisation
===============================================

Issue description:
https://forum.freecad.org/viewtopic.php?f=3&t=70325
https://github.com/FreeCAD/FreeCAD/issues/7520

The general algorithm to calculate normals miserably fails when
the curve is a line segment and the point through which the normal
to a curve is to be drawn is colinear with the line segment.

The solution is to provide specific code for this corner case.

fixes #7520
2023-05-28 06:45:50 +02:00
Abdullah Tahiri
78ae9c1d7d SketcherGui: apply clang-format 2023-05-25 17:08:03 +02:00
Abdullah Tahiri
0bdc7bb370 SketcherGui: Separate user and developer errors
===============================================

Revisiting all console calls:
- Using the Notification Framework when the user needs to be notified
- Turning them into DeveloperError/DeveloperWarnings when messages are intended only for developers
2023-05-25 14:09:06 +02:00
Florian Foinant-Willig
29657c2310 Sketcher: fix Circle to Line distance constraint display 2023-05-15 12:14:21 +02:00
Florian Foinant-Willig
93fba2a77f Sketch: Fix Point to Line constraint display 2023-05-14 21:37:21 +02:00
Florian Foinant-Willig
d3322ead12 Sketcher : Circle to Line Distance Constraint 2023-05-02 15:41:51 +02:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Abdullah Tahiri
4c57de5614 Sketcher: Fix double icons not selectable
=========================================

The scaling factor used  was the one of the ViewProviderSketch, however ZoomTranslation uses its own scaling factor.

fixes #6283
2023-04-20 20:45:40 +02:00
Paddle
271e3bec4a Move SoDatumLabel from Sketcher to Core so that it can be reused anywhere. 2023-04-12 16:48:07 +02:00
flachyjoe
e2a13763e9 Sketcher: Add circle to circle distance constraint 2023-03-19 14:05:35 +01:00
Abdullah Tahiri
93143c680c EditCoinManager: Refactor and extend layer support to use VisualLayerList property and ViewProviderSketchGeometryExtension 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
194fbf1efe Sketcher: Correct font sizes and updates
========================================

Fonts:
- SoDatumLabel internally uses QFont and thus points. It was being fed pixels, for which the configured size in preferences did not match the actual on screen size. This is corrected.
- Font sizes fed directly from parameters to the coin nodes skeleton were not being updated, as the parameter observer is initialised after the nodes are created, and the parameter
observer was not configured to update this nodes. This is corrected.

Colors:
- Some color parameters were not being being updated by the parameter observer. This is corrected.
2023-02-15 17:29:46 +01:00
Abdullah Tahiri
93c26a6c63 Sketcher: Make parabola axis to be internal alignment 2022-12-21 16:01:23 +01:00
Uwe
74b8b09caf [Sketch] Gui: E - Short*: remove unused headers
- also some sorting
2022-12-12 02:52:33 +01:00
wmayer
840fc70106 Mod: replace QRegExp with QRegularExpression 2022-10-07 14:03:53 +02:00
0penBrain
c2c45f6ca7 [Bugfix]Sketcher: some user colors aren't taken into account 2022-09-11 22:04:38 +02:00
0penBrain
8836a87770 Sketcher/BackEdit: makes sketch elements render on -Z if sketch viewed from back side 2022-09-09 16:09:42 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
wmayer
51186c018e Sketcher: modernize C++11
* use nullptr
2022-03-23 19:26:15 +01:00
0penBrain
a12f5f2691 [Sketcher] Disable constraints selection when geometry/constraint handler is active 2022-02-17 16:17:04 +01:00
Ajinkya Dahale
5c817bf5e4 [Sketcher] Check constraint type before drawing icons
Change is in `EditModeConstraintCoinManager::drawConstraintIcon` on the lines of 16a28614c86d01e2d70eeaf376861e25af579304.
2022-02-15 13:44:02 +01:00
Ajinkya Dahale
654d7c7b20 [Sketcher] Reformat statements in EditModeConstraintCoinManager.cpp 2022-02-15 13:44:02 +01:00
mwganson
a4582d8d61 Sketcher: prevent crash when accessing null pointer 2022-01-16 15:14:05 +01:00
luz paz
6394fed4e6 Fix various typos
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,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,./build/doc/SourceDocu`
2022-01-12 14:50:39 -06:00
Abdullah Tahiri
5279bf68c7 Sketcher: EditCoinManager - Check constraint types on updating constraint color
===============================================================================

Problem:
- While SketchObject inhibits intermediate updates during internal command execution, sometimes
a change in the selection (clear selection) in an intermediary step triggers an spurious update colour.

- There will be a final draw and this update colours at the end of the internal command.

- If the types of the constraints changed during the intermediary steps, it may happen that the constraint
coin nodes at a given position no longer correspond to the constraint type in the SketchObject property. This
may cause a attempt to access to a non-existing node or static casting a existing node to the wrong type.

Solution:
- Check the type of the constraint against the cached type. If not matching, cancel the color update.
2022-01-09 11:40:49 +01:00