Ejemplo n.º 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);
 }
Ejemplo n.º 2
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);
 }