OpenSCAD to RhinoCAM

I design simple objects in OpenSCAD. Most of my parts consist only out of contours to cut and a few pockets. I have to use RhinoCAM in Rhino 5 on a Windows 10 PC to mill it on the CNC mill in our shared workspace.

I can export my parts to STL files and Rhino 5 can import it. But in RhinoCAM I can not select anything, when creating a 2D or 3D step.

Rhino is only a small and very overcomplicated step in my workflow. So I do not want to waste to much time with it. What is the fastest way to convert the STL files to something RhinoCAM can work with? Are there scripts for this ugly tasks?

Why are you exporting via STL? If it’s only 2D contours, just export as curves. Or some surface-based export format such as IGES or STEP. Rhino/RhinoCAM will have no problem extracting contours with those. (STL files are meshes)

If you must use a mesh model, the only thing that you can use in RhinoCAM will be some of the 3D machining operations. But you should be able to run outlines and pockets on meshes with something like waterline machining (horizontal roughing and finishing).

Oh, and I guess the main question to ask here is why the heck are you designing your parts in OpenSCAD when you have Rhino ???

Most of my parts are 2D, but an 2D export would loses the Z dimension of the part and the depth of the pockets. And I want a workflow for all my parts, even the more complex ones. I want to automate my workflow as much as possible.

I tried for 12h to get Mill steps for simple screw holes with a pocket holes around them for a nut done. Still no success.

Why OpenSCAD?

  • 1000 USD saved on a personal licence and I use OpenSCAD on as many machines as I want. I use 4-8 differnt machines on a regular basis. My laptop and tablets are not powerful enough to run Rhino. I am a hobbiest and I would not use Rhino so often to remember all the things I must know to use Rhino. No dongle-pain, I am secure there is no licence trouble after updates or hard disk problems etc. In the shared workshop there are people that know how to handle the Rhino “licence server” and all the trouble that could comes with it. I just want to generate G code with minimal risk to damage the CNC. AFAIK it is difficult to generate G code from OpenSCAD because it exports cracy meshes.
  • Parametric design seems easier to me in OpenSCAD. I am a programmer, so it is very convinient to write code. But I am bad at learning icons and I hate learning icons. Sometimes I ask myself if Icons are made for analphabets?
  • I am an amateur and the documentation for OpenSCAD is easier to understand.
  • platform independence, linux is my favourite platform and I hope it has identical features on Macs and Windows.
  • greater user base and more online resources (tutorials, forums, howtos) and most of them are free. Rhino tutorials often have costs attached.
  • I can work on any device to edit my source text files, even a serial text terminal would do (validation and rendering needs a OpenSCAD installation). If am bored riding the train I edit on my phone.

Why RhinoCAM?

The CNC machine is preconfigured for RhinoCAM on the computers of my shared workshop. I hope all the defaults in RhinoCAM and CNC firmware work together nicely. Many people can check my work in the the shared workspace. I really do not want to damage the CNC with a frequenlty repeated error in my G code or incompatible G code.

No, you can export any 2D contours (from Rhino at least, many other CAD programs as well) at their correct 3D levels so you don’t lose your 3D at all. We have a tendency to call that 2.5D.

Well… remember, a mesh does not have any recognizable “features” that could be used by a CAM program to tell it for example that you have a real, circular hole - so you are most likely going to need to simply run some sort of 3D machining cycle over the part (probably horizontal finishing) and try to have it machine the mesh part as precisely as possible. In any case if you start with a mesh, you will have only facets so your holes will not be really round. If the mesh is fine enough it may not matter too much, depending on what precision you need. If you’re drilling holes, all you need is point objects at the centers.

I would question a number of points you made, but of course if you want free CAD, you won’t be buying Rhino. You seem to believe that paying for and managing a Rhino license is “trouble” - well the paying for it part might be perhaps… Other points -

You can type all your commands in Rhino, you don’t need to learn icons. You can also program Rhino with Python to do almost anything.

Dunno, Rhino has over half a million users… That’s a pretty good base. Virtually all the tutorials I’ve seen (and there are lots) are completely free.

That’s what on-screen simulations are for.

All that said, it seems to me that you are looking at it through the wrong end of the telescope. You are trying to adapt a program that seems poorly suited to your stated needs instead of finding something that actually works to make what you want. There are lots of other free CAD programs out there that can design AND export quality 3D parts that RhinoCAM can machine. From what you’ve described, the limitations all seem to be on the OpenSCAD end, not the Rhino/RhinoCAM end.

I must check what 2.5D file format and conversion tools are available to me.

You are right, Rhino is not the solution for me. But i would love to use RhinoCAM as the G code generator. It would be saver than most other solutions. There are errors in some G code generators that could damage the CNC mill. The shared workspace will update the CNC firmware and update to Rhino 6. All the right settings would be preconfigured for me by people with more CAM knowlage.

Use neutral export format like iges (for curves and surfaces) and step (for “solids”) as Helvetosaur suggested. I don’t strongly recommend to use stl format unless you would like to print your parts by using e.g. 3D printers.
Based on my experience I don’t have any problem with curves exported as iges during workflow catia (exported as iges by customer’s CAD office) - rhino (import and export) - surfcam (import and milling)

Unfortunately OpenSCAD can’t export any of those. It can Export DXF for 2D, but it isn’t obvious if it can export 2.5D - probably not.

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/STL_Import_and_Export

Hence my post about using the wrong software for his need.

Considering a CAM program as a simple “G-Code generator” is an overly simplistic way of looking at CAM. A CAM program allows one to define and manage toolpath strategies for machining a part and is independent of the actual G-Code.

The final G-Code is generated by translating the programmed toolpaths via a postprocessor into a format of G-Gode that is correct for the machine control in question (there are hundreds of varieties). Once the postprocessor is correctly configured however, it should generate error-free code very reliably and needen’t be worried about too much. On the other hand, programming the actual toolpaths is where you need to take care. Running on-screen simulations helps insure that the programmed toolpath is doing what you want.