Transforming a solid

Transforming a solid

Anonymous
Not applicable
3,602 Views
1 Reply
Message 1 of 2

Transforming a solid

Anonymous
Not applicable

I have a series of Solids that I am creating with GeometryCreationUtilities.CreateExtrusionGeometry() that I would like to transform (rotate and translate) before I perform boolean operations on them with the BooleanOperationsUtils and create elements out of them with DirectShape.  

 

I am aware of the ElementTransformUtils but this is only works on elements and I believe the boolean operations must be performed before creating elements in the project.  Is there away to perform boolean operations on elements in the project that I have missed?

 

I also found this page in the documentation but it appears that it is simply creating transformed points and I'm not sure of how to create Faces and Edges with the transformed points.

 

Thanks you,

 

Frank 

0 Likes
Accepted solutions (1)
3,603 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Frank,

 

Thank you for your query.

 

There is in fact a method, and it is easy to find in the Revit API help file RevitAPI.chm.

 

Just search for "transform AND solid":

 

/a/doc/revit/tbc/git/a/img/chm_search_with_and_finds_utils.png

 

That takes you straight to the SolidUtils.CreateTransformed method that creates a new solid, which is the transformation of the input argument.

 

I only discovered the little right arrow and the AND operator in the CHM right now answering this question of yours.

 

This is the first time I ever use it, as far as I can remember.

 

The Revit API Utils classes are often overlooked:

 

http://thebuildingcoder.typepad.com/blog/2013/04/handy-utility-classes.html

 

In fact, based on your question, and since I have now assembled a couple of posts on some of them, I added a new topic group to The Building Coder, on the fact that "the Revit API Util classes are often overlooked":

 

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

 

I hope this helps.

 

Best regards,

 

Jeremy



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