Cancel
Showing results for 
Search instead for 
Did you mean: 

Control position of a point object with an expression?

Builder
Builder

I want to parametrically control the location of curve that lies between two other curves (in a sketch). I thought I could do that using a point object placed on a line between the two curves using a "Between Two Points" type (see below).  However, it won't allow me to enter an expression for the "% Location".  If I try, it just enters the current value for the expression, and any changes to the expression are ignored.  At least that's how it's behaving.  I thought I would ask here in case there's something I'm missing. Is there? If not, is there another way I can do this?  Thanks for any help.

 

Control point position with an expression (9-17-18).png

5 REPLIES 5

Re: Control position of a point object with an expression?

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi @pmk3,

Try offset option and use expression for distance,arc length etc for respective option(s).

Re: Control position of a point object with an expression?

Phenom
Phenom

By using the Between Two Points option, the point is really not contrained to lie on the curve. 

 

Instead,

  1. create a point in the sketch,
  2. constrain it to lie on any curve you want,
  3. create a dimenson to drive the location.
  4. Use your expression for the dimension value.

 

 

Re: Control position of a point object with an expression?

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi,

 

What you are asking for is not as easy as it sounds. Within the sketch the points are not parametric, there are no expressions being used to position the point. All you have at you disposal are constraints and dimensions. 

 

If the distance between the two point is known then you can calculate the distance and use a dimension to position a point on a line between the two input points. Create a reference line, create a point on the line (snapping gives a point on curve constraint) and then create a dimension between the line endpoint and the point you just created.

 

I assume it is not this easy and this is where the fun starts. If you want to create the point at a calculated percentage/distance between the two points and the distance is unknown because you might want to move the points around, then you wish you could measure the distance first. Using the measurement you could then drive the location of the curve. Unfortunately this is not supported in NX sketcher. 

 

 

Construction.PNGConstructing a point a percentage between two pointsYou can construct it. See image above.

The two blue lines are your input. The purple dotted line is the line between the end points.

  1. Construct a line vertical to the dotted line where you want the point.
  2. Create the point at the intersection. 
  3. Make the two purple dotted lines equal length
  4. Create the red line to be half the dotted line and collinear (snap to mid point)
  5. Create the green line and a driving angle dimension
  6. Create a driving expression Percentage=0.25 (unitless)
  7. Set the angle expression to "90-atangent(2*Percentage)" 
  8. Now you can drag the two lines and the point will remain at the specified percentage of the distance.

Yes, it is not easy. If possible construct this outside the sketcher with a datum point feature. But isn't it fun to make it work!!!

 

Regards, **bleep**

 

PS. We already have ER's requesting for the measurement capability. 

PS2. Now that I got it done and written down I see easier ways to construct this. The clue in this post may be enough for you or others to come up with something far more efficient.

Re: Control position of a point object with an expression?

Builder
Builder

@GaneshKadole wrote:

Hi @pmk3,

Try offset option and use expression for distance,arc length etc for respective option(s).


Thanks for the suggestion. I tried this but it behaved the same as before.  I think this tool just isn't designed to be used the way I want.  I guess I'll submit an ER to Siemens.  At least I have a work around for now.

Re: Control position of a point object with an expression?

Builder
Builder

Thanks for the replies.  I came up with a simlar work around to what DickBaardse showed. In my case there was already a line between the two bounding curves.  So I added the perpendicular reference at one end  of that line, which allows the angled line to linearly position the middle curve (i.e. changing u from 0 to 1 moves the middle curve from the lower curve to the upper). And it does it without having to know the actual distance between the two curves. So it essentially does what the "Between Two Points" does, but parametrically.  

 

Work around for point between two curves driven by expression.png