Commit Graph

574 Commits

Author SHA1 Message Date
wmayer
dedf42102e remove leftover of boost.signals headers 2018-11-05 00:03:36 +01: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
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
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
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
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
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
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
2455b5fe39 CMP0050: make Sketcher module aware of cmake policy 2018-08-20 18:04:58 +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
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
cd5aa8975e Sketcher: Python command to delete all the constraints at once 2018-07-29 13:44:07 +02:00
Abdullah Tahiri
0024d1b0c4 Sketcher: Python SketchObject implementation
Exposure of all the functionality in the previous commits to Python
2018-07-29 13:44:07 +02:00
Abdullah Tahiri
527c814ddc Sketcher: SketchObject adaptation to Sketch Analysis
Apart for the inclusion of the Analysis functionality, SketchObject has been improved to provide:

- A fast painless deleteAllConstraints() function

- A fast painless constraint group deletion, delConstraints(std::vector<int> ConstrIds, bool updategeometry)
2018-07-29 13:44:07 +02:00
Abdullah Tahiri
97f375296b Sketcher: Sketch Analysis tool and autoconstraining algorithms
A series of algorithms to detect missing constraints and create them.

Each of the algorithms is divided in different steps for maximum flexibility:

    /// There is a first type of routines, simple routines, which work in the following order:
    /// Detect - (Analyse) - [Get] - [Set] - Make
    ///
    /// The Detect step just identifies possible missing constraints.
    ///
    /// The Analyse, which is not available for all the routines, operates in detected constraints of the same routine, to
    /// look for alternatives. For example, a general pointonpoint detection leads to a search for coincident constraints, which
    /// can be later run via Analyse if it is intended to convert endpoint coincidence to endpoint perpendicular and tangent constraints.
    ///
    /// The Get retrieves the result of the analysis as a vector of ConstraintIds, indicating the suggested constraints. This step is intended
    /// for enabling the user to check the result of the analysis, rather than applying it. If only applying is intended, this step is not necessary
    /// as the Make will operate on the result of the Detect - Analyse directly.
    ///
    /// The Set changes the detected result. It modifies the SketchAnalysis object. It only modifies the SketchObject as far as the SketchAnalysis is changed.
    /// It does not apply any changes to the sketch. It is intended so as to enable the user to change the result that will be applied.
    ///
    /// Neither the Detect, nor the Analyse, nor the Get steps modify the Sketch geometry.
    ///
    /// Make applies the constraints stored internally in the SketchAnalysis object.

It includes an automatic constraining algorithm for coincidences, horizontals/verticals and equality:

    /// A second type of routines, complex routines, are thought for running fully automatic and they Detect, Analyse and Make.
    /// They may also apply a variaty of types of Constraints.

It also includes some helper functions, like autoRemoveRedundants
2018-07-29 13:44:06 +02:00
hokieengr
841dfeadbe WIP. Moved code to hide units to seperate function 2018-07-23 12:43:46 -03:00
Bob
da41c0071b Add getPresentationValue function prototype 2018-07-23 12:41:14 -03:00
wmayer
b77b77c0de fix -Wmaybe-uninitialized 2018-06-09 12:05:19 +02:00
Abdullah Tahiri
d6d26b6a89 Sketcher: Wrong DoF reported - Fixes #3503 2018-06-09 11:11:46 +02:00
wmayer
a91d9c5d13 msvc2013 doesn't support default arguments in lambda expressions 2018-06-09 11:09:29 +02:00
Abdullah Tahiri
a5e85fd297 Sketcher: Python interface to solveraid 2018-06-09 11:02:53 +02:00
Abdullah Tahiri
830932db4e Sketcher: Ability for SketchObject to create a list of dependent geometric elements 2018-06-09 11:02:43 +02:00
Abdullah Tahiri
0b37a92596 GCS: Improved point symmetry constraint
=======================================

The original implementation won't work when the point is already on the line. See:
https://forum.freecadweb.org/viewtopic.php?f=3&t=29115#p237397

The new implementation works on the projections of the vectors linking the two first points with the symmetry point on the vector linking the two first points.

This assures that there is no stability problem when the point is already on the symmetry axis.
2018-06-09 10:50:05 +02:00
Abdullah Tahiri
ed0c22cf56 GCS: Add convenience point constructor 2018-06-09 10:49:55 +02:00
Abdullah Tahiri
bf03c7bcb1 Sketcher: Empty list means all geometry for Python addCopy addRectangularArray and addMove 2018-05-31 14:36:21 +02:00