Fri, 10/14/2011 - 18:23
Forums:
I have split up a BSpline using GeomConvert_BSplineCurveKnotSplitting and SplitBSplineCurve. With each new resulting BSpline I would like to know the center point, since each BSpline should now be an arc.
Anyone know a good way to obtain the center point of a BSpline?
Thanks, any help is appreciated.
Fri, 10/14/2011 - 23:46
Use GeomLProp_CLProps
It gives you Tangent, Normal, Curvature and CenterOfCurvature of a Geom_Curve.
Documentation -> Module ModelingData » Toolkit TKG3d » Package GeomLProp
Sat, 10/15/2011 - 00:10
I don't know if this is the best way, but you could try:
Evaluate the BSpline at 3 different locations.
Construct a geom_circle using GC_MakeCircle( pt1, pt2, pt3 ).
Get the gp_Circ from the geom_circle.
Get the center point from the gp_Circ.
Fri, 10/21/2011 - 20:03
Thanks Sharjith and Eric.
I took a look at both solutions and used Eric's, I had a little trouble with GeomLProp and Eric's solution seemed simple enough.
It's working great though, thanks for the help.
Brandon