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

AddByFillet

Anonymous

AddByFillet

Anonymous
Not applicable

In PlanarSketch, I wish to create a fillet between two touching sketch lines. Errors out!!!

ArcAsFillet.png

 

Code is:

 

            Dim startWorkPoint As WorkPoint = m_compDef.WorkPoints.AddFixed(newStartPoint, True)
            Dim pathSketch As PlanarSketch = pathSketchCurve.Parent
            Dim pathSketchLine As SketchLine = pathSketchCurve
            Dim skpt1 As SketchPoint = pathSketch.AddByProjectingEntity(startWorkPoint)
            Dim addedSketchLine As SketchLine = pathSketch.SketchLines.AddByTwoPoints(skpt1, pathSketchLine.StartSketchPoint)
            Dim skarc As SketchArc = pathSketch.SketchArcs.AddByFillet(addedSketchLine, pathSketchLine, m_bendradius, addedSketchLine.EndSketchPoint.Geometry, pathSketchLine.StartSketchPoint.Geometry)

            Dim path As Inventor.Path = m_compDef.Features.CreatePath(addedSketchLine)
            Dim profile As Profile = profileSketch.Profiles.AddForSolid
            CreateNewSweep(profile, path, PartFeatureOperationEnum.kJoinOperation)

In interactive mode, 'pathSketchLine' is somehow not selectable, although its part of the same sketch.

 

Attached is the full file.

 

Any clue?

 

0 Likes
Reply
Accepted solutions (1)
757 Views
8 Replies
Replies (8)

Balaji_Ram
Alumni
Alumni

Hi Yogesh,

 

Can you please share the sample file for me to understand the model ?

 

If you cannot select the path for fillet in Inventor UI, it is unlikely that the API can use it too.

 

But i would like to try it with your sample file.

 

Regards,

Balaji

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes

Anonymous
Not applicable

I have kept project zip at https://drive.google.com/file/d/0B9ZSXyeZHd37dm56bm1wQ2ZTdHM/view?usp=sharing  (password is your first name)

 

In this project I am trying to create Extrude/Sweep features equivalanet to given Sheet Metal features like FACE and CONTOUR FLANGE.

 

Please execute the project, open "My Project/FaceWithaFlange.ipt" and set break point in "ConvertContourFlangeToSweepOfEdgeWidthExtent()".  Here I am trying to build two sketches, one for profile and one for path. 

In case of Path I am not able to create arc between two sketch lines. Please uncomment the following line in code to see the error.

 

 'Dim skarc As SketchArc = pathSketch.SketchArcs.AddByFillet(addedSketchLine, pathSketchLine, m_bendradius, addedSketchLine.EndSketchPoint.Geometry, pathSketchLine.StartSketchPoint.Geometry)

 

ArcAsFillet.png

 

I wish to have arcs at every corners to achieve Bend like shape.

 

Not sure whats going wrong.

 

 

(Note: Please preserve this project, as I have quite a few queries on the same. Thanks)

0 Likes

Anonymous
Not applicable

I tried convertting path sketch to sketch3d and use AddAsBend, but that did not work either. Attached is the file.

0 Likes

Balaji_Ram
Alumni
Alumni

Hi Yogesh,

 

I have downloaded the sample project and looking into it.

It is quite interesting to see the sheet metal features getting recreated :slightly_smiling_face:

 

I am working on this and will get back to you soon.

 

Regards,

Balaji

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes

Balaji_Ram
Alumni
Alumni
Accepted solution

Hi Yogesh,

 

Can you please try this change ?

 

Dim skarc As SketchArc = pathSketch.SketchArcs.AddByFillet(addedSketchLine, pathSketchLine, m_bendradius, addedSketchLine.StartSketchPoint.Geometry, pathSketchLine.EndSketchPoint.Geometry)

Regards,

Balaji

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Anonymous
Not applicable

That worked fine!!...Thanks a lot.

 

After creating this arc, it was erroring out in Sweep creation. I guess it did not have sufficient space to create the arc. So moved back the profile little more as below:

 Private Sub ConvertContourFlangeToSweepOfEdgeWidthExtent(ByRef fcd As MyFaceData, ByRef pathSketchCurve As SketchEntity)
            Dim profileSketch As PlanarSketch = Nothing

            ' Need to shift m_boundaryPoints along -ve normal then create sketch out of it
            Dim normal As Vector = fcd.m_normal
            normal.ScaleBy(-2 * m_bendradius)

 

 

Then Sweep got created fine.

 

One more query in the aspect. Actually, I want a separate body for this feature, so wish to give kNewBodyOperation, but errors out. So I am forced to use kJoinOperation. Any clues?

0 Likes

Balaji_Ram
Alumni
Alumni

Glad you have got it working.

 

The sweep creation had also worked ok in Inventor 2016 without having to scale down the normal.

 

About using the "kNewBodyOperation", this is a behavior for which we have a request logged with our engineering team.

This was specific to a sheet metal document and unfortunately I do not have workaround for it.

Sorry about that.

 

The internal case notes from that request suggests that our QA have confirmed the behavior and is likely to get fixed in a future version of Inventor.

 

Regards,

Balaji

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes

Anonymous
Not applicable

Thanks for the info.

0 Likes