How to cut .obj file

How to cut an object .obj into a scene JME with a mouse click or a plan?

What have you tried? What have you read? Where are you stuck? Where is the code that doesn’t work?

i import .obj file in a JME canvas) into Jframe. i want to cut this object with click mouse or some thing like a plan. i look for a function of cutting object.

There is not “cut” object I’m afraid. It’s not as simple as that.

I do that with a script Blender but not with JME

I believe you want to modify the mesh, right? Maybe there is a wiki entry.

Blender != jme .

It’s fairly simple to split a mesh with an infinite plane, but you’ll have to write the code yourself.
Here you can find a really good paper about this and an implementation for unity GitHub - DanniSchou/MeshSplitting

thank you for your reply. I look for cutting .obj that means i want to modify the mesh.
Is there any function of JME or JAVA to doing this?

Yes. All the information is in the wiki or via searching the forum…

Unless you want to modify a mesh dynamically (that is at run time, in a way that is different each time). The you should edit your mesh in a proper editing tool. Like blender. jME is a game engine not a modeling tool.

Then even if you still want to do this, (which i don’t recommend), you need to be able to understand polygons and the data structures that represents them in opengl. This is typically indexed vertex buffers. Now you need to know your basic vector math to do things like work out where a cutting plane cuts a poly, add the required vertexs and triangulate the now not triangle triangles. And of course as is typical with this type of coding, deal with all the degenerate and edge cases.

But really, no matter what game engine you use. It is always better to mesh manipulate in a proper modeling program.