Commit Graph

553 Commits

Author SHA1 Message Date
luz.paz
360e581672 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
716d53b86e Sketcher: Move autoremoveredundants method from SketchAnalyser to SketchObject 2018-08-26 20:54:01 +02:00
Abdullah Tahiri
c1d6ccb0d8 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
83dbba99c7 CMP0050: make Sketcher module aware of cmake policy 2018-08-20 18:04:58 +02:00
luz.paz
fab9cad50f Misc. typos
Found via `codespell`
Trivial typos

Found via `codespell`
2018-08-18 21:48:42 +02:00
wmayer
a7f261dc13 fix warnings 2018-08-08 18:02:59 +02:00
Markus Lampert
e13c09235f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
Abdullah Tahiri
49a71e9399 Sketcher: Python SketchObject support 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
76993592ab Sketcher: Diameter support for Sketch Object 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
b320f15909 Solver: Support for Diameter constraint 2018-07-30 00:47:20 +02:00
Abdullah Tahiri
e54c33d585 GCS: Diameter constraint emulation through ConstraintEqual 2018-07-30 00:47:19 +02:00
Abdullah Tahiri
7270446ff9 GCS: Extension of ConstraintEqual to allow for a proportionality factor 2018-07-30 00:47:19 +02:00
Abdullah Tahiri
831e455e50 Sketcher: Diameter Constraint Python support 2018-07-30 00:47:18 +02:00
Abdullah Tahiri
5b9a794228 Sketcher: New Sketcher Constraint Diameter 2018-07-30 00:47:18 +02:00
wmayer
bc5a84cb09 add missing export macro 2018-07-29 15:53:56 +02:00
Abdullah Tahiri
9f969e558c Sketcher: Python command to delete all the constraints at once 2018-07-29 13:44:07 +02:00
Abdullah Tahiri
6e865aa3e5 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
d91f338a1a 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
8431385b44 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
8662d1af1b WIP. Moved code to hide units to seperate function 2018-07-23 12:43:46 -03:00
Bob
785770e66e Add getPresentationValue function prototype 2018-07-23 12:41:14 -03:00
wmayer
5ff103615f fix -Wmaybe-uninitialized 2018-06-09 12:05:19 +02:00
Abdullah Tahiri
2c89860a38 Sketcher: Wrong DoF reported - Fixes #3503 2018-06-09 11:11:46 +02:00
wmayer
8472bcba15 msvc2013 doesn't support default arguments in lambda expressions 2018-06-09 11:09:29 +02:00
Abdullah Tahiri
eacb14c3d4 Sketcher: Python interface to solveraid 2018-06-09 11:02:53 +02:00
Abdullah Tahiri
ce31cecc95 Sketcher: Ability for SketchObject to create a list of dependent geometric elements 2018-06-09 11:02:43 +02:00
Abdullah Tahiri
f8d90fc6db 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
a6fa514665 GCS: Add convenience point constructor 2018-06-09 10:49:55 +02:00
Abdullah Tahiri
8ebb8ce90b Sketcher: Empty list means all geometry for Python addCopy addRectangularArray and addMove 2018-05-31 14:36:21 +02:00
Abdullah Tahiri
93843aee9f Sketcher: Python support for moving Geometry 2018-05-31 14:34:58 +02:00
Abdullah Tahiri
cd8a5310e3 Sketcher: Moving Geometry Support 2018-05-31 14:34:31 +02:00
wmayer
d6bf698d28 suppress warning C4996 2018-05-31 13:42:35 +02:00
wmayer
ed0642e308 fix const correctness 2018-05-31 13:15:31 +02:00
wmayer
443dde8d6c fix const correctness 2018-05-31 12:49:23 +02:00
Abdullah Tahiri
97effe4017 Sketcher: fix failure to notify solver issues, like redundancies, when using setUpSketch in SketchObject 2018-05-31 11:41:48 +02:00
Abdullah Tahiri
d2558643f3 Fix MatrixIndexType 2018-05-31 11:41:37 +02:00
Abdullah Tahiri
9b11cc086d GCS: Improvement in redundant constraint detection
==================================================

The solver uses some heuristics to determine the "redundant to remove" and notify it to the user.

Basically it would pick the solver redundant constraint that affects most groups of redundants (popularity contest).

In the simple cases, all the redundants are equally popular and the popularity contest is untied by using the tagid (let say for simplicity it is the number at sketcher level Constraint3, the tagid=3).

This means that in simple cases, the solver systematically decides that the redundant constraint to handle from those showing a linear dependency is the one appearing the last.

This commits changes the way to untie the popularity contest, by giving more priority to those sketcher constraints that need a lower number of solver constraints (in other words,
those constraints that remove a lower amount of DoF). In case of tie, the tagid is then used to break the tie.

At least:
fixes #3434
fixes #1557
2018-05-31 11:41:26 +02:00
Abdullah Tahiri
3ae3f25cf1 GCS: Fix report view formating and duplicated endline 2018-05-31 11:41:16 +02:00
Abdullah Tahiri
040923fcef Solver: solver sketch level support for driven constraints and parameters
- Support for addition of driving information to GCS constraints
- Support for keeping track of value parameters of driven constraints
- Support for getting which QR algoritm is being used at GCS level
2018-05-31 11:40:16 +02:00
Abdullah Tahiri
eb5bf9894a GCS: Full detection of dependent parameters with Dense Full Household pivoting QR decomposition
- Improve Debug information.
- Support for addition of constraints with driving information for the solver constraints.
- Removal of the driven constraints from the Jacobian for QR decomposition
- Removal of the value freewheeling parameter from the Jacobian for QR decomposition
- Full detection of dependent parameters where DoF are present for Dense QR.
2018-05-31 11:40:05 +02:00
Abdullah Tahiri
0a4df1f8da GCS: Support for solver constraints to store driven/driving status 2018-05-31 11:39:53 +02:00
Abdullah Tahiri
05e8a7cec2 GCS: Extension of solver geometric elements to store whether they have dependent parameters 2018-05-31 11:39:28 +02:00
Abdullah Tahiri
f88daf23cc Solver: Solver Sketch level dependent parameters and solver geometric element management 2018-05-31 11:39:15 +02:00
Abdullah Tahiri
31e902d204 GCS: Solver dependent parameters retrieval 2018-05-31 11:39:02 +02:00
Abdullah Tahiri
e97e616686 Sketcher: Fix crash on applying dimensional constraint to external element 2018-05-27 19:43:05 +02:00
luz.paz
aa9c0e16ff whitespace cleanup 2018-05-19 12:06:34 -04:00
luz.paz
69b3b0b7f2 Misc. typos 2018-05-19 12:06:34 -04:00
luz.paz
9f9980eef4 removed newline altogether 2018-05-02 15:48:01 -04:00
luz.paz
9ba3e0345e Used QChar::fromLatin1('\n') instead 2018-05-02 14:57:49 -04:00
luz.paz
138b318c97 Added QString::fromUtf8("\n") 2018-05-02 00:50:06 -04:00