solid7
Mechanical
- Jun 7, 2005
- 1,403
I'm trying to use distancedir to measure along a direction. No problem, it works fine. Except what I really want to do, is invert the direction in the next iteration, and get the measure of all of a certain feature in the other direction.
For me, a direction should dictate only positive values. (or give the option to return absolute) However, all values are absolute. Here is my intention:
The only way that I have found to circumvent this problem, is to offset parallel lines in both directions, and measure backwards, then offset, test, and reverse offset, if not correct the 1st time. That's a pain. Too many calculations.
Anybody got a more clever way to accomplish this?
Thank you.
For me, a direction should dictate only positive values. (or give the option to return absolute) However, all values are absolute. Here is my intention:
Code:
If angle( direction( ioLine ) , direction( ioTestLine ) ) == 0deg OR
angle( direction( ioLine ) , direction( ioTestLine ) ) == 180deg
{
ioMeasDirLine = lineangle( ioTestLine , ioPlane , ioCoG , False , 0in , 1in , 90deg , True )
ioMeasDir = direction( ioMeasDirLine )
ioMeasDir1 = distancedir( ioTestLine , ioLine , ioMeasDir )
set ioMeasDirLine = invert( ioMeasDirLine )
ioMeasDir = direction( ioMeasDirLine )
ioMeasDir2 = distancedir( ioTestLine , ioLine , ioMeasDir )
ioMeasList1 ->Append( ioMeasDir1 )
ioMeasList2 ->Append( ioMeasDir2 )
Message( "ioMeasDir1 = # : ioMeasDir2 = #" , ioMeasDir1 , ioMeasDir2 )
}
The only way that I have found to circumvent this problem, is to offset parallel lines in both directions, and measure backwards, then offset, test, and reverse offset, if not correct the 1st time. That's a pain. Too many calculations.
Anybody got a more clever way to accomplish this?
Thank you.