示例#1
0
 internal static Snap.NX.Cone CreateConeFromArcs(Snap.NX.ICurve baseArc, Snap.NX.ICurve topArc)
 {
     NXOpen.Features.ConeBuilder featureBuilder = Globals.WorkPart.NXOpenPart.Features.CreateConeBuilder(null);
     featureBuilder.BooleanOption.Type = BooleanOperation.BooleanType.Create;
     featureBuilder.Type          = NXOpen.Features.ConeBuilder.Types.TwoCoaxialArcs;
     featureBuilder.BaseArc.Value = baseArc.NXOpenICurve;
     featureBuilder.TopArc.Value  = topArc.NXOpenICurve;
     NXOpen.Features.Cone cone = (NXOpen.Features.Cone)Snap.NX.Feature.CommitFeature(featureBuilder);
     featureBuilder.Destroy();
     return(new Snap.NX.Cone(cone));
 }
示例#2
0
 public static Snap.NX.Cone Wrap(Tag nxopenConeTag)
 {
     if (nxopenConeTag == Tag.Null)
     {
         throw new ArgumentException("Input tag is NXOpen.Tag.Null");
     }
     NXOpen.Features.Cone objectFromTag = Snap.NX.NXObject.GetObjectFromTag(nxopenConeTag) as NXOpen.Features.Cone;
     if (objectFromTag == null)
     {
         throw new ArgumentException("Input tag doesn't belong to an NXOpen.Features.Cone object");
     }
     return(objectFromTag);
 }
示例#3
0
        internal static Snap.NX.Cone CreateConeFromDiametersHeight(Position axisPoint, Vector direction, Snap.Number baseDiameter, Snap.Number topDiameter, Snap.Number height)
        {
            NXOpen.Part workPart = (NXOpen.Part)Globals.WorkPart;
            NXOpen.Features.ConeBuilder featureBuilder = workPart.Features.CreateConeBuilder(null);
            featureBuilder.BooleanOption.Type = BooleanOperation.BooleanType.Create;
            featureBuilder.Type = NXOpen.Features.ConeBuilder.Types.DiametersAndHeight;
            Direction direction2 = workPart.Directions.CreateDirection((Point3d)axisPoint, (Vector3d)direction, SmartObject.UpdateOption.WithinModeling);

            NXOpen.Axis axis = featureBuilder.Axis;
            axis.Direction = direction2;
            axis.Point     = workPart.Points.CreatePoint((Point3d)axisPoint);
            featureBuilder.BaseDiameter.RightHandSide = baseDiameter.ToString();
            featureBuilder.TopDiameter.RightHandSide  = topDiameter.ToString();
            featureBuilder.Height.RightHandSide       = height.ToString();
            NXOpen.Features.Cone cone = (NXOpen.Features.Cone)Snap.NX.Feature.CommitFeature(featureBuilder);
            featureBuilder.Destroy();
            return(new Snap.NX.Cone(cone));
        }
示例#4
0
 internal Cone(NXOpen.Features.Cone cone) : base(cone)
 {
     this.NXOpenCone = cone;
 }