Carbon copy of a sketch results in unresolvable sketch

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
openBrain
Posts: 1959
Joined: Fri Nov 09, 2018 5:38 pm

Re: Carbon copy of a sketch results in unresolvable sketch

Postby openBrain » Wed May 15, 2019 11:12 am

uwestoehr wrote:
Wed May 15, 2019 9:05 am
I don't understand. I created Sketch-CC at the upper face of the pad, parallel to the initial sketch. This face is not a mirrored one but the result of the padding.
When I look in your patched file I see that you created the sketch "in the air" but this sketch must be at the face of the pad (connected to the pad face):
My mistake. Didn't pay attention that your pad was in the reverse direction. I edited my previously attached file so it is now correct.
chrisb also did the same thing in between my 2 posts. A picture so maybe its clearer :
sketch_expr.png
sketch_expr.png (41.83 KiB) Viewed 173 times
openBrain wrote:
Wed May 15, 2019 8:18 am
This is normal you get a redundant constraint when adding a radius to the top left corner as it over-constrains the sketch along the Y axis. ;)
Was talking to chrisb. ;)
User avatar
uwestoehr
Posts: 690
Joined: Sun Jan 27, 2019 3:21 am

Re: Carbon copy of a sketch results in unresolvable sketch

Postby uwestoehr » Wed May 15, 2019 11:28 am

chrisb wrote:
Wed May 15, 2019 9:35 am
You should attach the new sketch to XY plane just as you did with the original one, and move it per expression in Z direction to -Pad.Length. That would make your model much more robust and CarbonCopy would work as well.
Many thanks this works!
Nevertheless I don't understand why the CCing resulted in an unresolvable state with my method. I understand now why the mirroring occurred but not the error with the unresolvable sketch result. I just want to assure that there is not a bug in the CCing code that might affect me or other users in other occasions.

Offtopic: Concerning toponaming, this is in my opinion THE only field where FC is not yet ready for a 1.0 version. That the numbering of edges and faces are random is a nightmare : For example I know that I should insert fillets at the very last but in real live I often have the case that I have to cut into fillets. Changing such parts is a nightmare because almost every change changes the edge numbers, then the fillet is either broken or at the wrong edge and then the cuts and evolves are all broken and I have to invest 5 minutes again and again to repair my model.
Besides toponaming I can say that FC 0.18 is absolutely ready for production use and I use it already at work for my daily design work.
openBrain
Posts: 1959
Joined: Fri Nov 09, 2018 5:38 pm

Re: Carbon copy of a sketch results in unresolvable sketch

Postby openBrain » Wed May 15, 2019 11:41 am

chrisb wrote:
Wed May 15, 2019 9:12 am
It can't be normal, because I can constrain it after pulling the arc. Please note that I had removed one DOF and the radius should add one again.
Took some more time and .. you're right. My mind goes wrong. Basic math applies and 1 DoF can replace another. Sorry for noise.
But there is indeed an interesting bug in the solver that falsely detects redundant constraints. It seems to happen when 2 curves are tangent by design but not by constraint.
To demonstrate, take the basic sketch below (notice arc and top line are not constrained tangent) :
sketcher_bug.png
sketcher_bug.png (13.79 KiB) Viewed 163 times
Delete the 2.5 mm constraint and add a radius to the arc => Solver (falsely) finds a redundant constraint
Reset the sketch to initial state, change the 4 mm constraint to 3 mm, then do the same as previous step => Solver (correctly) finds a fully constrained sketch

Wait for a confirmation to open a ticket. ;)
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Carbon copy of a sketch results in unresolvable sketch

Postby abdullah » Wed May 15, 2019 11:44 am

uwestoehr wrote:
Wed May 15, 2019 11:28 am
Nevertheless I don't understand why the CCing resulted in an unresolvable state with my method.
You don't and for good reason. It is a bug.

Please file bug in the tracker against the Sketcher project just put a title and link this thread.
openBrain
Posts: 1959
Joined: Fri Nov 09, 2018 5:38 pm

Re: Carbon copy of a sketch results in unresolvable sketch

Postby openBrain » Wed May 15, 2019 11:46 am

abdullah wrote:
Wed May 15, 2019 11:44 am
You don't and for good reason. It is a bug.

Please file bug in the tracker against the Sketcher project just put a title and link this thread.
Do you think it's the same bug as the one I described just above your post, or should another ticket be filled ?
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Carbon copy of a sketch results in unresolvable sketch

Postby abdullah » Wed May 15, 2019 12:02 pm

openBrain wrote:
Wed May 15, 2019 11:46 am
abdullah wrote:
Wed May 15, 2019 11:44 am
You don't and for good reason. It is a bug.

Please file bug in the tracker against the Sketcher project just put a title and link this thread.
Do you think it's the same bug as the one I described just above your post, or should another ticket be filled ?
No, it is another bug. Yes, please, file it. This one against the solver project (GCS project).

There are some files which are failing and it is good to have examples for two reasons: To help fix the problem and to make unit tests out of them, so that once the problem is fixed we avoid reintroducing the problem again with another "fix".
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Carbon copy of a sketch results in unresolvable sketch

Postby jmaustpc » Wed May 15, 2019 12:37 pm

openBrain wrote:
Wed May 15, 2019 11:41 am
To demonstrate, ta
If you post the file as well as the screen shot, we could get a better idea of what you are talking about.
openBrain
Posts: 1959
Joined: Fri Nov 09, 2018 5:38 pm

Re: Carbon copy of a sketch results in unresolvable sketch

Postby openBrain » Wed May 15, 2019 12:45 pm

jmaustpc wrote:
Wed May 15, 2019 12:37 pm
If you post the file as well as the screen shot, we could get a better idea of what you are talking about.
I know it Jim. But this time I inadvertently closes FC without saving. Given the sketch simplicity, I guessed the screenshot should be enough. ;)
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Carbon copy of a sketch results in unresolvable sketch

Postby jmaustpc » Wed May 15, 2019 12:58 pm

openBrain wrote:
Wed May 15, 2019 12:45 pm
jmaustpc wrote:
Wed May 15, 2019 12:37 pm
If you post the file as well as the screen shot, we could get a better idea of what you are talking about.
I know it Jim. But this time I inadvertently closes FC without saving. Given the sketch simplicity, I guessed the screenshot should be enough. ;)
No it isn't, the screen shot looks like you made a mistake, please recreate the file and let us see exactly what you did and exactly what FreeCAD does.
User avatar
uwestoehr
Posts: 690
Joined: Sun Jan 27, 2019 3:21 am

Re: Carbon copy of a sketch results in unresolvable sketch

Postby uwestoehr » Wed May 15, 2019 1:08 pm

jmaustpc wrote:
Wed May 15, 2019 12:58 pm
No it isn't, the screen shot looks like you made a mistake, please recreate the file and let us see exactly what you did and exactly what FreeCAD does.
I can help out since I can reproduce the issue, see attached an example file:
Constraint-bug-test.FCStd
contraint test
(9.62 KiB) Downloaded 8 times