}
}
+m4_define(`ROUNDCORNER_VARS',`
+ this_cnr = ci[0];
+ right_cnr = ci[1];
+ left_cnr = ci[2];
+ bigr= round_cnr_rad - round_edge_rad
+')
+
module RoundCorner_selector(ci, adj) {
r = round_cnr_rad - round_edge_rad;
cube(r*2 + adj, center=true);
module RoundCornerCut(ci) {
// ci should be [this_cnr, right_cnr, left_cnr]
// where right_cnr is to the right (ie, anticlockwise)
- this_cnr = ci[0];
- right_cnr = ci[1];
- left_cnr = ci[2];
- bigr= round_cnr_rad - round_edge_rad;
+ ROUNDCORNER_VARS;
INREFFRAME(this_cnr, right_cnr) INREFFRAME_EDGE {
difference(){
RoundCorner_selector(ci, -0.1);
}
module RoundCornerAdd(ci) {
- this_cnr = ci[0];
- right_cnr = ci[1];
- left_cnr = ci[2];
- bigr = round_cnr_rad - round_edge_rad;
+ ROUNDCORNER_VARS;
INREFFRAME(this_cnr, right_cnr) INREFFRAME_EDGE {
intersection(){
RoundCorner_selector(ci, +0.1);