コード例 #1
0
ファイル: Boolean.cs プロジェクト: suifengsigan/TEST_1
        public static Snap.NX.Boolean Wrap(Tag nxopenBooleanTag)
        {
            if (nxopenBooleanTag == Tag.Null)
            {
                throw new ArgumentException("Input tag is NXOpen.Tag.Null");
            }
            BooleanFeature objectFromTag = Snap.NX.NXObject.GetObjectFromTag(nxopenBooleanTag) as BooleanFeature;

            if (objectFromTag == null)
            {
                throw new ArgumentException("Input tag doesn't belong to an NXOpen.Features.BooleanFeature object");
            }
            return(objectFromTag);
        }
コード例 #2
0
ファイル: Boolean.cs プロジェクト: suifengsigan/TEST_1
        internal static Snap.NX.Boolean CreateBoolean(Snap.NX.Body target, Snap.NX.Body[] toolBodies, NXOpen.Features.Feature.BooleanType booleanType)
        {
            NXOpen.Features.BooleanBuilder featureBuilder = Globals.WorkPart.NXOpenPart.Features.CreateBooleanBuilder(null);
            featureBuilder.Operation = booleanType;
            featureBuilder.Target    = target.NXOpenBody;
            foreach (Snap.NX.Body body in toolBodies)
            {
                featureBuilder.Tools.Add(body.NXOpenBody);
            }
            BooleanFeature boolean = (BooleanFeature)Snap.NX.Feature.CommitFeature(featureBuilder);

            featureBuilder.Destroy();
            return(new Snap.NX.Boolean(boolean));
        }
コード例 #3
0
ファイル: Boolean.cs プロジェクト: suifengsigan/TEST_1
 internal Boolean(BooleanFeature boolean) : base(boolean)
 {
     this.NXOpenBooleanFeature = boolean;
 }