[Closed] Trimesh instead of mesh after detach
Hi,
I’m trying to detach a group of faces from an element and create a new maesh from it.
my code is:
for i = 1 to selection.count do
(
obj = selection[i]
if( selection[i].name == “bld_is_13”) do
(
– here I’m getting an array of elements from my selected object
elem_array = getElements obj
faces_array = #()
– loop all the elements in my selected obj
for idx = 1 to elem_array.count do
(
for poly in elem_array[idx] do
(
– take all the faces in each element
append faces_array poly
)
– here i’m trying to detach an element by detaching its faces to a new mesh
– but i’m getting a trimesh and I don’t know how to deal with it,
– when i’m trying to change it to editable mesh all my data is been lost
new_mesh = meshop.detachFaces obj faces_array delete:FALSE asMesh:TRUE
new_mesh = editable_mesh()
update obj
faces_array = #()
)
)
How can i detach the faces to a new mesh and not a trimesh ?