if for example. I want too script FilletEdge. i can get the brep within my plugin and select it. Is it possible to script the filletedge part? that I determine within my code what brepedge I want to use and use that edge in the script?
Because I can’t select MyBrep.Edges(0) for a script.
If you want to do this, you need to work on the RhinoObject level, not the geometry level. To create a sub-object selection (for example a BrepEdge on a Brep) you can use RhinoObject.SelectSubObject using a ComponentIndex to tell it what to sub-select.
I suppose something like this would work
RhinoObject brepObj = objRef.Object();
ComponentIndex idx = new ComponentIndex(ComponentIndexType.BrepEdge, 0); // or whichever index you want
brepObj.SubObjectSelect(idx, true);
If i use this on a plane surface:
brepObj.Object.GetSubObjects
it returns nothing because it does not recognize the brepEdge as an SubObject.
Also this only returns if a subobject can be selected… not select a subobject
Dim CompIndx As New ComponentIndex(ComponentIndexType.BrepEdge, 0)
Dim int as integer = obj.SelectSubObject(CompIndx, True, True)
but nevermind. I wanted to use this to script FilletEdge but FilletEdge cant use preselected edges.
So i think i explode it now and use FilletSrf instead and trim the intersecting parts.