[OpenSCAD] Frustrating unexpected behavior

linkreincarnate linkreincarnate at gmail.com
Mon Apr 6 23:44:14 EDT 2015


//Here is the entire openscad file it uses no external libraries or modules
so you should be able to just copy paste it from here
//3d printable cigarette rolling machine
//Created By LinkReincarnate
//CC Share Alike Attribution Non-Commercial
//*************VARIABLE DECLARATION SECTION******** all values are in mm
{
boxLength = 90.4;
boxWidth = 81.25;
boxHeight = 19.2;
boxBottomThickness = .67;
boxWallThickness = .67;
boxArcHeight = 3.5;
boxArcRadius=1;
boxControlArmHoleZOffset = 3.5;
boxControlArmHoleYOffset = 3;
boxHingePinDiameter = 3;
boxHingeDiameter= 5;
boxHingeZOffset = 0;
boxHingeYOffset = 0;
boxHingeTolerance = .1;
boxHingeSupportZOffset= -5;
boxHingeSupportYOffset = -4.5;
boxHingeNumberOfSplits = 7;
boxHingeClearance=1;
//the following variables determine the details of the cylinder (or sphere)
used for minkowski sums
boxCornerRoundness = 7;
boxCornerSmoothness = 16;
boxRoundCorners = true;

controlArmLength = 0;
controlArmHeight = 0;
conrolArmThickness = 0;
controlArmPinDiameter = 2;
controlArmHoleZOffset = 0;
controlArmHoleYOffset = 0;
controlArmPinTolerance = .1;

lidLipHeight = 5;
lidThickness = 5;
lidTolerance = 1;
lidHingeZOffset = -boxHeight/2;
lidHingeYOffset = 0;
lidHingeTolerance = 1;
lidOverlap = 2;

hingeSlotXOffset = 0;
hingeSlotYOffset = 0;
hingeSlotZOffset = 0;

dispenserHoleLength = 72; //also used for dist between tracks
dispenserHoleWidth = 11.5;
dispenserHoleXOffset = 0;
dispenserHoleYOffset = 0;

trackPanelLength = 76;
trackPanelHeight = 19;
trackPanelThickness = 3;
trackWidth = 2.5;
trackLength = 61;
trackHeight = 14;

rollerDiameter = 7;
rollerLength = 71;

rollerPinDiameter = 2;
hingePinDiameter = 1.6;
pinLength= 71;

pinTolerance = 1;
cigaretteDiameter = 7.75;
cigaretteLength = 70;

booleanOverlap = .01; //to ensure that the faces used to difference() dont
line up

lowRollingClearance = 5; //the distance from the center of the rolling pin
to the lid at the lowest point.
hightRollingClearance = 12.6;

arched = false;
//uses math to determin the arc radius of the curve of the box and creates
the appropriate cylinder
}
//*************MODULE DECLARATION SECTION***************************
module CreateArc(            arcLength,
                             arcHeight, 
                             cylinderHeight) 
                             {
                                carveRadius = ((arcHeight/2)+((arcLength *
arcLength)/arcHeight * 8)/(53));
                                
                                rotate(a=[90,180,90]){
                                    translate([0,-carveRadius + arcHeight -
(boxHeight/2),0]){
                                        cylinder(r=carveRadius,
h=cylinderHeight+booleanOverlap, $fn=1024, center=true);
                                    }
                                     
                                }
                             }
                                                      

