Get center point of a Rebar Shape

Get center point of a Rebar Shape

kimanh96tb
Explorer Explorer
589 Views
1 Reply
Message 1 of 2

Get center point of a Rebar Shape

kimanh96tb
Explorer
Explorer

Hi All,

 

I'm looking a way to get the center point of Rebar from a Rebar Shape (i remark this point in the picture). 

In my project, i did:

protected XYZ GetRebarOrigin(Rebar rebar)
{
IList<Curve> curves = rebar.GetShapeDrivenAccessor().ComputeDrivingCurves();
if (curves != null && curves.Count > 0)
return curves.First().GetEndPoint(0);
return null;
}

but it isn't point that i want to get. What do i do to get this point?

Thank you!

 

 

 

 

 

0 Likes
Accepted solutions (1)
590 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

I recently implemented code to retrieve the centre lines of the rebar, the rebar curves:

 

https://thebuildingcoder.typepad.com/blog/2019/07/roadmap-rebar-curves-wizard-zip-and-more.html#3

 

It is available from The Building Coder samples:

 

https://github.com/jeremytammik/the_building_coder_samples/blob/master/BuildingCoder/BuildingCoder/C...

 

You can determine the desired centre point from the centre curve as you feel appropriate.

 



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