C3D-DRAWCON · Draw Concrete edges/corners done
Draws 6 straight-chord 3D polyline(s) from 35 CON points on layer X-DRIV-CONC.
C# payload
// Draw Concrete edges/corners linework from surveyed points. Chained by point number, broken on gaps.
// Straight-chord 3D polylines on existing layer X-DRIV-CONC. Host owns Tx/ModelSpace.
const string LAYER = "X-DRIV-CONC";
var chains = new List<List<(double e,double n,double z)>> {
new List<(double,double,double)> { (2428099.84,1064559.65,418.03), (2428099.26,1064560.19,418.02) },
new List<(double,double,double)> { (2428066.44,1064613.57,417.12), (2428065.84,1064614.66,417.07), (2428064.68,1064614.22,417.12), (2428082.96,1064561.94,418.7), (2428081.91,1064561.49,418.61), (2428081.46,1064562.73,418.62), (2428082.59,1064563.15,418.61), (2428086.37,1064560.06,418.64), (2428085.37,1064558.84,418.61), (2428086.79,1064557.56,418.6), (2428087.49,1064558.68,418.61) },
new List<(double,double,double)> { (2428067.7,1064622.16,415.52), (2428072.21,1064619.76,415.48), (2428074.83,1064624.66,415.28), (2428070.04,1064627.11,415.29) },
new List<(double,double,double)> { (2428114.03,1064816.39,413.96), (2428112.65,1064821.61,413.85), (2428121.17,1064824.39,413.93), (2428122.6,1064818.95,414.08) },
new List<(double,double,double)> { (2427999.35,1064803.59,413.52), (2428012.96,1064762.42,413.77) },
new List<(double,double,double)> { (2428039.24,1064546.68,418.76), (2428036.92,1064552.39,418.69), (2428041.82,1064554.16,418.73), (2428044.05,1064548.5,418.76), (2428084.05,1064504.31,419.29), (2428078.46,1064497.16,419.19), (2428061.2,1064474.96,419.04), (2428053.71,1064460.02,419.1), (2428051.58,1064462.13,419.4), (2428042.54,1064446.03,418.75), (2428040.26,1064447.83,419.17), (2428029.79,1064434.49,419.2) },
};
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} CON points on '{LAYER}'.");
Result
Log
Drew 6 polylines from 35 CON points on 'X-DRIV-CONC'.
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.