Skip to content

Instantly share code, notes, and snippets.

View aravindk2604's full-sized avatar
💭
Upgrading...:hourglass_flowing_sand:

Aravind Krishnan aravindk2604

💭
Upgrading...:hourglass_flowing_sand:
View GitHub Profile
@aravindk2604
aravindk2604 / INSTALL.md
Created August 16, 2018 07:00 — forked from arya-oss/INSTALL.md
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
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.union(sphere);
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);
//create an extruded polygon
CSG polygon = Extrude.points(new Vector3d(0, 0, 40),// This is the extrusion depth
new Vector3d(0,0),// All values after this are the points in the polygon
new Vector3d(80,0),// Bottom right corner
new Vector3d(60,40),// upper right corner
new Vector3d(20,40)// upper left corner
);
return polygon
//CSG simpleSyntax =new Cylinder(10,10,40,(int)30).toCSG() // a one line Cylinder
//create a Cylinder
/*CSG myCylinder = new Cylinder(10, // Radius at the bottom
20, // Radius at the top
40, // Height
(int)30 //resolution
).toCSG()//convert to CSG to display ).toCSG()//convert to CSG to display
.movey(50)
//create a Cylinder
//create a sphere
CSG sphere = new Sphere(40)// Spheres radius
.toCSG()// convert to CSG to display
return sphere
//create a rounded cube
CSG roundedCube = new RoundedCube( 40,// X dimention
44,// Y dimention
50// Z dimention
)
.cornerRadius(4)// sets the radius of the corner
.toCSG()// converts it to a CSG tor display
return roundedCube
return new Cube( 40,// X dimention
60,// Y dimention
200// Z dimention
).toCSG()// this converts from the geometry to an object we can work with
@aravindk2604
aravindk2604 / javaCad.groovy
Created July 8, 2017 19:10 — forked from madhephaestus/.gitignore
JavaCadExample
class SampleMaker implements IParameterChanged{//collection of parts
ArrayList<CSG> parts = null;
boolean loading=false;
ArrayList<CSG> makeSamples(){
if(parts !=null){
return parts
}
loading=true;
double myStartSize = 40;