Get selected faces and other questions

BradCarstenBradCarsten Posts: 856

I'm trying to get hold of the selected faces, but the documentation on facets seems to be missing a lot of information, and so everything I've found has either been from the SDK documentation, or from just tapping around until something works. 

The only process i've found so far is to first add selected faces to a new face group, and then select them from there.

To do that (for anyone wanting to know how to do this in the future) I selected the current node, the shape and then the geometry. From there I use

oGeometry.createFaceGroup("GroupName");oGeometry.addSelectedFacetsToGroup("GroupName");var oFaceGroup= oGeometry.findFaceGroup("GroupName");

You can then use oFaceGroup.count and oFaceGroup.getIndex()

But this seems like a seriously round about way of doing things, and I suspect it can mess up your current face groups (I don't know how much of a problem that is because I've never used them, but I suspect it could be) Does anyone have an easier solution for getting hold of the currently selected faces? 

if not the only other way then that I can come up with is to create the face group, assign the selected faces to it, save that selection to an array, and then restore the face groups back to their original state. Trying that I am running into brick wall after brick wall.

- I can't find a way to delete my newly create face groups again.

- Using oFaceGroup.addIndex(i) oFaceGroup2.removeIndex(i); I can add a face to a face group. then using oFaceGroup.count() I can confirm that the face has indeed been moved, but when I go into the tools setting dialog box, the facegroups haven't been updated. The old group still contains all the faces it used to. If I save and reload the scene then all the changes are lost. 

after adding a face to a face group, how do you apply those changes? 

 

 

 

Post edited by BradCarsten on
Sign In or Register to comment.