This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.io.IOUtils; | |
import com.neuronrobotics.bowlerstudio.physics.*; | |
import com.neuronrobotics.bowlerstudio.threed.*; | |
def base; | |
//Check if the device already exists in the device Manager | |
if(args==null){ | |
base=DeviceManager.getSpecificDevice( "MediumKat",{ | |
return ScriptingEngine.gitScriptRun( "https://github.com/OperationSmallKat/SmallKat_V2.git", | |
"loadRobot.groovy", | |
[ "https://github.com/OperationSmallKat/greycat.git", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float moduleHeight = 30; | |
float LCDThickness = 6.3; | |
CSG cube = new Cube( 157.300,// X dimention | |
126.300,// Y dimention | |
moduleHeight// Z dimention | |
).toCSG().movez(moduleHeight/2)// this converts from the geometry to an object we can work with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.neuronrobotics.bowlerstudio.vitamins.Vitamins; | |
import eu.mihosoft.vrl.v3d.parametrics.*; | |
// to add your own viatamins, fork https://github.com/madhephaestus/Hardware-Dimensions and make your modifications there. | |
class allViataminMaker implements IParameterChanged{ | |
ArrayList <CSG> examples = null | |
ArrayList <CSG> getParts(){ | |
if(examples!=null) | |
return examples | |
examples = new ArrayList<>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.neuronrobotics.bowlerstudio.creature.ICadGenerator; | |
import com.neuronrobotics.bowlerstudio.creature.CreatureLab; | |
import org.apache.commons.io.IOUtils; | |
//Create the kinematics model from the xml file describing the D-H compliant parameters. | |
String xmlContent = ScriptingEngine.codeFromGistID("bcb4760a449190206170","CarlTheRobot.xml")[0]; | |
println "Loading the robot" | |
MobileBase base=null; | |
if(DeviceManager.getSpecificDevice(MobileBase.class, "CarlTheWalkingRobot")==null){ | |
BowlerStudio.speak("Connecting CarlTheWalkingRobot."); | |
base = new MobileBase(IOUtils.toInputStream(xmlContent, "UTF-8")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double size =40; | |
CSG cube = new Cube( size,// X dimention | |
size,// Y dimention | |
size// Z dimention | |
).toCSG() | |
//create a sphere | |
CSG sphere = new Sphere(size/20*12.5).toCSG() | |
// perform a union | |
CSG cubePlusSphere = cube.difference(sphere); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.neuronrobotics.bowlerstudio.vitamins.Vitamins; | |
import eu.mihosoft.vrl.v3d.parametrics.*; | |
int sphereRadius = 125; | |
int flapRadius = 65; | |
CSG body = new Sphere(sphereRadius,40,40)// Spheres radius | |
.toCSG()// convert to CSG to display | |
CSG cavity = new Sphere(sphereRadius-5,40,40)// Spheres radius | |
.toCSG()// convert to CSG to display |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Your code here | |
import eu.mihosoft.vrl.v3d.parametrics.*; | |
ArrayList<CSG> makeDividers(){ | |
LengthParameter thickness = new LengthParameter("Material Thickness",6.2,[10,1]) | |
LengthParameter foamThick = new LengthParameter("Foam Thickness",25,[40,1]) | |
LengthParameter height = new LengthParameter("Divider Height",60,[200,1]) | |
LengthParameter sheetX = new LengthParameter("sheetX",590,[914.4,1])// rows | |
LengthParameter sheetY = new LengthParameter("sheetY",590,[609.6,1])//columns | |
ArrayList<CSG> parts = new ArrayList<CSG>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import eu.mihosoft.vrl.v3d.parametrics.*; | |
CSG makeCube(){ | |
//Set up som parameters to use | |
LengthParameter xkey = new LengthParameter("X dimention",30,[120.0,1.0]) | |
LengthParameter ykey = new LengthParameter("Y dimention",30,[130.0,2.0]) | |
LengthParameter zkey = new LengthParameter("Z dimention",30,[140.0,3.0]) | |
LengthParameter sphereSize = new LengthParameter("Sphere Size",30,[150.0,4.0]) | |
//you can also create parametrics that are not used in creating primitives | |
LengthParameter offset = new LengthParameter("Sphere Offset Distance",15,[20,-5]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import eu.mihosoft.vrl.v3d.STL; | |
import eu.mihosoft.vrl.v3d.RoundedCube; | |
import com.neuronrobotics.bowlerstudio.vitamins.*; | |
import eu.mihosoft.vrl.v3d.parametrics.*; | |
float len = 68; | |
float width = 70; | |
float height = 42; | |
float thickness = 6.35; | |
float dia = 15; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//you print messages to the text output | |
println "Hello World From BowlerStudio Terminal!" | |
// or have it speak messages | |
BowlerKernel.speak("My copy") |
NewerOlder