Exemple #1
0
        public void SetBoundary(params Face[] conditions)
        {
            NXOpen.CAM.FaceMillingBuilder builder1;
            builder1 = workPart.CAMSetup.CAMOperationCollection.CreateFaceMillingBuilder(this.Oper);
            builder1.FeedsBuilder.SetMachiningData();
            Boundary           boundary    = builder1.BlankBoundary;
            BoundarySetList    list        = boundary.BoundaryList;
            List <BoundarySet> boundarySet = new List <BoundarySet>();

            foreach (Face face in conditions)
            {
                BoundarySet[] set = boundary.AppendFaceBoundary(face, true, false, false, NXOpen.CAM.BoundarySet.ToolSideTypes.InsideOrLeft);
                boundarySet.AddRange(set);
            }

            list.Append(boundarySet.ToArray());
            try
            {
                NXOpen.NXObject nXObject1;
                nXObject1 = builder1.Commit();
            }
            catch (NXException ex)
            {
                LogMgr.WriteLog("PlanarMillingModel.SetBoundary 错误" + ex.Message);
            }
            finally
            {
                builder1.Destroy();
            }
        }