my CAM simulator calculation problem ...

Everything related to 3D programming
marc_256
Addict
Addict
Posts: 842
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

my CAM simulator calculation problem ...

Post by marc_256 »

Hello,


My brain stopped working, I'm to tiered.
I don't see it anymore,
So, I need some math (guru) help (again) ...

For my CAM simulator i want to draw a part clamping system [1] on the CNC table. (see Image2)

I placed the 2 distance part [2+3] (see image)
I placed the user part [4] to be tooled.
Till now all ok ...

But then the clamp [5] need moving towards the user part with turning the bold [6] for clamping the user part.
How it works, when turning the bold (right) the distance shorten. (<65.19)
When I turn to the left, it widens the distance.(>65.19)

For the simulation, I need to calculate the distance in the X-axis when I turn the (Red) bold.
The red colored values are fixed distances.

Data bold:
Diameter 8 mm
Step/turn = M8 = 1.25 mm per 360 deg

Height distance center axis with rotating bold part = 55 mm fixed
Height of the axis to table = 25 mm fixed


I know that:
- The angle = ATan2 (X, Y)
- The distance 35.0 = Cos (angle) * 65.19 mm


What I need is the motion distance on de X-axis while turning the bold ...

It must be so simple, but
I'm even to tiered to think clearly ...

Thanks,
marc


Image

Image

Image
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
idle
Always Here
Always Here
Posts: 5896
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: my CAM simulator calculation problem ...

Post by idle »

Is this what you want?

Code: Select all

y.f = 55 
x.f = 35 
h.f = Sqr(x*x + y*y) 
h-1.2 
Debug 55-Sqr((h*h) - (x*x))
Debug 35-Sqr((h*h) - (y*y))
one should be right
marc_256
Addict
Addict
Posts: 842
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: my CAM simulator calculation problem ...

Post by marc_256 »

Hi idle,

thanks for your help,
but your x.f = 35 is the variable distance i need,
so when the 65.19 changes, the 35.0 mm changes.





I had a few hours sleep ...
So, we can go to work again.

How I gone find the solution:


The simplified schematics:

Code: Select all

            A
        |---------/ Beta
        |        /
        |       /
        |      /
      B |     / C
        |    /
        |   /
        |  /
        | /
        |/
      Alpha
-------------------------------------------------------------------------------
1) THE KNOWED DATA:
-------------------------------------------------------------------------------
1a) Fixed data

- B = 55 mm
- corner AB = 90 deg

1b) Variable data

- C = 65.19 (70...60 mm)


-------------------------------------------------------------------------------
2) THE CALCULATIONS:
-------------------------------------------------------------------------------
- What we need = A

- Alpha = Cos-1 (B / C)
= Cos-1 (55 / 65.19)
= 32.46839 deg

- So, A = Cos (90.0 - Alpha) * C
A = Cos (90.0 - 32.46839) * 65.19
A = Cos (57.53160) * 65.19
A = 35.00 mm


-------------------------------------------------------------------------------
3) THE ANIMATION CALCULATIONS:
-------------------------------------------------------------------------------
If we turn the bold 1 full turn right = 1.25 mm

- Alpha = Cos-1 (B / C)
= Cos-1 (55 / (65.19-1.25)) ; 1 full turn right
= Cos-1 (55 / (63.94)
= 30.66304 deg

- So, A = Cos (90.0 - Alpha) * C
A = Cos (90.0 - 30.66304) * 63.94
A = Cos (59.33696) * 63.94
A = 32.6086 mm


-------------------------------------------------------------------------------
4) FOR THE ANIMATION PER DEGREE OF BOLD TURN:
-------------------------------------------------------------------------------
- 360.0 deg = (35.00 - 32.6086)
= 2.391356 mm per full bold turn

- 1.0 deg = 2.391356 mm / 360.0 deg
= 0.006642658 mm per one deg bold turn



Still sleepy greetings,
marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Post Reply