- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've made an addin to dimension curtain walls, and in my test projects it was working fairly well. That's to say, tagging worked 100% (easy win), but elevation tags and dimensioning didn't always work (let's say 70% or 80% worked for me, but for some users and some projects 100% produced the same failure).
The problem is that I'm not getting the total widths of these windows, in rare cases the total hights, or the bottom reference for spot elevations. I'm getting the references based on physical mullion faces with a certain normal, for mulions that work in a certain direction (this works very well, generally, if I need all unfiltered references). It's probably where I filter out the exterior faces that I make a mistake.
Example of how I do my filtering:
foreach (Face fa in faces)
{
Mullion m = doc.GetElement(fa.Reference) as Mullion;
LocationPoint lp = m.Location as LocationPoint;
Reference r = fa.Reference;
if (direction == Direction.horizontal) { if (lp.Point.Z == bb.Min.Z && !minAdded && fa.ComputeNormal(new UV(0, 0)).X > 0) { totaalMaten.Append(r); minAdded = true; } if (lp.Point.Z == bb.Max.Z && !maxAdded && fa.ComputeNormal(new UV(0, 0)).X > 0) { totaalMaten.Append(r); maxAdded = true; } } else if (direction == Direction.vertical) { if (lp.Point.X == bb.Min.X && !leftAdded && fa.ComputeNormal(new UV(0, 0)).X > 0) { totaalMaten.Append(r); leftAdded = true; } if (lp.Point.X == bb.Max.X && !rightAdded && fa.ComputeNormal(new UV(0, 0)).X > 0) { totaalMaten.Append(r); rightAdded = true; } }
The Normal is always relative to the mullion interior coordinates; in short this is filtering the faces that are looking out. But apparently, this is not an adequate method in all situations.
Does anyone know whether there can be a difference between curtain walls that makes them behave differently? Sidenote: is there a more reliable way to get the exterior references (say, by bounding box)? Thanks in advance.
Solved! Go to Solution.