Skip to content
Snippets Groups Projects
Commit 25723d97 authored by Grace Kwak's avatar Grace Kwak
Browse files

parameterized bottomservomount component

parent 0518be5b
No related merge requests found
......@@ -9,21 +9,21 @@ c.addParameter("width", 90, parameterType="length") # = boat depth
c.addSubcomponent("servoMount", "SideServoMount", inherit="depth")
c.addSubcomponent("leftArmDown", "Rectangle")
c.addConstConstraint(("leftArmDown", "w"), 24)
c.addConstraint(("leftArmDown", "w"), "servoMount.depth")
c.addConstraint(("leftArmDown", "l"), "depth", "x-3") #DEPTH OF BOAT - 3 for the tab
c.addSubcomponent("leftArmAcross", "Rectangle")
c.addConstConstraint(("leftArmAcross", "w"), 24)
c.addConstConstraint(("leftArmAcross", "w"), "servoMount.depth")
c.addConstraint(("leftArmAcross", "l"), ("width", "servoMount.depth"), "x[0]/2 - x[1]/2") #DEPTH OF BOAT - 3 for the tab
c.addConnection(("leftArmDown", "r"), ("leftArmAcross", "r"), angle=-90)
c.addSubcomponent("rightArmDown", "Rectangle")
c.addConstConstraint(("rightArmDown", "w"), 24)
c.addConstConstraint(("rightArmDown", "w"), "servoMount.depth")
c.addConstraint(("rightArmDown", "l"), "depth", "x-3") #DEPTH OF BOAT
c.addSubcomponent("rightArmAcross", "Rectangle")
c.addConstConstraint(("rightArmAcross", "w"), 24)
c.addConstConstraint(("rightArmAcross", "w"), "servoMount.depth")
c.addConstraint(("rightArmAcross", "l"), ("width", "servoMount.depth"), "x[0]/2 - x[1]/2") #DEPTH OF BOAT - 3 for the tab
c.addConnection(("rightArmDown", "r"), ("rightArmAcross", "r"), angle=-90)
......@@ -34,4 +34,4 @@ c.addConnection(("servoMount", "rightInterface"), ("rightArmAcross", "l"))
c.inheritInterface("leftArmInterface", ("leftArmDown", "l"))
c.inheritInterface("rightArmInterface", ("rightArmDown", "l"))
c.toLibrary("ServoMountWithArms")
c.toLibrary("BottomServoMount")
......@@ -45,7 +45,7 @@ parameters:
defaultValue: 90
spec:
parameterType: length
source: ../builders/boat/ServoMountWithArmsBuilder.py
source: ../builders/boat/mounts/ServoMountWithArmsBuilder.py
subcomponents:
leftArmAcross:
classname: Rectangle
......@@ -64,7 +64,8 @@ subcomponents:
l:
function: x-3
parameter: depth
w: 24
w:
parameter: servoMount.depth
rightArmAcross:
classname: Rectangle
kwargs: {}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment