View Full Version : attach one trimesh to another

12 December 2010, 02:01 PM
atm i'm using a simple "tMesh += tMesh" wich kinda works but uses boolean and kinda messes up the whole thing in many cases. so was wondering if theres a way to attach a triMesh to another one.
they dont have nodes as its inside a simpleObject plugin :argh:

:surprised never mind

if i == 1 then mesh = slice.mesh else
local tMesh = copy mesh
meshop.attach tMesh (transformMesh slice.mesh newTM)
mesh = tMesh

12 December 2010, 02:06 PM
I haven't looked if there is an easier solution but you could just deconstruct one and add the verts to the other making sure that you increment the vertex ids up my the amount of verts in the mesh you are attaching to.

Does that make sence?

12 December 2010, 02:29 PM
it does but the code i edited my post with actually works, hence the weird smiley

before i tried to attach it to the mesh directly, didnt work
then i did it like this (copy trimesh; attach new trimesh; assign combined trimesh to var) and it worked

so it turns out you dont need a node for the meshOp.attach fn :buttrock:

your solution wouldve been me next way to go, thx for the time tho

also i dont really have the xp with de and reconstructing a mesh, i always kinda mess up the vert order and therefore normals :P

CGTalk Moderation
12 December 2010, 02:29 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.