Commit Graph

1336 Commits

Author SHA1 Message Date
wmayer
0b12ceec84 make constraint validation consistent to evaluation 2018-10-16 23:21:40 +02:00
luz.paz
125f41e3e8 Misc. typo fix
Found via `codespell`
2018-10-11 16:21:28 -04:00
Abdullah Tahiri
e66849378b Sketcher: Avoid transfering angle constraints
=============================================

Angle constraints are internally coded using the diverging points of the segments (PointPos != none) in normal 2 segment angle constraints.

This creates a problem with the mechanism to transfer enpoints on angle deletion.

fixes #3589
2018-10-08 15:16:27 +02:00
mwganson
2c09277763 sketcher: clear selection after failed addExternal geometry to prevent crash 2018-10-05 11:26:07 +02:00
wmayer
48ec50db38 fix segfault in ExpressionDelegate in case constraint property is invalidated 2018-10-04 23:34:19 +02:00
wmayer
7949cd84ef fix possible crashes in sketcher commands due to wrong casts 2018-10-04 19:45:20 +02:00
wmayer
abb56c35d0 0003544: Crash on creation of vertical dimension with Shift + V 2018-10-04 18:37:33 +02:00
wmayer
ebec4cd5e2 fix freeze when editing empty sketch 2018-10-04 00:34:06 +02:00
Abdullah Tahiri
65dd09d5e6 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
dedd66e7f4 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
wmayer
93f06f8256 fixes 0003410: 0.17 Regression: recompute will make parts lose color and take a longer delay compared to FC0.16 2018-10-02 19:04:44 +02:00
Abdullah Tahiri
b73cbd739c Sketcher: Correct checking of compatible equality geometry
=========================================================

Before this commit equality line to circle is allowed although the solver can not process it.

Similar happens for several combinations of incompatible edges.
2018-09-29 18:18:42 +02:00
Abdullah Tahiri
80e4b36f37 Sketcher: No equality to be applied to external axes
fixes #3532
2018-09-29 18:18:02 +02:00
luz.paz
b214f606c4 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
Markus Lampert
e4dbc896df 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
67b5ee0931 now each module registers its unit tests itself 2018-08-28 13:14:16 +02:00
Abdullah Tahiri
2a6655e176 Sketcher: UI option to enable/disable the automatic redundant removal mechanism 2018-08-26 20:54:02 +02:00
Abdullah Tahiri
8505b0eff4 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
dc1bb7eb87 Sketcher: Move autoremoveredundants method from SketchAnalyser to SketchObject 2018-08-26 20:54:01 +02:00
Abdullah Tahiri
96f6c46949 GCS: Bug fixes
==============

- Zero initialization of the jacobian matrix
- Correct notification of redundant/conflicting in presence of non-driving constraints.

fixes #3529
2018-08-26 20:54:01 +02:00
wmayer
2dc8089852 handle case if a B-spline is straight and thus maximum curvature is zero 2018-08-26 19:17:16 +02:00
wmayer
93163b28d0 Improve usability of expression dialog:
+ add signal showFormulaDialog to QuantitySpinBox in order to indicate whether the formula dialog opens or closes
+ when formula dialog opens then hide the button box in the parent dialog, show it again when the formula dialog closes
2018-08-23 12:22:57 +02:00
wmayer
2455b5fe39 CMP0050: make Sketcher module aware of cmake policy 2018-08-20 18:04:58 +02:00
luz.paz
321b159f27 More typos 2018-08-18 21:48:43 +02:00
luz.paz
781d007321 Misc. typos
Found via `codespell`
Trivial typos

Found via `codespell`
2018-08-18 21:48:42 +02:00
wmayer
01c140be28 fix warnings 2018-08-08 18:02:59 +02:00
Markus Lampert
0b40519f3f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
wmayer
36fa72488c comment out unused icons (to fix C2603 MSVC error) 2018-07-30 09:52:41 +02:00
Abdullah Tahiri
3d4c5eda21 Sketcher: Fix typos 2018-07-30 00:47:26 +02:00
Abdullah Tahiri
de7bab2f4a Sketcher: Fix Radius/Diameter shortcut 2018-07-30 00:47:26 +02:00
Abdullah Tahiri
c84fe5fa3d Sketcher: Add diameter constraint to the menu and the toolbar
fixes #1632
2018-07-30 00:47:25 +02:00
Abdullah Tahiri
26f93eef96 Sketcher: Geometry Element Widget Support for Diameter Constraint shortcuts 2018-07-30 00:47:25 +02:00
Abdullah Tahiri
1414f986dc Sketcher: Constraint Widget support for the diameter constraint 2018-07-30 00:47:25 +02:00
Abdullah Tahiri
6ce8dcdfc4 Sketcher: Support for editing datum dialog 2018-07-30 00:47:24 +02:00
Abdullah Tahiri
3147691013 Sketcher: Diameter Constraint Property representation 2018-07-30 00:47:24 +02:00
Abdullah Tahiri
a582da50b8 Sketcher: New command to add a Diameter Constraint 2018-07-30 00:47:24 +02:00
Abdullah Tahiri
1fbdc7c1dd Sketcher: Diameter constraint art 2018-07-30 00:47:23 +02:00
Abdullah Tahiri
de3da81293 Sketcher: ViewProvider representation of the Diameter Constraint 2018-07-30 00:47:23 +02:00
Abdullah Tahiri
2e33aba01e Sketcher: Double arrow label for Diameter Constraint 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
f41c1a9696 Sketcher: Python SketchObject support 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
103260872c Sketcher: Diameter support for Sketch Object 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
1e2df1054c Solver: Support for Diameter constraint 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
424d68085e GCS: Diameter constraint emulation through ConstraintEqual 2018-07-30 00:47:19 +02:00
Abdullah Tahiri
dcdb664709 GCS: Extension of ConstraintEqual to allow for a proportionality factor 2018-07-30 00:47:19 +02:00
Abdullah Tahiri
4ae2692fe2 Sketcher: Diameter Constraint Python support 2018-07-30 00:47:18 +02:00
Abdullah Tahiri
4bbc7ea786 Sketcher: New Sketcher Constraint Diameter 2018-07-30 00:47:18 +02:00
wmayer
8ef330d19a add missing export macro 2018-07-29 15:53:56 +02:00
Abdullah Tahiri
1899987e89 Sketcher: Add command to delete all constraints to menu 2018-07-29 13:44:09 +02:00
Abdullah Tahiri
74a5a066c9 Sketcher: UI command to delete all the constraints at once 2018-07-29 13:44:09 +02:00
Abdullah Tahiri
cd5aa8975e Sketcher: Python command to delete all the constraints at once 2018-07-29 13:44:07 +02:00