ap_attchment halve done
This commit is contained in:
104
hvst.py
104
hvst.py
@@ -4,17 +4,41 @@ import logging
|
|||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
|
||||||
tabletop_depth = 800 # currently, almost all parameters are derived from the table depth
|
tabletop_depth = 800 # currently, almost all parameters are derived from the table depth
|
||||||
#tabletop_depth = 600
|
#tabletop_depth = 600
|
||||||
|
|
||||||
alpha_max = 70
|
alpha_max = 70
|
||||||
|
|
||||||
|
bearings_diam = 22
|
||||||
|
|
||||||
tabletop_adjuster_assembly_spacing = 100 # symmetric distancing assumed
|
tabletop_adjuster_assembly_spacing = 100 # symmetric distancing assumed
|
||||||
|
|
||||||
|
lower_foot_width = 80
|
||||||
|
lower_foot_height = 50
|
||||||
|
|
||||||
|
upper_foot_width = 40
|
||||||
|
upper_foot_height = 40
|
||||||
|
|
||||||
|
tabletop_length = 1500
|
||||||
|
tabletop_thickness = 40
|
||||||
|
tabletop_connector_height = upper_foot_height
|
||||||
|
tabletop_connector_width = upper_foot_height
|
||||||
|
tabletop_connector_length = upper_foot_height
|
||||||
|
|
||||||
# cube in adjuster assembly
|
# cube in adjuster assembly
|
||||||
feet_adjuster_width = 60 # feet_adjuster is moving part inside adjuster assembly
|
feet_adjuster_width = 60 # feet_adjuster is moving part inside adjuster assembly
|
||||||
feet_adjuster_lenght = 60
|
feet_adjuster_lenght = 60
|
||||||
feet_adjuster_height = 60
|
feet_adjuster_height = 60
|
||||||
|
feet_adjuster_upper_connector_height = upper_foot_height
|
||||||
|
feet_adjuster_upper_connector_width = upper_foot_height
|
||||||
|
feet_adjuster_upper_connector_length = upper_foot_height
|
||||||
|
|
||||||
|
feet_adjuster_lower_connector_height = lower_foot_height
|
||||||
|
feet_adjuster_lower_connector_width = lower_foot_height
|
||||||
|
feet_adjuster_lower_connector_length = lower_foot_height
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
adjuster_assembly_wall_thickness = 20 # might be different for front and back...
|
adjuster_assembly_wall_thickness = 20 # might be different for front and back...
|
||||||
adjuster_assembly_slider_width = 10
|
adjuster_assembly_slider_width = 10
|
||||||
@@ -33,8 +57,8 @@ lower_feet_assambly_pivot_point_from_moving_end = ld - lower_feet_assambly_pivot
|
|||||||
|
|
||||||
logger.info(f"Lower h is: {lower_h} (between joins of leg only)")
|
logger.info(f"Lower h is: {lower_h} (between joins of leg only)")
|
||||||
|
|
||||||
lower_foot_width = 80
|
upper_foot_length = math.sqrt(math.pow(ld,2)+math.pow((tabletop_connector_height/2+feet_adjuster_upper_connector_height/2),2))
|
||||||
lower_foot_height = 50
|
|
||||||
lower_foot_length = 2*ld/math.sqrt(2)
|
lower_foot_length = 2*ld/math.sqrt(2)
|
||||||
lower_feet_assembly_base_plate_height = 20
|
lower_feet_assembly_base_plate_height = 20
|
||||||
lower_feet_assembly_side_wall_thickness = 25
|
lower_feet_assembly_side_wall_thickness = 25
|
||||||
@@ -51,6 +75,7 @@ lower_feet_assembly_bearing_hole_depth = 10
|
|||||||
lower_feet_assembly_pin_diameter = 10
|
lower_feet_assembly_pin_diameter = 10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## parameter end!
|
## parameter end!
|
||||||
|
|
||||||
def get_adjuster_assembly_old():
|
def get_adjuster_assembly_old():
|
||||||
@@ -74,25 +99,80 @@ def get_adjuster_assembly_front_back_plate():
|
|||||||
|
|
||||||
def get_adjuster_assembly():
|
def get_adjuster_assembly():
|
||||||
a = Assembly(None)
|
a = Assembly(None)
|
||||||
a.add(get_adjuster_assembly_left(), name="l")
|
l = get_adjuster_assembly_left()
|
||||||
|
l.vertices("<X and >Y and >Z").tag("upperCorner")
|
||||||
|
a.add(l, name="l")
|
||||||
a.add(get_adjuster_assembly_right(), name="r", color=Color("red"))
|
a.add(get_adjuster_assembly_right(), name="r", color=Color("red"))
|
||||||
a.add(get_adjuster_assembly_front_back_plate(), name="f", color=Color("orange"))
|
f = get_adjuster_assembly_front_back_plate()
|
||||||
|
f.vertices("<X and <Y and >Z").tag("upperInnerCorner")
|
||||||
|
a.add(f, name="f", color=Color("orange"))
|
||||||
a.add(get_adjuster_assembly_front_back_plate(), name="b")
|
a.add(get_adjuster_assembly_front_back_plate(), name="b")
|
||||||
|
|
||||||
|
return a
|
||||||
|
|
||||||
|
|
||||||
|
### das hier ist noch falsch... constraints chaos!!!
|
||||||
|
def test_constraints(a):
|
||||||
a.constrain("l@faces@<Y", "b@faces@>Y", "Plane")
|
a.constrain("l@faces@<Y", "b@faces@>Y", "Plane")
|
||||||
a.constrain("l@faces@>Y", "f@faces@<Y", "Plane")
|
a.constrain("l@faces@>Y", "f@faces@<Y", "Plane")
|
||||||
a.constrain("r@faces@<Y", "b@faces@>Y", "Plane")
|
a.constrain("r@faces@<Y", "b@faces@>Y", "Plane")
|
||||||
a.constrain("r@faces@>Y", "f@faces@<Y", "Plane")
|
a.constrain("r@faces@>Y", "f@faces@<Y", "Plane")
|
||||||
|
|
||||||
a.constrain("r@faces@>X", "f@faces@>X", "Axis")
|
a.constrain("l?upperCorner", "f?upperInnerCorner", "Point")
|
||||||
a.constrain("l@faces@<X", "f@faces@<X", "Axis")
|
|
||||||
a.constrain("r@faces@>X", "b@faces@>X", "Axis")
|
|
||||||
a.constrain("l@faces@<X", "b@faces@<X", "Axis")
|
|
||||||
a.solve()
|
|
||||||
|
|
||||||
|
#a.constrain("r@faces@>X", "f@faces@>X", "Axis")
|
||||||
|
#a.constrain("l@faces@<X", "f@faces@<X", "Axis")
|
||||||
|
#a.constrain("r@faces@>X", "b@faces@>X", "Axis")
|
||||||
|
#a.constrain("l@faces@<X", "b@faces@<X", "Axis")
|
||||||
|
a.solve()
|
||||||
return a
|
return a
|
||||||
|
|
||||||
show_object(get_adjuster_assembly())
|
def manuel_positioning(a):
|
||||||
|
return a
|
||||||
|
|
||||||
|
#a = get_adjuster_assembly()
|
||||||
|
#a = test_constraints(a)
|
||||||
|
|
||||||
|
#show_object(get_adjuster_assembly_front_back_plate())
|
||||||
|
#show_object(a)
|
||||||
|
|
||||||
|
### das hier ist noch falsch... constraints chaos!!! END
|
||||||
|
|
||||||
|
def get_ap():
|
||||||
|
return Workplane("XY").box(tabletop_length,tabletop_depth,tabletop_thickness)
|
||||||
|
|
||||||
|
|
||||||
|
def get_ap_attachment():
|
||||||
|
return Workplane("XY").box(tabletop_connector_length,tabletop_connector_width,tabletop_connector_height)\
|
||||||
|
.faces(">X").workplane().hole(6)\
|
||||||
|
.faces(">X").workplane().hole(bearings_diam,8)\
|
||||||
|
.faces("<X").workplane().hole(bearings_diam,16)\
|
||||||
|
.edges("|X and <Z").fillet(tabletop_connector_length/2-0.1)\
|
||||||
|
.faces(">Z").workplane().center(tabletop_connector_length/2,0).rect(tabletop_connector_length-10, tabletop_connector_width-10, forConstruction=True)\
|
||||||
|
.vertices().cskHole(4,5,45,15)\
|
||||||
|
|
||||||
|
def get_ap_attachment_rail():
|
||||||
|
pass # TODO -> better one piece for ap attachment
|
||||||
|
|
||||||
|
def get_ap_attachment_plate():
|
||||||
|
return Workplane("XY").box(tabletop_connector_length+30,tabletop_connector_width,2)\
|
||||||
|
.faces(">Z").workplane().rect(tabletop_connector_length-10, tabletop_connector_width-10, forConstruction=True)\
|
||||||
|
.vertices().cskHole(4,5,45)\
|
||||||
|
.faces("<Z").workplane().center((tabletop_connector_length+30)/2-6,0).cskHole(4,5,45)\
|
||||||
|
.faces("<Z").workplane().center(-(tabletop_connector_length+30)+12,0).cskHole(4,5,45)\
|
||||||
|
.edges("|Z").fillet(2)
|
||||||
|
|
||||||
|
def get_ap_attachment_assembly():
|
||||||
|
return Assembly(None)\
|
||||||
|
.add(get_ap_attachment(), name="ap_a")\
|
||||||
|
.add(get_ap_attachment_plate(), name="ap_a_p")\
|
||||||
|
.constrain("ap_a@faces@>Z", "ap_a_p@faces@<Z", "Plane")\
|
||||||
|
.solve()
|
||||||
|
|
||||||
|
|
||||||
|
show_object(get_ap_attachment_assembly())
|
||||||
|
#show_object(get_ap_attachment())
|
||||||
|
#show_object(get_ap_attachment_plate())
|
||||||
|
|
||||||
# actual parts:
|
# actual parts:
|
||||||
def get_lower_foot_base_plate():
|
def get_lower_foot_base_plate():
|
||||||
@@ -146,9 +226,9 @@ test_a = Assembly()\
|
|||||||
.add(get_lower_foot_assembly(), name="left_foot_assembly", color=Color("red"), loc=Location(Vector(0,0,0)))\
|
.add(get_lower_foot_assembly(), name="left_foot_assembly", color=Color("red"), loc=Location(Vector(0,0,0)))\
|
||||||
.add(get_lower_foot_assembly(), name="right_foot_assembly", color=Color("white"), loc=Location(Vector(500,0,0)))
|
.add(get_lower_foot_assembly(), name="right_foot_assembly", color=Color("white"), loc=Location(Vector(500,0,0)))
|
||||||
|
|
||||||
|
#show_object(get_lower_foot_assembly())
|
||||||
|
|
||||||
#show_object(get_lower_foot_front_wall())
|
#show_object(get_lower_foot_front_wall())
|
||||||
#show_object(get_lower_foot_end_wall())
|
#show_object(get_lower_foot_end_wall())
|
||||||
#show_object(assy)
|
#show_object(test_a)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user