module CreateNonArchedBody(  boxLength, 
                             boxWidth, 
                             boxHeight, 
                             boxBottomThickness, 
                             boxWallThickness,
                             boxRoundCorners,
                             boxCornerRoundness,
                             boxCornerSmoothness, 
                             boxHingeDiameter, 
                             boxHingePinDiameter,  
                             boxHingeZOffset, 
                             boxHingeYOffset, 
                             boxHingeTolerance,
                             boxHingeClearance,
                             boxHingeNumberOfSplits, 
                             pinTolerance, 
                             controlArmPinDiameter,
                             boxControlArmHoleZOffset,   
                             boxControlArmHoleYOffset,
                             controlArmPinTolerance,
                             boxHingeSupportZOffset,
                             boxHingeSupportYOffset,
                             booleanOverlap){
 //union joins the difference of the outer and inner bodies with a pinhole
for the arms and the hinge parts
    union(){
        //create body
         if (boxRoundCorners){
           translate([0,0,boxHingeSupportZOffset])
             difference(){     
                    $fn=boxCornerSmoothness;
                    minkowski(){
                     cube([boxLength-(2*boxCornerRoundness),boxWidth -
(2*boxCornerRoundness),boxHeight/2], 
                         center = true);
                     cylinder(r=boxCornerRoundness,h=boxHeight/2);
                    }
                    translate([0,0,(boxBottomThickness/2)]) {
                        $fn=boxCornerSmoothness;
                        minkowski()
                        {
                         cube([boxLength -
boxWallThickness-(2*boxCornerRoundness), 
                                  boxWidth - boxWallThickness
-(2*boxCornerRoundness), 
                                  (((boxHeight/2) - boxBottomThickness) +
booleanOverlap)], 
                                  center = true);
                         cylinder(r=boxCornerRoundness,h=boxHeight/2);
                        }
                    }
                    //create pinholes to connect control arms
                    rotate(a=[0, -90, 0]){
                       
translate([boxControlArmHoleZOffset,boxControlArmHoleYOffset,0]){
                            cylinder(d= (controlArmPinDiameter +
controlArmPinTolerance), 
                                         boxLength + booleanOverlap, 
                                         center=true );
                        }
                    }
                    
             } 
         } else {
              difference(){
                    cube([boxLength,boxWidth,boxHeight], 
                         center = true);
                    translate([0,0,(boxBottomThickness/2)]) {
                        cube([boxLength - boxWallThickness, 
                              boxWidth - boxWallThickness, 
                              ((boxHeight - boxBottomThickness) +
booleanOverlap)], 
                              center = true);
                    }
                    //create pinholes to connect control arms
                    rotate(a=[0, -90, 0]){
                       
translate([boxControlArmHoleZOffset,boxControlArmHoleYOffset,0]){
                            cylinder(d= (controlArmPinDiameter +
controlArmPinTolerance), 
                                         boxLength + booleanOverlap, 
                                         center=true );
                        }
                    }
                    
              }   
         }
         CreateHinge(boxRoundCorners,
                     boxWidth,
                     boxLength,
                     boxHeight,
                     boxHingeDiameter, 
                     boxHingePinDiameter,  
                     boxHingeZOffset, 
                     boxHingeYOffset, 
                     boxHingeTolerance,
                     boxHingeClearance,
                     boxHingeNumberOfSplits, 
                     pinTolerance,
                     boxHingeSupportZOffset,
                     boxHingeSupportYOffset,
                     lidHingeZOffset,
                     lidHingeYOffset,
                     lidHingeTolerance,
                     booleanOverlap);
     }// end of union body and hinge
}//end of module
module CreateArchedBody(     boxLength, 
                             boxWidth, 
                             boxHeight, 
                             boxBottomThickness, 
                             boxWallThickness,
                             boxRoundCorners,
                             boxCornerRoundness,
                             boxCornerSmoothness, 
                             boxHingeDiameter, 
                             boxHingePinDiameter,  
                             boxHingeZOffset, 
                             boxHingeYOffset, 
                             boxHingeTolerance,
                             boxHingeClearance,
                             boxHingeNumberOfSplits, 
                             pinTolerance, 
                             controlArmPinDiameter,
                             boxControlArmHoleZOffset,   
                             boxControlArmHoleYOffset,
                             controlArmPinTolerance,
                             boxHingeSupportZOffset,
                             boxHingeSupportYOffset,
                             booleanOverlap,
                             boxArcHeight,
                             boxArcRadius
                             ){
                              union(){
                                //create body
                                  if (boxRoundCorners){
                                    
translate([0,0,boxHingeSupportZOffset+boxArcHeight+1])
                                         difference(){   
                                            intersection(){
                                                $fn=boxCornerSmoothness;
                                                minkowski(){
                                                
cube([boxLength-(2*boxCornerRoundness),
                                                       boxWidth -
(2*boxCornerRoundness),
                                                      
boxHeight+boxArcHeight/2], 
                                                     center = true);
                                                
cylinder(r=boxCornerRoundness,h=boxHeight + boxArcHeight/2);
                                                }
                                               
translate([0,0,-boxHeight+boxArcHeight])
                                                    CreateArc(boxWidth,
boxArcHeight, boxLength);
                                             }  
                                           
translate([0,0,(boxBottomThickness/2)]){
                                               intersection(){
                                                    
$fn=boxCornerSmoothness;
                                                     minkowski(){
                                                         cube([boxLength -
boxWallThickness-(2*boxCornerRoundness), 
                                                               boxWidth -
boxWallThickness -(2*boxCornerRoundness), 
                                                              
(((boxHeight+boxArcHeight/2) - boxBottomThickness) + booleanOverlap)], 
                                                               center =
true);
                                                        
cylinder(r=boxCornerRoundness,h=boxHeight/2);
                                                    }
                                                   
translate([0,0,-boxHeight+boxArcHeight])
                                                        CreateArc(boxWidth,
boxArcHeight, boxLength);
                                                }  
                                            }
                                            //create pinholes to connect
control arms
                                            rotate(a=[0, -90, 0]){
                                               
translate([boxControlArmHoleZOffset,boxControlArmHoleYOffset,0]){
                                                    cylinder(d=
(controlArmPinDiameter +                                                                 
                                                                
controlArmPinTolerance), 
                                                                 boxLength +
booleanOverlap, 
                                                                 center=true
);
                                                }
                                            }
                                            
                                            CreateArc(boxWidth,
boxArcHeight, boxLength+booleanOverlap);
                                          //insert objects here to
difference them from the main body  
                                  } 
                                  } else {
                                      difference(){
                                          intersection(){
                                           
cube([boxLength,boxWidth,boxHeight+boxArcHeight], 
                                                 center = true);
                                           
translate([0,0,-boxHeight+boxArcHeight]){
                                                CreateArc(boxWidth,
boxArcHeight, boxLength);
                                            }
                                             
                                          }
                                            intersection(){
                                               
translate([0,0,(boxBottomThickness/2)]){
                                                    cube([boxLength -
boxWallThickness, 
                                                          boxWidth -
boxWallThickness, 
                                                          ((boxHeight
+boxArcHeight - boxBottomThickness) + booleanOverlap)], 
                                                          center = true);
                                                }
                                               
translate([0,0,-boxHeight+boxArcHeight]){
                                                     CreateArc(boxWidth,
boxArcHeight, boxLength);
                                                } 
                                            }
                                            //create pinholes to connect
control arms
                                            rotate(a=[0, -90, 0]){
                                              
translate([boxControlArmHoleZOffset,boxControlArmHoleYOffset,0]){
                                                   cylinder(d=
(controlArmPinDiameter +                                                        
                                                               
controlArmPinTolerance), 
                                                                boxLength +
booleanOverlap, 
                                                                center=true
);
                                               }
                                            }
                                           
CreateArc(boxWidth,boxArcHeight,boxLength + booleanOverlap);
                                            //insert here to difference with
body
                                        }   
                                }
                                //Create Hinge and hinge support
                                CreateHinge( boxRoundCorners,
                                             boxWidth,
                                             boxLength,
                                             boxHeight,
                                             boxHingeDiameter, 
                                             boxHingePinDiameter,  
                                             boxHingeZOffset, 
                                             boxHingeYOffset, 
                                             boxHingeTolerance,
                                             boxHingeClearance,
                                             boxHingeNumberOfSplits, 
                                             pinTolerance,
                                             boxHingeSupportZOffset,
                                             boxHingeSupportYOffset,
                                             lidHingeZOffset,
                                             lidHingeYOffset,
                                             lidHingeTolerance,
                                             booleanOverlap);
                               //insert new parts to be added to the body
here
                               }
                            }//end of module
