Free form rebar parameters

This widget could not be displayed.

Free form rebar parameters

Anonymous
Not applicable

Good day,

I am looking for a way to set the parameters of a free form rebar before it is created. 

Capture.PNG

After a method executes, I cannot select a shape or layout parameters. What I know is that it takes default rebar shape from rebar shape browser. Probably it does the same with layout rules etc.

Capture2.PNG

Is there a way to set these properties before creating free form rebar?

Sincerely,

0 Likes
Reply
Accepted solutions (2)
2,538 Views
17 Replies
Replies (17)

vlad_berila
Autodesk
Autodesk

Hello,

Free form rebar is a curve driven type of rebar ( as opposed to shape driven rebar ), which means you cannot simply select a shape and assign to it. But if the curves are planar, the free form rebar can be matched to existing shapes.

In order to enable shape matching for free form rebar you have to set the Workshop Instructions parameter to “Bend” ( as shown in attached image ).

 

workshopInstructions.PNG

 

From the API you can set it the following way:

Rebar myRebar; // this is the rebar created by “CreateFreeForm” method

// I will skip the validation part ( exception catch, null checks, etc )

RebarFreeFormAccessor freeFormAccessor = myRebar.GetFreeFormAccessor();

using (Transaction t = new Transaction(YourRevitDocument, "Set free form to bent"))

{

t.Start();

freeFormAccessor.WorkshopInstructions = RebarWorkInstructions.Bent;

t.Commit();
}

Also, it’s worth mentioning that a Free Form rebar can have multiple shapes ( each individual bar in the Rebar set can have its own shape).

As for the layout, because you are inputting the curves for each bar in the rebar set, we can only set it to Fixed Number and it will be read-only. If you want to change the spacing between the bars you have to update the curves into the new position.

0 Likes

Anonymous
Not applicable

Thank You for Your response.

It truly helped me to get a better understanding of a free form rebar.

However, I still need to create a rebar of a desired shape. I am thinking of creating a dummy rebar with a desired shape and see if it will be set as a default shape for a free form rebar

0 Likes

vlad_berila
Autodesk
Autodesk

Hello,

 

It would help me to get a better understanding of your issue if you could tell me what are you trying to reinforce in this way and why do you need to use free form rebar?

0 Likes

Anonymous
Not applicable

Thanks for your help. I can send a test revit file and my code if needed. In brief:

1. We have 2 or more structural foundations

Capture2.PNG

2. User draws a simple detail line

3. Code reads the surfaces and creates transforms of this line on its surface

4. Creates free form rebar

Capture.PNG

My code does almost all of the things I listed. Just need to find a way to set rebar shape when creating free form rebar 🙂

0 Likes

vlad_berila
Autodesk
Autodesk

Thank you for the explanation,

 

From what I see in the images I think that you can use a shape-driven rebar. There is a method for creating a shape driven rebar called CreateFromCurvesAndShape in which you can input both the curves and the shape. Does this help?

0 Likes

Anonymous
Not applicable

Unfortunately, I did not work for me but maybe I used it in a wrong way

Capture2.PNG

1. I specify RebarhookType as null cause I dont need them

2. XYZ norm is host normal?

3. IList<Curve> are the curves I got (in sample case 3 lines)

Result I get is as follows:

Capture.PNG

0 Likes

vlad_berila
Autodesk
Autodesk

Hello,

1. It's ok to pass null if you don't need hooks

2. It's the normal of the bar plane. The bar plane is the plane in which the rebar curves lies and bend. The normal it's also the direction in which the rebar set expands.

 

Regarding the error, it seems that your curve loop does not match the shape you are trying to set for the rebar. They must match. For example you cannot set a straight line shape ( shape 00 for example ) and a curve loop consisting of 2 curves ( L bar for example ). Also if the hooks are included in shape definition ( the ReinforcementSettings option ) and your shape defines hooks, for the shape to match the curves it should also match the hooks. Can you double check your shape?

0 Likes

Anonymous
Not applicable

Thank You for clearance. The thing is that I have a task to create a "00" type rebar (straight) which is not in reality straight (like in previous 3d picture). Customer told me, that it is a normal practice for them to put that type of bar  between 2 or more structural with a slope as in sample.MicrosoftTeams-image.png

The aim is to have only one parameter A with value, which is why they request to do that with "00" type.

Furthermore, we need the rebar ends not to touch the ends of structural foundation, that is why I use a detail line.

Probably "createfromcurvesandshape" method is not suitable for me because I need the rebar to look bent.

0 Likes

vlad_berila
Autodesk
Autodesk

Seems like we are back to the beginning 😀.

 

You described exactly the behavior of a free form rebar with the WorkshopInstructions parameter set to Keep Straight. When you have that you can bend the rebar in any way you like and the shape will report a straight shape with only one parameter. This doesn't solve your problem? It's the CreateFreeForm method that you described.

Only B parameter is available in the shapeOnly B parameter is available in the shape

0 Likes

Anonymous
Not applicable

I just have to apologise for my incompetence in structural Revit.

After I change workshop instructions, I cannot find a way to change a shape for any rebar, parameters are set to "read-only". Can You guide me to a right path? 

 

vlad_berila
Autodesk
Autodesk

Good morning,

 

When the workshop instructions for a free form rebar are set to Keep Straight ( API : RebarWorkInstructions.Straight ), the system will automatically set a straight shape in the free form rebar ( a shape defined only by a straight line, reporting only one parameter which is the total length ), no matter how complicated the rebar curves are.  Do you also need to change this straight shape to another straight shape? You cannot change it for now.

Anonymous
Not applicable

If I have for example 5 types of straight shapes (maybe duplicates with different name), does it mean that I cannot change to any of those? In this case I need a straight one, but I just cannot find a way to choose between those 5 types.

vlad_berila
Autodesk
Autodesk

Unfortunately for now you cannot change between shapes for a free form rebar.

Anonymous
Not applicable

Is there any way to change the rebar shape property of a free form after the creation. Maybe I can to select one of these 5 shapes before the creation of a free form and Revit decides to use it for a creation. I think I know, that the last user defined straight rebar shape from the rebar browser will be used in free form rebar creation

vlad_berila
Autodesk
Autodesk
Accepted solution

There's no guarantee, the system gets the first straight shape that it finds in the document or creates one if no one is available.

Anonymous
Not applicable

Well, I thought of an interesting approach and got slapped once again.

I open another revit document (donor project), do the free form rebars with only one shape available (it works fine and smooth) but when I copy them back to my main document, Revit itself renames copied rebar shape, for example:

if it was "00" in donor and main document has "00" shape already, it renames copied rebar shape to "00 01". It's killing me already. 

Anonymous
Not applicable
Accepted solution

I saw today that someone is still reading this.

I found an easy workaround. I rename the desired rebar type to a name that starts with first ASCII letters. In my case its a symbol "!". When you create free form rebar, it takes first rebar type in the list and its with a name "!". Then I rename it back. Case closed