Dear Jorge,
Thank you for your update and congratulations on the progress.
I heard back from the development team, and they say:
The property Rebar.NumberOfBarPositions will give us the number of bars in the set.
The Method Rebar.GetCenterlineCurves receives a barPositionIndex and will return the centreline curves for that bar.
I’m not sure what you mean by 'centre bar'; if in the set are 4 bars (indexes 0,1,2,3). It should be index 1 or 2?
public IList<Curve> GetCenterlineCurves(
bool adjustForSelfIntersection,
bool suppressHooks,
bool suppressBendRadius,
MultiplanarOption multiplanarOption,
int barPositionIndex)
What is missing in your code: GetCenterlineCurves will return the curves as they are positioned on the first bar.
You can obtain a transform which will move the curves into the desired position:
RebarShapeDrivenAccessor accessor = rebar.GetShapeDrivenAccessor();
Transform trf = accessor.GetBarPositionTransform(indice);
// Now apply the trf on each curve obtained from calling GetCenterlineCurves()
I hope this helps.
Best regards,
Jeremy