A few things have been added to RapCAD in the last 6 months so I decided to make a new release. Hopefully now that the release scripts are working on the build server I will be able to make releases more frequently, assuming that enough gets added to the code base to warrant a new release. I’d like to make releases once a month again as I think that was just about right.
Changes
- Implemented add assign (+=), and subtract assign (-=) operators.
- Added some simple examples.
- Implemented center() module for centering about the bounding box.
- Fix for cylinder and cube of zero height.
- Updated icons.
- Added support for non centered spheres
- Implemented new functions tanh() sinh() cosh() atan() atan2() acos() asin() exp() pow() ceil() floor() round() min() max() sign() abs() sin() cos() tan().
- Added warning when function cannot be found.
Version 0.7.0 is available this month. See the Download Page for details.
Any way you could add subdivision support for the cylinder function? Commonly in OpenSCAD it’s used to make nut-traps.
Usually it’s done something like this
cylinder(radius, height, surface_faces)
So we can specify 6 surface faces for a hexagonal nut, or leave unspecified to have the program calculate a good smooth number for a cylinder. OpenSCAD is _largely_ used in the reprap community, with many scad files available on thingiverse.com (just search for parametric).
RapCAD offers a better solution to creating “trapped nut” holes.
prism(height,sides,apothem);
This is a better solution because techically if you specify the number of sides then its not a cylinder, and also you can specify the distance across the nut flats using apothem, (raduis argument is also supported)
I also run into the problem of cylinders having too few faces when made too small. I don’t see anything in the documentation on how to fix this…
I do intend adding support for special variables $fn $fs $fa as you would expect to find but this is not implemented yet. In the meantime you can use the following workaround. Simply create a cylinder bigger than you need and scale it down e.g:
/** @r radius @h height @f smoothness factor */
module Cylinder(r,h,f){
scale([1/f,1/f,1/f])cylinder(r=r*f,h=h*f);
}
Cylinder(0.5,1,10);
As of version 0.9.0 you can now just do:
cylinder(r=0.5,h=1,$fn=10);