Code: Select all
It appears freecad is not using the difference command and the object is shown as just a series of solid cubes and disks when it should be a spoked flywheel. I have tried to put a couple of jpg's in to show, but can't figure out how to put them in this message so I have pasted the openscad file in at the bottom..
My freecad info is-
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +148 (Git)
Build type: Release
Branch: Branch_0.19.4
Hash: 476ecf091941bead59b14e44afa6064d5a66afa3
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/Australia (en_AU)
and openscad is-
OpenSCAD version 2021.01
The openscad file:-
Code: Select all
$fn = 128;
//Set up the dimensions
hubdiameter = 25;
shaftdiameter = 12;
wheeldiameter = 100;
hubthickness = 10;
rimthickness = 20;
spokethickness = 8;
numberofspokes = 5;
//Set draught so mold can be
//removed from sand
draught = 2;
//Don't change the next 3 lines
wheelrimthickness = (wheeldiameter - rimthickness);
spokelength = (wheeldiameter-hubdiameter+5);
rotation = 360/(numberofspokes);
//Set the ovalness of the spokes (1=round,
// less than one is oval in one plane,
// more than one is oval in the other plane
ovality = 1.5;
// Make half a wheel for casting
difference(){
//Wheel rim
difference(){
difference(){
color ("violet")
cylinder(h=12,d1=wheeldiameter,d2=wheeldiameter-draught,center=true);
//Two 3mm holes so the wheel halves
//can be correctly registered in the mold
translate([0, wheeldiameter/2-5, -5])
cylinder(h=10,d=3);
translate([0, -(wheeldiameter/2-5), -5])
cylinder(h=10,d=3);
}
//Cut out the annulus and make the spokes
difference(){
color ("blue")
cylinder(h=13,d1=wheelrimthickness-draught,d2=wheelrimthickness,center=true);
for (i=[1:numberofspokes]){
rotate([90,0,rotation * i])
scale([ovality,1,1])
color ("red")
//comment out cylinder line and uncomment
//cube line for rectangular spokes
cylinder(h=spokelength, d=spokethickness, center=false);}
// cube([65,spokethickness,5],center=true);}
}
color ("lightblue");
cylinder(h=12,d=15,center=true);
}
//This cube differences out half the wheel
//to make a mold for casting
translate ([0, 0, -10])
cube ([wheeldiameter+10, wheeldiameter+10, 20],center = true);
}
//Draw half a hub center
difference(){
color ("green")
translate ([0, 0, 2.5])
cylinder(h=5,d1=hubdiameter,d2=hubdiameter-draught,center=true);
color ("navy")
cylinder(h=11,d1=shaftdiameter,d2=shaftdiameter-draught, center=true);
}