I'm trying to rigorously describe an object that I'm calling a "portal". The situation is easiest to describe in two dimension. 


I start with a line segment $pq$ in $\mathbb{R}^2$. I want to remove the relative interior of $pq$ from $\mathbb{R}^2$, pull apart the opening and consider the new "boundary" which I will denote by an oriented path $\overrightarrow{pq}$ and $\overrightarrow{qp}$. Along each of $\overrightarrow{pq}$ and $\overrightarrow{qp}$ I want to glue a copy of $\mathbb{R}^2$. The result will be the original $\mathbb{R}^2$ with two additional $\mathbb{R}^2$ glued along $\overrightarrow{pq}$ and $\overrightarrow{qp}$. However, here's the catch, I want $pq$ to act as a "portal" meaning that if I consider a path entering from $\overrightarrow{pq}$ I enter the copy of $\mathbb{R}^2$ that I glued along $\overrightarrow{pq}$ and I can only get back to the original $\mathbb{R}^2$ via that same entrance. Likewise, if I consider a path that enters along $\overrightarrow{qp}$ I should enter the copy of $\mathbb{R}^2$ that I glued along that boundary.


It should be noted that if I can do this construction without removing $pq$ that would be fine as well. I just don't know another way to separate the segment into two distinct parts. 


In $\mathbb{R}^2$ I have a smooth orientable patch of surface $\sigma$. (homeomorphic to a closed disc) that I want to behave as a portal. Each side of $\sigma$ should be glued to a different copy of $\mathbb{R}^3$ that is only accessible by a path that intersects $\sigma$ from that side. 


I've thought about how to construct such a space with quotient spaces, but the intuition of a quotient space doesn't seem quite right. I've also considered gluing along the limit points of Cauchy sequences that come at $pq$ from a particular side, but that seems difficult to formalize. How would one go about formalizing this type of construction?



Creating topological spaces with portals
Based on your comment at [Creating topological spaces with portals](https://mathoverflow.net/questions/186430/creating-topological-spaces-with-portals#comment466017_186430), I think that I may have an answer. However, it seems to me that you are asking me to capture the right intuitive generalisation of a concept that you have given only for $\mathbb R^2$; so, if it doesn't fit what you want, then I hope you'll give at least another example.


I think that the general idea is that you want to choose a subset $P$ of a topological space $X$, and glue 3 copies of $X$ along $P$ in such a way that entering $P$ at its 'left' side on the 'original' $X$ goes into the 'left new' $X$, and similarly on the right.


To that end, choose two subsets $H\_+$ and $H\_-$ of $X$ (probably you want them in $\operatorname{cl}(\complement P)$) such that $H\_+ \cup H\_- \cup P = X$. (As with the overlap at $p$ and $q$ in your example, we do not require the various sets to be disjoint.) Then "$X$ with portal $P$ *via* $H\_+$ and $H\_-$" is defined to be $(H\_+ \sqcup H\_- \sqcup P) \sqcup (X\_+ \sqcup X\_-)$, modulo glueing $H\_+$, $H\_-$, and $P$ along their pairwise intersections, $H\_\pm$ pointwise to its copy in $X\_\pm$, and $P$ to its copy in each $X\_\pm$.


EDIT: Corrected the glueing.


