Add Dockerfile and modify generator script to change shapes and take a unique file id.
This commit is contained in:
parent
29ffa13092
commit
c9c98f91dc
18 changed files with 166867 additions and 57 deletions
|
@ -8,41 +8,6 @@ import numpy as np
|
|||
import FreeCAD
|
||||
import Part
|
||||
|
||||
# def generate_bulb(height, radius, thickness):
|
||||
#
|
||||
# light_angle = np.arcsin(0.25) + np.pi/2.0
|
||||
# light_arc_length = radius*light_angle+np.pi/2.0
|
||||
# num_divisions = 25
|
||||
# segment_length = light_arc_length/float(num_divisions)
|
||||
#
|
||||
# edges = []
|
||||
# for idx in range(1, num_divisions):
|
||||
# angle0 = float(idx-1)/float(num_divisions)*light_angle
|
||||
# angle1 = float(idx)/float(num_divisions)*light_angle
|
||||
# x0 = -radius*np.sin(angle0)
|
||||
# y0 = -radius*np.cos(angle0)
|
||||
# x1 = -radius*np.sin(angle1)
|
||||
# y1 = -radius*np.cos(angle1)
|
||||
# edges.append(Part.makeLine((x0, y0, 0),
|
||||
# (x1, y1, 0)))
|
||||
#
|
||||
# edge0 = Part.makeLine((0.0, height, 0),
|
||||
# (-radius, 0.0, 0))
|
||||
# edge1 = Part.makeLine((-radius, 0.0, 0),
|
||||
# (-radius -thickness, 0.0, 0))
|
||||
# edge2 = Part.makeLine((-radius -thickness, 0.0, 0),
|
||||
# (-radius -thickness, height, 0))
|
||||
# edge3 = Part.makeLine((-radius -thickness, height, 0),
|
||||
# (0.0, height, 0))
|
||||
# wire1 = Part.Wire([edge0, edge1, edge2, edge3])
|
||||
# face = Part.Face([wire1,])
|
||||
#
|
||||
# pos = FreeCAD.Vector(0.0, 0.0, 0.0)
|
||||
# vec = FreeCAD.Vector(0.0, 1.0, 0.0)
|
||||
# angle = 360
|
||||
# solid = face.revolve(pos, vec, angle)
|
||||
# return solid
|
||||
|
||||
def generate_chord(height, radius, thickness):
|
||||
|
||||
edge0 = Part.makeLine((0.0, height, 0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue