Finding Tangents to a Curve
 1-18  19-38  39-58  59-61

Previous
Next
 From:  Michael Gibson
11632.19 In reply to 11632.17 
Hi Brian,

re:
> The center points are created. var cpoint = curves.item( i).conicFrame.origin;
>
> I am wondering if cpoint.x, and cpoint.y, and curves.item(i).radius will yield the (x,y,0) coordinates, and the radius of each circle???
> (In MoI5 beta???)

cpoint.x and cpoint.y will have the x,y coordinates of the circle's center point, and curves.item(i).conicRadius will have the radius value.


> Or is var x = cp.distancex( cpoint).toFixed( digits);

.toFixed() is for converting a numeric value into a string value.

- 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.20 In reply to 11632.19 
Thank you very much Michael.

I reviewed the 1983 geometry book, and adjusted previous post :-)

- 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:  Michael Gibson
11632.21 In reply to 11632.18 
Hi Brian,

re:
> How to convert ax + by + c = 0 into a MoI line segment???

See page 10 "Conversion from Implicit to Parametric Form".

When you have it in parametric form you can get 2 points on the line by evaluating the parametric form at t = 0 and t = 1.

Slope intercept form is usually avoided because it has difficulty with vertical lines.


> I think r + ve means radius with a positive value. (ve meaning value???)
> On second thought, I think that r + ve, means use the positive version of radius. (ve meaning version)

I think the ve is "vector expression".

Anyway the thing that's really good about this book is that usually you don't have to translate from math notation into code, it also gives code.

So in this case "Finding a tangent may be coded:" at the bottom of page 34.

- 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.22 In reply to 11632.21 
Actually I think the "ve" comes from some math notation when illustrating +/- values.

"+ve" is shorthand for "positive". (label shown on the + branch of a +/- value)

"-ve" is shorthand for "negative". (label shown on the - branch of a +/- value)

In this book I don't think you'll see any "ve" in the code section, just as an abbreviation for "positive" and "negative" on illustrations.

- 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.23 In reply to 11632.22 
I'll agree with you on the Pos/Neg concept. (Never seen this notation before, and ve is not defined in the text, AFAIK.) I'll have to study the 1983 book more...
The book does mention optical quality resolution being "poor" (1983) (Readability). The book states that lower case and upper case identify the same "parameters", for readability.
Putting ve after the + or - makes the symbols stand out...


Attached is a script to calculate the Homothetic point for two circular arcs or circles, in the XZ plane, Front view. It does not work in other views.
y and z get mixed up.
I was unable to get cplane to make it work on other views. It is confusing. I dabbled with cplane, without success.

Time for me to move on, as this is Larry's project :-)
I guess the Homothetic point could be used with the MoI5 beta method mentioned earlier by yourself, to draw inner half tangent lines...

- Brian

It does not matter in which order the two "circles" are selected.

EDITED: 19 Jan by BEMFARMER

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:  Michael Gibson
11632.24 In reply to 11632.23 
  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:  AlexPolo
11632.25 
Hi All,

I have also been playing with tangents to get the CNC Pipe bender working I have found that is some instances where freestyle organic curve needs to be converted I do a manual divide of the curve in roughly equal segments which I then manually drag constant tangents which gives me a pretty good result but I have found in some instances that tube bending software does not like these conversions. If import the curve into solidworks there is an option to lock endpoints to tangent when I do this the curves work and if I overlay the curves MOI vs SOLIDWORKS there are slight differences. I have included a sample file with both sets overlayed and the scroll file converted the manual way with endpoint locked to tangent. Someway of MOI being able two adjust to curves against each into a tangent position would be great.









  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.26 In reply to 11632.9 
Hi Larry,
not sure if this is what you are trying to achieve but I did this trial with the nodeditor.
Your drawing does not show the top circle in the middle of the 2 bottom circles ?
My method starts with the bend angle required and works out the movement required but
the top circle is in the middle so may not be what you require.
Anyway if its of any use let me know and I will finish it.
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.27 
You guys are way faster than me! ;-} I'm following along and slowly digesting.

I'd gotten started with Brian's ideas & then got diverted with the book Michael referenced. After studying the book & muddling about with the conversions between the forms of equations, I thought that Brian's suggestion on finding the homothetic centers and using getTangentsToPoint() were much easier to work with. At this point I have the rudiments working, but not really something worth posting yet. This conversation has been very helpful, thank you!

Barry, I'd thought of the NodeEditor, but have never done anything with it. Whether your node solves my puzzle or not, I would certainly encourage you to finish it as I'm sure there will be many who may appreciate that. I'm impressed at how quickly you got to the essence of what I was describing earlier! In this case my desire was to be able to play with the sizes and positions of the die elements to achieve the effect I was after. Maybe that is doable in the NodeEditor, but for my pea-brain, doing it with a script was easier to conceive.

