Rotation of stirrup rebar (rotated beam)

Rotation of stirrup rebar (rotated beam)

jaroslav.kopecky
Contributor Contributor
2,323 Views
11 Replies
Message 1 of 12

Rotation of stirrup rebar (rotated beam)

jaroslav.kopecky
Contributor
Contributor

Hello,

I am trying to layout rebars on rotated beams (this case is 30 degrees rotation based on driving line)

 

On the picture we can see that layout is corrupted, while without rotation layout is OK.

 

Where is the problem? Does Revit support that?

 

Greetings Jaroslav Kopecký

corrupted layout on 30 degrees rotated beam (part of rebar can be seen near the center and outside)corrupted layout on 30 degrees rotated beam (part of rebar can be seen near the center and outside)layout OKlayout OKsection viewsection view

0 Likes
2,324 Views
11 Replies
Replies (11)
Message 2 of 12

shefypattambi
Collaborator
Collaborator

Hi, 

This is what I am getting. May be you could upload your file for further investigation.

image.png

 

Message 3 of 12

jaroslav.kopecky
Contributor
Contributor

Hello Shefy,

 

I attached rvt project. I am using Revit api to create beam.

When rotation is multiply of 45 degrees it is OK.

0 Likes
Message 4 of 12

shefypattambi
Collaborator
Collaborator

Hi @jaroslav.kopecky,

I could not find any problem in your file. I tried with the default 330 degree rotation in your file and this is the result..

image.png

0 Likes
Message 5 of 12

jaroslav.kopecky
Contributor
Contributor

Hello,

in my file, there is 3D view called "3D Reinfocements". When you open that view what do you see? I can see a beam with corrupted image of stirrup rebar inside (like on included attachement - only the initial view is overall). 

So I don't know where is the problem. May be "data" could be OK, but view doesn't looks correct.

 

0 Likes
Message 6 of 12

shefypattambi
Collaborator
Collaborator

Hi @jaroslav.kopecky,

Your Major segment of the stirrup bar is somehow came at the bottom as shown in the pic.

image.png
image.png

So select the stirrups and edit the family and change the major segment of the bar as shown in the below pic and upload it to your file. The problem will get resolved.

image.png

image.png

Corrected Stirrups

image.png

0 Likes
Message 7 of 12

jaroslav.kopecky
Contributor
Contributor

Hello,

I am afraid this is not the good way, how to "correct" stirrup rebar.

 

I tried the procedure that you suggested and it looked quite successful. But there are few "complications" why I can't use it.

First, it is almost the same as if I would create new stirrup rebar manually.

Then even though I changed that major segment to be on left, when I again repeat the process of creation of stirrup by api call, I get again corrupted picture.

 

So this is what I need to achieve. I am using API to create things in Revit, I need to achieve correct behavior via API, not by manual manipulation.

And even I edited Family of this particular shape of Rebar, it did not end up in correct creation behavior.

0 Likes
Message 8 of 12

shefypattambi
Collaborator
Collaborator

Hi @jaroslav.kopecky,

I see..I am sorry, I do not have much experience with Revit API, But I may suggest you to post this issue on the Revit API forum. May be someone will help you..

0 Likes
Message 9 of 12

jaroslav.kopecky
Contributor
Contributor

Hello Shefy,

OK, no problem.

So I will look for API forum, I didn't know there exist specific forum for API. Should I close this by "accept"?

Anyway thanks for your points..

0 Likes
Message 10 of 12

shefypattambi
Collaborator
Collaborator
You welcome. Based on my little knowledge regarding the rebar creation
using dynamo, did you set in your api code to create the rebar and hooks
using the curve "normal" vector?!
Are you creating the stirrups from closed polycurve?!
0 Likes
Message 11 of 12

jaroslav.kopecky
Contributor
Contributor

this is the process for stirrups:

(1) create

Rebar.CreateFromRebarShape(RevitDocument, stirrupShape, barType, element, origin, xVec, yVec)

 

(2) reset hooks (performed everytime, sometimes to ElementId.InvalidElementId)

createdStirrupRebar.SetHookTypeId(0, selectedStirrupHook.Id);
createdStirrupRebar.SetHookTypeId(1, selectedStirrupHook.Id);

 

(3) layout (position and dimensions tuning) by ScaleToBox()
RebarShapeDrivenAccessor rebarStirrupShapeDrivenAccessor = createdStirrupRebar.GetShapeDrivenAccessor();
rebarStirrupShapeDrivenAccessor.SetLayoutAsFixedNumber(stirrupItem.iCountOfLinks, layoutLenght, true, true, true);
rebarStirrupShapeDrivenAccessor.ScaleToBox(stirrupItemOrigin, xVecLayout, yVecLayout);

Message 12 of 12

jeremytammik
Autodesk
Autodesk

Just fyi and follow-up, the API issue is discussed in the Revit API forum in the following thread:

 

https://forums.autodesk.com/t5/revit-api-forum/rotation-of-stirrup-rebar-rotated-beam-api/m-p/825190...

 

Cheers,

 

Jeremy

 



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

0 Likes