Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

math help


petro7
 Share

Recommended Posts

I have to draw a cam, from 0 to 90 the radius changes approx. .015 per degree. so my question is can I draw a line polar and have it reduce by .015 each time without having to type it in each time? the constant is actually seven decimal places to reduce accumulation error i.e(.0153312). is there a way to store a constant in the math function of mc.

 

thanks

Link to comment
Share on other sites

MP.DLL is the postprocessor executive. The -.PST file is only a configuration file. MP.DLL reads the -.PST file first to figure out how to process the -.NCI file. We say that the postprocessor (the -.PST file) is written in the MP language. The cam programs make 'good reading', as they show the computational power available in MP.

Link to comment
Share on other sites

John has come up with some really nice programs that calculate Cam profiles as a set of Ascii data points. At some point it would be great if we could update some of these for Mastercam X.

 

The advantage of using V9 with these posts is that you can run the post processor without having operations or geometry present in the MC9 file. The post receives a text file with your angle/lift data and outputs an Ascii file with the points.

 

When I start to look at the math functions that John is using, my eyes start to glaze over. He is doing some really trick stuff with the MP language...

Link to comment
Share on other sites

Colin, you hit on why I prefer V9 for the purely computational programs -- it's simpler and less complicated for these kinds of programs.

For anybody that's trying to understand this thread, Colin is referring to the vector math library that's built into MP. These routines were, in turn, borrowed from Mastercam, and are fundamental to any CAD/CAM system. Oddly enough, they are not standard functions in most 'high level' languages.

Link to comment
Share on other sites
  • 5 months later...

Bryan,

 

I doubt these will be updated for X, but I could be wrong. The trick is getting the pst file to execute without having any operations...

 

John's equations and sample posts are just PST files, so theoretically, you could just update them and try to get them to run in the newer versions...

 

It might be fun to try one of these days...

Link to comment
Share on other sites

I think this fplot will do what you want

 

step_var1 = t

step_size1 = 10

lower_limit1 = 0

upper_limit1 = 90

geometry = nurbs

origin = 0,0,0

x =(2-(.01*t))*cos(t)

y =(2-(.01*t))*sin(t)

 

for your application change the 2 to your radius

change the step size to 1

change the .01 to the amount each line shortens

make sure to check that the variables in the

fplot dialog box are set to match those in your equation

 

this example above assumes going from 0 to 90 degreesin 10 degree increments

with each line shortening by .01

it will plot a nurbs curve

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...