RapCAD 1.0.2 just released --- OpenSCAD alternative, can write out files

does this allow you to avoid z-fighting?

Yes, although this is really because of the CGAL backend. If I recall correctly OpenSCAD only has z-fighting issues when using the preview mode that uses OpenCSG. It’s possible that geometry with rational size values has rounding errors in OpenSCAD not present in RapCAD.

1 Like

@Giles, the rapcad.org web site has almost no content, just a couple of general paragraphs that could just as easily describe many other packages, including OpenSCAD. That’s why I was kind of confused about how RapCAD is different; it didn’t seem that I could answer my own questions by reading it.

I note that the build instructions point at a git repository that doesn’t respond:

RapCAD

git clone git://git.rapcad.org/rapcad

cd rapcad &&
qmake &&
make

Incidentally, on Fedora, it’s qmake-qt5 because Fedora also has qmake-qt4 available.

RapCAD doesn’t seem to honor $fn which I used for angular resolution a lot. Also maybe it isn’t as… flexible about the idea of a cylinder as OpenSCAD is?

I grabbed a random OpenSCAD file I’d used recently to test with RapCAD.

od=72;
id=64;
cd=48;
bcd=od+15;
cone_h=20;
height=100;
h_lip=4;
$fn=180;


difference() {
    union() {
        cylinder(d=od, h=height+h_lip);
        cylinder(d1=bcd, d2=od, h=cone_h);
    }
    translate([0, 0, height]) cylinder(d=id, h=5.1);
    translate([0, 0, height-cone_h]) cylinder(d1=id, d2=cd, h=cone_h+0.01);
    translate([0, 0, -0.01]) cylinder(d=id, h=height-cone_h+0.02);
}

In OpenSCAD, it looks like this:

In RapCAD, it looks like this:

The rapcad.org web site has almost no content.

Yeah it needs work. I only recently re-registered the domain and added hosting on github pages. The original website content was moved to RapCAD – Giles Bathgate

I note that the build instructions point at a git repository that doesn’t respond … Incidentally, on Fedora, it’s qmake-qt5 because Fedora also has qmake-qt4 available.

I’ll update the build instructions.

RapCAD doesn’t seem to honor $fn which I used for angular resolution a lot. Also maybe it isn’t as… flexible about the idea of a cylinder as OpenSCAD is?

It does, it’s just that the special variables don’t have parent scope, so you just have to pass it into each module cylinder(d=od, h=height+h_lip,$fn=$fn); That is a bug, but it’s never been much of a problem, because often that’s how I find people use it in OpenSCAD anyway. I should fix it though.

A better variable to use is $fe, this works out an $fn that gives an error within the tolerance of the resolution of your 3d printer so for example, I use $fe=0.01 for my prusa mk2, which gives nice results.

There is a prism module which takes a sides parameter, which is my preferred way for creating n sided prisms instead of overloading cylinder.

cylinder(d1=id, d2=cd…

That’s an oversight, when I implemented cylinder OpenSCAD didn’t have diameter parameter support at all. I implemented a d parameter, but not d1 and d2. That said r1 and r2 for cylinder do work.

2 Likes

Maybe slightly off-topic, but I have recently abandoned OpenSCAD in favour of CadQuery (CadQuery 2 Documentation — CadQuery Documentation).

The primary advantages that I see are:

  • Uses a BREP representation internally (as opposed to CSG used by OpenSCAD) - this means that stuff like chamfers and fillets are supported directly, and that you can export in e.g. STEP format as well as STL
  • Python is a much better language than the scripting language used by OpenSCAD

It does have a steeper learning curve than OpenSCAD.

I wanted to like CADquery — got confused by the initial version being a FreeCAD Workbench, then moving to a stand-alone project.

The problem is, like all-too-many Python projects it’s hard to install/run — I’d like to love/use Python, but it’s hard when the fact that there are myriad package systems for it is a running joke:

I know cpan.org is already taken up by the Perl folks, but Python really needs something to simplify all this.

1 Like

Python is pretty easy on Linux since it can be completely maintained via PATHs and user filesystems.
A number of utilities to make this really easy are VirtualEnv and Conda and since Microsoft hired the primary Python dev years ago surely they’ve made it easy to manage on their Windows OSes.

I recommend the standalone CQ-editor package: Release 0.2 · CadQuery/CQ-editor · GitHub

I’ve tried Python on all three major operating systems for various node editing/flow programming tools — thus far, the only one I’ve gotten to work on all 3 was Nodezator.

@bullestock I’ll look into the stand-alone program — the problem for me is it doesn’t have a node editor/visual programming option which his how I prefer to work.

Sounds like something to take up with the various node editing/flow programming tool devs to see where you went, or they went, amiss. IIRC you are a Windows guy and for some time Microsoft was very pro Python and was planning a proprietary version or something called ironPython. Sounds like they had problems or found another star to focus on instead of Python. Or they just couldn’t forced the devs to lock Python to Windows and left it not be working so well or something.

Usually a good idea to contact the devs if you can’t figure out how to get an app/tool running on a particular platform. And if it’s tied to other libs or packages then ping those devs about the problem too. 3D stuff tends to be a bit nichie and has been this way for decades. MS fighting OpenGL made it sooo much worst and that was probably their goal.

I did contact the devs, and eventually managed to get all the programs running on at least one platform — none of them really quite worked out.

At this point in time, developing in BlockSCAD, importing into RapCAD, and writing out G-code seems workable — we’ll have to see.

1 Like