3

I want to turn a rectangle with ports in the top and bottom into a shape I can use with a node. How can I do this?

\documentclass[tikz,14pt,border=10pt]{standalone}
%%%<
\usepackage{verbatim}
%%%>
\begin{comment}
:Title: abc
:Tags: def
:Author: ghi
:Slug: jkl
\end{comment}
\title{test_portbox}
\usepackage{textcomp}
\usetikzlibrary{shapes,arrows}
\begin{document}
\begin{tikzpicture}[auto, line width = 0.5, node distance=2cm, >=triangle 45]

\draw (0.2,0) -- (0,0) -- (0,1) -- (0.2,1);
\draw (0.4,1) -- (1,1) -- (1,0) -- (0.4,0);

\draw [line width=0.1] (0.2,0) circle (0.025) -- (0.4,0) circle (0.025);
\draw [line width=0.1] (0.2,1) circle (0.025) -- (0.4,1) circle (0.025);

\end{tikzpicture}
\end{document}
Jason S
  • 2,838

0 Answers0