Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Looking for boundary class

5 REPLIES 5
Reply
Message 1 of 6
Moshe-A
252 Views, 5 Replies

Looking for boundary class

Hey Guys,

 

What is the class (or the closer one) in Revit API that mimics AutoCAD LWPOLYLINE object i would like to

to excute a boolean operations on closed boundaries to find:

 

if one is inside other?

are they crossing each other?

or are they totally apart?

 

thanks in advance

Moshe

 

5 REPLIES 5
Message 2 of 6
R.van.den.Bor
in reply to: Moshe-A

I revit almost every element has a boundingbox which you can retrieve with Element.get_BoundingBox(document),

is this what you mean ?
Kind regards,
Remy van den Bor
ICN Solutions B.V.
Liked this post or found it usefull, don't forget the Kudo It won't hurt (at least not me).
Message 3 of 6
Moshe-A
in reply to: R.van.den.Bor

Remy,

 

As far as i know/understand a BoundingBox is rectangle (4 straight lines at 90 degrees)

Am i right?

 

as i noted i want to execute booleans on real boundary of any polygon which can have arcs

 

Moshe

 

Message 4 of 6
R.van.den.Bor
in reply to: Moshe-A

That's correct, a boundingbox is a rectangle. What you want depends on the element you want to use. For instance, walls have edges and faces of which you can ask for the points. 

Kind regards,
Remy van den Bor
ICN Solutions B.V.
Liked this post or found it usefull, don't forget the Kudo It won't hurt (at least not me).
Message 5 of 6
Moshe-A
in reply to: R.van.den.Bor

the element i want to check for boolean operation is Area Boundary

i know i can take Area.GetBVopundarySegments(); and do the coding my self

but i thought Revit API has it like AutoCAD API has it for LWPOLYLINE

 

 

Message 6 of 6
Scott_Wilson
in reply to: Moshe-A

you can retrieve objects such as CurveLoop and CurveLoopArray from the faces found in a GeometryObject, but these are just containers and do not provide functionality such as boolean operations.

 

There is an API for boolean operations on solids, but for 2d polygons you will need to either code your own or bolt in a 3rd party library.

 

I've taken the first option and coded my own specialised classes for slicing arbitrary polygons with singular planes and performing point-polygon and polygon-polygon inclusion checks, but I'll probably convert to a 3rd party library at some point in the future as my needs grow.

 

Jeremy has a great blog entry on this very subject: http://thebuildingcoder.typepad.com/blog/2013/09/boolean-operations-for-2d-polygons.html

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community