Define a CylindricalSurface

Define a CylindricalSurface

a.sabatier
Contributor Contributor
8,443 Views
6 Replies
Message 1 of 7

Define a CylindricalSurface

a.sabatier
Contributor
Contributor

Hi

I have a silly question : how do you define a cylindricalSurface?

 

I've tried this , but doesn't work:

XYZ pointInsersion;

Frame framecylindre = new Frame(pointInsersion, new XYZ(1, 0, 0), new XYZ(0, 1, 0), new XYZ(0, 0, 1));
CylindricalSurface cylindreGrue = new CylindricalSurface(framecylindre,50);

 

Thanks for your help!

 

Alex

0 Likes
Accepted solutions (1)
8,444 Views
6 Replies
Replies (6)
Message 2 of 7

jeremytammik
Autodesk
Autodesk

Why do you call the constructor?

 

 

Does the class even expose a constructor?

 

I do not see it in the documentation.

 

Have you looked at the documentation?

 

https://apidocs.co/apps/revit/2019/6d3492bd-3205-d936-5672-9f8be4ee97c1.htm

 

All I see is the `Create` method to construct a cylindrical surface defined by a local coordinate system and a radius:

 

https://apidocs.co/apps/revit/2019/ae360b1d-65c3-2991-62c7-13193f5792e5.htm

 

Cheers,

 

Jeremy

 

 

 



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

Message 3 of 7

a.sabatier
Contributor
Contributor

Hi

Thanks. I didn't see it.

 

I've another question.

I'm trying to get the intersection (bool) beetween the cylindricalSurface I created and a solid.

I thought I could create a Cylindrical Surface and then intersect it with my solid but don't really know how to do it..

Thanks

0 Likes
Message 4 of 7

jeremytammik
Autodesk
Autodesk
Accepted solution

I cannot really believe that you seriously are interested in the intersection between a surface and a solid.

 

Do you in fact really want the intersection between a cylindrical solid and another solid?

 

If so, it makes no sense to create a surface.

 

If you wish to create a solid cylinder, you should take a look at the methods provided by the GeometryCreationUtilities class:

 

https://apidocs.co/apps/revit/2019/28337984-cc15-72d7-f305-fafcac75d695.htm

 

Cheers,

 

Jeremy

 



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

Message 5 of 7

a.sabatier
Contributor
Contributor

Hi

Thanks for your help.

 

I am interested in the intersection between my cylindrical surface and a solid.

I will do it with a solid if it's not possible but I'll have to write 3 cases if the intersection is the entire solid // a part of the solid // empty.

 

Thanks.

Alex

 

0 Likes
Message 6 of 7

jeremytammik
Autodesk
Autodesk

When you say, 'intersection between my cylindrical surface and a solid', what kind of result are you expecting?

 

It would be a pretty weird partial surface, wouldn't it?

 

You would need some pretty high-level free-form geometrical algorithms to handle and process that result, wouldn't you?

 

The Revit API does not offer tools at that level of complexity.

 

I think that the simplified approach that you mention as an alternative sounds much more doable.

 

Good luck, and looking forward to hearing how you end up solving this!

 

Thank you!

 

Cheers,

 

Jeremy

 



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

Message 7 of 7

a.sabatier
Contributor
Contributor
Hi

I wanted a bool result like true if there is an intersection and false if
the intersection is empty.

But I did it the way you advised me and it works perfectly.

Thanks for your answers!

Cheers
Alex
0 Likes