Surface automatic generator

Surface automatic generator

BenoitE&A
Collaborator Collaborator
598 Views
3 Replies
Message 1 of 4

Surface automatic generator

BenoitE&A
Collaborator
Collaborator

Hi all,

I have an issue that is close to the existing Revit tool that generates all the rooms automatically. 

So here is what I do :

- I use a given model with walls of any types and width

- I select the walls I am interested in

- I want the surfaces enclosed by these new walls.

They are different of the Rooms since I selected fewer walls than in the global model.

Ideally I would create a SpatialElement object for each surface and link it to the surrounding walls.

The question is : what is the best solution ?

Obviously when they designed the automatic room generator Revit programmers had this issue. Any idea how this was solved?

Thanks by advance

Benoit

 


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
0 Likes
599 Views
3 Replies
Replies (3)
Message 2 of 4

BenoitE&A
Collaborator
Collaborator

Here are a few comments that explain the paths I followed :

- either I try to create a plan circuit which encloses a surface, using for examples walls intersecting each other. But I don't figure out which object I should use once I have my circuit to get the given surface ;

- either I use methods like ReferenceIntersection to follow a given wall and turn around my walls. This sounds more reliable but I don't get how to follow walls going outward (which are not intersected by my ray using ReferenceIntersection).

So in fact there are 2 questions in 1.

Thanks


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
0 Likes
Message 3 of 4

jeremytammik
Autodesk
Autodesk

Dear Benoit,

 

Thank you for your interesting query.

 

I have no idea how the built-in Revit room generator is implemented.

 

Am I right in assuming that your problem is entirely embedded in a 2D plane, e.g., in the XY plane?

 

Maybe it would help if you describe your exact needs in a more abstract fashion.

 

Then it might very well map easily to existing computational geometry algorithms:

 

https://en.wikipedia.org/wiki/Computational_geometry

 

Can you simplify your walls to be simple straight lines?

 

And the desired surfaces to be polygons using these lines as their edges?

 

You may need to make use of 2D Boolean operations and adjacent area analysis, which The Building Coder has already discussed in some depth:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.28

 

I hope this helps.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 4 of 4

BenoitE&A
Collaborator
Collaborator

Hi Jeremy,

Thanks for the kind answer. It does not help me much in this topic but anyway...

If you get to know how the room generator is implemented (or who implemented it) I would appreciate the answer !

Sincerely

Benoit


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
0 Likes