Пример #1
0
 internal static Snap.NX.Sphere CreateSphere(Snap.NX.Point center, Snap.Number diameter)
 {
     NXOpen.Features.SphereBuilder featureBuilder = Globals.WorkPart.NXOpenPart.Features.CreateSphereBuilder(null);
     featureBuilder.Diameter.RightHandSide = diameter.ToString();
     featureBuilder.CenterPoint            = center.NXOpenPoint;
     featureBuilder.BooleanOption.Type     = BooleanOperation.BooleanType.Create;
     NXOpen.Features.Sphere sphere = (NXOpen.Features.Sphere)Snap.NX.Feature.CommitFeature(featureBuilder);
     featureBuilder.Destroy();
     return(new Snap.NX.Sphere(sphere));
 }
Пример #2
0
 public static Snap.NX.Sphere Wrap(Tag nxopenSphereTag)
 {
     if (nxopenSphereTag == Tag.Null)
     {
         throw new ArgumentException("Input tag is NXOpen.Tag.Null");
     }
     NXOpen.Features.Sphere objectFromTag = Snap.NX.NXObject.GetObjectFromTag(nxopenSphereTag) as NXOpen.Features.Sphere;
     if (objectFromTag == null)
     {
         throw new ArgumentException("Input tag doesn't belong to an NXOpen.Features.Sphere object");
     }
     return(objectFromTag);
 }
Пример #3
0
 internal Sphere(NXOpen.Features.Sphere sphere) : base(sphere)
 {
     this.NXOpenSphere = sphere;
 }