module CreateNonArchedLid(          lidLipHeight,
                                    lidThickness,
                                    lidTolerance,
                                    lidHingeZOffset,
                                    lidHingeYOffset,
                                    lidHingeTolerance,
                                    lidOverlap,
                                    hingeSlotXOffset,
                                    hingeSlotYOffset,
                                    hingeSlotZOffset,
                                    boxLength, 
                                    boxWidth, 
                                    boxHeight,
                                    boxRoundCorners,
                                    boxCornerRoundness,
                                    boxCornerSmoothness, 
                                    boxHingeDiameter, 
                                    boxHingePinDiameter,
                                    dispenserHoleLength,
                                    dispenserHoleWidth,
                                    dispenserHoleXOffset,
                                    dispenserHoleYOffset,
                                    rollerLength,
                                    booleanOverlap)
 {
  if (boxRoundCorners){
             difference(){     
                    $fn=boxCornerSmoothness;
                    minkowski(){
                     cube([lidOverlap + boxLength + lidTolerance - (2 *
boxCornerRoundness),
                           lidOverlap + boxWidth + lidTolerance - (2 *
boxCornerRoundness),
                           ((lidThickness + lidLipHeight)/2)], center=true);
                     cylinder(r=boxCornerRoundness,h=((lidThickness +
lidLipHeight)/2), center=true);
                    }
                    
                    translate([0,0,(-lidThickness/2)-booleanOverlap ]){
                        $fn=boxCornerSmoothness;
                        minkowski()
                        {
                         cube([boxLength + lidTolerance - (2 *
boxCornerRoundness) ,
                               boxWidth + lidTolerance - (2 *
boxCornerRoundness),
                               lidLipHeight/2],center = true); 
                         cylinder(r=boxCornerRoundness,h=lidLipHeight/2,
center = true);
                        }
                    }
                    translate([0,(boxCornerRoundness + lidTolerance +
lidOverlap+booleanOverlap),-lidThickness/2])
                    cube([boxLength + lidTolerance - (2 *
boxCornerRoundness) ,
                               boxWidth + lidTolerance - (2 *
boxCornerRoundness),
                               lidLipHeight +booleanOverlap],center = true); 
                    
                    //hingeslots
                    //here the part to be subtracted from the hinge is
created 
                    difference(){
                       
                        translate([0,((boxWidth / 2)+(lidHingeYOffset +
(boxHingeDiameter/2))),((boxHeight/2)+lidHingeZOffset)]){
                            rotate(a=[0,270,0])
                               translate([0,0,-boxLength/2 ]){
                                                    for ( i = [0 :
boxHingeNumberOfSplits/2] )
                                                        {
                                                            
                                                            translate([0, 0,
boxLength/boxHingeNumberOfSplits * i *2])
                                                           
cylinder(d=boxHingeDiameter+boxHingeTolerance+booleanOverlap +
boxHingeClearance, 
                                                                   
(boxLength/boxHingeNumberOfSplits) + boxHingeTolerance + lidHingeTolerance,
                                                                    
center=true);
                                                        }
                                                     
                               }
                        }
                        translate([boxLength/2-lidOverlap -
lidTolerance,0,0]){
                           
cube([boxCornerRoundness+booleanOverlap+lidTolerance,1000,1000],
center=true);
                        }
                        translate([-(boxLength/2-lidOverlap -
lidTolerance),0,0]){
                           
cube([boxCornerRoundness+booleanOverlap+lidTolerance,1000,1000],
center=true);
                        }
                        
                    }//end of hinge slot subtration 
                      
                     
             } // end of difference
         } else {
              difference(){
                    cube([boxLength,boxWidth,boxHeight], 
                         center = true);
                    translate([0,0,(boxBottomThickness/2)]) {
                        cube([boxLength - boxWallThickness, 
                              boxWidth - boxWallThickness, 
                              ((boxHeight - boxBottomThickness) +
booleanOverlap)], 
                              center = true);
                    }
                    //create pinholes to connect control arms
                    rotate(a=[0, -90, 0]){
                       
translate([boxControlArmHoleZOffset,boxControlArmHoleYOffset,0]){
                            cylinder(d= (controlArmPinDiameter +
controlArmPinTolerance), 
                                         boxLength + booleanOverlap, 
                                         center=true );
                        }
                    }
                    
              }   
         }
 }//end of Lid Module
