algorithmic modeling for Rhino
I am trying to figure out a system to derive the angle for use with a cnc tangential knife through GH as the knife follows a curve.
Dividing the curve into many points is a start, then finding the Angle of rotation from Point to Point is the Goal.
Google has led me to a formula that seems appropriate, but I am unsure as to the best way to implement it in GH.
Here is where I am having problems....
Thanks for any input!
Tags:
Still trying to sort out the better approach to my problem. Does anybody know how or if I can get the Arcsine part of the equation to work within the variable expression component?
Here is a screen shot of another approach that just uses vector2pt and vector angle to determine the degree of knife rotation... It may be lame right now, but it is at least getting me some of the correct angles.
hey Chris,
Thanks for the feedback. I just got your example need to take some time to go through it slowly.
I had to go here a http://en.wikipedia.org/wiki/Cross_product
to start learning about cross products... I must of been sleeping during high school and college algebra... in fact my problem with this tangential knife control makes me question if I was awake for any of my math classes.
Here is another screenshot of the curve example. i went ahead and drew blue lines at every point parallel to the X axis that could be said to be 0 degree rotation... then I drew white lines
toward the next point on the line just for rough visualization and measured the Angles needed to turn the knife toward the next point.
Does this make sense?
So why are your numbers so different? You are not displaying radians ( i dont' think so).
I need a crash course on vectors, because I don't know why you are using the cross product.
Thanks for your help already... and any further insight you may have.
Above you ask for the "Angle of rotation from Point to Point" so that's what I gave you (at least as far as I understand the use of the language). In other words I give you the incremental angle of change to get to the next position of the knife. From the drawing above it looks like what you want is the angle of rotation relative to a fixed reference angle and always taken in the positive direction. You'll have to clarify this for me. The angles are in degrees. I was assuming that your cnc software would want degrees for input and that the motion was incremental not absolute. Again you need to clarify what kind of output you want. It's necessary to use the cross product to get the direction of rotation. The vector angle component always returns a positive angle but the motion of the knife oscillates between CW and CCW movements as it goes around the curve. The cross product allows you to identify the change of direction. I won't get to look at this again until later tonight.
Chris
Looking at your drawing above again your white lines aren't tangential at the points indicated. If anything they might represent the average tangent line between any two adjacent points. Clarification required...
Chris
Chris,
Thank you so much for your help... I now understand what you created... and why you did. My description was far from clear. Sorry about that. Your are right when you describe what you think I might really want to do.
"From the drawing above it looks like what you want is the angle of rotation relative to a fixed reference angle and always taken in the positive direction."
Yes!! As far as your last post... you are right the white lines don't represent the direction of the curve that well... they only deal with points on the curve,
and my example was a "low Resolution" version of what I would probably use once the definition is working.
Here is a visualI think this method of determining the angle of rotation of the knife will ultimately work... I think this is considered "point to point" milling as opposed to circular interpolation. So more points = smaller "flats" on the physically milled object.
Does this make sense?
Hopefully I am doing better at explaining things here. I really value your help.
I can't get back to this till late tonight... I will try to modify what you have given me to fit my needs. Your explanation of why you used the cross product was very clear. Thank you.
What kind of cnc machine is this? Can you provide a link to illustrate one? "Point to point" milling (linear interpolation) and circular interpolation differ only in the type of input. The machine still has to make a series of steps in x and y separately. Smoothness of the curve is determined by the number of x-y positions assumed along the path. I would think that the way you're approaching this would cause the knife at certain points to crash into the part but keep in mind that I have no idea of how your machine works.
Chris
Chris, Thank you so much for the Revised definition. It is working exactly how I wanted it to.
I have one question:
I don't really understand the syntax/logic behind the last variable Expression component.
If(x=-1,A,R)
Here is my guess:
you have used the cross product as described in earlier posts to determine the direction of rotation... so if the direction is counter clockwise x=-1 and Clockwise x=1... then somehow, this expression causes either the values from the Clockwise or Counterclockwise angles to be used.... I think this is correct, but my question is more about the logic of the expression itself.
As far as the machine goes... I am using a 3 axis milling machine that uses Mach3 as the gcode interpreter. I am building the Tangential knife hardware on my own. It will probably be used for a variety of things.. the most conventional of which would be a tangential knife, but I have been using the mill with additive processes like spraying and extruding. This last part is where this GH definition could be fun and useful... the knife system needs to always be in line with the direction of travel, but for an additive toolhead... having the rotation of the toolhead vary from the direction of travel could be nice. What you have helped me with is the capability of writing the gcode with the angle of rotation of the toolhead to stay in line with the direction of travel.
this is probably way more than you are interested in hearing... so if your question is more about Mach3 I could explain more how it works.
I has an integrated tangential knife command that figures out the same angles that you helped me with... but it does this as it runs the gcode... I want to have the ability control the tangential Axis in ways beyond what Mach3 is made for.
I will post some pictures as the project comes together more
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by