Sketcher error, "radius should be positive number"
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!
Sketcher error, "radius should be positive number"
I'm running an older (0.18.0.18.4) release and am wondering if the issue I'm seeing is still present, so looking for a sanity check.
Load the attached file and edit Sk_RimCross.
The arc has been constrained with both endpoints on the circle.
The vertical and horizontal bar have been made coincident and the left end of the horizontal bar has been made coincident with the lower left point on the arc. The two legs of the arc are equal.
If you select the upper two points and attempt to make them coincident, I get the error:
"Updating geometry: Error build geometry(1): gp_Circ::SetRadius() - radius should be positive number
Invalid solution from DogLeg solver."
Does this error still exist in 0.19?
Is there a better way to create this sketch?
This example is cut down from a sketch with a wedge in each quadrant and an outer ring, to make a "tire" with four spokes.
OS: FreeBSD 11.3-RELEASE-p12
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.0.18.4
Build type: Release
Python version: 3.7.8
Qt version: 5.14.2
Coin version: 4.0.0
OCC version: 7.4.0.beta
Locale: C/Default (C)
Load the attached file and edit Sk_RimCross.
The arc has been constrained with both endpoints on the circle.
The vertical and horizontal bar have been made coincident and the left end of the horizontal bar has been made coincident with the lower left point on the arc. The two legs of the arc are equal.
If you select the upper two points and attempt to make them coincident, I get the error:
"Updating geometry: Error build geometry(1): gp_Circ::SetRadius() - radius should be positive number
Invalid solution from DogLeg solver."
Does this error still exist in 0.19?
Is there a better way to create this sketch?
This example is cut down from a sketch with a wedge in each quadrant and an outer ring, to make a "tire" with four spokes.
OS: FreeBSD 11.3-RELEASE-p12
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.0.18.4
Build type: Release
Python version: 3.7.8
Qt version: 5.14.2
Coin version: 4.0.0
OCC version: 7.4.0.beta
Locale: C/Default (C)
- Attachments
-
- Bug_Sketcher_HoleCross_5.FCStd
- (14.95 KiB) Downloaded 59 times
-
- Veteran
- Posts: 3191
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Sketcher error, "radius should be positive number"
Was it your intention to make the center of the arc where the two straights join?
Re: Sketcher error, "radius should be positive number"
It works here:
. .
OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23717 (Git)
Build type: Release
Branch: master
Hash: 254ed951f924687e3dffb325288bbc0333980b9c
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Bulgarian/Bulgaria (bg_BG)
. .
OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23717 (Git)
Build type: Release
Branch: master
Hash: 254ed951f924687e3dffb325288bbc0333980b9c
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Bulgarian/Bulgaria (bg_BG)
See the gif - the wire in question first shows fully constrained after the coincidence but then properly switches to unconstrained.abdullah wrote: ping
Re: Sketcher error, "radius should be positive number"
There is indeed something wrong with solving this sketch. If I drag the center of the arc towards the center of the circle, and create the coincidence, parts of the sketch show as being constrained;
This is another case of a partially dropped constraint. The right way would be to add a vertical constraint between the right end of the arc and the upper end of the vertical line.
My version is the latest available, yet it is more than two weeks old.
OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23578 (Git)
Build type: Release
Branch: master
Hash: 50c3cbf00579dc4941ca743c25720d016b0453ce
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
but they aren't: The center of the arc can still be moved. And if I do so, the color of arc and lines turn back to white again.This is another case of a partially dropped constraint. The right way would be to add a vertical constraint between the right end of the arc and the upper end of the vertical line.
My version is the latest available, yet it is more than two weeks old.
OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23578 (Git)
Build type: Release
Branch: master
Hash: 50c3cbf00579dc4941ca743c25720d016b0453ce
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Sketcher error, "radius should be positive number"
There is another buglet: The vertical line has an equality and a vertical constraint. Only the equality is hidden (moved to virtual space), but the vertical constraint symbol is shown if and only if the equality is shown too.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Sketcher error, "radius should be positive number"
Yesedwilliams16 wrote: ↑Mon Jan 18, 2021 9:24 pm Was it your intention to make the center of the arc where the two straights join?
Re: Sketcher error, "radius should be positive number"
Right; it's not constrained because the center of the arc (coincident with joining straight lines) is not yet constrainedchrisb wrote: ↑Mon Jan 18, 2021 10:46 pm There is indeed something wrong with solving this sketch. If I drag the center of the arc towards the center of the circle, and create the coincidence, parts of the sketch show as being constrained;
but they aren't: The center of the arc can still be moved. And if I do so, the color of arc and lines turn back to white again.
I see how a vertical constraint solves the issue. Is the coincident constraint somehow a partial over-constaint? Is there some intelligient way to learn / intuit that I need a vertical constraint instead of a coincident one? I have had other cases where geometry implies something is coincident, but the sketcher doesn't see it that way so I have to add a coincident constraint. Unfortunately I don't have an example; it might have been a result of undoing something that just left points on top of each other.
Re: Sketcher error, "radius should be positive number"
In that case you should have omitted the equality constraint on the lines. It follows from the fact that both lines are radiuses of the arc and they are coincident in the center and on the endpoints.garya wrote: ↑Mon Jan 18, 2021 11:36 pmYesedwilliams16 wrote: ↑Mon Jan 18, 2021 9:24 pm Was it your intention to make the center of the arc where the two straights join?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Sketcher error, "radius should be positive number"
Look at my sketcher tutorial in my signature: If you know the number of constraints consumed by a constraint, you should always have a look at the solver messages. If the number of degrees of freedom doesn not shrink as expected, you should choose a different constraint.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Sketcher error, "radius should be positive number"
I noticed that also but forgot to mention it.
It may be a result of previous actions, if that's possible. This sketch was the result of deleting components of a previous sketch which had the pieces for a wedge in each of the quadrants. When I first built it, I didn't get an error for some reason connecting the pieces in the first quadrant; I only saw it when doing the one in the upper right quadrant after having done the one in the upper left.