Add Dimension for a Radius

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
netlinker
Posts: 9
Joined: Tue Jul 31, 2018 2:18 pm

Add Dimension for a Radius

Post by netlinker »

Hi all,

I have a problem dimensioning a bore hole. As you can see, there are to bores colliding in the material. When I try to select the circle in the projection, it is split into several arcs and some other stuff projected from the overlap of the two bores. This alone wouldn't be a problem if I could add a dimension to the arc, but when selecting one of the arcs and trying to apply a dimension, it tells me:
"Can't make a radius dimension from this selection (edge type: curve)"
Does anybody have a suggestion how to circumvent this?
I have 0.17 Rev 13522

Best regards
Attachments
Bildschirmfoto von 2018-07-31 16-32-22.png
Bildschirmfoto von 2018-07-31 16-32-22.png (22.22 KiB) Viewed 1858 times
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: Add Dimension for a Radius

Post by chrisb »

Hi netlinker, welcome.
Is the bore at a certain angle different from 90°, thus yielding an ellipse and not a circle at the surface? You can try using a TechDraw Dimension Link.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Add Dimension for a Radius

Post by wandererfan »

chrisb wrote: Tue Jul 31, 2018 3:52 pm Is the bore at a certain angle different from 90°, thus yielding an ellipse and not a circle at the surface? You can try using a TechDraw Dimension Link.
OCC might have turned the circular arcs into splines. It seems to do this quite often. Need to find a way to tell if a spline is "close enough" to being a circle and how to get the radius of the spline.
netlinker
Posts: 9
Joined: Tue Jul 31, 2018 2:18 pm

Re: Add Dimension for a Radius

Post by netlinker »

Thank you for the quick reply and the warm welcome to the forum!

The Bore is at an angle of exactly 90°.
It seems to be more a problem like wandererfan said.

The circle gets split into splines and there is no possibility to dimension a radius of a spline that is a arc of a circle.
The bad thing is, this also happens, when you create a sectional view, so this can't be used as a workaround.
Maybe this is a bug in the code for projections. Usually the topmost object should be projected. In this case the outer circle of the bore, which is perfectly intact and thus should be able to be dimensioned.
I also don't understand why the circle is split into splines and not arcs. Is there a possibility of telling OCC to not convert arcs into splines? Dimensioning of a rounded corner and thus arcs works perfectly well.
This does not solve the problem that it can be quite cumbersome to select an arc when there is lots of junk nearby, but at least it would be possible to apply a dimension.
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Add Dimension for a Radius

Post by wandererfan »

netlinker wrote: Wed Aug 01, 2018 8:24 am I also don't understand why the circle is split into splines and not arcs. Is there a possibility of telling OCC to not convert arcs into splines? Dimensioning of a rounded corner and thus arcs works perfectly well.
There is an option to return everything as polylines (which doesn't help), but nothing to prevent returning splines. There are functions that will take a returned curve (spline) and approximate it with a curve of specified degree and continuity. Might be able to use that to make circular arcs from a spline. We do something similar with straight lines that are returned as splines.
netlinker wrote: This does not solve the problem that it can be quite cumbersome to select an arc when there is lots of junk nearby, but at least it would be possible to apply a dimension.
32px-Techdraw-toggleframe.png
32px-Techdraw-toggleframe.png (1.63 KiB) Viewed 1799 times
TechDraw_Toggle will hide the "junk" to allow selecting an edge. Press it again to get the "junk" back.
netlinker
Posts: 9
Joined: Tue Jul 31, 2018 2:18 pm

Re: Add Dimension for a Radius

Post by netlinker »

Ah, I see. I just started using 0.17 didn't find the toggle button yet. This already helps a lot!
I just checked and verified that the problem is also present for a simple line containing arcs.
I still have to check if this is only the case, if the arc is derived from a 3D object (rounded corner), or if the problem persists when the arc is already present in a sketch.
I'll check that soon.
Attachments
Bildschirmfoto von 2018-08-01 14-53-30.png
Bildschirmfoto von 2018-08-01 14-53-30.png (8.8 KiB) Viewed 1792 times
netlinker
Posts: 9
Joined: Tue Jul 31, 2018 2:18 pm

Re: Add Dimension for a Radius

Post by netlinker »

I just checked ... a simple extrusion of a 2D Sketch containing arcs works well, so it seems to have something to do with the projection.
Attachments
Bildschirmfoto von 2018-08-02 09-38-28.png
Bildschirmfoto von 2018-08-02 09-38-28.png (16.74 KiB) Viewed 1764 times
Bildschirmfoto von 2018-08-02 09-35-49.png
Bildschirmfoto von 2018-08-02 09-35-49.png (8.96 KiB) Viewed 1764 times
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Add Dimension for a Radius

Post by wandererfan »

netlinker wrote: Wed Aug 01, 2018 8:24 am Maybe this is a bug in the code for projections. Usually the topmost object should be projected. In this case the outer circle of the bore, which is perfectly intact and thus should be able to be dimensioned.
This commit git commit 5730aae4c9 allows splines that are "close enough" to circular arc to be dimensioned. An "are you sure" dialog appears and the radius/diameter is approximated from the curvature of the spline. The approximation is usually very close, but not exact. You'll have to over-ride the Dimension format and set the dimension to Arbitrary to get the exact number on the display.
Post Reply