Commit Graph

1291 Commits

Author SHA1 Message Date
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
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
3dfb202380 Sketcher: Make use of Sketch Analysis for Sketch Validation - refactoring 2018-07-29 13:44:06 +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
luz.paz
0576524144 Misc. code comment typo fixes
Found via `codespell -q 3 -I ../fc-word-whitelist.txt --skip="*.ts,*.po,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./.git,./src/zipios++"`
2018-07-27 10:39:43 -03:00
hokieengr
2b08754c17 Fixed default HideUnits option to FALSE 2018-07-23 12:44:26 -03:00
hokieengr
d7e5534d51 Added code to strip units from display string 2018-07-23 12:44:26 -03:00
hokieengr
b9767f0036 Updated hide units GUI option with more text 2018-07-23 12:44:26 -03:00
hokieengr
f8327a009b WIP. Moving to other machine. 2018-07-23 12:43:46 -03:00
hokieengr
4c2e36b645 WIP. Added logic to not hide non-base units. 2018-07-23 12:43:46 -03: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
hokieengr
3f1216a58d WIP. Added logic to hide units on distance dimensions.
More of a prototype than anything else right now. Will find a better way to add this functionality to the rest of Sketcher.
2018-07-23 12:41:14 -03:00
hokieengr
5e3ce0331e Added option to hide units in sketch
Currently not hooked up to anything just yet.
2018-07-23 12:41:14 -03:00
JimStar
63f085dd78 Extended global marker size to be used for Sketcher 2018-07-11 21:22:28 -03:00
Abdullah Tahiri
1e37612a27 Sketcher: Fix deleteall crash 2018-06-10 19:57:42 +02: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
d02d0da7de Sketcher: Do not update point height when highlighted i.e. (pre)selected 2018-06-02 16:44:57 +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
Abdullah Tahiri
39e82c79f6 Sketcher: New tool bar icon under the copy command to move 2018-05-31 14:35:54 +02:00
Abdullah Tahiri
7c586b6c1a Sketcher: move icon art 2018-05-31 14:35:14 +02:00
Abdullah Tahiri
cffa76b0cc Sketcher: Python support for moving Geometry 2018-05-31 14:34:58 +02:00
Abdullah Tahiri
7df7667774 Sketcher: Moving Geometry Support 2018-05-31 14:34:31 +02:00
Abdullah Tahiri
ec6eaa509d Sketcher: Improved B-Spline creation 2018-05-31 14:33:58 +02:00
Abdullah Tahiri
4805927170 Sketcher: Extend existing rendering order for lines to points 2018-05-31 14:31:29 +02:00
Abdullah Tahiri
dccb86a5db Sketcher: Optional extended naming for constraints widget giving first-second-third information 2018-05-31 14:29:00 +02:00
wmayer
3cb6890bcc suppress warning C4996 2018-05-31 13:42:35 +02:00
wmayer
717abd0cf3 fix string 2018-05-31 13:27:38 +02:00
wmayer
d4354af79b fix const correctness 2018-05-31 13:15:31 +02:00
wmayer
63cefaf4a6 fix const correctness 2018-05-31 12:49:23 +02:00
Abdullah Tahiri
8d7622b4a9 Sketcher: error message when trying to increase the degree of not-a-bspline fixes #3471 2018-05-31 11:42:24 +02:00
Abdullah Tahiri
bfef80f9c0 Sketcher: bspline knot increase wrong string fixes #3470 2018-05-31 11:42:11 +02:00
Abdullah Tahiri
8a31a6c5b4 Tests: Update test to remove redundants that failed to be detected with the old solver 2018-05-31 11:41:59 +02:00
Abdullah Tahiri
60a57107cf Sketcher: fix failure to notify solver issues, like redundancies, when using setUpSketch in SketchObject 2018-05-31 11:41:48 +02:00
Abdullah Tahiri
61b1a15524 Fix MatrixIndexType 2018-05-31 11:41:37 +02:00
Abdullah Tahiri
03c3539dbf 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
9e901dbc59 GCS: Fix report view formating and duplicated endline 2018-05-31 11:41:16 +02:00
Abdullah Tahiri
d75be15f64 Sketch: DoF finder icon/resource file 2018-05-31 11:41:04 +02:00
Abdullah Tahiri
f7a7d2bade Sketcher Toolbar: Removing DoF finder from the toolbar, as it can be accessed from the solver messages now
- Renaming of command
2018-05-31 11:40:53 +02:00