BOSL2/gears bevel_gear bug?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

BOSL2/gears bevel_gear bug?

LenStruttmann
Even though I am a noobie, it looks like I've run across some apparent issues in BOSL2/gears.scad

When using anchor=TOP" or BOTTOM, or "flattop" in bevel_gear(), the resulting translation is incorrect:

Here is my example code:

$fn = 24;

include <BOSL2/std.scad>;
include <BOSL2/gears.scad>;
include <BOSL2/attachments.scad>;

#bevel_gear(
   pitch=5, teeth=36, face_width=20, shaft_diam=5,
   pitch_angle=45, spiral_angle=0, anchor=BOTTOM  // or TOP, or "flattop"
);


When using anchor=TOP or "flattop", the gear top is just above the axis, as shown in the first image.
anchor=TOP

When using anchor=BOTTOM, the gear bottom is just below the axis, as shown in the second image.
anchor=BOTTOM

This issue seems to be caused by the fact that the "thickness" variable is calculated differently in the bevel_gear() function...

Line 963:         thickness = abs(verts1[0][0].z - select(verts1,-1)[0].z),

...than it is in the bevel_gear() module...

Line 1028:     thickness = face_width * cos(pitch_angle);

As someone who is very new to OpenSCAD and BOSL2, my question is:

Q. Is this truly a bug, or am I misinterpreting what anchor is meant to do?


A secondary consequence of this is that the true thickness of the gear is not available to the user.

When using anchor="apex" to get a correctly matched pair of bevels, as far as I can tell, the user MUST have access to the true thickness and/or the distance from the apex to (at least) one face of the gear to correctly place the gears in an assembly.  This suggested that one or more bevel-gear informational functions may need to be added.

Your thoughts?


Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2/gears bevel_gear bug?

adrianv
To me it looks like a bug.  Worse:  if you try to render the gear with F6 it fails--that's definitely a bug.  You can submit an issue on github.  

LenStruttmann wrote
Even though I am a noobie, it looks like I've run across some apparent issues
in BOSL2/gears.scad

When using anchor=TOP" or BOTTOM, or "flattop" in bevel_gear(), the
resulting translation is incorrect:



Your thoughts?

--
Sent from: http://forum.openscad.org/
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]


Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2/gears bevel_gear bug?

LenStruttmann
Thanks!

On Mon, Mar 29, 2021 at 3:46 PM adrianv <[hidden email]> wrote:
To me it looks like a bug.  Worse:  if you try to render the gear with F6 it fails--that's definitely a bug.  You can submit an issue on github.  

LenStruttmann wrote
Even though I am a noobie, it looks like I've run across some apparent issues
in BOSL2/gears.scad

When using anchor=TOP" or BOTTOM, or "flattop" in bevel_gear(), the
resulting translation is incorrect:



Your thoughts?

--
Sent from: http://forum.openscad.org/
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]


Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]