Finding Tangents to a Curve
 1-11  12-31  32-51  52-61

Previous
Next
 From:  bemfarmer
11632.52 In reply to 11632.51 
Thank you Michael.

If a programmer wanted to utilize the new list of numbers in order, from start to end,
is the list already in order, corresponding to: from curve start to curve end?
Or is it necessary to do any ".sort BySelectionOrder()," which is sometimes done when selecting geometry in other code ?

So the code line:
var pt = crv.evaluatePoint( params.item( i ) );
transforms (evaluates) each params number to locate/create a new RAW point on the curve, ( with coordinates in the current cplane ).
A line drawn from such a (tan) point, to the initial External point, will be tangent to the starting curve, at said new point location on the curve.

Sorry to be wordy, but it helps me to understand :-)

- Brian

I just ordered a used copy of the programmers book also.

On the API I also see the curve methods:

equallySpacedPoints? (No documentation in API)

getArcLengthParam Would this method enable a programmer to find the parameter where the ArcLength of the curve is some specific value? And evaluate the point there?

EDITED: 21 Jan by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11632.53 In reply to 11632.52 
Hi Brian,

re:
> If a programmer wanted to utilize the new list of numbers in order, from start to end,
> is the list already in order, corresponding to: from curve start to curve end?

Yes the returned list of parameters is sorted in ascending order.


> So the code line:
> var pt = crv.evaluatePoint( params.item( i ) );
> transforms (evaluates) each params number to locate/create a new RAW point on
> the curve, ( with coordinates in the current cplane ).

The resulting point will be in world coordinates, not necessarily in the current cplane.

If you want coordinates relative to the current cplane you would need to transform it.


> A line drawn from such a (tan) point, to the initial External point, will be tangent to
> the starting curve, at said new point location on the curve.

Yup, like this:





- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11632.54 In reply to 11632.52 
Hi Brian,

re:
> equallySpacedPoints? (No documentation in API)

crv.equallySpacedPoints( NumSegments ); - takes one argument for number of segments, returns a list of NumSegments+1 parameter values to produce segments of equal arc lengths.


> getArcLengthParam Would this method enable a programmer to find the parameter
> where the ArcLength of the curve is some specific value? And evaluate the point there?

crv.getArcLengthParam( NormalizedDistance ); - takes one argument of either a number or sorted array of numbers with normalized distance values between 0 and 1 and returns curve parameter values for position at that arc length along the curve.
So for example crv.getArcLengthParam( 0.5 ) will return the parameter value at half the distance along the curve.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
11632.55 In reply to 11632.54 
Hi Michael.
Your documentation is excellent. IMHO

Maybe PEER will update the MoI v5 API?

-Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Larry Fahnoe (FAHNOE)
11632.56 In reply to 11632.50 
Hi Barry,

The Bend Tool node looks to be very flexible & quite handy, thank you!

Was the material thickness/diameter problematic? I thought it was a helpful feature.

--Larry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
11632.57 In reply to 11632.56 
Hi Larry,
I will add that option.
Barry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
11632.58 In reply to 11632.56 
Hi Larry,
attached new nod file with material thickness plus solid or curve option switch added.
Also added inclusion angle and error warnings if rollers are to close.
The top roller is limited to stop an error if moved to high.
Cheers
Barry
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Larry Fahnoe (FAHNOE)
11632.59 In reply to 11632.58 
Hi Barry,

WOW, you're really cooking with gas! ;-}

Here's some more background on what I was initially setting out to accomplish. Again, this is intended to roughly simulate bending metal in the real world. In designing a bend one of the key things to keep track of is how the material deforms as a result of the bend. You've got the centerline and thickness/diameter modeled, but what is needed to is to adjust the length of the straight portions of the centerline as the bend progresses & this is mainly done by subtracting the length of the arc that forms on the bottom of the top die. The change from Bend Tool to Bend Tool Plus made the centerline two independent "arms" if you will, but to approximate reality, it ought to be a single line of a fixed length. Maybe I've already described this well enough, but to put it another way: the length of each straight arm is reduced by a portion of the arc's length. Since the top die does not need to be in the center, the portion of the arc is not half but varies depending on which bottom die is closer.

I can't get my head wrapped around how to create nodes, but my hat is off to you for doing so. Because I enjoy making things and for my own education, I will continue to pursue this as a MoI script, but I strongly suspect your new node will be quite handy for those of us who fool with bending things. Well done Sir!

--Larry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
11632.60 In reply to 11632.59 
Hi Larry,
try this version.
Set the bar datum to the left and bar length.
When bent the bar length should be maintained and a curve length value is used as a check.
Cheers
Barry
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Larry Fahnoe (FAHNOE)
11632.61 In reply to 11632.60 
Hi Barry,

You nailed it! Now you're going to be guilty of encouraging a bunch of folks to try their hand at bending some metal.

--Larry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-11  12-31  32-51  52-61