internal static Snap.NX.DatumCsys CreateDatumCsys(Position origin, Snap.NX.Matrix matrix) { NXOpen.Part workPart = (NXOpen.Part)Globals.WorkPart; NXOpen.Features.DatumCsysBuilder featureBuilder = workPart.Features.CreateDatumCsysBuilder(null); Xform xform = workPart.Xforms.CreateXform((Point3d)origin, (Vector3d)matrix.AxisX, (Vector3d)matrix.AxisY, SmartObject.UpdateOption.WithinModeling, 1.0); CartesianCoordinateSystem system = workPart.CoordinateSystems.CreateCoordinateSystem(xform, SmartObject.UpdateOption.WithinModeling); featureBuilder.Csys = system; NXOpen.Features.DatumCsys datumCsys = (NXOpen.Features.DatumCsys)Snap.NX.Feature.CommitFeature(featureBuilder); featureBuilder.Destroy(); return(new Snap.NX.DatumCsys(datumCsys)); }
public static Snap.NX.DatumCsys Wrap(Tag nxopenDatumCsysTag) { if (nxopenDatumCsysTag == Tag.Null) { throw new ArgumentException("Input tag is NXOpen.Tag.Null"); } NXOpen.Features.DatumCsys objectFromTag = Snap.NX.NXObject.GetObjectFromTag(nxopenDatumCsysTag) as NXOpen.Features.DatumCsys; if (objectFromTag == null) { throw new ArgumentException("Input tag doesn't belong to an NXOpen.Features.DatumCsys object"); } return(objectFromTag); }
internal DatumCsys(NXOpen.Features.DatumCsys datumCsys) : base(datumCsys) { this.NXOpenDatumCsys = datumCsys; }