Merge edge/join edge grasshopper

Hi! When i do brep offset i get small edges on a new brep. Is it possible to execute join edge command in grasshopper?
I have seen a similar topic but it was a long time ago, and and without an answer. Brep.JoinEdges command in Rhino to grasshopper

use Flexibility plugin and Brep merge Edges Component and Brep split edge Component.

2 Likes

thank you!

Instead of posting code and geometry of your own, it doesn’t work for me to post a link to a seven year old thread where no code and geometry was also not posted :bangbang: :frowning:

3. Attach minimal versions of all the relevant files

As far as I know, there is no such thing as brep offset in standard GH :question: :man_facepalming:

for example:
Merge Edge.gh (10.0 KB)


https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.collections.brepedgelist/mergealledges
https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.collections.brepedgelist/mergeedge

private void RunScript(
	Brep brep,
	int index,
	double tol,
	ref object Brep,
	ref object numberofmerge,
	ref object domain)
    {
        Component.Name="BrepMergeEdgeAt index";
        Component.NickName="Merge Edge";
              
   
     int count=0;

    var ag=Rhino.RhinoDoc.ActiveDoc.ModelAngleToleranceDegrees;
    if(brep!=null){domain= brep.Edges[index].Domain;
    if(Component.Params.Input[2].VolatileDataCount!=0)
    ag=tol;
     if(Component.Params.Input[1].VolatileDataCount==0)
    count=brep.Edges.MergeAllEdges(ag);
    else
   count= brep.Edges.MergeEdge(index,ag);
      brep.SetTolerancesBoxesAndFlags(true, true, false, false, false, false, false, false);
    brep.Compact();
numberofmerge=count;
 
Brep=brep;
    }

    }
}

and for Split.Brep.Edge

 private void RunScript(
	Brep brep,
	int index,
	List<double> parameter,
	ref object berpSplit,
	ref object NumberOfSplits,
	ref object domain)
    {
        Component.Name="BrepSplitEdgeAt P";
        Component.NickName="SplitEdge";
        if(brep!=null){
       
      domain= brep.Edges[index].Domain;
   
int count = brep.Edges.SplitEdgeAtParameters(index,parameter);
  if (count > 0)
  { 
    brep.SetTolerancesBoxesAndFlags(true, true, false, false, false, false, false, false);
    brep.Compact();
  }
 
berpSplit=brep;
NumberOfSplits=count;
        }
    }
1 Like

Hi Joseph. In this case it’s more of a conceptual question rather then a some specific case I need to solve. So I just wanted to know if it’s even a thing in the first place. Offset brep is just an example, I bet you can get splitted edges in a different way.
Yes, there is no such thing in standard grasshopper as offset brep, but I don’t think this forum is exclusively about vanilla grasshopper. In real job there are plenty of cases where you have to be quick, and will not spend a week trying to avoid plug-ins because of some strage niche principles. I am sure this thread will be useful for someone. Have a good one!

Without any example, this thread is absolutely useless.