Artem wrote:Hi all,
I'm a member of SHAPER development team, in charge of developing the connector between SHAPER and PlaneGCS.
The main problem we have faced is unstable behavior of Tangent constraint. Please take a look at two attached scripts, they only different by coordinates of elements. In fact, the sketch in tangent-ok.py has 7 DoF and completely solved. However, tangent-failed.py reports about 2 redundant constraints (both tangent) and has 9 DoF.
I would really appreciate it if somebody explains me the difference in these similar cases.
Thanks in advance.
Artem
Code: Select all
App.ActiveDocument.Sketch.addGeometry(Part.LineSegment(App.Vector(-544.3181818181816,-159.0909090909091,0),App.Vector(-336.809445115132,101.6251959975382,0)),False)
App.ActiveDocument.Sketch.addGeometry(Part.LineSegment(App.Vector(-227.3938145270301, 96.31134256163281,0),App.Vector(-37.49999999999997, -196.5909090909091,0)),False)
Code: Select all
App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Tangent',0,2,2,2))
App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Tangent',1,1,2,1))
Code: Select all
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 17, Constr: 10, Rank: 8
DL: tolg: 1e-80, tolx: 1e-80, tolf: 1e-10, convergence: 1e-10, dogLegGaussStep: FullPivLU, xsize: 13, csize: 8, maxIter: 100
DL: stopcode: 1, Success
Sketcher::RedundantSolving-DogLeg-
Sketcher Redundant solving: 2 redundants
Sketcher::setUpSketch()-T:0
DL: tolg: 1e-80, tolx: 1e-80, tolf: 1e-10, convergence: 1e-17, dogLegGaussStep: FullPivLU, xsize: 9, csize: 4, maxIter: 200
DL: stopcode: 1, Success
Sketcher::Solve()-DogLeg-T:0
Code: Select all
DenseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 17, Constr: 10, Rank: 8
DL: tolg: 1e-80, tolx: 1e-80, tolf: 1e-10, convergence: 1e-10, dogLegGaussStep: FullPivLU, xsize: 13, csize: 8, maxIter: 100
DL: stopcode: 1, Success
Sketcher::RedundantSolving-DogLeg-
Sketcher Redundant solving: 2 redundants
Sketcher::setUpSketch()-T:0
DL: tolg: 1e-80, tolx: 1e-80, tolf: 1e-10, convergence: 1e-17, dogLegGaussStep: FullPivLU, xsize: 9, csize: 4, maxIter: 200
DL: stopcode: 1, Success
Sketcher::Solve()-DogLeg-T:0
Code: Select all
DenseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-15, Params: 17, Constr: 10, Rank: 9
DL: tolg: 1e-80, tolx: 1e-80, tolf: 1e-10, convergence: 1e-10, dogLegGaussStep: FullPivLU, xsize: 15, csize: 9, maxIter: 100
Artem wrote:I would really appreciate it if somebody explains me the difference in these similar cases.
Code: Select all
DenseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-20, Params: 17, Constr: 10, Rank: 10
Sketcher::setUpSketch()-T:0.001
dbruniercoulin wrote:I've faced a similar problem using FreeCAD 0.16 interactively. For reproducing it, the sequence is the following:
- Open the attached model
- Edit the sketch
- Create a Tangent constraint between the arc and one of the 2 lines geometrically tangent
You get an over-constraint error message asking you to remove the Tangent constraint.
I guess the issue is the same than the one reported by Artem.
Can someone explain why the solver fails in this situation and if it can be fixed ?
cbourcier wrote:Dear FreeCAD developers,
The SALOME team (CEA-EDF) is currently developing a new parametric modeller for numerical simulation to replace SALOME GEOM.
Christophe
Artem wrote:Hi all,
I'm a member of SHAPER development team, in charge of developing the connector between SHAPER and PlaneGCS.
Artem
Artem wrote:Regarding the cases I have reported in my previous message. It is very strange for me that similar cases has different result. Indeed the result depends on the solver. I will try to investigate this problem at leisure.
Thank you one again!