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:

Sebcloutier

Verified Members
  • Posts

    31
  • Joined

  • Last visited

Posts posted by Sebcloutier

  1.  

    Seb,

     

    Give this a try, I haven't been able to test as I am in the middle of something else but it might help.

                opname = "FC 1/8-3DEG";
                var op3 = this.contour(opname);
                var count3 = this.contourchain(op3, depthdiff, true, mindepth, ncname, string.Empty, uchain);
    
                foreach (var nchain in uchain)
                {
                    nchain.Direction = ChainDirectionType.Clockwise;
                }
    
                op3.CutterComp = CutterCompType.CutterCompRight;
    
                ChainManager.StartChainAtLongest(uchain);
                ChainManager.SortChainsByArea(uchain, true); // Flip true/false accordingly
    
                op3.Commit();
                op3.Regenerate();
    
                this.mm4deg5.Focus();
    
    

    Yes it'S works thanks

  2. here is my code

      private void mm3deg3_Click(object sender, EventArgs e)
            {
                {
                    //1/8-3DEG
    
                    Chain[] Uchain = ChainManager.GetMultipleChains("Selection du parcours a machiné", true);
                    Chain rchain;
                 
                   
    
                    string ncname = "";
                    string opname = "1/8-3DEG-1";
                    double depthdiff;
                    double mindepth;
                    bool result;
                    depthdiff = System.Convert.ToDouble(label2.Text);
                    mindepth = System.Convert.ToDouble(label1.Text);
                    {
    
                        Mastercam.Operations.ContourOperation op = contour(opname);
                        int count = contourchain(op, depthdiff, false, mindepth, ncname, "", Uchain);
                        if (count > 0)
                        {
                            result = op.Regenerate();
                           
                        }
                    }
                    opname = "1/8-3DEG-2";
                    Mastercam.Operations.ContourOperation op2 = contour(opname);
                    int count2 = contourchain(op2, depthdiff, true, mindepth, ncname, "", Uchain);
                    if (count2 > 0)
                    {
                        result = op2.Regenerate();
    
                    }
                    opname = "FC 1/8-3DEG";
                   
                   
                    Mastercam.Operations.ContourOperation op3 = contour(opname);
                    int count3 = contourchain(op3, depthdiff, true, mindepth, ncname, "", Uchain);
                   
                    foreach (Mastercam.Database.Chain nchain in Uchain)
                    {
                        ChainDirectionType rev = ChainDirectionType.Clockwise;
                        nchain.Direction = rev; 
    
                        // here I want to remove chain point
                        
                    }
    
                    
                    
                  
                    op3.Commit();
                    op3.Regenerate();
    
                    mm4deg5.Focus();
                }
            }
    
  3. Hi guys, I try to reverse chain.  For the first operation the user select counter clockwise chain but the second operation it the same chain but clockwise. I try to reverse or change Direction but it doesn't works.

    Chain[] Uchain = ChainManager.GetMultipleChains("Selection du parcours a machiné", true);
                    Chain rchain;
                 
                    foreach (Mastercam.Database.Chain nchain in Uchain)
                    
                    {
                        
                        ChainDirectionType rev = ChainDirectionType.Clockwise;
                        nchain.Direction = rev;
                      
                        
    
                       
    
                    } 

    It's contour operation. I have MX6 and I use VS 2010

     

    Thanks

     

     

     

  4. Hi guys, I a project I have this error I don't know why my other dll work great and I don't have this error why ?? I use MAstercam x6 and visual studio ultimate 2010.

     

     

     

     

    Warning 1 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "NETHook2_0, Version=1.0.4367.6328, Culture=neutral, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. backmill

     

     

    Thanks

  5. HI me again, I have 2 sames tools but diffrent lenght. My first operation it's a pocket I use the smallest tool. My second operation it's a pocket and I use the other one. I when I import the first operation the tools was ok but when I import the second operation the tools was the same of first operation and it'S bad. What can I do to avoid this. I try to make 2 operation library but it do the same. If doesn't works i'm think I will be obliged to changet ool in the c# program. Do you have better idea ???

     

     

    Mastercam x6

    nethook 2.0

    visual studio 2010

  6. I want to do the code again and again stop just when user hit escape. Here is my code

     

       string  lvlname125 = "072 - BEARING 3.18 HOLE";
    	  int LVL = LevelsManager.GetLevelNumber(lvlname125);
    	    if (LVL < 0)
    	    {
    		    bool rest = LevelsManager.SetLevelName(125, lvlname125);
    
    		 }
    
    	    Point3D pt = new Point3D(0, 0, 0);
    	    int LVL1 = LevelsManager.GetLevelNumber(lvlname125);
    	    bool res=SelectionManager.AskForPoint("test",PointMask.EndPoint,ref pt);
    
    
    
    	  ArcGeometry cir = new ArcGeometry(1, pt, 10, 360, 0);
    	  cir.Level = LVL1;
    	    cir.Color = 75;
    	    cir.Commit();
    

     

    Thanks

  7. I want to do the code again and again stop just when user hit escape. Here is my code

     

       string  lvlname125 = "072 - BEARING 3.18 HOLE";
    	  int LVL = LevelsManager.GetLevelNumber(lvlname125);
    	    if (LVL < 0)
    	    {
    		    bool rest = LevelsManager.SetLevelName(125, lvlname125);
    
    		 }
    
    	    Point3D pt = new Point3D(0, 0, 0);
    	    int LVL1 = LevelsManager.GetLevelNumber(lvlname125);
    	    bool res=SelectionManager.AskForPoint("test",PointMask.EndPoint,ref pt);
    
    
    
    	  ArcGeometry cir = new ArcGeometry(1, pt, 10, 360, 0);
    	  cir.Level = LVL1;
    	    cir.Color = 75;
    	    cir.Commit();
    

     

    Thanks

  8. Hi, I have a problem. When I'm use hst operation the first one it's ok the second one show alarm enable to determine valid toolpath but I only copy the operation and change the depth. I try with anothwr computer and it<s work which paramater or tolerance can affect that.

     

    Thanks

  9. Where Can I find guide to help me to go through make simple net-hook. I want to make translate but I does'nt works.

     

    string lvlname = "testa";

    short mcview = 1;

    Point3D point1 =new Point3D (0,0,0);

    Point3D point2 = new Point3D(0,0,1);

    GraphicsManager.FitScreen();

    GraphicsManager.Repaint();

    int lvl = Mastercam.IO.LevelsManager.GetLevelNumber(lvlname);

    Geometry[] newChains= SearchManager.GetGeometry(lvl);

     

     

    newChains.Translate(point1,point2,mcview,mcview);

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