Alex, you're closer to the realm I'm thinking of (real world bending of metal), but much more advanced given use of a CNC bender. Your work is just remarkable! I work on a smaller scale & while I have both Hossfeld and DiAcro manual benders, I had an idea for a die to do a compound bend similar to an S-hook in a single operation. So I designed the die in MoI and then built it. The first iteration of the design didn't do quite what I wanted, but after a revision and remaking some of the parts I'm pretty close to what I want. This exercise got me to thinking that a simplified bending script would speed up the design process, hence my noodling. For reference, here is an illustration the die in use; designed to bend a bunch of carpentry nails for use in a sculpture.



--Larry
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:  Barry-H
11632.28 In reply to 11632.27 
Hi Larry,
attached nod file for you to try.
Have added a material thickness or diameter and the bend is based on the centre line.
Cheers
Barry
Updated to work with nodeditor plus.(only)

EDITED: 19 Jan by BARRY-H

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.29 In reply to 11632.28 
Hi Barry,

Remarkable! But when I opened the macro, oh my! Have never used visual programming tools, so this is totally new, but your example is much appreciated.

Here I go, sticking my foot in something I clearly do not understand... It seems like the centerline ought to be tangent to the top roller's larger radius, like you've done on the bottom roller. Or maybe you're just taunting me to figure it out and fix it myself... I suspect that when you added the thickness/diameter, you updated the bottom rollers but not the top. c'mon Larry, spot the difference!

--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.30 In reply to 11632.29 
Hi Larry,
does the attached photo help or are your results different.
The bottom rollers are one side of material and the top the other.
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.31 In reply to 11632.30 
Hi Barry,

Your results look correct, however mine are different (using NodeEditor Plus in case that matters):



In case I had messed something up, I just quit & relaunched however the result is the same as shown above.

--Larry

EDITED: 19 Jan by FAHNOE

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:  Barry-H
11632.32 In reply to 11632.31 
Hi Larry,
found the issue I created the nod in the original nodeditor and your results come from using the new nodeditor plus.
Have updated nod file to work with the new nodeditor plus see original post.

Cheers
Barry

EDITED: 19 Jan by BARRY-H

  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.33 
There are two orange nodes in the bend2 Bend Macro, offset and output.
Works well otherwise.

Now we need a bend2 icon for the NodeEditorPlus library.
Some sort of .png file.

- 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:  bemfarmer
11632.34 
I am unable to find documentation for crv.getTangentsToPoint( pt ), nor for crv.getTangentsToDir( dir ), although the second (method) has usage examples in scripts.
The forum was searched.
The MoI Wiki was searched, including the V4 and V5Beta pages.

These are V5 (methods or properties)?

I wonder if code blocks are searched?

Ctrl+F can be used to search the API and the Wiki.
In the API, highlight, right+click, and print seems to print selected text pretty well.

It looks like most of the V5 methods/properties are included in the API.


Petr's site seems to be unavailable?

- Brian

Edit: Note, the latest MoI v5 API DOES include documentation on these two crv.getTangents... methods!!!

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.35 In reply to 11632.34 
Hi Brian,

re:
> I am unable to find documentation for crv.getTangentsToPoint( pt ), nor for crv.getTangentsToDir( dir ),

Sorry it looks like they escaped documentation.

.getTangentsToPoint( pt ) and .getTangentsToDir( dir ) functions on curves and curve segments return a
list of a curve parameters where the curve is tangent to a given point or direction. In v5.

- 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.36 In reply to 11632.35 
Thank you Michael

Today I learned about Browsing the Wiki and Resources pages, and about searching, and Search.
- B
  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.37 In reply to 11632.35 
Brian made corrections to post 11632.34. MoI v5 API does have those two methods documented.
PEER had made the additions some months ago.
I do not know how or where they learned of the new methods.
I had an old copy on both computers.

- Brian

For closed curves, the GetTangents script( crv, dir ) will place an extra tangent point at the end of the curve (if it exists there).
I guess I can add code for if crv.isClosed, reduce params.length by 1, and not do the extra horizontal or vertical tangent point (if it exists there), for the end of the curve.(?)
To be tried later...
I need to learn about how this curve parameter thing works...Are there any recommended (NURBS?) references or forum information??

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.38 In reply to 11632.37 
Hi Brian,

re:
> I need to learn about how this curve parameter thing works...Are there any recommended (NURBS?) references
> or forum information??

NURBS references:
https://preserve.mactech.com/articles/develop/issue_25/schneider.html
https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline
https://www.rhino3d.com/features/nurbs/

A curve parameter is a numeric value that defines a location along the curve, ranging from the start of the curve being crv.domainMin to the end of the curve being crv.domainMax.

You can generate a cartesian x,y,z point value at a curve parameter by using crv.evaluatePoint( t ), or other information at that position with crv.evaluateTangent( t ), crv.evaluateCurvature( t ) or crv.evaluateDerivatives( t ).

- 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
 

Reply to All Reply to All

 

 
Show messages:  1-18  19-38  39-58  59-61