Commit Graph

77 Commits

Author SHA1 Message Date
Abdullah Tahiri
9bb917b91b GCS: Asynchronous full geometry parameter identification for Dense QR 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
718d17b634 GCS: Make QR decompositions for constraints and parameters run asynchronously 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
56705d0c3a GCS: QR profiling debug code 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
fac1ffa624 GCS: Rewrite diagnose() so that it has a single return point 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
f0dcb12475 GCS: Diagnose() - Separate DenseQR and SparseQR 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
82b4cfeba6 GCS: Refactor new SparseQR Dependent Parameter detection code and const correctness 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
0ef05d4f99 GCS: Detect dependent parameters (geometry) during diagnosis using two SparseQR factorisations 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
c565ef6793 GCS: makeSparseQRDecomposition generalise for transposed and non-transposed matrices 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
0d5e120a2c GCS: SparseQR compilation guards 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
72c2830a52 GCS: reduce input parameters in makeDenseQRDecomposition 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
909adbd93d GCS: Refactor Non-Zero elimination over pivot 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
28f6978a0d GCS: Refactor diagnose identification of conflicting and redundant constraints 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
6e53dd0034 GCS: Refactor dependent parameters identification which is only available for DenseQR 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
083aa1099a GCS: Refactor QR decomposition into separate functions for Sparse and Dense 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
417727754f GCS: Increase documentation of diagnose() routine 2020-12-19 11:58:54 +01:00
Abdullah Tahiri
30d30a27b8 GCS: Prevent that reference constraints affect the result of a redundant solving
================================================================================

Solves the part of this described bug relating to reference constraints affecting the diagnosis of redundant constraints:
https://forum.freecadweb.org/viewtopic.php?p=410195#p410195
2020-07-01 14:04:25 +02:00
Abdullah Tahiri
56db6f0e80 GCS: Add debug code to identify the popularity contest selected redundant that is removed 2020-07-01 14:04:25 +02:00
wmayer
3632c81435 clang/gcc/cmake: move handling of suppressed deprecated-copy warnings from source file to CMake file to more easily support gcc 10 2020-06-09 15:30:42 +02:00
wmayer
be8634d05c Handle clang 10 warnings:
+ fix -Wtautological-bitwise-compare
+ fix -Wimplicit-int-float-conversion
+ fix -Wmisleading-indentation
+ fix -Wrange-loop-construct
+ suppress -Wdeprecated-copy of 3rd party libs
2020-05-25 15:34:43 +02:00
DeepSOIC
c7c981f643 Sketcher: Fix #3658 Levenberg-Marquardt solver precision issues 2020-03-24 08:03:53 +01:00
luz.paz
7008cf92de Sketcher: [skip ci] fix header uniformity
This PR fixes header uniformity across all Sketcher WB files
2019-12-22 01:00:29 +01:00
asapelkin
7b8f473cc9 used in-built methods instead of external algoritms 2019-11-21 18:57:06 +01:00
luz.paz
fb32601746 Fix various (doxy) typos and whitespace issues
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml`
2019-10-03 07:57:13 +02:00
Abdullah Tahiri
dbe917dcc7 GCS: Refactor and additional debug information
==============================================

In maximum verbose debug mode, information is given about the groups of Sketcher Constraints that the solver is considering for redundancy or conflict.

This is before the popularity contest selects the constraint shown in the solver messages.

The main reason for showing this is to enable to diagnose problems with sketches in which the constraint indicated as the redundant one appears not to
be the right one. Intended for power users with "iteration level" debug mode.
2019-06-17 14:05:24 +02:00
Abdullah Tahiri
2c6f941644 GCS: Partial refactoring of diagnose() and debug improvements 2019-04-24 17:56:37 +02:00
Abdullah Tahiri
8b93107202 GCS: use at for map reading 2019-04-24 17:56:37 +02:00
wmayer
d077c7333f fix crash in debug mode in sketcher in case the equation matrix has rank zero 2018-10-28 14:51:14 +01: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
luz.paz
fab9cad50f Misc. typos
Found via `codespell`
Trivial typos

Found via `codespell`
2018-08-18 21:48:42 +02:00
Abdullah Tahiri
e54c33d585 GCS: Diameter constraint emulation through ConstraintEqual 2018-07-30 00:47:19 +02:00
wmayer
d6bf698d28 suppress warning C4996 2018-05-31 13:42:35 +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
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
31e902d204 GCS: Solver dependent parameters retrieval 2018-05-31 11:39:02 +02:00
Abdullah Tahiri
33be143f48 Sketcher: Solver bypass of knotpoints
Internal geometry knot points, which were added as fixed parameters to the solver according to a previous commit, are tracked in the corresponding bspline as solver level,
without being a parameter to the solver, and upon solving, the position thereof is updated by means of OCC functionality.

This allows to show the knot points and solidarily move them when moving a bspline.
2017-04-08 12:58:06 +02:00
Abdullah Tahiri
c46c66d48a Sketcher: Bspline solver knot support - unfinished 2017-04-08 12:58:06 +02:00
Abdullah Tahiri
4b1fa0af8e Sketcher: BSpline Weights internal geometry support 2017-01-11 01:17:07 +01:00
Abdullah Tahiri
167240e197 Sketcher: BSpline solver Internal Geometry for poles 2017-01-10 23:34:49 +01:00
Abdullah Tahiri
11808acad1 Sketcher: Parabola solver equality constraint 2016-12-24 02:39:02 +01:00
Abdullah Tahiri
84b6e97f2d Sketcher: Point on Object solver constraint 2016-12-24 01:14:15 +01:00
Abdullah Tahiri
3932a2f37d Sketcher: Focus solver internal geometry 2016-12-22 16:10:52 +01:00
Abdullah Tahiri
bb068fa7a4 Sketcher: Parabola Arc rules solver constraint 2016-12-22 16:10:33 +01:00
DeepSOIC
e61174ad00 Sketcher: Hyperbola: fix minor diameter ends swapping
Quick and dirty, but seems to work.
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
298153aecd Solver InternalAlignment: Change to diameters instead of radii to be able to draw asymptotes
GCS and Sketch.cpp support
2016-11-27 18:45:33 +01:00
DeepSOIC
44e814e973 Sketcher: solver: transplant all arc kinds to use CurveValue constraint
arc and arc of ellipse
2016-11-27 18:45:33 +01:00
DeepSOIC
0f27f81062 Sketcher: solver: Value constraint
(morphed from hyperbola arc range constraint)
(compiles, but untested)
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
6b59712292 Hyperbola solver equality constraint
The Ellipse radii solver constraint was reused generalised to MajorAxisConic class.

UI representation of the Equality sign not yet handled (appears on the origin).
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
cb5981fceb In Part:Geometry:
- Fixing Hyperbola classes to get CCW emulation (like Ellipse classes).

In Sketcher:
- The Sketcher representation deals with the right branch of the Hyperbola only.
- Solver model is: Center, Focus1 (focus of the right branch), minor radius (b).
- HyperbolicArcRangeToEndPoints code is the one of Ellipse <= Awaiting DeepSOIC help ;)
- ConstraintPointOnHyperbola solver constraint is now implemented and should be working.
- No InternalAligment constraints implemented yet.
2016-11-27 18:45:33 +01:00