Example #1
0
 internal static Snap.NX.Section CreateSection(params Snap.NX.Point[] points)
 {
     NXOpen.Section section = Globals.WorkPart.NXOpenPart.Sections.CreateSection(0.02413, Globals.DistanceTolerance, Globals.AngleTolerance);
     section.AllowSelfIntersection(false);
     section.SetAllowedEntityTypes(NXOpen.SectionEx.AllowTypes.CurvesAndPoints);
     SelectionIntentRule[] rules = CreateSelectionIntentRule(points);
     section.AddToSection(rules, (NXOpen.NXObject)points[0].NXOpenTaggedObject, null, null, (Point3d)Position.Origin, NXOpen.Section.Mode.Create);
     return(section);
 }
Example #2
0
 internal void AddPoints(params Snap.NX.Point[] points)
 {
     if (points != null)
     {
         Snap.NX.Part   workPart      = Globals.WorkPart;
         NXOpen.Section nXOpenSection = this.NXOpenSection;
         nXOpenSection.AllowSelfIntersection(false);
         SelectionIntentRule[] rules = CreateSelectionIntentRule(points);
         nXOpenSection.AddToSection(rules, (NXOpen.NXObject)points[0].NXOpenTaggedObject, null, null, (Point3d)Position.Origin, NXOpen.Section.Mode.Create, false);
     }
 }
Example #3
0
 internal static Snap.NX.Section CreateSection(params Snap.NX.ICurve[] icurves)
 {
     NXOpen.Section section = Globals.WorkPart.NXOpenPart.Sections.CreateSection(0.02413, Globals.DistanceTolerance, Globals.AngleTolerance);
     section.AllowSelfIntersection(false);
     section.SetAllowedEntityTypes(NXOpen.SectionEx.AllowTypes.CurvesAndPoints);
     for (int i = 0; i < icurves.Length; i++)
     {
         SelectionIntentRule[] rules = CreateSelectionIntentRule(new Snap.NX.ICurve[] { icurves[i] });
         section.AddToSection(rules, (NXOpen.NXObject)icurves[i].NXOpenTaggedObject, null, null, (Point3d)Position.Origin, NXOpen.Section.Mode.Create);
     }
     return(section);
 }
Example #4
0
 internal void AddICurve(params Snap.NX.ICurve[] icurves)
 {
     if (icurves != null)
     {
         Snap.NX.Part   workPart      = Globals.WorkPart;
         NXOpen.Section nXOpenSection = this.NXOpenSection;
         nXOpenSection.AllowSelfIntersection(false);
         for (int i = 0; i < icurves.Length; i++)
         {
             SelectionIntentRule[] rules = CreateSelectionIntentRule(new Snap.NX.ICurve[] { icurves[i] });
             nXOpenSection.AddToSection(rules, (NXOpen.NXObject)icurves[i].NXOpenTaggedObject, null, null, (Point3d)Position.Origin, NXOpen.Section.Mode.Create, false);
         }
     }
 }