← Inbox

C3D-DRAWEP · Draw Edge of pavement done

Draws 4 straight-chord 3D polyline(s) from 37 EP points on layer SS-V-ROAD-EPVM.

Script file
C3D-DRAWEP.cs
Target
active document · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload

// Draw Edge of pavement linework from surveyed points. Chained by point number, broken on gaps.
// Straight-chord 3D polylines on existing layer SS-V-ROAD-EPVM. Host owns Tx/ModelSpace.
const string LAYER = "SS-V-ROAD-EPVM";
var chains = new List<List<(double e,double n,double z)>> {
    new List<(double,double,double)> { (2427982.84,1064714.26,413.79), (2428017.02,1064725.44,413.85), (2428005.6,1064735.31,413.48), (2428004.53,1064736.57,413.44), (2428004.38,1064738.42,413.41), (2428005.88,1064740.38,413.44), (2428007.58,1064741.18,413.53), (2428018.39,1064744.55,413.67), (2428024.65,1064746.39,413.75), (2428028.75,1064747.12,413.82), (2428031.62,1064746.88,413.96), (2428034.85,1064745.47,413.92), (2428038.67,1064743.3,413.92), (2428040.77,1064741.14,413.88), (2428042.01,1064738.76,413.93), (2428046.85,1064727.02,413.87), (2428056.74,1064730.88,414.2), (2428066.36,1064734.19,414.3) },
    new List<(double,double,double)> { (2427933.98,1064731.74,412.69), (2427944.14,1064723.41,413.11), (2427955.46,1064717.14,413.34), (2427968.26,1064713.85,413.44), (2427977.89,1064713.55,413.67), (2427982.87,1064714.16,413.84) },
    new List<(double,double,double)> { (2428171.68,1064462.96,427.41), (2428172.06,1064457.47,427.48), (2428183.0,1064474.07,427.37), (2428191.27,1064485.0,427.34), (2428194.98,1064491.0,427.48) },
    new List<(double,double,double)> { (2428288.51,1064508.71,424.94), (2428259.34,1064482.65,424.93), (2428227.36,1064450.92,425.25), (2428203.14,1064423.99,425.44), (2428172.37,1064385.61,425.81), (2428155.11,1064364.45,426.08), (2428154.95,1064364.01,426.08), (2428121.31,1064319.5,426.78) },
};
EnsureLayer(LAYER);
int drawn = 0, ptsUsed = 0;
foreach (var chain in chains)
{
    var pl = new Polyline3d(Poly3dType.SimplePoly,
        new Point3dCollection(chain.Select(p => new Point3d(p.e, p.n, p.z)).ToArray()), false);
    pl.Layer = LAYER;
    ModelSpace.AppendEntity(pl);
    Tx.AddNewlyCreatedDBObject(pl, true);
    drawn++; ptsUsed += chain.Count;
}
Log($"Drew {drawn} polylines from {ptsUsed} EP points on '{LAYER}'.");

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260709 - 1512 Bass Rd, Macon, GA 31210, USA\260709 - 1512 Bass Rd.dwg
Message
Executed C3D-DRAWEP (0 entities touched).
Entities
Duration
354 ms
Civil 3D
25.0.0.0

Log

Drew 4 polylines from 37 EP points on 'SS-V-ROAD-EPVM'.

Notes

What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.

No notes yet.