public static Snap.NX.ExtractFace Wrap(Tag nxopenExtractFaceTag) { if (nxopenExtractFaceTag == Tag.Null) { throw new ArgumentException("Input tag is NXOpen.Tag.Null"); } NXOpen.Features.ExtractFace objectFromTag = Snap.NX.NXObject.GetObjectFromTag(nxopenExtractFaceTag) as NXOpen.Features.ExtractFace; if (objectFromTag == null) { throw new ArgumentException("Input tag doesn't belong to an NXOpen.Features.ExtractFace object"); } return(objectFromTag); }
internal static Snap.NX.ExtractFace CreateExtractFace(Snap.NX.Face[] faces) { NXOpen.Part workPart = (NXOpen.Part)Globals.WorkPart; NXOpen.Features.ExtractFaceBuilder featureBuilder = workPart.Features.CreateExtractFaceBuilder(null); featureBuilder.FaceOption = NXOpen.Features.ExtractFaceBuilder.FaceOptionType.FaceChain; NXOpen.Face[] faceArray = new NXOpen.Face[faces.Length]; for (int i = 0; i < faces.Length; i++) { faceArray[i] = (NXOpen.Face)faces[i]; } FaceDumbRule rule = workPart.ScRuleFactory.CreateRuleFaceDumb(faceArray); SelectionIntentRule[] rules = new SelectionIntentRule[] { rule }; featureBuilder.FaceChain.ReplaceRules(rules, false); NXOpen.Features.ExtractFace extract = (NXOpen.Features.ExtractFace)Snap.NX.Feature.CommitFeature(featureBuilder); featureBuilder.Destroy(); return(new Snap.NX.ExtractFace(extract)); }
internal ExtractFace(NXOpen.Features.ExtractFace extract) : base(extract) { this.NXOpenExtractFace = extract; }