Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a room in Revit that is rotated (image above on the left), when I extract it's boundary curves using the code below, I get the image on the right (I copied the XYZ values from Visual Studio's debug into a Grasshopper panel to quickly verify the vertices). My question is, is this the expected behavior? Is there a way to get the transform of the Room Element to correctly orient the boundary segment vertices in Model Space?
private List<XYZ> GetRoomVertices(Room room)
{
IList<IList<BoundarySegment>> loops = room.GetBoundarySegments(new SpatialElementBoundaryOptions());
//convert boundary segments to curve loops
List<XYZ> verts = new List<XYZ>();
foreach (List<BoundarySegment> loop in loops)
{
foreach (BoundarySegment segment in loop)
{
verts.Add(segment.GetCurve().GetEndPoint(0));
}
}
return verts;
}
Solved! Go to Solution.