Nut and bolt with homegrown CAD

Discussions about CAD use and designing

Nut and bolt with homegrown CAD

Postby cacb » 2016-Mar-Fri-12-Mar

I like making software and some may remember the CSG modeller based on AngelScript viewtopic.php?f=20&t=10650
At that time it was a preprocessor to OpenSCAD, and it can still be used that way. However, I have recently been working with doing the boolean operations without OpenSCAD, because it is a challenge and because I want something a bit faster. I found an interesting library called CARVE that can do similar things, so I started looking into it. It turns out it is quite good, so I began building functionality around it. With this tool I can do almost all what OpenSCAD can do, and most of the time significantly faster.

As a test of a new feature yesterday I designed an M16 metric nut and bolt, with threads according to https://en.wikipedia.org/wiki/ISO_metric_screw_thread . Could I design it, print it so the nut and bolt fit? Here are some results:

First a view of the STL file mesh of the bolt (D=16mm, pitch=2mm) . The threads have been created by winding the thread profile about 15 times around. Then unioned with a cylinder to make a threaded rod. Then unioned that with the rounded head to make a bolt, and the other rod end slightly chamfered.
bolt_mesh1.jpg


The nut is created by subtracting the threaded rod from the head, adding a 0.5mm clearance
nut_mesh1.jpg


Here are the two parts printed on my Simple Metal. 0.1mm layer, 210C, no brand PLA. Bed temperature 65C.
IMG_0195.jpg


And yes, the threads actually fit ....
IMG_0189.jpg
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18

Nut and bolt with homegrown CAD

Sponsor

Sponsor
 

Re: Nut and bolt with homegrown CAD

Postby Mooselake » 2016-Mar-Fri-13-Mar

That's impressive!

Does that mean you've using the CARVE library within AngelScript CSG? Is there a new version to download?

Kirk
  • 0

Modified KickStarter Classic Plus 7/2012
KS Thingybot Delta Pro 10/31/16
Creality Ender 3 Pro 12/2019
User avatar
Mooselake
My next printer is...
 
Posts: 3623
Joined: 2011-Dec-Tue-23-Dec
Location: Moose Swamp, Upper Michigan, USA
Reputation: 177

Re: Nut and bolt with homegrown CAD

Postby cacb » 2016-Mar-Fri-13-Mar

Mooselake wrote:That's impressive!

Does that mean you've using the CARVE library within AngelScript CSG? Is there a new version to download?


Thank you! Yes, you've got that right, there is now an alternative path where OpenSCAD isn't used. However, this carve-based route isn't ready so there isn't a new version at this moment. But I am able to use it for a few things.
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18

Re: Nut and bolt with homegrown CAD

Postby frankv » 2016-Mar-Fri-14-Mar

Interesting!

Where can I find out more about the CARVE library?

I'm interested in using to convert scanned meshes as .OBJ files into solids as .STEP or similar.
  • 0

frankv
First blob a success!
 
Posts: 519
Joined: 2015-Jan-Thu-12-Jan
Reputation: 18

Re: Nut and bolt with homegrown CAD

Postby cacb » 2016-Mar-Fri-17-Mar

frankv wrote:Interesting!

Where can I find out more about the CARVE library?


https://code.google.com/archive/p/carve/

It takes some work to figure out....
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18

Re: Nut and bolt with homegrown CAD

Postby Mooselake » 2016-Mar-Fri-18-Mar

frankv wrote:I'm interested in using to convert scanned meshes as .OBJ files into solids as .STEP or similar.

If you haven't already, check out meshlab (and here). It won't get you to step files, but at least it'll clean up those scanned meshes.

Kirk
  • 0

Modified KickStarter Classic Plus 7/2012
KS Thingybot Delta Pro 10/31/16
Creality Ender 3 Pro 12/2019
User avatar
Mooselake
My next printer is...
 
Posts: 3623
Joined: 2011-Dec-Tue-23-Dec
Location: Moose Swamp, Upper Michigan, USA
Reputation: 177

Re: Nut and bolt with homegrown CAD

Postby frankv » 2016-Mar-Fri-18-Mar

Yes, I have Meshlab. Also this, which works with MeshLab and Blender http://3d-print.link/download/lunavast-cgto3dprint/ and a bunch other stuff. But nothing seems good at converting meshes to solids (yes, I know that's a difficult problem).

However, what I'm aiming to do is to take some of the myriad 3D models on the Net and edit them to make them 3D printable.

Naturally, :roll: I've started with a complex example... the Wright Brothers 1903 Flyer 3D-scanned by the Smithsonian... http://3d.si.edu/downloads/48

Tools I'm using are MeshMixer to chop the model into bits and MeshLab to simplify the meshes of each part. But I want to load it into OnShape (since that's my preferred CAD program) to edit the parts (e.g. adding tabs and pins and so on to the parts for reassembly), scaling, etc. However, OnShape won't read .OBJ files, so I'm using FreeCAD to convert to a solid and export as STEP/IGES. But the conversion re-adds all the removed complexity, and makes the object file huge and unwieldy again. :( I'm thinking maybe to use cacb's app, or the CARVE library, or whatever, to simplify the solids.
  • 0

frankv
First blob a success!
 
Posts: 519
Joined: 2015-Jan-Thu-12-Jan
Reputation: 18

Re: Nut and bolt with homegrown CAD

Postby cacb » 2016-Mar-Sat-02-Mar

frankv wrote:However, OnShape won't read .OBJ files, so I'm using FreeCAD to convert to a solid and export as STEP/IGES. But the conversion re-adds all the removed complexity, and makes the object file huge and unwieldy again. :(


I think FreeCAD is based on OpenCascade http://www.opencascade.com/, a "traditional" and complicated CAD B-rep representation. That is a very different animal compared to a mesh based approach. You are going to struggle very hard to convert from a mesh to a usable STEP or IGES. FreeCAD can import OpenSCAD .csg files, but it will not understand those commands that usually rely on a mesh based representation (hull and minkowski are a couple of such examples).

"nothing seems good at converting meshes to solids". Meshes are solids. I think what you are really saying is "nothing seems good at converting meshes to a STEP type model". In the general case that's impossible in a meaningful way, so I am not surprised. To make "the myriad 3D models on the Net" 3d printable you will have to stay with meshes in many cases. At least that is what I think.
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18

Re: Nut and bolt with homegrown CAD

Postby cacb » 2016-Mar-Sat-16-Mar

Now on Thingiverse http://www.thingiverse.com/thing:1445033 if you want to give it a try
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18


Return to CAD & design

Who is online

Users browsing this forum: No registered users and 1 guest