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
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"
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"
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"
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"
RE: How to access the value of a "Distance Analysis"
You could create a length parameter and assign its value from a formula:
--Doug
RE: How to access the value of a "Distance Analysis"
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"
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"
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"