How to pick edges in Solid3D

strsuraj
Enthusiast
Enthusiast

How to pick edges in Solid3D

strsuraj
Enthusiast
Enthusiast

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.

0 Likes
Reply
Accepted solutions (1)
847 Views
6 Replies
Replies (6)

SEANT61
Advisor
Advisor

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.
0 Likes

strsuraj
Enthusiast
Enthusiast

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.

0 Likes

SEANT61
Advisor
Advisor

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.
0 Likes

SEANT61
Advisor
Advisor
Accepted solution

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.

strsuraj
Enthusiast
Enthusiast

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

0 Likes

SEANT61
Advisor
Advisor

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


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