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 cadquery as cq | |
from Helpers import show | |
# pillow block | |
height = 42 #cube parameters | |
width = 42 | |
length = 35 | |
cyl_dia = 32 #cylinder parameters | |
cyl_lenght = 17 | |
between_holes = 31 #holes parameters |
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 cadquery as cq | |
from Helpers import show | |
# parameters | |
sr_OD = 12 | |
sr_lenght = 13 | |
nSides = 6 | |
fillet_size = 2 | |
cutcone_BD = 12 | |
cutcone_SD = 2 |
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
#Program to plot graph of car, moto and bike power | |
#Written by Eddie Liberato in 25/10/16 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.font_manager as font_manager | |
import matplotlib.patches as mpatches | |
font_path = '/usr/share/fonts/truetype/strasua/strasua.ttf' | |
font_prop = font_manager.FontProperties(fname=font_path, size=14) |
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
*include,input=hexb.inp | |
** material description | |
*MATERIAL, NAME=steel | |
*ELASTIC | |
210000.,0.3 | |
*density | |
7.850e-09 | |
*BOUNDARY |
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
#Program to compute and graph a cantilever beam | |
#subject to Uniformly Distributed Load | |
#Written by Eddie Liberato in 25/10/16 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
#Beam parameters | |
l=200 #mm, lenght | |
h=100 #mm, height | |
b=10 #mm, width |
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
*INCLUDE, INPUT=can.inp | |
*MATERIAL, NAME=Al | |
*ELASTIC | |
69.0E+09,0.3 | |
*SHELL SECTION, MATERIAL=Al, ELSET=bottom | |
0.22 | |
*SHELL SECTION, MATERIAL=Al, ELSET=body | |
0.1 |
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
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.font_manager as font_manager | |
import matplotlib.patches as mpatches | |
font_path = '/usr/share/fonts/truetype/strasua/strasua.ttf' | |
font_prop = font_manager.FontProperties(fname=font_path, size=14) | |
plt.figure(figsize=(10, 5), dpi=1200) |
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
<< HEAD(INFORM("compressibility factor for air",{{"T:","Kelvin",0},{"P:","bar",0}},{1,0},{},{})) \-> L | |
<< L(1) -> T | |
<< L(2) -> P | |
<< 1|>Z ; P/37.71|>Pr ; T/132.65|>Tr ; .00001|>Ge ; | |
DO .08664*Pr/(Z*Tr)|>k ; 1/(1-k)-4.9339796/Tr^1.5*(k/(1+k))|>Zrk ; Z-Zrk|>E ; Zrk|>Z ; | |
UNTIL Ge>E | |
END ; PURGE({'E','Ge','Zrk','k','Tr','Pr'}) ; Z | |
>> | |
>> | |
>> |
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 serial | |
import matplotlib.pyplot as plt | |
from time import sleep | |
from drawnow import * | |
arduino = serial.Serial('/dev/ttyUSB0') | |
with arduino: | |
arduino.setDTR(False) | |
sleep(1) | |
arduino.flushInput() |
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 cadquery as cq | |
from Helpers import show | |
l1 = 20 | |
d1 = 7 | |
l2 = 90 | |
d2 = 10 | |
l3 = 25.4 | |
d3 = 8 | |
hole_diameter = 3 |