Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating branched Extrusion Surface

4 REPLIES 4
Reply
Message 1 of 5
kulkary
417 Views, 4 Replies

Creating branched Extrusion Surface

Scenario 1: Two lines simply connected, end-to-end, via a common SketchPoint.

 

Dim oLineOne As SketchLine = oSketch.SketchLines.AddByTwoPoints( oTransGeom.CreatePoint2d(0, 0.75), oTransGeom.CreatePoint2d(5, 0.75))

Dim oLineTwo As SketchLine oLineTwo = oSketch.SketchLines.AddByTwoPoints(oLineOne.EndSketchPoint, oTransGeom.CreatePoint2d(5, 5.75))

Dim oProfile As Profile = oSketch.Profiles.AddForSurface(oLineOne)

 

=> Works fine. ExtrusionSrf created by profile by AddForSurface(oLineOne), gives "L" shaped surface.


Scenario 2: Added a third line, making a "T" like shape as below.

 

Dim oLineOne As SketchLine = oSketch.SketchLines.AddByTwoPoints( oTransGeom.CreatePoint2d(0, 0.75), oTransGeom.CreatePoint2d(5, 0.75))

Dim oLineTwo As SketchLine oLineTwo = oSketch.SketchLines.AddByTwoPoints(oLineOne.EndSketchPoint, oTransGeom.CreatePoint2d(5, 5.75))

Dim oLineTwo As SketchLine oLineTwo = oSketch.SketchLines.AddByTwoPoints(oLineOne.EndSketchPoint, oTransGeom.CreatePoint2d(10, 0.75))

 

Dim oProfile As Profile = oSketch.Profiles.AddForSurface(oLineOne)

 

Only surface corresponding to oLineOne is created. Does not even for both oLineOne & oLineTwo as done
in Scenario 1. Stops at a branch point. Why? What is the resolution?

 

By some logic if it does so, now the issue is, Lines like oLineTwo and oLineThree are left out. How to identify
such lines which are not part of any profiles so far?

 

Is there any identifier/attribute that differentiates SketchLies which are consumed in a profile so far, and the ones which are not consumed?

 

Or exhaustive search is needed?

 

Basically given a sketch having multiple-connected lines, it would be nice to have all the connected paths possible
as a list then one can iterate over that list, create profile for each of the paths.

 

Tags (2)
4 REPLIES 4
Message 2 of 5
philippe.leefsma
in reply to: kulkary

Same behavior as from the User Interface. Seems to be a limitation of Inventor. I couldn't even build a stitched surface from 3 independent extrusions.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 5
kulkary
in reply to: philippe.leefsma

Thanks for the reply.

 

Is there any suggestion on how to find SketchLines not consumed by any of the profiles?

Message 4 of 5
philippe.leefsma
in reply to: kulkary

I don't think there is a direct way: the sketchline doesn't know about the profile. You will need to go the other way around: from the feature, access the Profile, iterate each ProfilePath inside (Profile[idx]), iterate each ProfileEntity from the path, use ProfileEntity.SketchEntity to access the sketch entities used by that path.

You could store all used entities and compare that with all entities in the sketch.

 

Hope that helps,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 5 of 5
kulkary
in reply to: philippe.leefsma

Thanks Philippe. I will go ahead with the exhaustive search way.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report