Hi,
Is there a way to get an outline of room and offset this outline to other side of the wall?
here are some thoughts:
- get outline from the room is simple.
- get each boundary wall thickness : get BoundarySegment, then get wall id from BoundarySegment,
now the tricky part is that i can not simply offset the outline, because the boundary wall thickness could be varies.
There is also a further question,
if the first question is resolved, how to apply this to 2 rooms and get a big outline just cover these 2 rooms?
First question: use the Revit API CreateViaOffset method:
https://apidocs.co/apps/revit/2019/6cffc624-d197-0f3b-b68c-26b9c9a0adf8.htm
This was discussed just today in another thread:
https://forums.autodesk.com/t5/revit-api-forum/offset-xyz-points/m-p/8665334
In order to combine multiple rooms, you can use a Boolean operation on their boundary polygons:
https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.2
Here is a recent discussion in intersections, equally valid for unions:
https://thebuildingcoder.typepad.com/blog/2018/12/fire-rating-zone-intersection.html#4
Cheers,
Jeremy
Thanks for your reply, Jeremy.
CreateViaOffset method offset same distance for each line of the boundary, see screenshot below, but i want to create the red outline from the green outline (room boundary).
Regarding to Boolean operation.
I've been using VS to write quite a few Zero-Touch Dynamo nodes, and read all your blogs about Boolean operation using Clipper.
when I used Clipper.cs, my Zero-Touch node can't be loaded into Dynamo library, so I think that's because Dynamo doesn't support SomeGenericClass<T>?
https://github.com/DynamoDS/Dynamo/wiki/Zero-Touch-Plugin-Development#can-i-use-generics-
Is there a way to use Clipper.cs in Dynamo Zero-Touch node? Hope this is not out of the topic.
Thanks.
Eric Luo
Since the clipper library is open source, you can compile it all into one single C# library, or create a C++ DLL, or package it in any way you wish:
http://angusj.com/delphi/clipper.php
I am sure that some form or other can be loaded into and accessed from Dynamo.
Cheers,
Jeremy
Regarding your calculations for handling the varying wall thicknesses and offsetting the room boundary points:
If you need the outline to always follow the exterior wall boundary, the easiest way to go might be to create separate 2D polygons in the XY plane for the room itself and all its bounding walls separately, then create a Boolean union of them all.
Cheers,
Jeremy
I have been struggling with the same issue and was wondering if you managed to solve the problem of offsetting the room boundary to the outer face of the wall, including curved walls?
if so any pointers or solution you could share would be much appreciated.
For clarity I am not utilising Dynamo, just C# and the api.
Regards
Stephen
Can't find what you're looking for? Ask the community or share your knowledge.