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.
Solved! Go to Solution.
Solved by SEANT61. Go to Solution.
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
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.
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
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.
You're welcome. I'm happy that it helped.
Can't find what you're looking for? Ask the community or share your knowledge.