.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to pick edges in Solid3D

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
strsuraj
677 Views, 6 Replies

How to pick edges in Solid3D

I have a solid3d and would like to fillet the edges, picked by me.

 

I came across below code, but it filters all the edges of selected Solid3d sol and does fillet.

 

ObjectId[] ids = new ObjectId[] { sol.ObjectId };
SubentityId subentId = new SubentityId(SubentityType.Null, IntPtr.Zero);
FullSubentityPath path = new FullSubentityPath(ids, subentId);
List<SubentityId> subentIds = new List<SubentityId>();
DoubleCollection radii = new DoubleCollection();
DoubleCollection startSetback = new DoubleCollection();
DoubleCollection endSetback = new DoubleCollection();
using (Autodesk.AutoCAD.BoundaryRepresentation.Brep brep = new Autodesk.AutoCAD.BoundaryRepresentation.Brep(path))
{
    foreach (Autodesk.AutoCAD.BoundaryRepresentation.Edge edge in brep.Edges)
    {

         subentIds.Add(edge.SubentityPath.SubentId);
         radii.Add(6.0); startSetback.Add(5.0); endSetback.Add(0.0);

     }
}
sol.FilletEdges(subentIds.ToArray(), radii, startSetback, endSetback);

 

How can I pick edges after selecting the solid ??

 

Thanks in advance.

Tags (3)
6 REPLIES 6
Message 2 of 7
SEANT61
in reply to: strsuraj

This thread does not answer your question specifically, but it may offer some information to assist the quest:

https://forums.autodesk.com/t5/net/select-lines-and-faces/m-p/7754428#M57408 

 


************************************************************
May your cursor always snap to the location intended.
Message 3 of 7
strsuraj
in reply to: SEANT61

Hi Seant, thanks for your reply. I went through that link and got quite a logic about how to proceed further.

Now I am able to pick as many edges I wish to and fillet does happens but only at the first edge picked by me. Even the PromptSelectionResult shows Count as 1. Can you help with this.

 

I have made ForceSubSelections = true; so has it got anything to do with giving back just one edge as selection.

Message 4 of 7
SEANT61
in reply to: strsuraj

Hi @strsuraj,

 

Most of the Face Area routine was written quite a while ago.  I’m pretty sure that the same general process would work with edges as well, but I need to review my code to re-acquaint myself. 

In the meantime, why don’t you post your current code.  We should be able to get something working.

 

Sean


************************************************************
May your cursor always snap to the location intended.
Message 5 of 7
SEANT61
in reply to: SEANT61

The code in the Swamp.org link can be modified to isolate edge selection.  In the attached screencast, I just used a hardcoded radius amount, though that too could be part of the user interaction.
Give the modification a go.  There are a couple of areas that may throw a roadblock; let me know if you need some assistance.

 

 


************************************************************
May your cursor always snap to the location intended.
Message 6 of 7
strsuraj
in reply to: SEANT61

hey Seant, thanks. That code in Swamp link really helped.

Message 7 of 7
SEANT61
in reply to: strsuraj

You're welcome.  I'm happy that it helped. 


************************************************************
May your cursor always snap to the location intended.

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report