dear all,
i have a diffucelt question (trying to motivate the experts here)
i want to polish an oval marble sink.
i calculated the movement, by splitting the edge of the oval sink and mid point into two arc.
then i moving along the angle from 0-360.
which works for me.
can be view the process here : https://www.youtube.com/watch?v=qpobzqI7tSQ
but i need now to deal with the a,b,c that will be in offset of 20deg to the surface i going:
an example of what i need to achived is here : https://www.youtube.com/watch?v=P76tcOgVqjs
this was done by teaching the points and moving along them.
i want to do all the math with calculated points.
tried to figure it out with geometric opreator, with no success
the code as follow:
DEF OvalSink(SinkBot:IN)
DECL E6POS SinkBot
DECL POS OriCorrSink, OriCorrSinkMid
;for oval sink calc
DECL REAL pi ;pi value
DECL REAL t ;radius
DECL REAL calcX ;calculated x
DECL REAL calcY ;calculated y
DECL REAL calcXmid ;calculated middle x point
DECL REAL calcYmid ;calculated middle y point
DECL REAL a ;a in elipse the width of sink
DECL REAL b ;b in elipse the height of sink
DECL INT maxOri ;maximum orientation of the tool in the bowl
t=0 ; zero degree
pi=3.1415 ;pi value
a=100 ;sink width
b=70 ;sink hight
OriCorrSink={X 0, Y 0, Z 0, A 0, B 0, C 0}
OriCorrSinkMid={X 0, Y 0, Z 0, A 0, B 0, C 0}
maxOri = 40
$BASE=BASE_DATA[3]
$TOOL=TOOL_DATA[3]
;go to center sink will be end point
EndPoint = SinkBot ;<== getting the value from main program
PTP EndPoint ; move to middle of sink
FOR counter = 0 TO 360 STEP 18
;calculate x,y for start point
t=counter
calcX = a*(cos(t))
calcY = b*(sin(t))
OriCorrSink.C = maxOri*(cos(t))
OriCorrSink.B = maxOri*(cos(t))
calcXmid = (a/2)*(cos(t))
calcYmid = (a/2)*(sin(t))
OriCorrSinkMid.C = (maxOri/2)*(cos(t))
OriCorrSinkMid.B = (maxOri/2)*(cos(t))
StartPoint = EndPoint
StartPoint.X = StartPoint.X + calcX
StartPoint.Y = StartPoint.Y + calcY
StartPoint = StartPoint:OriCorrSink
StartPoint.Z = StartPoint.Z - 150 ;go down , sink depth
midPoint.X = EndPoint.X + calcXmid
midPoint.Y = EndPoint.Y + calcYmid
midPoint = midPoint:OriCorrSinkMid
;move to sink elipse point
CIRC midPoint,StartPoint
;move back to center
CIRC midPoint,EndPoint
StartPoint = $NULLFRAME
ENDFOR
PTP XHOME
END
Display More
but i getting:
midpoint.z a b c value invalid
when i try to look the midpoint values
i getting only x and y values
what i doing wrong?