×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

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

Students Click Here

Jobs

How to access the value of a "Distance Analysis"

How to access the value of a "Distance Analysis"

How to access the value of a "Distance Analysis"

(OP)
Hello guys,
I have a problem in CATIA V5. My problem is like what is shown in the attached picture. I have two curves that I have measured the minimum distance in between them in x-dir using the Distance Analysis from FreeStyle. I need this value to be called for an optimization task. Most of design parameters and their values like point coordinates, curve length, dimensions,... are normally accessible from "Formula". But there is nothing that represents this value and I don't know how to access this minimum distance. I would appreciate any help from you regarding this problem.

Thanks,
Henry

RE: How to access the value of a "Distance Analysis"

@Idunnowhatelse
Hi Henry, I tried too, but I couldn't find a parameter that could be accessed through the "formula" box or through a catvba macro. I don't think it's exposed to automation. Unfortunately, some elements can only be accessed manually in CATIA and this appears to be one.

Drew Mumaw
www.textsketcher.com
www.drewmumaw.com

RE: How to access the value of a "Distance Analysis"

(OP)
Thank you Drew,

It is not a good news :(
Do you think there is another way that I can calculate maximum distance between two curves for automation applications?

Henry

RE: How to access the value of a "Distance Analysis"

Just out of curiosity, if while in the formula editor you click on the "Free Form Analysis.1" or the "Distance Analysis.2" does it list anything?
I don't have your licensing but that is the only way i can get the values of a measure between to show in the formula box.

Kevin

RE: How to access the value of a "Distance Analysis"

(OP)
No Kevin, It does not show anything. To the best of my knowledge I confirm that this is the only way, but it does not work in this way.

RE: How to access the value of a "Distance Analysis"

In my example I created two sketches, each with a spline in them. The intent was to measure the minimum distance in the Z-Direction. I was able to obtain the same resultant value as the 'Min' value reported by the distance analysis in the FreeStyle workbench.

You could create a length parameter and assign its value from a formula:
Length.1 = distancedir(`Geometrical Set.1\Sketch.1` ,`Geometrical Set.1\Sketch.2` ,direction(`xy plane`))

--Doug

RE: How to access the value of a "Distance Analysis"

(OP)
Thanks Doug,

It seems your resolution is valid only when it comes to calculation of minimum distance as the distancedir returns the minimum distance. Am I right?

Henry

RE: How to access the value of a "Distance Analysis"

To run an optimizer you have to have a parameter that drives the geometry...this is the only way optimizer can actually change the geometry to optimize it. The 2 splines are not associated to one another, so optimizer will not be able to move one spline relative to the other to come up with a solution.

Try making spline1 in a sketch
make spline2 in another sketch but dimension one of the points back to a point in spline1
Now you will have a dimension (parameter) that you can have the optimizer change and move the splines.

RE: How to access the value of a "Distance Analysis"

(OP)
@lardman363
Actually the minimum distance is a decision making parameter. I am not going to effect the design by changing this parameter, it just help me to assess the overall condition of my design.
---------------

I think I am very close to the solution, but there is still one obstacle. I used Doug's suggestion on mirrored curves. In this way the minimum distance between mirrored curves is in fact the maximum distance between the original curves. The obstacle is that I can only see the "distance" function in the "measure" dictionary. There is no "distancedir" function. Although the calculated value is very close to minimum distance returned by DistanceAnalysis tool but I am still not sure if they are same in all conditions.

Henry

RE: How to access the value of a "Distance Analysis"

Oh, sorry I thought you wanted to modify the curves.

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.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources