Example #1
0
from schematics import ExampleDebugger
command_line_parser = ExampleDebugger('A simple system.')
command_line_parser.parse()

from schematics import Canvas
from schematics import System
from schematics import Pipe
from schematics import Point

simple = System('simple')

simple.add_component(
  Pipe(
    1.0, 0.5, Point(), name = 'Pipe 1', angle = 0.0,
    label_location = 'center', label_pad = 0.0, label_angle = 0.0
  )
)

simple.add_component(
  Pipe(
    1.0, 0.5, Point(2.0, 1.0), name = 'Pipe 2', angle = 0.0,
    label_location = 'center', label_pad = 0.0, label_angle = 0.0
  )
)

simple.add_component(
  Pipe(
    1.0, 0.5, Point(4.0, 0.0), name = 'Pipe 3', angle = 0.0,
    label_location = 'center', label_pad = 0.0, label_angle = 0.0
  )
)
Example #2
0
spacing = 0.2
core_channel_width = 0.5
core_channel_height = 2.0
pipe_width = 0.4

# Core
x = 1.5 * (- core_channel_width - spacing)
y = 0.0
CH1 = CoreChannel(
        core_channel_width, core_channel_height,
        Point(x, y),
        name = 'CH1',
        label_angle = 90.0
     )
tmi.add_component(CH1)

x += core_channel_width + spacing
CH2 = CoreChannel(
        core_channel_width, core_channel_height,
        Point(x, y),
        name = 'CH2',
        label_angle = 90.0
      )
tmi.add_component(CH2)

x += core_channel_width + spacing
CH3 = CoreChannel(
        core_channel_width, core_channel_height,
        Point(x, y),
        name = 'CH3',
Example #3
0
command_line_parser = ExampleDebugger("A simple system.")
command_line_parser.parse()

from schematics import Canvas
from schematics import System
from schematics import Pipe
from schematics import Pump
from schematics import CoreChannel
from schematics import Point

tmi = System("tmi")

radius = 1.0
px = 0.0
py = 0.0
y = (0.5 * radius) + py
x = (3.0 * radius) + px
tmi.add_node(x, y, name="outlet")

PumpA = Pump(radius, Point(px, py), name="Pump", ref=None, angle=90.0, label_angle=0.0)
tmi.add_component(PumpA)

tmi.connect("Pump:outlet", "outlet")


CAN = Canvas(border_thickness=0.05, grid=True)
CAN.add_system(tmi)

CAN.draw(save_file="tmi.pdf", display=True)
Example #4
0
from schematics import Canvas
from schematics import System
from schematics import Pipe
from schematics import Pump
from schematics import CoreChannel
from schematics import Point

tmi = System('tmi')

radius = 1.0
px = 0.0
py = 0.0
y = (0.5 * radius) + py
x = (3.0 * radius) + px
tmi.add_node(x, y, name='outlet')

PumpA = Pump(radius,
             Point(px, py),
             name='Pump',
             ref=None,
             angle=90.0,
             label_angle=0.0)
tmi.add_component(PumpA)

tmi.connect('Pump:outlet', 'outlet')

CAN = Canvas(border_thickness=0.05, grid=True)
CAN.add_system(tmi)

CAN.draw(save_file='tmi.pdf', display=True)