高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】drawing spline curves
drawing spline curves
drawing spline curves
i need to implement functionality that will draw a spline curve, and i am having difficulty figuring out how to generate a list of points to draw on the screen. i can get the control points, knots, etc. it seems like there ought to be a method in odªgeªnurbªcurve3d that would handle this, but if there is, i can't figure out which one it is. the documentation and sample code have not been too helpful with this, unfortunately, and my experimentation has not yielded good results.
thanks.
why don't you use the rendering classes embedded in dwgdirect - they are very powerful - you'll receive there any curve "exploded" to line segments?
or use the method getsamplepoints of the gecurve3d object to get a set of points on the spline?
regards
chudomir
thanks for the information. the getsamplepoints method is what i was looking for. i guess that i did not look far enough back up the class hierarchy from odgenurbcurve3d.
by the way, do you need to draw acdbspline entity or just a geometry object?
if so, how do you convert from acdbspline to the geometry object?
thanks.
obtaining odgenurbcurve3d from oddbspline
quote:
originally posted by chudo
by the way, do you need to draw acdbspline entity or just a geometry object?
if so, how do you convert from acdbspline to the geometry object?
thanks.
conversion from oddbspline to odgenurbcurve3d can be done through oddbspline::worlddraw() passing as parameter instantiation of odgiworlddraw interface (that should return pointers to instantiations of odgiworldgeometry, odgisubentitytraits, etc interfaces). odgenurbcurve3d object can be received through odgiworldgeometry::nurbs method. this method is more optimal then copying data (degree, knots, control points, etc).
sincerely yours,
george udov
|