The pasting process itself works as follows:
Note that the boundary of the feature will only approximately lie on the base. However, by performing knot insertion, we can make this approximation good to any tolerance.
In general, we will want an arbitrary hierarchy of domains. One domain, however, must be the root of all other domains (i.e., the other domains must be subdomains within this root domain). Thus, we can represent the domain hierarchy as a directed acyclic graph with a single root.