module CreateArchedLid(             lidLipHeight,
                                    lidThickness,
                                    lidTolerance,
                                    lidHingeZOffset,
                                    lidHingeYOffset,
                                    lidHingeTolerance,
                                    boxLength, 
                                    boxWidth, 
                                    boxHeight,
                                    boxRoundCorners,
                                    boxCornerRoundness,
                                    boxCornerSmoothness, 
                                    boxHingeDiameter, 
                                    boxHingePinDiameter,
                                    dispenserHoleLength,
                                    dispenserHoleWidth,
                                    dispenserHoleXOffset,
                                    dispenserHoleYOffset,
                                    rollerLength,
                                    boxArcHeight,
                                    boxArcRadius,
                                    booleanOverlap){}
module CreateControlArm(){}
module CreateControlTrack(){}
module CreateRoller(){}
module CreateLidHinge(   boxRoundCorners,
                         boxWidth,
                         boxLength,
                         boxHeight,
                         boxHingeDiameter, 
                         boxHingePinDiameter,  
                         boxHingeZOffset, 
                         boxHingeYOffset, 
                         boxHingeTolerance,
                         boxHingeClearance,
                         boxHingeNumberOfSplits, 
                         pinTolerance,
                         boxHingeSupportZOffset,
                         boxHingeSupportYOffset,
                         lidHingeZOffset,
                         lidHingeYOffset,
                         lidHingeTolerance,
                         booleanOverlap)
{
difference(){
        union(){
        //hingepart is created here
        if (boxRoundCorners){
            translate([0,((boxWidth / 2)+(lidHingeYOffset +
(boxHingeDiameter/2))),((boxHeight/2)+lidHingeZOffset)]){
                 rotate(a=[0,-90,0]){
                      cylinder(d=boxHingeDiameter, boxLength -
(boxCornerRoundness * 2),center=true);
                      
                 }
            } 
        } else {
               translate([0,((boxWidth / 2)+(lidHingeYOffset +
(boxHingeDiameter/2))),((boxHeight/2)+lidHingeZOffset)]){
                    rotate(a=[0,-90,0]){
                        cylinder(d=boxHingeDiameter, boxLength,center=true);
                    }
                } 
        }
        //add geometry to the hinge here
     }
     //hingehole
     translate([0,((boxWidth / 2)+(lidHingeYOffset +
(boxHingeDiameter/2))),((boxHeight/2)+lidHingeZOffset)]){
          rotate(a=[0,-90,0]){
             cylinder(d=boxHingePinDiameter, boxLength +
booleanOverlap,center=true);    
          }
      }  
      //hingeslots
      //here the part to be subtracted from the hinge is created 
        translate([0,((boxWidth / 2)+(lidHingeYOffset +
(boxHingeDiameter/2))),((boxHeight/2)+lidHingeZOffset)]){
            rotate(a=[0,270,0])
               translate([0,0,-boxLength/2 ]){
                                    for ( i = [0 : boxHingeNumberOfSplits/2]
)
                                        {
                                            
                                            translate([0, 0,
boxLength/boxHingeNumberOfSplits * i *2])
                                           
cylinder(d=boxHingeDiameter+boxHingeTolerance+booleanOverlap +
boxHingeClearance, 
                                                   
(boxLength/boxHingeNumberOfSplits) + boxHingeTolerance + lidHingeTolerance,
                                                     center=true);
                                        }
               }
        } //end of hinge slots                                
     }//end of difference (hinge, hingehole, hingeslots)    
    }
