Commit Graph

1364 Commits

Author SHA1 Message Date
wmayer
4f02b209fc fixes 0003689: Snap to grid checkbox in edit control widget does not update 2018-11-14 12:40:39 +01:00
Abdullah Tahiri
07cf5b10d7 Sketcher: Trim support multiple intersections for circles
=========================================================

The problem with ellipses:
https://forum.freecadweb.org/viewtopic.php?f=3&t=31594&sid=37481b7a6c1ae2614c9840fc27a7773e&start=60#p267248

The problem with circles:
https://forum.freecadweb.org/viewtopic.php?f=3&t=31594&sid=37481b7a6c1ae2614c9840fc27a7773e&start=60#p267536
2018-11-09 22:30:04 +01:00
Abdullah Tahiri
084c483603 Sketcher: Ellipse trim, handle multiple intersection 2018-11-09 22:30:04 +01:00
Abdullah Tahiri
4245ae6863 Sketcher: Ellipse trimming with internal aligment geometry
==========================================================

Trimming was not considering a case where an ellipse is trimmed with respect to its own internal aligment geometry.

This resulted in Coincident Constraints with PointPos = Sketcher::none, which is invalid.
2018-11-09 22:30:03 +01:00
wmayer
f6a9cfaad3 fix -Wabsolute-value 2018-11-09 12:46:36 +01:00
wmayer
fbb8e86cbf remove trailing spaces 2018-11-05 11:55:14 +01:00
wmayer
c1f19d3854 remove trailing spaces 2018-11-05 10:53:01 +01:00
wmayer
dedf42102e remove leftover of boost.signals headers 2018-11-05 00:03:36 +01:00
Abdullah Tahiri
13f589a0a6 Sketcher: Allow driven constraints when autoredundancy removal and autorecomputes active
==========================================================================================

https://forum.freecadweb.org/viewtopic.php?f=3&t=31998#p266626
2018-11-04 14:46:37 -03:00
Abdullah Tahiri
0a667889a0 Sketcher: Trim bug
==================

Trim tool fails to generate coincidence upon trimming an arc of ellipse at the end of the arc.

https://forum.freecadweb.org/viewtopic.php?f=3&t=31594&start=50#p266765
2018-11-04 14:43:24 -03:00
Abdullah Tahiri
d779e5b4b9 Sketcher: Fillet radius estimation improvement 2018-11-04 14:43:24 -03:00
Abdullah Tahiri
293e5732ad Sketcher: SketchObject Debug disabled by default 2018-11-04 14:43:24 -03:00
Abdullah Tahiri
abc7101118 Sketcher: Add DEBUG macro to SketchObject 2018-11-04 14:43:24 -03:00
Abdullah Tahiri
69d62787eb Sketcher: Intercurve fillet Improvement and delete constraint on point fix
==========================================================================

Intercurve fillet uses endpoint constraints for improved accuracy, but before this
commit was only considering a coincident constraint. Now it also considers an endpoint
tangency or perpendicular.

delConstraintOnPoint with coincidentonly=false, was not checking endpoint perpendiculars and
would therefore fail to delete them.

https://forum.freecadweb.org/viewtopic.php?f=3&t=31594&start=30#p265731
2018-11-04 14:43:24 -03:00
Abdullah Tahiri
fe78c1a037 Sketcher: Expose mass datum commands to python 2018-11-04 14:41:20 -03:00
Abdullah Tahiri
2c41e70c91 Sketcher: Mass operations on dimensionals
=========================================

This commit introduces two functions to operate on all datum constraints exclusively:

- Make all datum constraints driving or not driving, depending on the argument.
- Move all datum constraints at the end of the constraint list.

The practical use an ongoing effort towards improving the block constraint behaviour, that will be defered to 0.19
2018-11-04 14:41:20 -03:00
Abdullah Tahiri
6a1aed66e2 Sketcher: Refactor code relating to dimensional constraint checks 2018-11-04 14:41:20 -03:00
Abdullah Tahiri
8e2e5d7b6a Sketcher: Made constraints aware of whether they are dimensionals or not
========================================================================

Centralise the knowledge on whether a constraint is dimensional or not within the constraint
2018-11-04 14:41:20 -03:00
wmayer
f898eafd64 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
Abdullah Tahiri
1d86a83b30 Sketcher: Fillet UI command Improved exception handling 2018-10-28 18:35:41 +01:00
Abdullah Tahiri
957c22a61a Sketcher: Fillet extended CAD kernel information 2018-10-28 18:35:27 +01:00
Abdullah Tahiri
044e0f6c20 Sketcher: Use transparent exception mechanism for fillets
=========================================================

This ensures that the exception back in the c++ that invoked python retains the type of exception and can be properly catched.
2018-10-28 18:34:50 +01:00
Abdullah Tahiri
4b9d90321a Sketcher: GUI command updated to support filleting of bounded curves 2018-10-28 18:34:23 +01:00
Abdullah Tahiri
f1a98c3101 Sketcher: Support for filleting bounded curves
==============================================

Generally, bounded curves require that the curves are coincident at one point, the vertex to be filleted.

Trimmed curves, like combinations of line segments, arcs of conics, do not require it, as they are able to extend the trimmed
curve using the basis curve. However, they work fine when there is such a coincidence.
2018-10-28 18:34:12 +01:00
Abdullah Tahiri
7c1a218847 Sketcher: Inter-trimmed-curve filleting
=======================================

Algorithm changed to use offset curves, so as to avoid moving geometry in the sketcher.
2018-10-28 18:32:30 +01:00
Abdullah Tahiri
0aa3da513a Sketcher: filleting arcofconic-arcofconic command 2018-10-28 18:32:02 +01:00
Abdullah Tahiri
44c5f1a67e Sketcher: Fillet support inter-conics
==============================================

Specific support for filleting between conics.

It does not support B-Splines or line segments.
2018-10-28 18:31:48 +01:00
wmayer
465152bcc9 fix crash in debug mode in sketcher in case the equation matrix has rank zero 2018-10-28 14:51:14 +01:00
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