C3D-0222 · 260714 Huckaby: read the joined driveway vertices done
READ-ONLY. Dumps 20CC8 real vertices, bulges and flags any zero-length segment, to locate why EvaluateHatch reports eNotApplicable.
C# payload
// READ-ONLY: dump the joined driveway's real vertices + bulges, and find self-intersections.
ObjectId bid;
Db.TryGetObjectId(new Handle(Convert.ToInt64("20CC8", 16)), out bid);
var pl = (Polyline)Tx.GetObject(bid, OpenMode.ForRead);
int n = pl.NumberOfVertices;
Log(string.Format("20CC8: {0} verts, len {1:F2}, closed={2}, area {3:F0}", n, pl.Length, pl.Closed, pl.Area));
for (int i = 0; i < n; i++) {
var p = pl.GetPoint2dAt(i);
Log(string.Format("v{0,2} {1:F4} {2:F4} bulge={3:F6}", i, p.Y, p.X, pl.GetBulgeAt(i)));
}
// segment lengths - a zero-length segment is the usual culprit
for (int i = 0; i < n; i++) {
var a = pl.GetPoint2dAt(i);
var b = pl.GetPoint2dAt((i + 1) % n);
double d = a.GetDistanceTo(b);
if (d < 0.01) Log(string.Format("ZERO-LENGTH segment {0}->{1}: {2:F6}", i, (i + 1) % n, d));
}
Result
Log
20CC8: 23 verts, len 490.00, closed=True, area 3491 v 0 1207157.7966 2206284.6799 bulge=-0.190183 v 1 1207153.6856 2206300.6538 bulge=-0.000000 v 2 1207141.5681 2206311.1508 bulge=-0.000000 v 3 1207113.4334 2206326.9381 bulge=0.101403 v 4 1207082.7855 2206353.4893 bulge=-0.000000 v 5 1207071.0846 2206372.6936 bulge=-0.000000 v 6 1207049.9863 2206399.2801 bulge=-0.000000 v 7 1207050.1513 2206399.6042 bulge=0.000000 v 8 1207087.2405 2206401.0775 bulge=0.000000 v 9 1207084.3777 2206381.5225 bulge=-0.179223 v10 1207096.3742 2206355.5677 bulge=-0.075289 v11 1207125.8939 2206333.4278 bulge=0.000000 v12 1207147.3262 2206321.4122 bulge=0.274456 v13 1207175.6589 2206273.7366 bulge=0.000000 v14 1207178.4162 2206237.1490 bulge=0.000000 v15 1207158.6556 2206236.3801 bulge=0.000000 v16 1207158.5574 2206242.7386 bulge=0.000000 v17 1207157.3208 2206248.5421 bulge=0.000000 v18 1207153.9320 2206252.5541 bulge=0.000000 v19 1207148.6538 2206254.4513 bulge=0.000000 v20 1207143.7493 2206254.8005 bulge=0.000000 v21 1207143.8988 2206270.7500 bulge=-0.203969 v22 1207156.2311 2206279.8762 bulge=0.000000
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.