Surface Smart Paste Operation
We’ve seen questions arise asking to how to go about pasting a surface containing an interior boundary into another larger Target surface in such a way as to preserve the Target surface geometry within this interior boundary. Basically this:
In AutoCAD Civil 3D, this can be done, but it requires a complicated workaround. The challenge that must be overcome arises as a result of the pre-paste clipping operation that occurs when you use the ‘paste surface’ edit in AutoCAD Civil 3D. Basically what happens is that the outermost boundary of the ToPaste surface is used to remove all of the Target surface data within the footprint of the ToPaste surface prior to actually pasting in the new surface geometry; interior boundaries are not considered, thus all Target surface geometry within this interior boundary of the ToPaste surface is already obliterated prior to adding any new geometry to the Target surface. In order to overcome this problem, you must do something similar to this:
- Create a new Patch surface to preserve the Target surface geometry within the region of the interior boundary in the ToPaste surface. The Target surface geometry should be duplicated in this surface, not pasted, unless you are creating a new Result surface.
- Create a boundary polyline along the edge of the interior boundary in the ToPaste surface.
- Apply this boundary to the Patch surface as an outer/clip boundary.
- If creating a new Result surface, create it…else skip ahead to step (6) and use the Target surface as the Result surface.
- Paste the Target surface into the Result surface.
- Paste the ToPaste surface into the Result surface.
- Paste the Patch surface into the Result surface.
While this series of steps will accomplish the stated goal, it has some significant deficiencies, the largest of which is its complexity. Another deficiency is that if you are reusing the Target surface as the Result surface, it may be difficult to dynamically update the Patch surface to reflect changes to the original Target surface geometry depending on how the surfaces are defined.
Surely there must be an easier way…
…and, there is, but you won’t find it in any out-of-the-box version AutoCAD Civil 3D. The solution is found in our latest application prototype (which will soon be ready for release). The working name for the project is ‘Surface Stitcher’, and it includes among other things an operation called ‘Smart Paste’. Let’s take a look at what it can do…
Surface Stitcher – Smart Paste Operation
In our DWG, we have two surfaces…Target and ToPaste:
For the sake of simplicity, we will reuse the Target surface as the Result surface. To initiate the process, we will open the Smart Paste command implemented by this application. This will bring up the following dialog:
We then set the surface references and options:
Enabling the ‘Show target data inside…’ option will cause a new field to appear in which you can set a ‘boundary offset’ for the interior boundary of the ToPaste surface for ‘blending’ purposes. It will also tell the command to preserve the Target surface geometry within this interior boundary. There is also another ‘Outer paste boundary offset’ field and a ‘Blend surfaces’ option. The surface ‘blending’ function of this command will be discussed in a future post…for now, we’ll just set these fields and options as follows:
When we click on the ‘OK’ button, the application will perform the paste operation, resulting in a final Result surface which contains the pasted surface geometry, yet still retains the Target surface geometry within the interior boundary of the ToPaste surface: