Thread: how to calculate automatically the linear length

1. Sort of what I suggested, though with the difference of using connected to layers
yes, have done similar earlier, the "problem" is that it isn't really faster than selecting the poly manually.

if it could be automated however, it would be faster.

Kryslin may have something going if he can make the script of calculating each segment ..then return with a report including all segments individual length or full scale .
yes, Absolute Size does this, so what we need is something similar that also copies that data to a polygon tag.

2. perhaps also the script Absolute Measure by Deuce could be of use...
located in NewTek\LightWave11.6.2\support\plugins\scripts\LSc ript\model

// Measure tool -- Deuce

@version 2.3
@warnings

main
{
selmode(USER);
var numberofpoints = editbegin();
var total = 0;
var j = 1;

for(i=1; i<numberofpoints; i++)
{
var j = j + 1;
varpntA = pointinfo(points[i]);
varpntB = pointinfo(points[j]);

varseg = extent(varpntA,varpntB);
skew = sqrt((varseg.x * varseg.x) + (varseg.z * varseg.z));
total = total + sqrt((skew * skew) + (varseg.y * varseg.y));
}

editend();

reqbegin("Absolute Distance Measure");
reqsize(415,97);

c1 = ctldistance("Absolute Distance",total);
ctlposition(c1,36,21,345,25);

if(reqpost())
{
dist = getvalue(c1);
}
else

return;
reqend();
}
also see Measure_Points.ls by Matt Gorner in the same location

3. Basically, my idea is like this:
1)Grab all the polygons.
2)For each polygon that hasn't been processed:
2a) Select that polygon
2b) Select the connected polygons.
2c) Remove the additional selected polygons from the master list.
2d) Get the length of the selected member, based on the greater bounding box dimension.
****I know this only works on things that are on axis.
2e) Add the measurement to the list.
2f) Repeat 2a)-2f) until no polygons remain.
3) Summarize data for reporting.
4) Output report file to user specified location.
4a) Include a use specified cutting allowance in the total (typically, 3mm-12mm, depending on material and cutting method).

Ideally, at 2d, I would rotate the points of the selected tube until the length was along the z-axis. That way, tube not on axis could be measured.

I should have some free time tonight and tomorrow (blizzard rolling in here in the lower great plains in the US).

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•