CS_NXOpen_0004_createArc




using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using NXOpen;
using NXOpen.UF;

namespace createArc
{
    public class EX_Create_Arc
    {

        private static UFSession theUfSession;
        private static Session theSession;


        public static void Main(string[] args)

        {

            theSession = Session.GetSession();
            theUfSession = UFSession.GetUFSession();



            // WCS Reference

            Tag wcs;

            theUfSession.Csys.AskWcs(out wcs);
           


            // Creating Arc


            UFCurve.Arc arc_coords = new UFCurve.Arc();
            Tag arc;


            arc_coords.start_angle = 0.0;
            arc_coords.end_angle = 3.0;

            arc_coords.arc_center = new double[3];
            arc_coords.arc_center[0] = 0.0;
            arc_coords.arc_center[1] = 0.0;
            arc_coords.arc_center[2] = 1.0;

            arc_coords.radius = 2.0;


            theUfSession.Csys.AskMatrixOfObject(wcs, out arc_coords.matrix_tag);
            theUfSession.Curve.CreateArc(ref arc_coords, out arc);

           
        }
    }
}




Comments

Popular posts from this blog

CS_NXOpen_0011_MoveBodies2Components

CS_NXOpen_0003_ProjectCurve

CS_NXOpen_0010_ExtrudeCurves