Feedback

Please leave feedback and comments. I am always interested to hear how people get on using these LScripts!

Tuesday, 21 June 2011

LScript - Modeler_StitchWeld

LScript (Modeler) to weld points but in selected pairs. This allows you to stitch multiple selected points in one go instead of needing to weld individually.

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

    Modeler_StitchWeld.ls

*/

@version 2.2
@warnings
@script modeler
@name *Stitch Weld

    // Title
    sTitle = "*Stitch Weld";

    // 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)
          {
          pointmove(points[iCurrentPoint],pointinfo(points[iCurrentPoint + 1])); // Move point           
          }

    editend();

    mergepoints(0.0); // Merge Points

    info(iPointCount," point(s) welded.");
}
All scripts available at my Google Drive at
https://drive.google.com/open?id=1cR_q2GVUAJHumic1-A3eXV16acQnVTWs

No comments:

Post a comment