Error when creating rebar following PolyCurves

Hi,
I’m trying to create rebars in revit by following the polycurves that can be seen in blue in the photo, but I always get an internal error. I suspect it has something to do with the vector but I’m not sure. Could someone explain to me why I’m getting this error and how to fix it?


Thank you in advance

Hi,
I think you need to Join the curves using “Polycurve.ByJoinedCurves” and also see this topic it might help you Setting rebar container dimensions in Dynamo (Dynamo for Rebar)

Thank you I will try that :slight_smile:

Try to add Flatten after the last Curve.Join node.

I tried that but it did not work but thank you

I used “Polycurve.ByJoinedCurves” but I got the same error

Am I maybe using the wrong curve to produce the normal vector?

Can you drop here your files. So that we can have closer look at it.

Here is a link to the files (I can not upload attachments since I’m a new user), thank you so much :slight_smile: https://drive.google.com/open?id=0B56f0ykmnoVBYTlWS2Jka1B0Y1E

I wasn’t able to download your revit file, but I tested your script and it works fine with me on

Dynamo 1.0
Revit 2017
Dynamo for Rebar 1.0.0

Hi

As far as I can tell you are using the correct polycurve (Polycurve.ByJoinedCurves) and normal vector nodes. The issue with Curve.Join is that the polycurve it generates is a list of curves and the node will then create separate rebar sections instead of a continuous bar. I’ve found that once you get an internal error on that node, you sometimes need to restart Revit before it will work again, even if you have fixed the input nodes. You don’t need the Group Curves node, you can feed the Flatten node straight into the PolyCurve.ByJoinedCurves node, I don’t think this will affect your error though.

I can’t make out the detail of the polycurves on your image (the image below shows what I think you are trying to make, correct me if I’m wrong), but your bend radii are possibly too small. If you don’t have any radii on the bends and they are just two straight lines meeting at 90 degrees (top in image), the node won’t be able to make the bars (however, you’ll get a different error, and not the internal error warning). Also, if you do have radii at the 90 degree bends, but they are smaller than the standard bend radius, the node also won’t be able to make the bars (but again, this will give you a different error).

Remember that the standard bend diameters are inside diameters and that you are drawing the bar center lines, so you have to adjust your radii accordingly (eg, if you have a 25mm bar, with a standard bend diameter of 155mm, the arcs in your polycurve have to have a diameter of at least 180mm, or the rebar creation node will fail).

But as mentioned above, incorrect geometries would cause different errors, your code looks fine, can’t see why you get the internal error.

If you are trying to create bars with the shape shown in the image, you could just draw the bottom straight section and add 90degree hooks to the ends using the rebar node.

1 Like

Sorry for my late reply, I upgraded to Revit 2014, I was using 2016, but it still does not work but thank you for testing my script

I was able to download your Revit file now, the geometry in your file was a little more challenging than the test I did. With that file I get the same error as you.

#Checks:
The polycurves in Dynamo looks fine though:

Looks like they fit inside your host too:

And the number of polycurves matches the amount of normal vectors:

#Error messages:

In console: !! Warning: Rebar Container is placed completely outside of its host.

#Suggestion:
You can try to post and issue here: https://github.com/tt-acm/DynamoForRebar/issues
(attach your files, and warning messages)

2 Likes

I tried feeding the Flatten node straight into the PolyCurve.ByJoinedCurves but I get Warning: PolyCurve.ByJoinedCurves operation failed. Curve join produced more than one WIRE in PolyCurve.

The detail of the polycurve looks like the top image in your comment but here is an image of the rebar that is created

The strange thing is that it work for some elements but not others like you can see in the image below,
I got no error for the element on the left but an internal error for the element on the right

But the problem with the hooks is that I cannot change their length.

Thank you for your answer :slight_smile:

@Einar_Raknes Thank you for taking a look at this for me I will post the issue :slight_smile:

Sorry for the late reply, but @TanyaBryn, I’ve been experiencing the same issues as described but with other curve shapes. In some cases when the polycurve is straight, I managed to re-create a single curve from the start point and end point, but for polycurves containing more than one line in different directions, “An internal error has ocurred” shows.

Did you already solve that issue?

I’m thinking what @TSF said could be the problem. I’ll give it a try.