Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 67020

Re: Create Direct Shape from Room

$
0
0

Dear Platform5rd,

 

Thank you for your interesting query.

 

It is not completely clear to me what exactly you are after.

 

If you want the room with holes, then there will be nothing left.

 

The room is a hole.

 

What else is a room except a hole?

 

Do you mean that you would like to recreate the shape of all the walls with their openings?

 

Do you mean that you have a room whose plan view includes holes?

 

Let's assume the latter.

 

In that case, if your walls are all vertical, this is absolutely trivial.

 

You can collect the room boundary edges and assemble them into the outer and inner wall loops.

 

This is demonstrated very effectively by the 2D room editor, which retrieves this information, converts it to a simplified 2D view in SVG, and displays the room outline in a web browser:

 

https://github.com/jeremytammik/RoomEditorApp

 

Here is a demo recording and lots of other supporting material:

 

http://thebuildingcoder.typepad.com/blog/2016/10/connecting-desktop-and-cloud-at-rtc-material.html

 

If you want a 3D direct shape instead of a 2D flat version, you will obviously need to determine the ceiling height and location and take that into account as well.

 

I hope this helps.

 

Update:

 

OK, I now went and read your problem description.

 

:-)

 

Very clear. Thank you for that.

 

Thank you also for your appreciation!

 

That issue is indeed addressed by the RoomEditorApp that I already pointed to.

 

When you retrieve the room boundary, the edges may not be contiguous in the right order.

 

You may need to order them yourself.

 

There are several ways of achieving that:

 

  1. DIY. I love do it yourself. Search for SortCurvesContiguous.

 

  1. ExporterIFCUtils.ValidateCurveLoops. Maybe. The Edge.AsCurveFollowingFace method. Maybe. But read on through the following, and note the note in the last of the discussions listed below.

 

For the former, here is some reading material:

 

2D Polygon Areas and Outer Loop -- http://thebuildingcoder.typepad.com/blog/2008/12/2d-polygon-areas-and-outer-loop.html

 

Curve Following Face and Bounding Box Implementation -- http://thebuildingcoder.typepad.com/blog/2013/03/sort-and-orient-curves-to-form-a-contiguous-loop.html

 

Retrieving Plan View Room Boundary Polygon Loops -- http://thebuildingcoder.typepad.com/blog/2013/03/revit-2014-api-and-room-plan-view-boundary-polygon-loops.html#3

 

Extrusion Analyser and Plan View Boundaries -- http://thebuildingcoder.typepad.com/blog/2013/04/extrusion-analyser-and-plan-view-boundaries.html

 

Room and Furniture Loops Using Symbols -- http://thebuildingcoder.typepad.com/blog/2013/04/room-and-furniture-loops-using-symbols.html

 

https://github.com/jeremytammik/RoomEditorApp/blob/master/RoomEditorApp/ContiguousCurveSorter.cs

 

Sorting Face Loop Edges -- http://thebuildingcoder.typepad.com/blog/2015/01/autodesk-internship-in-california-and-sorting-edges.html#3

 

I have explored and written lots more on this topic, as you can see if you follow the various links in the discussions listed above.

 

I am confident that this will give you all you need.

 

I see that what you are after is basically the floor slabs under the rooms.

 

I assume that you are not interested in querying the slabs for their geometry?

 

You want to create these shapes form the room boundaries?

 

Well, I think you have all you need now for that.

 

Good luck and have fun!

 

Best regards,

 

Jeremy


Viewing all articles
Browse latest Browse all 67020

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>