Rotated holes result in different sized Helix tool paths.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 23
- Joined: Fri Nov 16, 2018 2:00 am
Rotated holes result in different sized Helix tool paths.
I created a flat sheet with some 4.5mm holes, and create a clone of it and rotate the clone 90.
Then I select the holes in each object and apply "helix" tool path.
When I click on each of the helix paths, the diameter is different as shown in the base geometry. I measured and they are actually different.
I don't know if this is related, but the holes are poligonalized. When you rotate the hole, the polygon gets wider/shorter in one dimension because the points of the polygon are actually farther/closer apart the horizontal direction. I'm not sure if this causes the helix to get it's diameter from the horizontal width of those poligonalized holes.
I'm dealing with tolerances on the diameter of .05mm so the differences are noticable.
Is there a way to workaround? I tried "edit->preferences->units->NumberOfDecimals" but that didn't help.
Also, I searched this forum but didn't find any mention of this. Is this already known?
Then I select the holes in each object and apply "helix" tool path.
When I click on each of the helix paths, the diameter is different as shown in the base geometry. I measured and they are actually different.
I don't know if this is related, but the holes are poligonalized. When you rotate the hole, the polygon gets wider/shorter in one dimension because the points of the polygon are actually farther/closer apart the horizontal direction. I'm not sure if this causes the helix to get it's diameter from the horizontal width of those poligonalized holes.
I'm dealing with tolerances on the diameter of .05mm so the differences are noticable.
Is there a way to workaround? I tried "edit->preferences->units->NumberOfDecimals" but that didn't help.
Also, I searched this forum but didn't find any mention of this. Is this already known?
- Attachments
-
- rotatedHoleSize.png (75.51 KiB) Viewed 3086 times
- aka 'TheRainHarvester" on youtube.
Re: Rotated holes result in different sized Helix tool paths.
Please attach your FreeCAD file.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 23
- Joined: Fri Nov 16, 2018 2:00 am
Re: Rotated holes result in different sized Helix tool paths.
Attached.
- Attachments
-
- RotateHoleSize.FCStd
- (15.89 KiB) Downloaded 84 times
- aka 'TheRainHarvester" on youtube.
Re: Rotated holes result in different sized Helix tool paths.
I can confirm the issue, although I was a bit disappointed by the uploaded file, as it did not show the issue.
The holes have a diameter of 4.9mm. I reduced the sketch to one hole and added the clone. The helix contains both holes as BaseGeometry and shows the different diameters. If I measure the holes in a sketch the both show the correct diameter of 4.9.rainharvester wrote: ↑Tue Aug 06, 2019 8:16 pm I created a flat sheet with some 4.5mm holes, and create a clone of it and rotate the clone 90.
- Attachments
-
- RotateHoleSize_cb.FCStd
- (15.74 KiB) Downloaded 75 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 23
- Joined: Fri Nov 16, 2018 2:00 am
Re: Rotated holes result in different sized Helix tool paths.
Sorry for the mix up of the file.
Is there a workaround that I could use to make the hole the correct size (other than creating 2 different models for different rotations)?
Is this bug being worked on already?
Thanks!
Is there a workaround that I could use to make the hole the correct size (other than creating 2 different models for different rotations)?
Is this bug being worked on already?
Thanks!
- aka 'TheRainHarvester" on youtube.
Re: Rotated holes result in different sized Helix tool paths.
It seems to be a bug which I haven't seen before. We usually wait here for the experts to comment before creating a ticket.
sliptonic wrote:ping
mlampert wrote:ping
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Rotated holes result in different sized Helix tool paths.
Yes, select the eadge istead of the face of the hole.rainharvester wrote: ↑Thu Aug 08, 2019 1:38 am Is there a workaround that I could use to make the hole the correct size (other than creating 2 different models for different rotations)?
See code to determine hole diameter used by the helix operation:
Code: Select all
def holeDiameter(self, obj, base, sub):
'''holeDiameter(obj, base, sub) ... returns the diameter of the specified hole.'''
if self.baseIsArchPanel(obj, base):
edge = self.getArchPanelEdge(obj, base, sub)
return edge.BoundBox.XLength
try:
shape = base.Shape.getElement(sub)
if shape.ShapeType == 'Vertex':
return 0
if shape.ShapeType == 'Edge' and type(shape.Curve) == Part.Circle:
return shape.Curve.Radius * 2
# for all other shapes the diameter is just the dimension in X
return shape.BoundBox.XLength
except Part.OCCError as e:
PathLog.error(e)
return 0
Apparently edge.BoundBox.XLength gets calculated from finite approximated panels. Sadly this is python and i cant figure out what type edge is by looking at the code and therfore and where the BoundBox is being calculated.
Re: Rotated holes result in different sized Helix tool paths.
Looks like the first bit:
is never used only this is used:
shape here is of type Part::Face, asserted at run time. Thats all i have time for for now.
Code: Select all
if self.baseIsArchPanel(obj, base):
edge = self.getArchPanelEdge(obj, base, sub)
return edge.BoundBox.XLength
Code: Select all
# for all other shapes the diameter is just the dimension in X
return shape.BoundBox.XLength
Re: Rotated holes result in different sized Helix tool paths.
I get an error using Helix anyway, but I will start a new topic for that.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 23
- Joined: Fri Nov 16, 2018 2:00 am
Re: Rotated holes result in different sized Helix tool paths.
heh heh, the bound box seems to mimic what I thought : the poligonal lines that make up the holes are smaller when the hole is rotated 90.
Earlier I tried to workaround this by increasing the number of lines per circle (via all the "edit->preferences" settings), but I could find no attribute that affected this. Maybe I needed to draw the circle AFTER changing the settings?
I'll try your workaround... ... it works (in display AND cutout parts). Thanks for your help!
Now wait for devs to say if we should file a bug? (I'm not even sure if one of you IS a dev.)
Earlier I tried to workaround this by increasing the number of lines per circle (via all the "edit->preferences" settings), but I could find no attribute that affected this. Maybe I needed to draw the circle AFTER changing the settings?
I'll try your workaround... ... it works (in display AND cutout parts). Thanks for your help!
Now wait for devs to say if we should file a bug? (I'm not even sure if one of you IS a dev.)
- aka 'TheRainHarvester" on youtube.