public static Snap.NX.OffsetFace Wrap(Tag nxopenOffsetFaceTag) { if (nxopenOffsetFaceTag == Tag.Null) { throw new ArgumentException("Input tag is NXOpen.Tag.Null"); } NXOpen.Features.OffsetFace objectFromTag = Snap.NX.NXObject.GetObjectFromTag(nxopenOffsetFaceTag) as NXOpen.Features.OffsetFace; if (objectFromTag == null) { throw new ArgumentException("Input tag doesn't belong to an NXOpen.Features.OffsetFace object"); } return(objectFromTag); }
internal static Snap.NX.OffsetFace CreateOffsetFace(Snap.NX.Face[] faces, Snap.Number distance, bool direction) { NXOpen.Part workPart = (NXOpen.Part)Globals.WorkPart; NXOpen.Features.OffsetFaceBuilder featureBuilder = workPart.Features.CreateOffsetFaceBuilder(null); featureBuilder.Distance.RightHandSide = distance.ToString(); SelectionIntentRule[] rules = new SelectionIntentRule[faces.Length]; for (int i = 0; i < faces.Length; i++) { NXOpen.Face[] boundaryFaces = new NXOpen.Face[0]; rules[i] = workPart.ScRuleFactory.CreateRuleFaceTangent((NXOpen.Face)faces[i], boundaryFaces); } featureBuilder.FaceCollector.ReplaceRules(rules, false); featureBuilder.Direction = direction; NXOpen.Features.OffsetFace offsetFace = (NXOpen.Features.OffsetFace)Snap.NX.Feature.CommitFeature(featureBuilder); featureBuilder.Destroy(); return(new Snap.NX.OffsetFace(offsetFace)); }
internal OffsetFace(NXOpen.Features.OffsetFace offsetFace) : base(offsetFace) { this.NXOpenOffsetFace = offsetFace; }