Message 1 of 3
Change Degrees or Curvature or Continuity G0, G1, G2, G3 from a Curve with API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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...
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