Is it possible to override the interpolation method of the BezierShape, so every new spline the user creates is conformed to a surface? Or is it possible to set the interpolated points of a spline?
So far I found this method:
ComputeBezPoints()
But since it's not virtual it can't be overridden. And about setting the interpolation points I found nothing, of course.
Any ideas about how I could accomplish this?
Yeah, like that. I want my CustomSpline to behave like that but I don't know what should be overriden in order to do that.
Actually, I still need help on this. I thought replacing Spline3D class with my own would work but now I see it's a mess of classes that try to emulate whatever max does but with my own interpolation. This approach leaded me to have Spline3D, BezierShape, SplineKnotAssy, and SplineKnot replaced, it's a mess!
I have somewhere else the points interpolated, based on a modified version of Catmull-Rom. I just need to know where to return all those points in Max code, so the spline is rendered based on them. So far I know that InterpBezier3D method will retrieve the interpolated points (right?). But what's the right place in SplineShape to change that?
Any idea on where to hack the interpolation without trying to replicate whatever Max does with all those classes?
@denisT.MaxDoctor, @istan, @nicolas.fonta - some thoughts?
tell us what your spline does have to do? what operations with this spline do your want to provide?
the things you have override depend on a functionality of your spline. Technically you have to write your own ShapeObject.
For example, if you want to have a Catmull-Rom spline instead of Bezier you have to re-write all BezierShape. But you can convert from your spline Object to Bezier and back, you can extend the BezierShape. If there is no problem to convert from Catmull-Rom to Bezier, it's a problem to do it back.
Thanks for replying, @denisT.MaxDoctor
The goal: to have spline shapes that conform to a specific surface.
In order to do that, I started by creating a class derived from SplineShape. I needed this class to (1) insert knots conformed to the surface and (2) interpolate the spline shape based on this surface. I also recreated Spline3D class through my own "CustomSpline3D".
The number (1) worked by re-writing Spline3D::Interact. For the requirement (2), I tried changing Spline3D::MakePolyline, but surprisingly the method is never called. The possible reasons why the latter does not work are: either MakePolyline isn't the right method to change spline interpolation; or BezierShape is interfering with the call of CustomSpline3D::MakePolyline, instead it's executing Spline3D::MakePolyline.
After this long story, I want to know:
Again, thank you very much for any help
Can't find what you're looking for? Ask the community or share your knowledge.