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

# Min Distance Between Marker and Spline (runtime)

## Min Distance Between Marker and Spline (runtime)

(OP)
I want to calculate (runtime) the mini distance and direction between a marker that is moving close to a spline and the spline itself. Reason: The distance between the spline and marker decribes the force on the marker. Is there a function or do you have to write your own code ?

Francois

### RE: Min Distance Between Marker and Spline (runtime)

By a spline I assume you mean a description of a 3d line in space, rather than the ADAMS meaning of a curve describing the relationship between two or three variables?

I don't think ADAMS understands 3D geometry quite like that, I think you'd have to roll your own.

Another approach would be to model the line as a series of markers and then work out the distance to each using DM, DX and so on.

You might be able to do something funky with the contact solutions, but I doubt it.

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

### RE: Min Distance Between Marker and Spline (runtime)

(OP)
Thanks for the response.  Yes, it is a 3-d spline in space and it is about modeling the aerodynamic forces on a ball inside a pipe. So the spline describes the center of the pipe and the force on the ball is a function of the distance between the center (spline) and the ball center.

### RE: Min Distance Between Marker and Spline (runtime)

So how is the pipe's axis modelled, in ADAMS?

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

### RE: Min Distance Between Marker and Spline (runtime)

(OP)
Not yet modelled. But I could bring it in from UG (unigraphics) and convert the curve to spline. It might be possible to get a away with straight lines and radiusses but I rather write a code that could be apllied to any later change in the pipe.

### RE: Min Distance Between Marker and Spline (runtime)

Um, unless the latest versions of ADAMS have changed enormously the ONLY points in space that it understands are markers. OK, what you could do is for each time step find the point on the 3d curve's analytical equation that is closest to the ball. then move the J marker to that position, and apply your force equation.

It might well be worth asking on the MSC ADAMS forum (see FAQ), this is pretty tricky stuff and I am no expert when it comes to the Solver.

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

### RE: Min Distance Between Marker and Spline (runtime)

(OP)
I solved the problem without having to write a program. Use two "point on curve"'s with a straight line between them. In the middle of this straight line is another line perpedicular to the first line. On the last line is a translational joint to the center of the ball. The ball has a rev joint on the translational joint. And walla ! The ball can spin and hit the sides of the pipe and move freely inside the pipe. But now the distance along the translational joint is the distance I have been looking for and will always be the minimum distance from the center of the pipe to the center of the ball.  The straight line between two two point should be small enough to min error.

### RE: Min Distance Between Marker and Spline (runtime)

Well done. I haven't seen 'point on curves'.

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

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

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. 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!