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

AddByFillet

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?

 

Balaji_Ram
in reply to: Anonymous

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

Anonymous
in reply to: Balaji_Ram

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)

Anonymous
in reply to: Anonymous

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

Balaji_Ram
in reply to: Anonymous

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

Balaji_Ram
in reply to: Anonymous

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
in reply to: Balaji_Ram

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?

Balaji_Ram
in reply to: Anonymous

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

Anonymous
in reply to: Balaji_Ram

Thanks for the info.