3D curve rebar

3D curve rebar

Anonymous
Not applicable
1,406 Views
7 Replies
Message 1 of 8

3D curve rebar

Anonymous
Not applicable

It seems the methods provided by the Revit API can only create rebar in a plane. Is there a way to create rebar along a space (3D) curve?

Thanks

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

jeremy_tammik
Alumni
Alumni

Pleas always search the available resources before asking a question here.

 

In this case, please search the Revit SDK samples for `RebarShape`.

 

One of the samples provides is MultiplanarRebar. 

 

This sample is to demo multiplanar rebar creation in API. A user scenario of multiplanar rebar is corbel reinforcement. This sample reinforces sloped corbels.

 

Cheers,

 

Jeremy

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 8

Anonymous
Not applicable

 

Hi Jeremy, thank you very much for your reply. What I want is a method to create a rebar with an arbitrary 3D shape, which is sometimes required in the longitudinal reinforcement of double-curved bridge. I created a HermiteSpline from a series of XYZ points and use the curve as the center line of rebar.  The MultiplanarRebar may not be the solution. However, I found the free form rebar may be able to do that. I will try that.

 

Thanks

 

0 Likes
Message 4 of 8

jeremytammik
Autodesk
Autodesk
Accepted solution

Maybe this free form rebar distribution is exactly what you are after:

 

https://youtu.be/13RWV0Augfc

 

Cheers,

 

Jeremy

 



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

0 Likes
Message 5 of 8

Anonymous
Not applicable

Hi Jeremy, I can get what I want using the free form rebar. Thank you for your help.

0 Likes
Message 6 of 8

jeremytammik
Autodesk
Autodesk

Congratulations!

 

Thank you for your appreciation.

 

Please share a snippet or two of sample code to show others how you ended up solving this.

 

Thank you!

 

Cheers,

 

Jeremy

 



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

0 Likes
Message 7 of 8

Anonymous
Not applicable

 

The code is really simple, as follows:

List<XYZ> pts = …  // define my XYZ points

Curve curve3D = HermiteSpline.Create(pts, false);

CurveLoop curveLoop = new CurveLoop();

curveLoop.Append(curve3D);

List<CurveLoop> curveLoops = new List<CurveLoop>();

curveLoops.Add(curveLoop);

Rebar rebar = Rebar.CreateFreeForm(document, barType, host, curveLoops, out error);

This method is simple, and no constrain can be applied. But it seems good enough for my current task.

Thanks,

0 Likes
Message 8 of 8

2327398194
Observer
Observer

Hello, how did you develop the plug-in for the free form reinforcement shown in the video?