C3D-FCPTS · FC fence-corner points + distances (read-only) done
Locate the 4 FC points and their pairwise distances to determine the fence run(s)
C# payload
// Read-only: the 4 FC (fence corner) points with number + coords, ordered by point number,
// so we can see the actual geometry and figure out which points form which fence run (Rule 9).
var cd = CivilDoc; var cps = cd.CogoPoints;
var hits = new List<(uint num, string raw, double e, double n)>();
foreach (ObjectId id in cps) {
var cp = (Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id, OpenMode.ForRead);
var raw = (cp.RawDescription ?? "").Trim();
if (raw.ToUpperInvariant().Contains("FC"))
hits.Add((cp.PointNumber, raw, cp.Easting, cp.Northing));
}
foreach (var h in hits.OrderBy(x => x.num))
Log($"#{h.num} '{h.raw}' E={h.e:F2} N={h.n:F2}");
// pairwise distances so we can see which are close enough to be a real run
var arr = hits.OrderBy(x => x.num).ToList();
Log("--- pairwise distances (ft) ---");
for (int i = 0; i < arr.Count; i++)
for (int j = i+1; j < arr.Count; j++) {
double d = System.Math.Sqrt(System.Math.Pow(arr[i].e-arr[j].e,2)+System.Math.Pow(arr[i].n-arr[j].n,2));
Log($" #{arr[i].num} -> #{arr[j].num}: {d:F1}'");
}
Log($"FC points: {hits.Count}");
Result
Log
#137 'IPF 1\2 RBF FC FL' E=2225443.14 N=1346018.10 #167 'FLAGED FC' E=2225237.38 N=1346045.68 #169 'OLD FLAGED FC' E=2225150.14 N=1346026.56 #173 'FC FL' E=2225321.66 N=1346132.31 --- pairwise distances (ft) --- #137 -> #167: 207.6' #137 -> #169: 293.1' #137 -> #173: 166.7' #167 -> #169: 89.3' #167 -> #173: 120.9' #169 -> #173: 201.5' FC points: 4
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.