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:

Compaq007

Verified Members
  • Posts

    61
  • Joined

  • Last visited

Recent Profile Visitors

1,032 profile views

Compaq007's Achievements

Newbie

Newbie (1/14)

  • Reacting Well Rare
  • First Post Rare
  • Collaborator Rare
  • Week One Done
  • One Month Later

Recent Badges

7

Reputation

  1. I thought that for any educational versions of Mastercam, you can't post or export anything. Is that right?
  2. I experienced it since June, 2023 and been waiting for someone to chime in about View Sheets Groups. It is a great idea, I hope they work it out for the next MasterCAM release.
  3. Another useful resource is eaprentice.net. At least it was for me. I learned about MP postprocessing language. Not sure if they are still in business anymore. But it was an enlightening course and it made me more confident at my job.
  4. Wonder about make me wonder if that was the intended functionality.
  5. I'll be darn! you are right, your code works. Awesome! Thanks for the example code, it would have taken me a gazillion hours to figure the Matrix part of it.
  6. I see now: typing the directives at the beginning saves me from over typing. go from this : Mastercam.Math.Point3 D ptInView1 = Mastercam.IO.ViewManager.ConvertToWorldCoordinates(pt, cPlane.ViewID); to this : Point3 D ptInView1 = ViewManager.ConvertToWorldCoordinates(pt, cPlane.ViewID); thanks.
  7. I hope that the images above make any sense in my explanation. Tried to upload them at the very beginning for clarity but I had some trouble in doing so. Like I said before, I lack experience at this, and I trying my best. Just wondering if anyone has experience the same issue and can point me in the right direction. Here is a snippet of the code I am using ; public static class PointTransformXY { //bool GetPointFromUser(bool display, string prompt, ref Mastercam.Math.Point3D pt) public static Mastercam.Math.Point3D GetPointFromUser(bool display, string prompt) { var pt = new Mastercam.Math.Point3D(); Mastercam.Database.MCView cPlane = Mastercam.IO.ViewManager.CPlane; Array allViews = Mastercam.IO.ViewManager.GetAllViews(true); var strTargetPlane = cPlane.ViewName; // Ask the user to select a single POINT geometry item. bool result = Mastercam.IO.SelectionManager.AskForPoint(prompt, Mastercam.IO.Types.PointMask.Null, ref pt); if (result) { string dataWorld = string.Format("X: {0}\nY: {1}\nZ: {2}", pt.x, pt.y, pt.z); MessageBox.Show(dataWorld, "Point (World)", MessageBoxButtons.OK, MessageBoxIcon.Information); } // Convert the World coordinates of the point to a specific View# (in this case the CPlane) //Mastercam.Math.Point3D ptInView = Mastercam.IO.ViewManager.ConvertToWorldCoordinates(pt, cPlane.ViewNumber); //Mastercam.Math.Point3D ptInView1 = Mastercam.IO.ViewManager.ConvertToViewCoordinates(ptInView, cPlane.ViewNumber); Mastercam.Math.Point3D ptInView1 = Mastercam.IO.ViewManager.ConvertToWorldCoordinates(pt, cPlane.ViewID); Mastercam.Math.Point3D ptInView2 = Mastercam.IO.ViewManager.ConvertToWorldCoordinates(pt, 2); Mastercam.Math.Point3D ptInView3 = Mastercam.IO.ViewManager.ConvertToWorldCoordinates(pt, 3); Mastercam.Math.Point3D ptInView4 = Mastercam.IO.ViewManager.ConvertToWorldCoordinates(pt, 4); Mastercam.Math.Point3D ptInView5 = Mastercam.IO.ViewManager.ConvertToWorldCoordinates(pt, 5); Mastercam.Math.Point3D ptInView6 = Mastercam.IO.ViewManager.ConvertToWorldCoordinates(pt, 6); Mastercam.Math.Point3D ptInView7 = Mastercam.IO.ViewManager.ConvertToWorldCoordinates(pt, 7); // Mastercam.Math.Point3D ptInView = Mastercam.IO.ViewManager.ConvertToViewCoordinates(pt); // Convert the World coordinates of the point to the current CPlane View Mastercam.Math.Point3D ptInView11 = Mastercam.IO.ViewManager.ConvertToViewCoordinates(ptInView1, cPlane.ViewID); Mastercam.Math.Point3D ptInView22 = Mastercam.IO.ViewManager.ConvertToViewCoordinates(pt, 2); Mastercam.Math.Point3D ptInView33 = Mastercam.IO.ViewManager.ConvertToViewCoordinates(pt, 3); Mastercam.Math.Point3D ptInView44 = Mastercam.IO.ViewManager.ConvertToViewCoordinates(pt, 4); Mastercam.Math.Point3D ptInView55 = Mastercam.IO.ViewManager.ConvertToViewCoordinates(pt, 5); Mastercam.Math.Point3D ptInView66 = Mastercam.IO.ViewManager.ConvertToViewCoordinates(pt, 6); Mastercam.Math.Point3D ptInView77 = Mastercam.IO.ViewManager.ConvertToViewCoordinates(pt, 7); if (display) { string dataView = string.Format("View#: {0}\nName: {1}\nX: {2}\nY: {3}\nZ: {4}", cPlane.ViewNumber, cPlane.ViewName, ptInView77.x, ptInView77.y, ptInView77.z); MessageBox.Show(dataView, "Point (View)", MessageBoxButtons.OK, MessageBoxIcon.Information); } return pt; } } Cheers!
  8. The next slide, is the debug mode and it shows the results at runtime. You can see the non-standard view 53 (2a_FRONT_PLANE) is being used for world transformation of the point coordinates. But instead looks like it is transforming from World coordinates to the standard MasterCAM's view 2 (Front). The actual point coordinate values are circled above Line 32. At line 44 the values are converted to view coordinates using the values from ptInView1 in refence to view 53. The results should be X1.1,Y-2.3,Z-4.7, instead we have X1.1,y2.2Z-3.3. as sown at line 42.
  9. The custom view is enabled and the point coordinates are : X1.1,Y-2.3Z-4.7 in reference to the 2a_FRONT_PLANE (X0.0,Y-1.0,Z2.5 origin)
  10. You can see that the Top view is enabled and the point data is X1.1,Y2.2,Z-3.3.
  11. I am trying to add images for clarity. Getting close but no cigar!
  12. I am working on this Chook for Mastercam 2021, I don't have a lot of experience, but what I'm trying to do is convert the X Y Z of a single-point from a given view to another view and output that information to a text file. I am using the viewManager.IO.ConvertToWorldCoordinates and viewManager.IO.ConvertToWorldCoordinates . One thing I notice about this functionality is that it does don't work for non-standard (custom) Mastercam views. It always defaults to one of the standard Views. So, it outputs the dimensions referencing the standard View and not the custom View. I ran a few tests and came up empty.
  13. Does anyone know if eaprentice.net move their website or was it taken down?.. I am trying to acess like I normally do but can't find it.

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