Wrong transformation after convex hull
Posted: 19 Dec 2018, 11:25
Hi,
When I try to compute the convex hull of an object in a child script, I notice that the original object and convex hull object do not align. I use the following code:
The scene with a minimal example: https://wetransfer.com/downloads/3026a9 ... 553/ce9487
Is this a bug, or am I doing something wrong?
Kind regards,
Boris
When I try to compute the convex hull of an object in a child script, I notice that the original object and convex hull object do not align. I use the following code:
Code: Select all
h = sim.getObjectHandle('imported_part_0')
data = sim.getShapeViz(h, 0)
newVertices, newFaces=sim.getQHull(data.vertices) -- get convex hull
newMeshh=sim.createMeshShape(0, 0, newVertices, newFaces)
sim.setObjectPosition(newMeshh, h, {0,0,0})
sim.setObjectOrientation(newMeshh, h, {0,0,0})
Is this a bug, or am I doing something wrong?
Kind regards,
Boris