If you want to make Civil 3D TIN surface smaller and easier to process faster by reducing the number of points, what you do ?
In Civil 3D UI tools, you can select the Edits -> 'Simplify Surface…' option to bring up the "Simplify Surface – SurfaceName" dialog box and there in the "Reduction Options" you can specify the 'Percentage of points to remove' as shown in the picture below –
The same operation, you can perform by calling your custom command and invoking the TinSurface.SimplifySurface() function. Here is a C# .NET code snippet on the same :
using (Transaction trans = db.TransactionManager.StartTransaction())
{
TinSurface surface = trans.GetObject(surfaceId, OpenMode.ForRead) as TinSurface;
// SurfaceSimplifyOptions
// This class represents the options for simplifing a TinSurface object.
SurfaceSimplifyOptions ssop = new SurfaceSimplifyOptions(SurfaceSimplifyType.PointRemoval);
//specify the 'Percentage of points to remove'
ssop.PercentageToRemove = 0.40;
// Call SimplifySurface() now
surface.SimplifySurface(ssop);
// Rebuild the Surface
surface.Rebuild();
trans.Commit();
}


Leave a Reply