×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Measuring along only the positive value of the direction

## Measuring along only the positive value of the direction

(OP)
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:

#### 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.

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

#### Resources

White Paper - Reshoring Prototyping and Production
In this whitepaper, we'll provide insight into why and when it makes sense for U.S. manufacturers to reshore prototyping and production, and how companies can leverage the benefits of working with local design, prototype, and manufacturing partners during the pandemic and beyond. Download Now
Engineering Report - Top 10 Defect Types in Production
This 22-page report from Instrumental identifies the most common production defect types discovered in 2020, showcases trends from 2019 to 2020, and provides insights on how to prevent potential downtime in 2021. Unlike other methods, Instrumental drives correlations between a variety of data sources to help engineers find and fix root causes. Download Now
White Paper - Addressing Tooling and Casting Requirements at the Design Stage
Several of the tooling and casting requirements of a part can be addressed at the design stage. If these requirements are not addressed at the design stage, lot of time is spent in design iteration when the design reaches the die caster. These design issues lead to increase in time and cost of production leading to delay in time to market and reduced profits for the organization. Download Now

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!