Message 1 of 1
BoundaryPatch from Sketch3D with SketchEntities3D - API C# or VB.NET
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Inventor 2024
API Visual Studio C#
i try to create a Surface with BoundaryPatch using BoundaryPatchFeature.
Is there a way, to Create a Path, GuideRail or Profiles3D ?
So the problem is, that if i Create Curves with API, and i dont Connect the Points, then this is not a Profile3D,
and im not able to Create Profile.AddClosed()
a Surface with BoundaryPatch Feature.
Is there a WorkAround, or any Solution?
I was try with Path, CreatePath or CreateSpecifiedPath.
Or with only One SketchEntity, with each etc..
How to Use the GuideRail with BoundaryPatch Feature?
Example Code:
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;
Sketch3D oSketch3D = oCompDef.Sketches3D[1];
ObjectCollection oObjColl = oTO.CreateObjectCollection();
foreach (SketchEntity3D oSketchEntity3D in oSketch3D.SketchEntities3D)
{
if (oSketchEntity3D.Type != ObjectTypeEnum.kSketchPoint3DObject)
{
//Path oPathGuide = oCompDef.Features.CreatePath(oSketchEntity3D);
oObjColl.Add(oSketchEntity3D);
}
}
Path oPathGuide = oCompDef.Features.CreateSpecifiedPath(oObjColl);
ObjectCollection oObjColl2 = oTO.CreateObjectCollection();
oObjColl2.Add(oPathGuide);
BoundaryPatchDefinition oBoudaryPatchDef = oCompDef.Features.BoundaryPatchFeatures.CreateBoundaryPatchDefinition();
oBoudaryPatchDef.GuideRails.Add(oObjColl2);
BoundaryPatchFeature oBoundaryPatch = oCompDef.Features.BoundaryPatchFeatures.Add(oBoudaryPatchDef);
Thanks For any Suggestion