Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
florian_wenzel
213 Views, 2 Replies

Change Degrees or Curvature or Continuity G0, G1, G2, G3 from a Curve with API

Hi,

Inventor 2024

API Visual Studio C# or VB.NET

 

i have a Question,  is there a way to modify or change the Curvature of the Curve.

I think in Inventor as Default is G3, correct me if im wrong.

Is there a Way to Change this for example to G2 or G1 etc...

 

I was found nothing in CurveEvaluator and etc...

 

florian_wenzel_0-1697642608906.png

 

here some Links: Autodesk Inventor 2D surface curvature comb graphs (cadsetterout.com)

https://www.youtube.com/watch?v=LySx2At5yZs

 

Code:

// only begining

 

 

 

using Inventor;
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Win32;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using InvAddIn;
using Part_Code_CS;


namespace InvAddIn
{
    internal class CommandFunctionButton_18
    {
        public static void CommandFunctionfweButton_18()
        {
            PartDocument oPartDoc = (PartDocument)Globals.g_inventorApplication.ActiveDocument;
            PartComponentDefinition oCompDef = oPartDoc.ComponentDefinition;
            TransientGeometry oTG = Globals.g_inventorApplication.TransientGeometry;
            TransientObjects oTO = Globals.g_inventorApplication.TransientObjects;
            TransientBRep oBRep = Globals.g_inventorApplication.TransientBRep;
            MeasureTools oMeasureTools = Globals.g_inventorApplication.MeasureTools;
            CommandManager oCommandManager = Globals.g_inventorApplication.CommandManager;

            Sketch3D oSketch_A = oCompDef.Sketches3D.Add();
            Sketch3D oSketch_B = oCompDef.Sketches3D.Add();

            Point oPoint_A = oTG.CreatePoint(1, 4, 0);
            Point oPoint_B = oTG.CreatePoint(4, 1, 0);
            Point oPoint_C = oTG.CreatePoint(1, 1, 0);

            ObjectCollection oObjColl = oTO.CreateObjectCollection();
            oObjColl.Add(oPoint_A);
            oObjColl.Add(oPoint_C);
            oObjColl.Add(oPoint_B);

            SketchControlPointSpline3D oSpline = oSketch_A.SketchControlPointSplines3D.Add(oObjColl);
            BSplineCurve oBSplineCurve = oSpline.Geometry;
            CurveEvaluator oCurveEvaluator = oBSplineCurve.Evaluator;

        }
    }
}

 

 

 

Thanks for any Sugestion