cutting simulation

Typically: "How do I... ", "How can I... " questions
Post Reply
jeffer
Posts: 1
Joined: 03 May 2014, 04:08

cutting simulation

Post by jeffer » 03 May 2014, 22:47

Hello,

I am new to V-REP, and I looked at the Milling Robot video about the "cutting" functionality of V-REP, does the "cutting" use the mesh 'cutting" functions inside V-REP? I looked at the CMeshManip class inside the V-REP source code, but could not find which functions
does the "Boolean" operation, could someone explain or pointer something about how the "cutting" was implemented for the cutting simulation?

coppelia
Site Admin
Posts: 6867
Joined: 14 Dec 2012, 00:25

Re: cutting simulation

Post by coppelia » 04 May 2014, 22:28

Hello Jeffer,

have a look at following files:
  • v_rep/sourceCode/3dObjects/Mill.cpp
  • v_rep/sourceCode/3dObjects/millObjectRelated/CuttingRoutine.cpp
  • v_rep/sourceCode/interfaces/collDistInterface.cpp
  • meshCalculationPlugin/sourceCode/collDistAlgos/collDistAlgos.cpp
But the algorithm is that a convex volume (composed by N planes) will be run over a mesh. If a triangle's vertices are separated by a plane, it will be split. Everything goes quite fast since the mesh's triangles is contained in a Oriented-Bounding-Box hierarchy. New created triangles (resulting from triangle cutting) are directly inserted in that hierarchy too.

That's just a very rough overview.

Cheers

carmelo
Posts: 3
Joined: 24 Jul 2018, 09:51

Re: cutting simulation

Post by carmelo » 05 Dec 2018, 10:44

Hello Coppelia,

I am wondering if it is possible to visualize and export the mesh which originates from the cutting algorithm. I performed some milling on a mesh with all edges visible, but I could not see the edges of the new triangles created during the cutting simulation. I would really need to export the mesh model produced after the milling, ideally as an STL file. Is that possible to access/export the mesh triangles contained in the Oriented-Bounding-Box hierarchy described in the answer above?

Hope to hear from you soon.
Kind regards,
Carmelo

coppelia
Site Admin
Posts: 6867
Joined: 14 Dec 2012, 00:25

Re: cutting simulation

Post by coppelia » 06 Dec 2018, 08:03

Hello Carmelo,

the cutting algorithm is far from perfect and might be taken out of V-REP in future.
But normally you can call sim.applyMilling on the shape to make the change permanent. Then you should be able to access the modified data.

Cheers

Post Reply