discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Fwd: Re: hirth joint

RW
Raymond West
Thu, Nov 7, 2024 12:54 PM

Hi Adrian,

afaik, my geometry is good enough. I get no errors or warnings. I'm
using OpenSCAD version 2024.02.19 (git 5cfd4dbe0)

Parsing design (AST generation)...

Saved backup file:
C:/Users/ray/Documents/OpenSCAD/backups/hirth-backup-cEZVCbrD.scad

Compiling design (CSG Tree generation)...

ECHO: gradiant = 1.60398

Rendering Polygon Mesh using Manifold...

Geometries in cache: 121

Geometry cache size in bytes: 535424

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Total rendering time: 0:00:00.060

Top level object is a 3D object:

Facets: 1568

Rendering finished.

What parameters are you using that cause  problems? I've tested a
variety of parameters, and provided the number of ridges is three or
more, and the angles, etc. are reasonable, then it works fine.

These values are OK for example, and give the above console output

// hirth.scad

ind = 50;  // overall diameter
num = 28;  // number of teeth
angle = 90; //tooth angle (usually 60 or 90)
flat = 0.5; // amount by which tips are flattened

back = 10; //thickness of back
bore = 6.5; // diameter of hole
recess = 26;// diameter of recess in centre
/////////////////////////////////////////////

On 05/11/2024 22:27, Adrian Mariano wrote:

Ray, I tried your code and (1) preview is very very slow on my machine
and (2) render gives

Rendering Polygon Mesh using CGAL...

ERROR: The given mesh is not closed! Unable to convert to
CGAL_Nef_Polyhedron.

ERROR: The given mesh is not closed! Unable to convert to
CGAL_Nef_Polyhedron.

ERROR: The given mesh is not closed! Unable to convert to
CGAL_Nef_Polyhedron.

ERROR: The given mesh is not closed! Unable to convert to
CGAL_Nef_Polyhedron.

ERROR: The given mesh is not closed! Unable to convert to
CGAL_Nef_Polyhedron.

Geometries in cache: 9903

I'm now convinced that Bob has the right basic approach. The key thing
is the idea of projecting onto a cylinder. Working in spherical
coordinates never made sense to me, but for some reason the idea of
just projecting points onto a cylinder didn't occur to me. (At one
point I thought about doing it, but with equations, not with code,
which was a bad idea.) With this insight I can now make roundings
while creating the object as a single polyhedron:

image.png

On Tue, Nov 5, 2024 at 12:54 PM Raymond West via Discuss
discuss@lists.openscad.org wrote:

 I've modified it slightly, to allow the tooth angle to be set - In
 manufacturing, most likely a 60 or 90 degree angle. I've also
 included the angle to set the rotary table, and added a method of
 flattening the tips. I think this could 3d printed OK, I've yet to
 test. The stl would not be used in any other manufacturing
 process, afaik. For machining, It could be set up directly from
 the parameters. I've attached the code below. The flattening of
 the peaks give a slight taper. Adding an extra triangle to the
 polyhedron, could generate a more tapered width to the flat top,
 but for whatever use I may put this too, if any, it is unlikely to
 make much difference.

 The code will produce a viable stl, for any number of teeth, 
 including three and upwards, and it f6 renders fast enough.

 Here is a link to some curvic coupling design, which is a bit more
 involved to generate -
 https://www.geartechnology.com/articles/20867-curvic-coupling-design.


 On 04/11/2024 17:05, Raymond West via Discuss wrote:
 found it- etc.
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org
Hi Adrian, afaik, my geometry is good enough. I get no errors or warnings. I'm using OpenSCAD version 2024.02.19 (git 5cfd4dbe0) Parsing design (AST generation)... Saved backup file: C:/Users/ray/Documents/OpenSCAD/backups/hirth-backup-cEZVCbrD.scad Compiling design (CSG Tree generation)... ECHO: gradiant = 1.60398 Rendering Polygon Mesh using Manifold... Geometries in cache: 121 Geometry cache size in bytes: 535424 CGAL Polyhedrons in cache: 0 CGAL cache size in bytes: 0 Total rendering time: 0:00:00.060 Top level object is a 3D object: Facets: 1568 Rendering finished. What parameters are you using that cause  problems? I've tested a variety of parameters, and provided the number of ridges is three or more, and the angles, etc. are reasonable, then it works fine. These values are OK for example, and give the above console output // hirth.scad ind = 50;  // overall diameter num = 28;  // number of teeth angle = 90; //tooth angle (usually 60 or 90) flat = 0.5; // amount by which tips are flattened back = 10; //thickness of back bore = 6.5; // diameter of hole recess = 26;// diameter of recess in centre ///////////////////////////////////////////// On 05/11/2024 22:27, Adrian Mariano wrote: > Ray, I tried your code and (1) preview is very very slow on my machine > and (2) render gives > > Rendering Polygon Mesh using CGAL... > > ERROR: The given mesh is not closed! Unable to convert to > CGAL_Nef_Polyhedron. > > ERROR: The given mesh is not closed! Unable to convert to > CGAL_Nef_Polyhedron. > > ERROR: The given mesh is not closed! Unable to convert to > CGAL_Nef_Polyhedron. > > ERROR: The given mesh is not closed! Unable to convert to > CGAL_Nef_Polyhedron. > > ERROR: The given mesh is not closed! Unable to convert to > CGAL_Nef_Polyhedron. > > Geometries in cache: 9903 > > I'm now convinced that Bob has the right basic approach. The key thing > is the idea of projecting onto a cylinder. Working in spherical > coordinates never made sense to me, but for some reason the idea of > just projecting points onto a cylinder didn't occur to me. (At one > point I thought about doing it, but with equations, not with code, > which was a bad idea.) With this insight I can now make roundings > while creating the object as a single polyhedron: > > image.png > > > On Tue, Nov 5, 2024 at 12:54 PM Raymond West via Discuss > <discuss@lists.openscad.org> wrote: > > I've modified it slightly, to allow the tooth angle to be set - In > manufacturing, most likely a 60 or 90 degree angle. I've also > included the angle to set the rotary table, and added a method of > flattening the tips. I think this could 3d printed OK, I've yet to > test. The stl would not be used in any other manufacturing > process, afaik. For machining, It could be set up directly from > the parameters. I've attached the code below. The flattening of > the peaks give a slight taper. Adding an extra triangle to the > polyhedron, could generate a more tapered width to the flat top, > but for whatever use I may put this too, if any, it is unlikely to > make much difference. > > The code will produce a viable stl, for any number of teeth,  > including three and upwards, and it f6 renders fast enough. > > Here is a link to some curvic coupling design, which is a bit more > involved to generate - > https://www.geartechnology.com/articles/20867-curvic-coupling-design. > > > On 04/11/2024 17:05, Raymond West via Discuss wrote: >> >> found it- etc. >> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >