1315/2078

Cloning a Solid, AngelHack, 3D Web Fest and Dubai

Originally Published in

The Revit 2016 offers a whole host of exciting new functionality that I am dying to try out, e.g.:

And much, much more…

Too little time!

At least I can mention one useful aspect of the new geometry API that came in handy for an issue that came up yesterday.

I am in Dubai right now, preparing for the AngelHack Hackathon.

Here are the topics for today:

3D Web Festival in San Francisco

Hey, there is this really cool event coming up in San Francisco on May 13th, the 3D Web Festival ↗, sponsored by Autodesk, Goo Technologies and Leap Motion:

If you know any folks in the Bay Area who might be interested in seeing and experiencing what’s possible today with 3D on the web, please let them know.

AngelHack and I♥3D in Dubai

As said, I am in Dubai right now, for the first time in my life.

Here are my first impressions ↗ wandering around Jumeirah Beach Residence ↗ aka JBR.

Jumeirah Beach Residence, Dubai

Tonight we hold the AngelHack Dubai Pre-Hackathon Meetup and Workshop ↗ to get all interested AngelHack Dubai Hackathon ↗ participants up to speed on the View and Data API in preparation for two hot and frantic days of hacking over the weekend – which is Friday and Saturday here, of course.

AngelHack and I♥3D in Athens

We also just held the inaugural I love 3D – Athens ↗ meetup, on April 24th, at The Cube ↗, Greece’s biggest coworking space.

Cyrille Fauvel and Peter Schlipf presented the View and Data API, Fusion360, AutoCAD I/O and Recap360 to a group 30 enthusiastic local developers:

I♥3D Athens inaugural meetup

They loved it.

I will be going there too soon, for the Angelhack in Athens ↗, on June 5-7.

Again, we have scheduled an AngelHack workshop ↗ meetup session on Friday evening to get us all well prepared and up to speed for the subsequent hackathon.

I am looking forward to meeting you there!

Autodesk University proposals

The Autodesk University Call for Proposals ↗ has opened.

I am already busy preparing mine   :-)

Cloning a solid

Now, finally, back to the Revit API, with a question on cloning solids, very well addressed by one of the Revit 2016 API enhancements:

Question: To clone solids, we have been using the following workaround in the past:

  static public Solid Clone( this Solid solid )
  {
    if( solid == null )
    {
      return null;
    }
    return BooleanOperationsUtils
      .ExecuteBooleanOperation( solid, solid,
        BooleanOperationsType.Union );
  }

This function allows us to clone solids to later use them to create or modify DirectShape elements. It works very well in the majority of the cases; however, the ExecuteBooleanOperation function throws an exception on some specific DirectShape elements, saying:

  • Exception: “Failed to perform the Boolean operation for the two solids. Error: Autodesk.Revit.Exceptions.InvalidOperationException: Failed to perform the Boolean operation for the two solids”

I would be very grateful if you can give me some directions how to fix this issue.

Answer: Have you noticed the following new functionality provided by the Revit 2016 API Geometry API additions?

Solid – copy

The new method:

  • SolidUtils.Clone()

creates a new Solid that is a copy of the input Solid.

That looks as if it should solve your problem for you more elegantly and efficiently.

Response: Thanks for the quick answer.

The SolidUtils.Clone method does indeed solve the issue for Revit 2016. It works perfectly. Thanks!

However, what can I do to fix it in Revit 2015?

Answer: I am very glad to hear that the issue is solved in Revit 2016 by the SolidUtils.Clone enhancement.

For Revit 2015 and previous versions, a better workaround, rather than unioning the original solid with itself, might be to union the shape with a small cube (1” x 1” would work for most shapes) located in the interior of the shape.

Response: Thank you!

I can confirm that the workaround solves the issue I was having with the Revit 2015 API.