Sorry for the off topic, but I'm curious: is there a reason for using the freecad-daily package (which is stuck ATM) rather than the newer freecad-stable one? It is based on the 0.18.1 tag, which corresponds to 0.18.16110. It's been available for the past two weeks.
Sketcher solver redundancy error
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Sketcher solver redundancy error
Re: Sketcher solver redundancy error
I tried to update and it broke my FreeCAD stable. I haven't had much time to look into it further. If I can't fix it I'll post in one of the appropriate topics.
- Hannu
- Posts: 130
- Joined: Fri Sep 11, 2015 4:12 pm
- Location: Strängnäs, Sweden - 1hr drive west from Stockholm
Re: Sketcher solver redundancy error
I have seen the "repeating redundancy error" a number of times, and most often use box selection to select points to set constraints on. Never figured out the selection method to be related though - and therefore haven't made any postings regarding it.
One needs to have some understanding of the problem before a posting can be made.
/Hannu - engineer & mild
- Embedded, Computer, Software, Electronic, Fault analysis. A&D Photography http://flickr.com/arkane
- Mechanics, FDM 3D-prints, Solder, Lathe, Mill, Weld -work. ISO Audits, Claim, Deviation, Corrective action
- Embedded, Computer, Software, Electronic, Fault analysis. A&D Photography http://flickr.com/arkane
- Mechanics, FDM 3D-prints, Solder, Lathe, Mill, Weld -work. ISO Audits, Claim, Deviation, Corrective action
Re: Sketcher solver redundancy error
Hi folks,
I am interested in knowing why the coincident constraint is directed to an "edge" instead of a point:
Constraint 1 is [(1,2),(-1,0)]
The software should never generate that 0 there. If you happen to notice this behaviour, I would be thankful to know how these get created.
I am interested in knowing why the coincident constraint is directed to an "edge" instead of a point:
Constraint 1 is [(1,2),(-1,0)]
The software should never generate that 0 there. If you happen to notice this behaviour, I would be thankful to know how these get created.
Re: Sketcher solver redundancy error
The problem is that coincident constraint to an edge, which the solver does not accept. This creates the sketcher and solver constraints to get out of sync.
This is a fixed file: In this file the sketch still appears as "redundant", but if you click you get to the two redundant constraints.
I fixed it like this:
You canNOT use this code above in stock FreeCAD, because SecondPos is readonly. I will be submitting a PR to make it r/w.
I am refactoring the parts of the solver making the QR calculation, so any fix will go with it.
THIS DOES NOT FIX THE CAUSE OF THE PROBLEM
There is a way to create coincident constraints to edges (PointPos=0) in FreeCAD, which is the real source of grievance and the bug to be fixed.
This is a fixed file: In this file the sketch still appears as "redundant", but if you click you get to the two redundant constraints.
I fixed it like this:
Code: Select all
>>> constraints = ActiveSketch.Constraints
>>> con18 = ActiveSketch.Constraints[17]
>>> con18.Type
'Coincident'
>>> con18.SecondPos
0
>>> con18.SecondPos = 1
>>> constraints[17] = con18
>>> ActiveSketch.Constraints = constraints
>>> ActiveSketch.solve()
-2
I am refactoring the parts of the solver making the QR calculation, so any fix will go with it.
THIS DOES NOT FIX THE CAUSE OF THE PROBLEM
There is a way to create coincident constraints to edges (PointPos=0) in FreeCAD, which is the real source of grievance and the bug to be fixed.
Re: Sketcher solver redundancy error
I don't know why. When I try to recreate the Additive Sweep using Sketches "RightBottomCurve" and "ExternalProfile", I get an error window with the message: "TopoDS::Face".
This is with me using a newer FreeCAD version since yesterday (info below).
FreeCAD also doesn't move the line segment onto the origin...
And for anyone who wants to know more about Constraint geoID and posID numbering:
https://forum.freecadweb.org/viewtopic.php?f=10&t=28890
OS: Ubuntu 18.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.1.
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Re: Sketcher solver redundancy error
With the PR, I will be providing with some hint:
Sketcher constraint number 18 is malformed is in red in the report view. This should enable users to identify malformed constraints. If you happen to realise this message just after doing some operation and can provide a way to reproduce, I am waiting for your bug reports
Code: Select all
Active view is Xiaomi Redmi 4X_brokenSkeetch : 1[*] (at 0x5582d6f62670)
Sel : Clear selection
Sketcher constraint number 17 is malformed!
SolverReportingManager - Too long string suppressedEigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 130, Constr: 126, Rank: 124
Re: Sketcher solver redundancy error
PR:
https://github.com/FreeCAD/FreeCAD/pull/2093
With this PR I hope that you guys can help me out here identify when FreeCAD is creating these malformed coincident constraints.
https://github.com/FreeCAD/FreeCAD/pull/2093
With this PR I hope that you guys can help me out here identify when FreeCAD is creating these malformed coincident constraints.
Re: Sketcher solver redundancy error
I found another coincidence to (-1,0) in one of my sketches so I am going to examine and remove them by hand. Is it possible to automate that? A script to iterate througn all sketches, check if there are coincidences to edge and report those?
Edit: It turned out to be in the begining so all subsequent sketches which were copies if it carried that constraint. Which was easy fix. But a macro will still be nice
Edit: It turned out to be in the begining so all subsequent sketches which were copies if it carried that constraint. Which was easy fix. But a macro will still be nice
Last edited by kisolre on Mon Apr 22, 2019 5:37 pm, edited 1 time in total.