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!
User avatar
uwestoehr
Posts: 694
Joined: Sun Jan 27, 2019 3:21 am

Carbon copy of a sketch results in unresolvable sketch

Postby uwestoehr » Wed May 15, 2019 12:13 am

From time to time I stumble over this sketch carbon copy issue I cannot resolve.

Attached is a simple pad example. I want to CC the sketch of the pad. Therefore I created the parallel "Sketch-CC".
So I open Sketch-CC and make a CC of the Sketch-Pad.

Result: the sketch is CCed but also mirrored. Moreover it is is fully constraint but unresolved:
FreeCAD_CC_problem2.png
FreeCAD_CC_problem2.png (92.89 KiB) Viewed 283 times

Therefore I cannot use "Sketch-CC" to create another pad. I can also not find any way to make the CCed sketch resolved.

Is there any trick how to do this? And how can i avoid that the CCing mirrors the sketch?

abdullah wrote:
Tue Mar 27, 2018 5:09 am
Abdullah, since you are familiar with this feature, maybe you have any idea?
Attachments
CarbonCopy-sketch-test.FCStd
test file
(17.48 KiB) Downloaded 24 times
User avatar
meme2704
Posts: 2926
Joined: Sat Apr 01, 2017 2:47 pm
Location: Vosges

Re: Carbon copy of a sketch results in unresolvable sketch

Postby meme2704 » Wed May 15, 2019 6:21 am

hi
I do not know what you did, but *** - cc is empty
if I do the classic manipulation, I have no problem
Attachments
copie sketch partiel.FCStd
(16.49 KiB) Downloaded 10 times
chrisb
Posts: 18106
Joined: Tue Mar 17, 2015 9:14 am

Re: Carbon copy of a sketch results in unresolvable sketch

Postby chrisb » Wed May 15, 2019 8:02 am

I can second meme's observation: the sketch is empty.

If I create a carbon copy I get the unsolved message. Report view says:

Code: Select all

Updating geometry: Error build geometry(5): gp_Circ::SetRadius() - radius should be positive number
Invalid solution from DogLeg solver.
Updating geometry: Error build geometry(2): gp_Circ::SetRadius() - radius should be positive number
Invalid solution from LevenbergMarquardt solver.
The issue seems to be already in previous steps. If I delete e.g. the top 2.5mm constraint and try immediately after the removal to add a radius constraint (0,5mm) to the left upper corner, the solver shows redundant constraints. If I manually move that arc to and fro I can add the constraint.

Observation on CarbonCopy: If I create a new sketch, then CarbonCopy works flawless.
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 8:07 am

uwestoehr wrote:
Wed May 15, 2019 12:13 am
Is there any trick how to do this? And how can i avoid that the CCing mirrors the sketch?
I guess the sketch is mirrored because attached to a mirrored face. You can have the sketch in the right place by setting its Map Reverse to True and its Yaw to 180°. But it is not enough to get it solved.
I don't know exactly why it stucks the solver but I guess that the constraint set is disturbed by all this spinning. :lol:

Anyway, there is a tip to get what you want. Moreover it will highly increase robustness of your design.
Map your Sketch-CC to XY-Plane then apply a Z-offset of Pad.Length value thanks to expressions. ;)
Attached the patch file. Now everything runs finely.
Attachments
CarbonCopy_OB.FCStd
(18.55 KiB) Downloaded 8 times
Last edited by openBrain on Wed May 15, 2019 11:09 am, edited 1 time in total.
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 8:18 am

chrisb wrote:
Wed May 15, 2019 8:02 am
The issue seems to be already in previous steps. If I delete e.g. the top 2.5mm constraint and try immediately after the removal to add a radius constraint (0,5mm) to the left upper corner, the solver shows redundant constraints. If I manually move that arc to and fro I can add the constraint.
I checked that but ATM found that the original "Sketch" is correctly constrained.
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. ;)
Last edited by openBrain on Wed May 15, 2019 11:44 am, edited 1 time in total.
User avatar
uwestoehr
Posts: 694
Joined: Sun Jan 27, 2019 3:21 am

Re: Carbon copy of a sketch results in unresolvable sketch

Postby uwestoehr » Wed May 15, 2019 9:05 am

meme2704 wrote:
Wed May 15, 2019 6:21 am
I do not know what you did, but *** - cc is empty
Yes, to demonstrate the problem, I just created Sketch-CC to the face of the pad where the CCed sketch should appear.
To reproduce the problem, just pen the empty Sketch-CC and then make a CC of Sketch-PAD.
openBrain wrote:
Wed May 15, 2019 8:07 am
I guess the sketch is mirrored because attached to a mirrored face. You can have the sketch in the right place by setting its Map Reverse to True and its Yaw to 180°.
Attached the patch file. Now everything runs finely.
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):
patched file has sektch not on face.png
patched file has sektch not on face.png (11.87 KiB) Viewed 234 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. ;)
I don't understand this as well. My original sketch is correctly constrained. I cannot see any redundants. So where is my mistake that lead to a unresolvable CCed sketch?
chrisb wrote:
Wed May 15, 2019 8:02 am
Observation on CarbonCopy: If I create a new sketch, then CarbonCopy works flawless.
Please try to create a new sketch at the upper face of the pad as I did and make a CC of the initial sketch and you will see the problem.
chrisb
Posts: 18106
Joined: Tue Mar 17, 2015 9:14 am

Re: Carbon copy of a sketch results in unresolvable sketch

Postby chrisb » Wed May 15, 2019 9:12 am

openBrain wrote:
Wed May 15, 2019 8:18 am
chrisb wrote:
Wed May 15, 2019 8:02 am
The issue seems to be already in previous steps. If I delete e.g. the top 2.5mm constraint and try immediately after the removal to add a radius constraint (0,5mm) to the left upper corner, the solver shows redundant constraints. If I manually move that arc to and fro I can add the constraint.
I checked that but ATM found that the original "Sketch" is correctly constrained.
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.
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.
User avatar
uwestoehr
Posts: 694
Joined: Sun Jan 27, 2019 3:21 am

Re: Carbon copy of a sketch results in unresolvable sketch

Postby uwestoehr » Wed May 15, 2019 9:17 am

uwestoehr wrote:
Wed May 15, 2019 9:05 am
Please try to create a new sketch at the upper face of the pad as I did and make a CC of the initial sketch and you will see the problem.
Here is a screencast of what I did to get the problem:

Steps-to-reproduce2.gif
screencast to reproduce
Steps-to-reproduce2.gif (896.24 KiB) Viewed 231 times
User avatar
uwestoehr
Posts: 694
Joined: Sun Jan 27, 2019 3:21 am

Re: Carbon copy of a sketch results in unresolvable sketch

Postby uwestoehr » Wed May 15, 2019 9:20 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.
But also if I do it your way: remove the 2.5 mm constraint, move the arc and then set its radius to 0.5 mm I get a fully constraint sketch. But the result of the CCing is the same as before, see my screencast in my previous post.
chrisb
Posts: 18106
Joined: Tue Mar 17, 2015 9:14 am

Re: Carbon copy of a sketch results in unresolvable sketch

Postby chrisb » Wed May 15, 2019 9:35 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 talking about toponaming we usually only think of numbering faces, edges and vertices. But there seems to be more to it, such as the orientation of the faces, which seems to have some randomness from OCC side.
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):
patched file has sektch not on face.png
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.
Attachments
CarbonCopy_cb.FCStd
(15.33 KiB) Downloaded 4 times
Bildschirmfoto 2019-05-15 um 11.32.32.png
Bildschirmfoto 2019-05-15 um 11.32.32.png (18.24 KiB) Viewed 213 times