Posted on

Calculating Cut/Fill Shapes in Subassemblies

Calculating Cut/Fill Shapes in Subassemblies

Recently there was a conversation posted on the AutoCAD Civil 3D Community Forum in which a member requested assistance with creating a custom subassembly that would intersect a collection of ‘Datum’ links against a sampled surface and then automatically apply the correct code (i.e. ‘cut’ and ‘fill’) to each of the calculated shapes:

Sketch of cross section showing cut/fill shape geometry

Such shapes might be necessary if your cut and fill materials must be combined with structural (shape based) materials in a quantity report for calculating mass haul. Other times it might be necessary to know the area of cut (or fill) in order to determine how to construct the remainder of the subassembly, etc.

From a subassembly design perspective, this is an interesting problem: the profile of the sampled surface is unknown at the time the subassembly is designed, thus statically calculated and coded shapes won’t work. I’ve seen proposed solutions based on looping techniques, and this may well work, but IMHO this is more complex than is necessary. A much simpler solution exists.

We had encountered this exact problem some time ago when helping a customer with a custom subassembly. Our solution was to add some special components to Subassembly Studio which makes this operation almost trivial to accomplish. At the same time, we also implemented a generic solution which allows the end user to go beyond simple cut and fill classifications to assign unlimited codes to calculated shapes based on a material table (this generic solution may likely be the subject of future posts).

To illustrate the solution I’ve created a sample subassembly which simulates the sampled surface links using a random link generation routine (based on the Complex Curve component). This allows us to see what happens as the sampled surface changes relative to the subassembly design, thus simulating what a real sampled surface might do as the subassembly is modeled at different stations on a corridor. The final product looks something like this:

Sample cut/fill shapes vs random surface - 001

Subassembly construction is relatively straightforward. First, we need to create some geometry which can be used to construct the shapes:

  • We first create the ‘random’ simulated surface links (coded ‘eg’) using the Complex Curve component.
  • Next, we add the ‘design’ links (coded ‘datum’) – our design for this subassembly consists of a flat bottomed ditch and a berm. The actual geometry is completely arbitrary.

Once the geometry is constructed, we can add the cut/fill shapes component:

CutFillShapesFromLinks subassembly component properties

This component samples the links based on codes and/or Ids, and then intersects the selected items to calculate a collection of polygons. These polygons are then classified based on the relationship of each to the link collections (i.e. ‘above’ and ‘below’). Based on the classification, the appropriate shape code is then applied. This allows us to effectively perform this entire complex operation in one simple, easily configured step without the need for loops, etc.

If we ‘regen’ the subassembly graphics a few times, we will see the shape configurations changing (the simulated ‘eg’ surface links are recreated randomly each time we regen), including both the actual shape geometry and the number of shapes found:

Sample cut/fill shapes vs random surface - 002

Sample cut/fill shapes vs random surface - 003

Sample cut/fill shapes vs random surface - 004

 

The web store has been temporarily placed in demo/test mode while we update and test some new features. If you see this message and wish to make a purchase please contact sales@civilplus.net. Thank you.