Notifications
Clear all

[Closed] Sdk basic modifier

Trying to get the offset of mnmesh::Slice to correspond to the units system, ie slice every 10mm. Unsure how to do this, this is the description on the function for offset param.

The offset of the slice plane. For any point X in the plane, DotProd(N,X) =
off.\n\n

it’s the standard plane equation, so the plane is defined by a direction normal and the dot of the normal and any point on that plane.
so the offset in your case would be

offset = DotProd(normal, Point3(0.0f,0.0f,zoffset));

thanks Klvnk, fixed! Im trying to figure out how to delete selected edges now

I’ve got the edges selected but how the hell do I remove them with their verts & face. It’s hard to find what your looking for in the samples

collect your edges
tag all the faces using the edges(MNEdge::f1 & MNEdge::f2)
with MNFace::SetFlag(flag_to_tag);

delete faces with

MNMesh::DeleteFlaggedFaces(flag_to_tag); 
MNMesh::CollapseDeadStructs();

Thanks Klvnk, I’m such a newb Im still stuck.

I know that I have the extruded edges selected

pmesh.ExtrudeEdges(MN_SEL, &chamData, tUpDir);

then this moves them.

Tab < Point3 > tUpDir;
tUpDir.SetCount(pmesh.numv);

for (i = 0; i < tUpDir.Count(); i++) pmesh.v[i].p += tUpDir[i] * 10;

now how do I use the above to set a flag (MN_USER) to the selected edges?

sorry for all silly questions

Page 3 / 3