So hard to find answers in simple questions, maybe creators assume you knwo everything about the involved languages? Or the application?
Here is a version of the script that prepares NGons for MXRoundish,
Code: Select all
LogMessage("Preparing Geom'");
var sel = Selection;
var subcmp = sel(0).SubComponent;
var ctrlpts = subcmp.ComponentCollection;
NGonID=ctrlpts(0).Index;
MyNgon = "poly["+NGonID+"]";
MyObj = sel(0).name;
SetSelFilter("Polygon");
SelectMembers(null, null, null);
DuplicateMeshComponent("."+MyNgon, siPersistentOperation, null, null, null, null, null, null, null, null, null, null, null, null, null);
GrowSelection(null);
CreateCluster(null);//Ideally the new cluster should get a unique name
ShrinkSelection();
ApplyTopoOp("Collapse", MyObj+"."+MyNgon, siUnspecified, siPersistentOperation, null);
SelectObj(MyObj+".polymsh.cls.Polygon", null, null); //name of cluster appears here
SelectMembers(null, null, null);
GrowSelection(null);
ShrinkSelection();
ShrinkSelection();
LogMessage("\n\nReady to apply MXRoundish'");
Known issues cluster name, Idealy i shound name the cluster something random, and delete by the end -> Sometimes the script meshes up preexisting clusters, and when that happens you might see selection acting funny, or the proccess failing
If you select 2 or more ngons, it will applied in the first, if you want to disolve your selection by default add one more disolve in the second line,
I didnt even tried what happens when you have 2 or more ojects selected
![Whistling :-](./images/smilies/65.gif)
Freezing the geometry is nessesary, i belive Vitaly works on immed mode, guy is such a great inspiration,
From playing around y/day (havent touch softy 10thousand years):
![Image](https://i.imgur.com/tPbYeUu.png)