Commit 32df1f47 by mehtank

Added crossbar to rocker chair

1 parent 6e9172d5
......@@ -5,13 +5,20 @@ c = Component()
c.addSubcomponent("seat","ChairSeat", inherit=True, prefix=None)
c.addSubcomponent("legl","RockerLeg", inherit=True, prefix=None)
c.addSubcomponent("legr","RockerLeg", inherit=True, prefix=None)
c.addSubcomponent("crossbar","Rectangle")
c.delParameter("flip")
c.addConstConstraint(("legl","flip"), 1)
c.addConstConstraint(("legr","flip"), 0)
c.addConstraint(("crossbar","l"), "width")
c.addConstraint(("crossbar","w"), ("height", "rocker"), "2 * x[0] * np.sin(np.deg2rad(x[1]))")
c.addConnection(("seat","left"),("legl","topedge"), angle=0)
c.addConnection(("seat","right"),("legr","topedge"), angle=0)
c.addConnection(("crossbar","l"),("legl","crossbarflip"), angle=90)
c.addConnection(("crossbar","r"),("legr","crossbar"), angle=90)
c.toYaml("library/RockerChair.yaml")
......@@ -46,5 +46,7 @@ for i in range(n):
c.inheritInterface("topedge", ("beam3", "r"))
c.inheritInterface("crossbar", ("beam5", "l"))
c.inheritInterface("crossbarflip", ("beam1", "l"))
c.toYaml("library/RockerLeg.yaml")
......@@ -7,6 +7,14 @@ connections:
- [seat, right]
- [legr, topedge]
- {angle: 0}
connection2:
- [crossbar, l]
- [legl, crossbarflip]
- {angle: 90}
connection3:
- [crossbar, r]
- [legr, crossbar]
- {angle: 90}
interfaces: {}
metadata:
backheight: {default: 40, paramtype: length}
......@@ -20,6 +28,14 @@ metadata:
parameters: {backheight: 40, depth: 50, gapheight: 20, height: 40, recline: 110, rocker: 10,
thickness: 10, width: 70}
subcomponents:
crossbar:
classname: Rectangle
kwargs: {}
parameters:
l: {parameter: width}
w:
function: 2 * x[0] * np.sin(np.deg2rad(x[1]))
parameter: [height, rocker]
legl:
classname: RockerLeg
kwargs: {}
......
......@@ -48,6 +48,8 @@ connections:
- [kite3, t]
- {angle: 0}
interfaces:
crossbar: {interface: l, subcomponent: beam5}
crossbarflip: {interface: l, subcomponent: beam1}
topedge: {interface: r, subcomponent: beam3}
metadata:
depth: {default: 50, paramtype: length}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!