Importing Model (obj) as Mesh?

Hello,
I have another beginner question.

I have a preexisting Geometry and need to apply a mesh to it from a model. If I understand meshes correctly they are the structure of models. I see that I can import them as a Spatial but how about a mesh? Is there a was to do what I want to do?

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:scenegraph_for_dummies

I understand the scenegraph, but I do not understand how I can load a model as a mesh and then latter apply is to a geometry.

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_asset

@tlf30 said: I have a preexisting Geometry and need to apply a mesh to it from a model.

…and for the record, the above statement makes no sense which is probably why you will keep getting referred to the scene graph docs until you explain what you are really trying to do.

CustomObject co = new CustomObject(); //Extends Geometry

Spatial teapot = assetManager.loadModel(“Models/Teapot/Teapot.obj”);

/*
How do I get the Mesh stored in the Spatial into the CustomObject?
Or is there another way to load a model into a custom subclass of geometry?
*/

According to the docs you know so well, where would the mesh be in your case?

Also, why do you have a custom subclass of Geometry. Usually that’s a sign of really bad things.

@normen said: According to the docs you know so well, where would the mesh be in your case?
See pages 88-100 of the "jMonkeyEngine 3.0 Beginner's Guide"
@pspeed said: Also, why do you have a custom subclass of Geometry. Usually that's a sign of really bad things.

Is there a better way to store custom data in the Geometry objects?

I think I solved my own question…

@tlf30 said: Is there a better way to store custom data in the Geometry objects?

http://hub.jmonkeyengine.org/javadoc/com/jme3/scene/Spatial.html#setUserData(java.lang.String,%20java.lang.Object)

Or…

http://hub.jmonkeyengine.org/javadoc/com/jme3/scene/Spatial.html#addControl(com.jme3.scene.control.Control)

or in myappstate
hashmap<Geometry,Something>