Commit 2cbc2196 by mehtank

Full width cat cabin

1 parent 6a30a1ad
......@@ -4,28 +4,28 @@ c = Component()
# BOX
c.addSubcomponent("cabin","Cabin", inherit=True, prefix=None, invert=True)
c.addSubcomponent("cabin","Cabin", inherit=True, prefix=None)
c.addSubcomponent("port","BoatBase")
c.addSubcomponent("star","BoatBase")
c.addConstraint(("port","length"), ("length", "depth"), "sum(x)")
c.addConstraint(("port","width"), ("length", "depth"), "sum(x)/10.")
c.addConstraint(("port","width"), "width", "x/8.")
c.addConstraint(("port","depth"), ("length", "depth"), "sum(x)/20.")
c.addConstraint(("port","bow"), "length", "x/2.")
c.addConstraint(("port","stern"), "length", "x/8.")
c.addConstraint(("star","length"), ("length", "depth"), "sum(x)")
c.addConstraint(("star","width"), ("length", "depth"), "sum(x)/10.")
c.addConstraint(("star","width"), "width", "x/8.")
c.addConstraint(("star","depth"), ("length", "depth"), "sum(x)/20.")
c.addConstraint(("star","bow"), "length", "x/2.")
c.addConstraint(("star","stern"), "length", "x/8.")
c.addConnection(("cabin", "portedge"), ("port", "staredge"))
c.addConnection(("cabin", "staredge"), ("star", "portedge"))
c.addConnection(("cabin", "portedge"), ("port", "portedge"))
c.addConnection(("cabin", "staredge"), ("star", "staredge"))
c.inheritInterface("foreedge", ("cabin", "foreedge"))
c.inheritInterface("rearedge", ("cabin", "rearedge"))
c.inheritInterface("portedge", ("port", "portedge"))
c.inheritInterface("staredge", ("star", "staredge"))
c.inheritInterface("portedge", ("port", "staredge"))
c.inheritInterface("staredge", ("star", "portedge"))
c.toYaml("library/Catamaran.yaml")
......@@ -5,16 +5,16 @@ c = Component()
# BOX
c.addSubcomponent("boat","Catamaran", inherit=True, prefix=None)
c.addSubcomponent("port","Foil", invert=True, inherit=True, prefix=None)
c.addSubcomponent("star","Foil", invert=True, inherit=True, prefix=None)
c.addSubcomponent("port","Foil", inherit=True, prefix=None)
c.addSubcomponent("star","Foil", inherit=True, prefix=None)
c.delParameter("flip")
c.addConstraint(("port","width"), ("length", "depth", "width"), "(x[0]+x[1])/10. + x[2]")
c.addConstraint(("port","width"), "width", "x*3./8.")
c.addConstraint(("port","height"), ("length", "depth"), "sum(x)/3.")
c.addConstConstraint(("port","flip"), False)
c.addConstraint(("star","width"), ("length", "depth", "width"), "(x[0]+x[1])/10. + x[2]")
c.addConstraint(("star","width"), "width", "x*3./8.")
c.addConstraint(("star","height"), ("length", "depth"), "sum(x)/3.")
c.addConstConstraint(("star","flip"), True)
......
......@@ -30,7 +30,7 @@ subcomponents:
width: {parameter: width}
port:
classname: Foil
kwargs: {invert: true}
kwargs: {}
parameters:
depth: {parameter: depth}
dl: {parameter: dl}
......@@ -39,12 +39,10 @@ subcomponents:
function: sum(x)/3.
parameter: [length, depth]
length: {parameter: length}
width:
function: (x[0]+x[1])/10. + x[2]
parameter: [length, depth, width]
width: {function: x*3./8., parameter: width}
star:
classname: Foil
kwargs: {invert: true}
kwargs: {}
parameters:
depth: {parameter: depth}
dl: {parameter: dl}
......@@ -53,6 +51,4 @@ subcomponents:
function: sum(x)/3.
parameter: [length, depth]
length: {parameter: length}
width:
function: (x[0]+x[1])/10. + x[2]
parameter: [length, depth, width]
width: {function: x*3./8., parameter: width}
connections:
connection0:
- [cabin, portedge]
- [port, staredge]
- [port, portedge]
- {}
connection1:
- [cabin, staredge]
- [star, portedge]
- [star, staredge]
- {}
interfaces:
foreedge: {interface: foreedge, subcomponent: cabin}
portedge: {interface: portedge, subcomponent: port}
portedge: {interface: staredge, subcomponent: port}
rearedge: {interface: rearedge, subcomponent: cabin}
staredge: {interface: staredge, subcomponent: star}
staredge: {interface: portedge, subcomponent: star}
metadata:
depth: {default: 50}
height: {default: 30}
......@@ -21,7 +21,7 @@ parameters: {depth: 50, height: 30, length: 200, width: 60}
subcomponents:
cabin:
classname: Cabin
kwargs: {invert: true}
kwargs: {}
parameters:
depth: {parameter: depth}
height: {parameter: height}
......@@ -39,9 +39,7 @@ subcomponents:
function: sum(x)
parameter: [length, depth]
stern: {function: x/8., parameter: length}
width:
function: sum(x)/10.
parameter: [length, depth]
width: {function: x/8., parameter: width}
star:
classname: BoatBase
kwargs: {}
......@@ -54,6 +52,4 @@ subcomponents:
function: sum(x)
parameter: [length, depth]
stern: {function: x/8., parameter: length}
width:
function: sum(x)/10.
parameter: [length, depth]
width: {function: x/8., parameter: width}
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!