# Thread: Controlling a distance using a relation

1. Hello all,

I need some assistance. I have created a 2D graph consisting of 3 points and a spline curve going through the 3 points. The closest vertical line (Point C) is 20mm from the Y axis and the closest horizontal line (Point A) is 20mm from the X-axis. The 20mm distance from the Y-axis to Point C will never change, but the 20mm distance from the X-axis could potentially be either pointsA,B, or C. The X and Y axis are notcontrained to any datum planes due to the fact that the graphcould potentially become very large and I just want this to be a representationof the data that we receive.I want to see if there is a relation to have the X-axis line to be 20mm from the closest horizontal line, whether it be point A, B, or C. I have a attached a picture explaining my scenario. I have alsoshown generic "d" values next to the letters that can be used to anyone whowill explainhow to do it. Any help would be much appreciated. Thanks!

Zack

Attachment 5806

•

2. do you mean?

Ax min0 to max any + value; Ay min 20 to max any + value
Bx min0 to max any + value; By min 20 to max any + value
Cx min 20 to max any + value; Cy min 20 to max any + value

3. Your question is a little vague. I am thinking that you
want the x-axis position to always be 20 mm below the
closest line, but the 3 lines given by A, B and C Y
values could be anywhere in space.
Since the X and Y axes should be the independent
references, and should not be movable, I must assume that
you want to reassign the Y values of D0, D1 and D2 so
that the closest one is 20 mm from Y = 0 (the x-axis).

If this is the case you must write relations to evaluate
the Y values of each line, determine the lowest of the 3
values, determine the increase in each value and then set
the lowest to y=20. After that you can reassign the
others to add the difference that separates them.
This will probably be a fairly long set of relations.

Let us know if this is what you are looking for and I am
sure we can provide you with the relations.

4. tgsp,

Yeah if I am reading your reply correctly, thats what I am looking for. Basically, the vertical line connected to point C will always be the closest line to the Y-axis, so that is locked at 20 mm from the Y-axis. What could change is the point closest to the X-axis. I am looking for a relation for Pro-E to know which point is the closest and to make sure the X-axis line is 20mm away from that point.

The X and Y axis lines are not constrained to anything. They are just floating in space, so the x-axis has complete freedom to move.

Hope that helps. Thanks!

•

5. Ok here's what you do.
Assuming you have created 3 horizontal lines in a sketch,
whose y values are d7, d8 and d9 respectively, and the
lowest value is greater than 20 mm.
Write the following relations:

/* create required variable parameters
dummy = 0
offset = 0
/* test for smallest y value
if d9&lt;d8 & d9&lt;d7
dummy=d9
endif
dummy = 0
if d8&lt;d9 & d8&lt;d7
dummy=d8
endif
dummy = 0
if d7&lt;d8 & d7&lt;d9
dummy=d7
endif

/* determine the difference from the lowest y value to 20
offset=dummy-20

/* offset all 3 y values to keep lines in same relative
position in y
d7=d7-offset
d8=d8-offset
d9=d9-offset

This should be what you are looking for.

Regards,
Tom Peterek
Active Design Consulting Inc.

<br / target="_blank">09_121858_minimize_y_test.zip">201 3-01-
09_121858_minimize_y_test.zip</a>

6. Thanks so much Tom, I appreciate the help! I will give that a shot. It makes sense reading it so I will input it into my relations.

Zack Mueller

LuK USA, LLC

7. You're welcome Zack. Hey are you in Wooster? I taught
Pro/E there quite a few times, a few years back. If you
are near the education building, say Hi to Denise for me.
My direct contact is tgspeterek@gmail.com

8. Tom,

Wow small world! Yes I am located in Wooster and I know Denise very well. I will let her know!

Zack

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•