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:

Trouble getting Depth Of Cut in NET Hook


Recommended Posts

Hello,

 

I am trying to get DEPTH of Cut and Width of cut in my .net Hook.

 

i am using this to get selected operations:

Dim OpList() As Mastercam.Database.Operation = Mastercam.Support.SearchManager.GetOperations(True)

For now i only care about ONE operation.

 

Getting RPM and Feedrate values is easy.       

But so far i am having trouble getting Cut parameters such as DEPTH, WIDTH, Ramp angle for milling and Peck for Drilling,

 

Would be glad for any help.

Thanks!

Link to comment
Share on other sites

Okay never mind.

I was too lazy to dig any deeper

Turns out i need to trycast according to the current operation type like such:

    Select Case op.Type
                        Case Mastercam.Database.Types.OperationType.Contour
                            Dim oo As Mastercam.Operations.ContourOperation = TryCast(Mastercam.Support.SearchManager.GetOperation(op.GetOperationID), Mastercam.Operations.ContourOperation)
                            cut.DOC = oo.DepthCuts.MaxRoughStep

                        Case Mastercam.Database.Types.OperationType.Pocket
                            Dim oo As Mastercam.Operations.PocketOperation = TryCast(Mastercam.Support.SearchManager.GetOperation(op.GetOperationID), Mastercam.Operations.PocketOperation)
                            cut.DOC = oo.DepthCuts.MaxRoughStep

                        Case Mastercam.Database.Types.OperationType.Drill

                    End Select

Hope this helps someone else who might need it.

 

Cheers!

  • Like 1
Link to comment
Share on other sites

Ok

Another, however, related problem:

 

Can not find a way to get Width of Cut and Depth of cut from HSM operations.

I am using this code

 Case 134

                            Dim oo As Mastercam.Operations.ChainBasedOperation = TryCast(Mastercam.Support.SearchManager.GetOperation(op.GetOperationID), Mastercam.Operations.ChainBasedOperation)

But that type does not contain any DOC or WOC values.....

 

Is it even possible?

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...