Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to access the value of a "Distance Analysis" 1

Status
Not open for further replies.

Idunnowhatelse

Marine/Ocean
Aug 29, 2015
5
US
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
 
 http://files.engineering.com/getfile.aspx?folder=72e8380c-9c4e-4f94-83eb-c324a2e11af5&file=Untitled.png
Replies continue below

Recommended for you

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

 
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
 
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.
 
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
 
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
 
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.
 
@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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top