module CreateHinge(  boxRoundCorners,
                     boxWidth,
                     boxLength,
                     boxHeight,
                     boxHingeDiameter, 
                     boxHingePinDiameter,  
                     boxHingeZOffset, 
                     boxHingeYOffset, 
                     boxHingeTolerance,
                     boxHingeClearance,
                     boxHingeNumberOfSplits, 
                     pinTolerance,
                     boxHingeSupportZOffset,
                     boxHingeSupportYOffset,
                     lidHingeZOffset,
                     lidHingeYOffset,
                     lidHingeTolerance,
                     booleanOverlap)
{
    
 //Create Hinge and hinge support
    //difference to create hole in hinge and hinge slots
    
    difference(){
       union(){
        //hingepart is created here
        if (boxRoundCorners){
            translate([0,((boxWidth / 2)+(boxHingeYOffset +
(boxHingeDiameter/2))),((boxHeight/2)+boxHingeZOffset)]){
                 rotate(a=[0,-90,0]){
                      cylinder(d=boxHingeDiameter, boxLength -
(boxCornerRoundness * 2),center=true);
                      
                 }
            } 
        } else {
               translate([0,((boxWidth / 2)+(boxHingeYOffset+ +
(boxHingeDiameter/2))),((boxHeight/2)+boxHingeZOffset)]){
                    rotate(a=[0,-90,0]){
                        cylinder(d=boxHingeDiameter, boxLength,center=true);
                    }
                } 
        }
        //support part is created here, also this part is unioned to the
hingepart
        if(boxRoundCorners){
             translate([0,((boxWidth /
2)+(boxHingeYOffset+boxHingeSupportYOffset)),((boxHeight/2)+boxHingeZOffset
+boxHingeSupportZOffset)]){
                rotate(a=[0,-90,0]){
                     difference(){
                         rotate(a=[0,0,-25]){
                            cylinder(d=boxHingeDiameter*4,
(boxLength-(boxCornerRoundness * 2)), $fn=4,center=true);                                   
                         }
                         rotate(a=[0,0,45]){
                            translate([-4.5, -4.5,0]){
                                cylinder(d=boxHingeDiameter*6, boxLength+1,
$fn=4,center=true);
                            }
                            translate([21.1,-1,0]){
                                cylinder(d=boxHingeDiameter*6, boxLength+1,
$fn=4,center=true);
                            }
                        }
                    }
                       
                }
             }
         }else{
             translate([0,((boxWidth /
2)+(boxHingeYOffset+boxHingeSupportYOffset)),((boxHeight/2)+boxHingeZOffset
+boxHingeSupportZOffset)]){
                rotate(a=[0,-90,0]){
                    difference(){
                        rotate(a=[0,0,-25]){
                         cylinder(d=boxHingeDiameter*4, boxLength,
$fn=4,center=true);                                   
                        }
                        rotate(a=[0,0,45]){
                            translate([-4.5, -4.5,0]){
                                cylinder(d=boxHingeDiameter*6, boxLength+1,
$fn=4,center=true);
                            }
                            translate([21.1,-1,0]){
                                cylinder(d=boxHingeDiameter*6, boxLength+1,
$fn=4,center=true);
                            }
                        }
                    }
                }
             }
         }//end of else  end of addition of geomotry
     }
      //hingehole
      translate([0, ((boxWidth / 2) + (boxHingeYOffset+boxHingeDiameter/2)),
((boxHeight/2)+boxHingeZOffset)]){
                                            rotate(a=[0,-90,0]){
                                              
cylinder(d=boxHingePinDiameter, boxLength + booleanOverlap,center=true);    
                                            }
                                        }  
       //hingeslots
       //here the part to be subtracted from the hinge is created 
        translate([0,((boxWidth / 2)+(boxHingeYOffset +
(boxHingeDiameter/2))),((boxHeight/2)+boxHingeZOffset)]){
            rotate(a=[0,90,0])
               translate([0,0,(-boxLength/2) ]){
                    for ( i = [0 : boxHingeNumberOfSplits/2] ){
                            
                            translate([0, 0,
boxLength/boxHingeNumberOfSplits * i *2])
                           
cylinder(d=boxHingeDiameter+boxHingeTolerance+booleanOverlap +
boxHingeClearance, 
                                      (boxLength/boxHingeNumberOfSplits) +
boxHingeTolerance,
                                       center=true);
                    }
               }
        } //end of hinge slots                                
     }//end of difference (hinge, hingehole, hingeslots)
     
     
    
     
     
    
}//end of Hinge Module
                            
                            
//**********************END OF
DECLARATIONS***********************************
/* 

if(arched){
    CreateArchedBody(         boxLength, 
                             boxWidth, 
                             boxHeight, 
                             boxBottomThickness, 
                             boxWallThickness, 
                             boxRoundCorners,
                             boxCornerRoundness,
                             boxCornerSmoothness, 
                             boxHingeDiameter, 
                             boxHingePinDiameter,  
                             boxHingeZOffset, 
                             boxHingeYOffset, 
                             boxHingeTolerance,
                             boxHingeClearance,
                             boxHingeNumberOfSplits, 
                             pinTolerance, 
                             controlArmPinDiameter,
                             boxControlArmHoleZOffset,   
                             boxControlArmHoleYOffset,
                             controlArmPinTolerance,
                             boxHingeSupportZOffset,
                             boxHingeSupportYOffset,
                             booleanOverlap,
                             boxArcHeight,
                             boxArcRadius
                             );
}else{                         
   CreateNonArchedBody(          boxLength, 
                                 boxWidth, 
                                 boxHeight, 
                                 boxBottomThickness, 
                                 boxWallThickness, 
                                 boxRoundCorners,
                                 boxCornerRoundness,
                                 boxCornerSmoothness, 
                                 boxHingeDiameter, 
                                 boxHingePinDiameter,  
                                 boxHingeZOffset, 
                                 boxHingeYOffset, 
                                 boxHingeTolerance,
                                 boxHingeClearance,
                                 boxHingeNumberOfSplits, 
                                 pinTolerance, 
                                 controlArmPinDiameter,
                                 boxControlArmHoleZOffset,   
                                 boxControlArmHoleYOffset,
                                 controlArmPinTolerance,
                                 boxHingeSupportZOffset,
                                 boxHingeSupportYOffset,
                                 booleanOverlap,
                                 boxArcHeight,
                                 boxArcRadius);
}    

  */



                  
 translate([0,0,boxHeight/2])
 {
    union(){     
     CreateLidHinge(     boxRoundCorners,
                         boxWidth,
                         boxLength,
                         boxHeight,
                         boxHingeDiameter, 
                         boxHingePinDiameter,  
                         boxHingeZOffset, 
                         boxHingeYOffset, 
                         boxHingeTolerance,
                         boxHingeClearance,
                         boxHingeNumberOfSplits, 
                         pinTolerance,
                         boxHingeSupportZOffset,
                         boxHingeSupportYOffset,
                         lidHingeZOffset,
                         lidHingeYOffset,
                         lidHingeTolerance,
                         booleanOverlap);  
                       
     CreateNonArchedLid(                lidLipHeight,
                                        lidThickness,
                                        lidTolerance,
                                        lidHingeZOffset,
                                        lidHingeYOffset,
                                        lidHingeTolerance,
                                        lidOverlap,
                                        hingeSlotXOffset,
                                        hingeSlotYOffset,
                                        hingeSlotZOffset,
                                        boxLength, 
                                        boxWidth, 
                                        boxHeight,
                                        boxRoundCorners,
                                        boxCornerRoundness,
                                        boxCornerSmoothness, 
                                        boxHingeDiameter, 
                                        boxHingePinDiameter,
                                        dispenserHoleLength,
                                        dispenserHoleWidth,
                                        dispenserHoleXOffset,
                                        dispenserHoleYOffset,
                                        rollerLength,
                                        booleanOverlap);
                                    }    
 }       



--
View this message in context: http://forum.openscad.org/Frustrating-unexpected-behavior-tp12321p12326.html
Sent from the OpenSCAD mailing list archive at Nabble.com.




More information about the Discuss mailing list