from schematics import ExampleDebugger command_line_parser = ExampleDebugger('Simple pipe reflected.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import Pipe from schematics import Component CAN = Canvas(border_thickness = 0.05, grid = True) print(Component.stats) CAN.add_component( Pipe(5, 1.0, Point(0.0, 0.0) , label_location = 'center', label_pad = 1.0, name = 'Not reflected', angle = 0.0, label_angle = 0.0) ) CAN.add_component( Pipe(5, 1.0, Point(0.0, 0.0) , label_location = 'bottom', label_pad = 1.0, name = 'Bottom label \n relfect_x', angle = 0.0, label_angle = 0.0, reflect = 'x') ) CAN.add_component( Pipe(5, 1.0, Point(0.0, -2.0) , label_location = 'center', label_pad = 1.0, name = 'Not reflected', angle = 0.0, label_angle = 0.0) ) CAN.add_component( Pipe(5, 1.0, Point(0.0, -2.0) , label_location = 'top', label_pad = 1.0, name = 'Top label \n relfect_x', angle = 0.0, label_angle = 0.0, reflect = 'x') ) print(Component.stats) CAN.draw(save_file = 'test.pdf', display = True, print_information = False)
from __future__ import print_function from schematics import ExampleDebugger command_line_parser = ExampleDebugger('Simple pump reflected.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import Pump from schematics import Component CAN = Canvas(border_thickness = 0.05, grid = True) print(Component.stats) CAN.add_component( Pump(0.3, Point(0.0, 0.0), label_location = 'center', name = 'not reflected', label_pad = 0.5, angle = 0)) CAN.add_component( Pump(0.3, Point(1.0, 0.0), label_location = 'right', name = 'relfect_y \nright label', label_pad = 0.5, angle = 0.0, reflect = 'y')) CAN.add_component( Pump(0.3, Point(2.0, 0.0), label_location = 'left', name = 'relfect_y \nleft label', label_pad = 0.5, angle = 0.0, reflect = 'y')) CAN.add_component( Pump(0.3, Point(0.0, -1.0), label_location = 'center', name = 'not reflected', label_pad = 0.5, angle = 0.0)) print(Component.stats) CAN.draw(save_file = 'test.pdf', display = True, print_information = False)
from schematics import ExampleDebugger command_line_parser = ExampleDebugger('Display color palettes.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import Pipe from schematics import Component CAN = Canvas(border_thickness = 0.05, grid = False) print Component.stats # RAINBOW CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 4.5), label_location = 'left', label_string = 'Rainbow', face_color = (0.6875, .1953, 0.1875))) CAN.add_component( Pipe(1.0, 1.0, Point(-1.5, 4.5), face_color = (0.8825, 0.4170, 0.1445))) CAN.add_component( Pipe(1.0, 1.0, Point(0.0, 4.5), face_color = (0.9961, 0.8320, 0.0))) CAN.add_component( Pipe(1.0, 1.0, Point(1.5, 4.5), face_color = (0.125, 0.4101, 0.1445))) CAN.add_component( Pipe(1.0, 1.0, Point(3.0, 4.5), face_color = (0.1758, 0.203, 0.7461))) CAN.add_component( Pipe(1.0, 1.0, Point(4.5, 4.5), face_color = (0.5, 0.2266, 0.5703))) # Fantastic Mr. Fox CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 3.0), label_location = 'left', label_string = 'Fantastic\n Mr. Fox', face_color = (0.8633, 0.5508, 0.1602))) CAN.add_component( Pipe(1.0, 1.0, Point(-1.5, 3.0), face_color = (0.8828, 0.8203, 0.0))) CAN.add_component( Pipe(1.0, 1.0, Point(0.0, 3.0), face_color = (0.27343, 0.67187, 0.78125))) CAN.add_component( Pipe(1.0, 1.0, Point(1.5, 3.0), face_color = (0.894531, 0.5234, 0.00391))) CAN.add_component( Pipe(1.0, 1.0, Point(3.0, 3.0), face_color = (0.7031, 0.05859, 0.125))) CAN.add_component( Pipe(1.0, 1.0, Point(4.5, 3.0), face_color = (0.9531, 0.9179, 0.8008))) # Beachy Time CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 0.0), label_location = 'left', label_string = 'Beachy\nTime', face_color = (0.59, 0.81, 0.71))) CAN.add_component( Pipe(1.0, 1.0, Point(-1.5, 0.0), face_color = (1.00, 0.93, 0.68)))
command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import CoreChannel from schematics import Component CAN = Canvas(border_thickness=0.05, grid=False) print(Component.stats) CAN.add_component( CoreChannel(1.0, 3.0, Point(-3.0, 0.0), label_location='left', name='left \nreflect_y', label_pad=0.25, angle=0.0, reflect='y', face_color=(0.6875, .1953, 0.1875, 1.0))) CAN.add_component( CoreChannel(1.0, 3.0, Point(0.0, 0.0), label_location='center', name='center', label_pad=0.25, angle=0.0, face_color=(0.5, 0.2266, 0.5703, 1.0))) CAN.add_component( CoreChannel(1.0,
command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import Pipe from schematics import Component CAN = Canvas(border_thickness=0.05, grid=True) print(Component.stats) CAN.add_component( Pipe(0.75, 0.3, Point(1.0, 1.0), name='Component', a=0.0, ll='bottom', lp=1.0, la=0.0, fs=10)) # CAN.add_component( Pipe(0.75, 0.3, Point(-1.0, -1.0), name = '-90 degrees', a = -90.0, # ll = 'top', lp = 1.0, la = 0.0 # ) # ) # # CAN.add_component( Pipe(0.75, 0.3, Point(0.0, -1.0), name = '-45 degrees', a = -45.0, # ll = 'top', lp = 1.0, la = 0.0 # ) # ) #
n = deepcopy(self.name, memo), ll = deepcopy(self.label_location, memo), ls = deepcopy(self.label_string, memo), la = deepcopy(self.label_angle, memo), lp = deepcopy(self.label_pad, memo), fs = deepcopy(self.font_size, memo), a = deepcopy(self.angle, memo), ref = deepcopy(self.reflect, memo), fc = deepcopy(self.face_color, memo), ec = deepcopy(self.edge_color, memo), lw = deepcopy(self.line_width, memo) ) # debugging routine if __name__ == '__main__': from schematics import component_debug_switch debugging = component_debug_switch('The component Pipe') from schematics import Canvas component = Pipe( 1.0, 0.5, Point(0.0, 0.0), name = 'Pipe', a = 0.0, ll = 'top', lp = 1.0, ls = 'Component', la = 0.0, fs = 12 ) CAN = Canvas(border_thickness = 0.05, grid = False) CAN.add_component(component) CAN.add_graph(component.graph) CAN.draw(display = True)
ref=deepcopy(self.reflect, memo), fc=deepcopy(self.face_color, memo), ec=deepcopy(self.edge_color, memo), lw=deepcopy(self.line_width, memo)) # debugging routine if __name__ == '__main__': from schematics import component_debug_switch debugging = component_debug_switch('The component Pipe') from schematics import Canvas component = Pipe(1.0, 0.5, Point(0.0, 0.0), name='Pipe', a=0.0, ll='top', lp=1.0, ls='Component', la=0.0, fs=12) CAN = Canvas(border_thickness=0.05, grid=False) CAN.add_component(component) CAN.add_graph(component.graph) CAN.draw(display=True)
command_line_parser = ExampleDebugger('Simple pump reflected.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import Pump from schematics import Component CAN = Canvas(border_thickness=0.05, grid=True) print(Component.stats) CAN.add_component( Pump(0.3, Point(0.0, 0.0), label_location='center', name='not reflected', label_pad=0.5, angle=0)) CAN.add_component( Pump(0.3, Point(1.0, 0.0), label_location='right', name='relfect_y \nright label', label_pad=0.5, angle=0.0, reflect='y')) CAN.add_component( Pump(0.3, Point(2.0, 0.0), label_location='left',
from schematics import ExampleDebugger command_line_parser = ExampleDebugger('Display color palettes.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import Pipe from schematics import Component CAN = Canvas(border_thickness = 0.05, grid = False) print Component.stats # Reds CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 3.0), face_color = (0.597659, 0.0, 0.0))) CAN.add_component( Pipe(1.0, 1.0, Point(-1.5, 3.0), face_color = (0.67578, 0.19531, 0.19531))) CAN.add_component( Pipe(1.0, 1.0, Point(0.0, 3.0), face_color = (0.71484, 0.2968, 0.2968))) CAN.add_component( Pipe(1.0, 1.0, Point(1.5, 3.0), face_color = (0.7539, 0.3984, 0.3984))) CAN.add_component( Pipe(1.0, 1.0, Point(3.0, 3.0), face_color = (0.796875, 0.49609, 0.49609))) CAN.add_component( Pipe(1.0, 1.0, Point(4.5, 3.0), face_color = (0.8359, 0.5976, 0.5976))) # Oranges CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 1.5), face_color = (0.82, 0.36, 0.01))) CAN.add_component( Pipe(1.0, 1.0, Point(-1.5, 1.5), face_color = (0.83, 0.43, 0.11))) CAN.add_component( Pipe(1.0, 1.0, Point(0.0, 1.5), face_color = (0.85, 0.49, 0.20))) CAN.add_component( Pipe(1.0, 1.0, Point(1.5, 1.5), face_color = (0.87, 0.55, 0.30))) CAN.add_component( Pipe(1.0, 1.0, Point(3.0, 1.5), face_color = (0.89, 0.62, 0.40))) CAN.add_component( Pipe(1.0, 1.0, Point(4.5, 1.5), face_color = (0.91, 0.68, 0.50))) # Yellows CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 0.0), face_color = (0.98, 0.79, 0.00))) CAN.add_component( Pipe(1.0, 1.0, Point(-1.5, 0.0), face_color = (0.98, 0.81, 0.10)))
from schematics import ExampleDebugger command_line_parser = ExampleDebugger("Simple steam dome reflected.") command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import SteamDome from schematics import Component CAN = Canvas(border_thickness=0.05, grid=True) print(Component.stats) CAN.add_component( SteamDome(1.0, Point(1.0, 0.0), label_location="center", name="not reflected", label_pad=0.5, angle=0.0) ) CAN.add_component( SteamDome( 1.0, Point(1.0, 0.5), label_location="right", name="relfect_y \nright label", label_pad=0.5, angle=0.0, reflect="y", ) ) CAN.add_component( SteamDome( 1.0,
from schematics import ExampleDebugger command_line_parser = ExampleDebugger('Simple steam dome reflected.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import SteamDome from schematics import Component CAN = Canvas(border_thickness = 0.05, grid = True) print Component.stats CAN.add_component( SteamDome(1.0, Point(1.0, 0.0), label_location = 'center', name = 'not reflected', label_pad = 0.5, angle = 0.0)) CAN.add_component( SteamDome(1.0, Point(1.0, 0.5), label_location = 'right', name = 'relfect_y \nright label', label_pad = 0.5, angle = 0.0, reflect = 'y')) CAN.add_component( SteamDome(1.0, Point(2.0, 0.5), label_location = 'left', name = 'relfect_y \nleft label', label_pad = 0.5, angle = 0.0, reflect = 'y')) CAN.add_component( SteamDome(1.0, Point(2.0, 0.0), label_location = 'top', name = 'relfect_x \ntop label', label_pad = 0.5, angle = 0.0, reflect = 'x')) print Component.stats CAN.draw(save_file = 'test.pdf', display = True, print_information = False)
from schematics import ExampleDebugger command_line_parser = ExampleDebugger('Simple core channel.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import CoreChannel from schematics import Component CAN = Canvas(border_thickness = 0.05, grid = False) print Component.stats CAN.add_component( CoreChannel(1.0, 3.0, Point(-3.0, 0.0), label_location='left', name='left \nreflect_y', label_pad = 0.25, angle=0.0, reflect = 'y', face_color = (0.6875, .1953, 0.1875, 1.0))) CAN.add_component( CoreChannel(1.0, 3.0, Point(0.0, 0.0), label_location='center', name='center', label_pad = 0.25, angle=0.0, face_color = (0.5, 0.2266, 0.5703, 1.0))) CAN.add_component( CoreChannel(1.0, 3.0, Point(3.0, 0.0), label_location='right', name='right \nreflect_y', label_pad = 0.25, angle=0.0, reflect = 'y', face_color = (0.9961, 0.8320, 0.0, 1.0))) print Component.stats CAN.draw(save_file = None, display = True, print_information = False)
from __future__ import print_function from schematics import ExampleDebugger command_line_parser = ExampleDebugger('Display color palettes.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import Pipe from schematics import Component CAN = Canvas(border_thickness = 0.05, grid = False) print(Component.stats) # RAINBOW CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 4.5), label_location = 'left', label_string = 'Rainbow', face_color = (0.6875, .1953, 0.1875))) CAN.add_component( Pipe(1.0, 1.0, Point(-1.5, 4.5), face_color = (0.8825, 0.4170, 0.1445))) CAN.add_component( Pipe(1.0, 1.0, Point(0.0, 4.5), face_color = (0.9961, 0.8320, 0.0))) CAN.add_component( Pipe(1.0, 1.0, Point(1.5, 4.5), face_color = (0.125, 0.4101, 0.1445))) CAN.add_component( Pipe(1.0, 1.0, Point(3.0, 4.5), face_color = (0.1758, 0.203, 0.7461))) CAN.add_component( Pipe(1.0, 1.0, Point(4.5, 4.5), face_color = (0.5, 0.2266, 0.5703))) # Fantastic Mr. Fox CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 3.0), label_location = 'left', label_string = 'Fantastic\n Mr. Fox', face_color = (0.8633, 0.5508, 0.1602))) CAN.add_component( Pipe(1.0, 1.0, Point(-1.5, 3.0), face_color = (0.8828, 0.8203, 0.0))) CAN.add_component( Pipe(1.0, 1.0, Point(0.0, 3.0), face_color = (0.27343, 0.67187, 0.78125))) CAN.add_component( Pipe(1.0, 1.0, Point(1.5, 3.0), face_color = (0.894531, 0.5234, 0.00391))) CAN.add_component( Pipe(1.0, 1.0, Point(3.0, 3.0), face_color = (0.7031, 0.05859, 0.125))) CAN.add_component( Pipe(1.0, 1.0, Point(4.5, 3.0), face_color = (0.9531, 0.9179, 0.8008))) # Beachy Time CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 0.0), label_location = 'left', label_string = 'Beachy\nTime', face_color = (0.59, 0.81, 0.71)))
from schematics import ExampleDebugger command_line_parser = ExampleDebugger('Simple Pipe.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import Pipe from schematics import Component CAN = Canvas(border_thickness = 0.05, grid = True) print Component.stats CAN.add_component( Pipe(0.75, 0.3, Point(1.0, 1.0), name = 'Component', a = 0.0, ll = 'bottom', lp = 1.0, la = 0.0, fs = 10 ) ) CAN.add_component( Pipe(0.75, 0.3, Point(-1.0, -1.0), name = '-90 degrees', a = -90.0, ll = 'top', lp = 1.0, la = 0.0 ) ) CAN.add_component( Pipe(0.75, 0.3, Point(0.0, -1.0), name = '-45 degrees', a = -45.0, ll = 'top', lp = 1.0, la = 0.0 ) ) CAN.add_component( Pipe(0.75, 0.3, Point(1.0, -1.0), name = '0 degrees', a = 0.0, ll = 'top', lp = 1.0, la = 0.0
from schematics import ExampleDebugger command_line_parser = ExampleDebugger('Simple Pipe.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import Pipe from schematics import Component CAN = Canvas(border_thickness = 0.05, grid = True) print(Component.stats) CAN.add_component( Pipe(0.75, 0.3, Point(1.0, 1.0), name = 'Component', a = 0.0, ll = 'bottom', lp = 1.0, la = 0.0, fs = 10 ) ) # CAN.add_component( Pipe(0.75, 0.3, Point(-1.0, -1.0), name = '-90 degrees', a = -90.0, # ll = 'top', lp = 1.0, la = 0.0 # ) # ) # # CAN.add_component( Pipe(0.75, 0.3, Point(0.0, -1.0), name = '-45 degrees', a = -45.0, # ll = 'top', lp = 1.0, la = 0.0 # ) # ) # # CAN.add_component( Pipe(0.75, 0.3, Point(1.0, -1.0), name = '0 degrees', a = 0.0, # ll = 'top', lp = 1.0, la = 0.0
from __future__ import print_function from schematics import ExampleDebugger command_line_parser = ExampleDebugger('Display color palettes.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import Pipe from schematics import Component CAN = Canvas(border_thickness=0.05, grid=False) print(Component.stats) # Reds CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 3.0), face_color=(0.597659, 0.0, 0.0))) CAN.add_component( Pipe(1.0, 1.0, Point(-1.5, 3.0), face_color=(0.67578, 0.19531, 0.19531))) CAN.add_component( Pipe(1.0, 1.0, Point(0.0, 3.0), face_color=(0.71484, 0.2968, 0.2968))) CAN.add_component( Pipe(1.0, 1.0, Point(1.5, 3.0), face_color=(0.7539, 0.3984, 0.3984))) CAN.add_component( Pipe(1.0, 1.0, Point(3.0, 3.0), face_color=(0.796875, 0.49609, 0.49609))) CAN.add_component( Pipe(1.0, 1.0, Point(4.5, 3.0), face_color=(0.8359, 0.5976, 0.5976))) # Oranges CAN.add_component( Pipe(1.0, 1.0, Point(-3.0, 1.5), face_color=(0.82, 0.36, 0.01))) CAN.add_component(
command_line_parser = ExampleDebugger('Simple steam dome reflected.') command_line_parser.parse() from schematics import Point from schematics import Canvas from schematics import SteamDome from schematics import Component CAN = Canvas(border_thickness=0.05, grid=True) print(Component.stats) CAN.add_component( SteamDome(1.0, Point(1.0, 0.0), label_location='center', name='not reflected', label_pad=0.5, angle=0.0)) CAN.add_component( SteamDome(1.0, Point(1.0, 0.5), label_location='right', name='relfect_y \nright label', label_pad=0.5, angle=0.0, reflect='y')) CAN.add_component( SteamDome(1.0, Point(2.0, 0.5), label_location='left',