Compatible with Newtek LightWave 9.6 and above.
// LScript Modeler - www.StephenCulley.co.uk // // web address: http://www.stephenculley.co.uk // email address: email@stephenculley.co.uk /* LScript Modeler - Stitch Weld Average Modeler_StitchWeldAverage.ls */ @version 2.2 @warnings @script modeler @name *Stitch Weld Average // Title sTitle = "*Stitch Weld Average"; // Version sVersion = "v1.0"; main { // Selection - Point (DIRECT) selmode(DIRECT); iPointCount = pointcount(); if(iPointCount <= 1) error("None or not enough points selected."); if((iPointCount & 1) != 0) iPointCount--; // Check if odd editbegin(); for(iCurrentPoint = 1; iCurrentPoint <= iPointCount; iCurrentPoint += 2) { vAverage = (pointinfo(points[iCurrentPoint]) + pointinfo(points[iCurrentPoint + 1])) * 0.5; // Average Vector pointmove(points[iCurrentPoint],vAverage); // Move point pointmove(points[iCurrentPoint + 1],vAverage); // Move point } editend(); mergepoints(0.0); // Merge Points info(iPointCount," point(s) welded."); }
https://drive.google.com/open?id=1cR_q2GVUAJHumic1-A3eXV16acQnVTWs
No comments:
Post a Comment