diff --git a/rocolib/builders/boat/mounts/ServoMountWithArmsBuilder.py b/rocolib/builders/boat/mounts/BottomServoMountBuilder.py similarity index 82% rename from rocolib/builders/boat/mounts/ServoMountWithArmsBuilder.py rename to rocolib/builders/boat/mounts/BottomServoMountBuilder.py index 52435286d7d81b7b18b7177679eb5e4a8160a9d7..1ffa889af3486d42c54b218e0c49fe224f98b085 100644 --- a/rocolib/builders/boat/mounts/ServoMountWithArmsBuilder.py +++ b/rocolib/builders/boat/mounts/BottomServoMountBuilder.py @@ -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") diff --git a/rocolib/library/ServoMountWithArms.yaml b/rocolib/library/ServoMountWithArms.yaml index 002b20ea82da0159fbe773c95b97d07877596507..865c3d1a402d37ffda42e350b0ea7718870501c2 100644 --- a/rocolib/library/ServoMountWithArms.yaml +++ b/rocolib/library/ServoMountWithArms.yaml @@ -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: {}