C3D-DRAWBLDG · Draw Building outline done
Draws 1 straight-chord 3D polyline(s) from 9 BLDG points on layer SS-V-BLDG-OTLN.
C# payload
// Draw Building outline linework from surveyed points. Chained by point number, broken on gaps.
// Straight-chord 3D polylines on existing layer SS-V-BLDG-OTLN. Host owns Tx/ModelSpace.
const string LAYER = "SS-V-BLDG-OTLN";
var chains = new List<List<(double e,double n,double z)>> {
new List<(double,double,double)> { (2428083.72,1064504.86,419.17), (2428060.34,1064523.02,419.03), (2428078.37,1064498.18,419.19), (2428053.24,1064460.52,419.11), (2428051.06,1064462.44,419.3), (2428042.45,1064446.81,418.86), (2428040.11,1064448.37,419.55), (2428005.91,1064452.83,419.14), (2428029.23,1064434.88,419.05) },
};
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()), true);
pl.Layer = LAYER;
ModelSpace.AppendEntity(pl);
Tx.AddNewlyCreatedDBObject(pl, true);
drawn++; ptsUsed += chain.Count;
}
Log($"Drew {drawn} polylines from {ptsUsed} BLDG points on '{LAYER}'.");
Result
Log
Drew 1 polylines from 9 BLDG points on 'SS-V-BLDG-OTLN'.
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.