Hello all ,
i have a problem with spiral rebar , the rebars placed outside curved face of the ramp , how i set it in the right way please ?
Thanx
I think you nede to share the .dyn and .rvt file (you can use dropbox or something) if you want to get help with this one.
Hello @al-zawahreh1990!
Unfortunately it seem that only arcs and curves are supported by Revit to create rebar from:
I tested it and got this error message: “The input curves contains at least one curve which is not a bound Line or bound Arc and is not supported for this operation.”
Maybe @Maximilian_Thumfart1 have something to add?
I took a look at the source code of the Dynamo for Rebar package and it looks like it is converting the splines to arcs:
/// <summary>
/// Approximate Curve to Revit Curve
/// </summary>
/// <param name="curve"></param>
/// <returns></returns>
[IsVisibleInDynamoLibrary(false)]
public static object Approximate(this Curve curve)
{
if (curve.GetType() == typeof(Autodesk.DesignScript.Geometry.NurbsCurve))
{
NurbsCurve nurbsCurve = (NurbsCurve)curve;
if (nurbsCurve.IsLinear())
{
return Autodesk.Revit.DB.Line.CreateBound(curve.StartPoint.ToRevitType(), curve.EndPoint.ToRevitType());
}
else
{
return Autodesk.Revit.DB.Arc.Create(curve.StartPoint.ToRevitType(), curve.EndPoint.ToRevitType(), curve.PointAtParameter(0.5).ToRevitType());
}
}
else if (curve.GetType() == typeof(Autodesk.DesignScript.Geometry.PolyCurve))
{
DynamoRebar.RevitPolyCurve revitpolycurve = new RevitPolyCurve((Autodesk.DesignScript.Geometry.PolyCurve)curve);
return revitpolycurve;
}
else
{
Autodesk.Revit.DB.Curve result = curve.ToRevitType();
if (result.GetType() == typeof(Autodesk.Revit.DB.NurbSpline))
{
return Autodesk.Revit.DB.Arc.Create(curve.StartPoint.ToRevitType(), curve.EndPoint.ToRevitType(), curve.PointAtParameter(0.5).ToRevitType());
}
else
return result;
}
}
You could try approximating the curves with multiple lines and arcs (with a reasonably big tolerance, to keep the sections number low) and feeding that into the Rebar.CreateFromCurves method?
Thank you for the suggestion Dimitar, I tried this, but it didn’t work:
Probably it has something to to with the normal vector which we have provide. It can’t be one vector for the whole polycurve, and creating a lot of small individual rebar pieces doesn’t make sense either.
Hello Einar,
You can join multiple rebar pieces in one through rebar container. Also you should set RebarContainer.PresentItemsAsSubelements property to True for correct rebar presentations in schedule.
Einar_Raknes
Dimitar_Venkov
Max_Kotsar
Thank you very much
I appreciate all your answers
I hope to find a solution in the future
thank again
Have you tried to use the Rebar.Morph node instead, and generate the curves between the two spiral edges of the surface?
I think you’ll end up with nurbs curves anyway…
@Dieter_Vermeulen Advice is pure gold. Worked for me and i think it will work for your ramp too.
@Dieter_Vermeulen thank sir , Not worked in revit , i dont know why…
@m.k show the solution here pleas
i can split the ramp into two parts , and its work
why when i use ramp with arc angle more than 90 degree , the rebar placed outside the ramp floor?
Sorry this might be due to the surface evaluation, I will have a look.