예제 #1
0
 public static Snap.NX.Ruled Wrap(Tag nxopenRuledTag)
 {
     if (nxopenRuledTag == Tag.Null)
     {
         throw new ArgumentException("Input tag is NXOpen.Tag.Null");
     }
     NXOpen.Features.Ruled objectFromTag = Snap.NX.NXObject.GetObjectFromTag(nxopenRuledTag) as NXOpen.Features.Ruled;
     if (objectFromTag == null)
     {
         throw new ArgumentException("Input tag doesn't belong to an NXOpen.Features.Ruled object");
     }
     return(objectFromTag);
 }
예제 #2
0
 internal static Snap.NX.Ruled CreateRuled(Snap.NX.Curve curve0, Snap.NX.Curve curve1)
 {
     NXOpen.Features.RuledBuilder featureBuilder = Globals.WorkPart.NXOpenPart.Features.CreateRuledBuilder(null);
     featureBuilder.PositionTolerance = Globals.DistanceTolerance;
     featureBuilder.FirstSection.DistanceTolerance  = Globals.DistanceTolerance;
     featureBuilder.FirstSection.ChainingTolerance  = (Globals.UnitType == Globals.Unit.Millimeter) ? 0.02413 : 0.00095;
     featureBuilder.SecondSection.DistanceTolerance = Globals.DistanceTolerance;
     featureBuilder.SecondSection.ChainingTolerance = (Globals.UnitType == Globals.Unit.Millimeter) ? 0.02413 : 0.00095;
     featureBuilder.AlignmentMethod.AlignCurve.DistanceTolerance = Globals.DistanceTolerance;
     featureBuilder.AlignmentMethod.AlignCurve.ChainingTolerance = (Globals.UnitType == Globals.Unit.Millimeter) ? 0.02413 : 0.00095;
     ((Snap.NX.Section)featureBuilder.FirstSection).AddICurve(new Snap.NX.ICurve[] { curve0 });
     ((Snap.NX.Section)featureBuilder.SecondSection).AddICurve(new Snap.NX.ICurve[] { curve1 });
     NXOpen.Section[] sections = new NXOpen.Section[] { featureBuilder.FirstSection, featureBuilder.SecondSection };
     featureBuilder.AlignmentMethod.SetSections(sections);
     NXOpen.Features.Ruled ruled = (NXOpen.Features.Ruled)Snap.NX.Feature.CommitFeature(featureBuilder);
     featureBuilder.Destroy();
     return(new Snap.NX.Ruled(ruled));
 }
예제 #3
0
 internal Ruled(NXOpen.Features.Ruled ruled) : base(ruled)
 {
     this.NXOpenRuled = ruled;
 }