Hello everyone.

I am trying to create a method like this

numKnots(shape, spline_index_integer);
Returns the number of knots (also known vertices or control points) in the indexed spline as an integer. If the spline index is not specified, returns the number of knots in the entire shape.

numKnots(path, 1);

i have been looking through the docs and have found geom.getVertexCount


You seem to intend to implement a 3d editor, I suggest using one to create such meshes or looking into how they do it usually and then constructing the mesh:
jME is not a mesh editing library, its a game engine.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or theres an increased use of exclamation marks and all-capital words.

1 Like

im not trying to make an editor,
i see Shape.getVertexCount()
but is there something like Shape.getVertexCount( indexed spline); ?

I think it’d help if you told us what you were trying to accomplish and why. There may be a better way to do what you’re intending to accomplish.

i don’t think jME has any support for splines, and you would have to construct the splines out of the mesh anyways, and for an arbitrary 3D model I don’t see this ending well. But you should be able to turn a 2D spline into a 3D suface fine enough (and get the number of knots out of that), but you’d have to implement that stuff yourself. As normen said, we aren’t an editor/engineering program, so the number of knots isn’t really important to us, but i think some basic spline support in jME could be beneficial

can anyone recommend a library for spline calculation ect?

this has a list of numerical java libraries, which may be of use

1 Like