0

I am making a process flow diagram as a flow chart in schemdraw. Here is the flow chart I have so far (it's not pretty but it is nowhere near done). Link to flow chart

How can I make stream 1 AND stream 2 flow into manufacturing? Preferably, I'd like stream 1 to the left of manufacturing and stream 2 above it. I've attached the code I have so far below.

Alternatively, if you have a better flowchart library, I'd be happy to try that out, too. Thank you!

import schemdraw
from schemdraw import flow

with schemdraw.Drawing() as d:
    d.config(fontsize=10)
    d += (str1 := flow.Start().anchor('W').label('Stream 1'))
    d += flow.Arrow().right().at(str1.E)
    d += (manu := flow.Process().label('Manufacturing'))
    d += (str2 := flow.Start().label("Stream 2"))

1 Answers1

0

I figured it out:

You can use .reverse() to reverse an arrow. So, the code would look like this:

import schemdraw
from schemdraw import flow

with schemdraw.Drawing() as d:
    d.config(fontsize=10)
    d += (str1 := flow.Start().anchor('W').label('Stream 1'))
    d += flow.Arrow().right().at(str1.E)
    d += (manu := flow.Process().label('Manufacturing'))
    d += flow.Arrow().up().at(manu.N).reverse()
    d += (str2 := flow.Start().label("Stream 2").anchor('S'))

This way, you can create multiple starting points from outside by creating the necessary arrow in the wrong direction, then reversing that arrow.