C3D-DRAWSW · Draw Sidewalk done
Draws 1 straight-chord 3D polyline(s) from 10 SW points on layer SS-V-SIDEWALK.
C# payload
// Draw Sidewalk linework from surveyed points. Chained by point number, broken on gaps.
// Straight-chord 3D polylines on existing layer SS-V-SIDEWALK. Host owns Tx/ModelSpace.
const string LAYER = "SS-V-SIDEWALK";
var chains = new List<List<(double e,double n,double z)>> {
new List<(double,double,double)> { (2428086.23,1064502.47,418.96), (2428091.12,1064498.89,419.07), (2428080.41,1064494.74,419.27), (2428085.12,1064491.27,419.11), (2428058.11,1064456.4,418.92), (2428047.57,1064442.85,418.94), (2428032.23,1064432.69,419.01), (2428036.89,1064429.17,418.98), (2428029.63,1064419.95,418.9), (2427999.02,1064444.02,419.01) },
};
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} SW points on '{LAYER}'.");
Result
Log
Drew 1 polylines from 10 SW points on 'SS-V-SIDEWALK'.
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.