combine two edges

Technical discussions
Post Reply
Pham THN
Posts: 1
Joined: Mon Nov 16, 2020 5:28 am

combine two edges

Post by Pham THN »

Hi, I need a method to merge two edges which are tangential at an end into one edge. I am totally new to this software. Thankyou

Prashant Kande
Posts: 121
Joined: Mon Apr 04, 2016 4:55 am

Re: combine two edges

Post by Prashant Kande »

Hi Pham
Normally it is not a good idea. I would suggest using a wire instead and add the edge to it.

An edge is defined by a single 3D curve. If you know that the curves are geometrically identical, the merge means extending range of the first edge. You can do it like this:

Code: Select all

Point_DG ptLastEnd = iEdge1.GetPointRatio(1.0);	// Get the last point of the second edge

// Get its position on the first edge
ICurve_DG iCurve0 = iEdge0.GetCurve();		// Curve of the first edge
double uLastEnd = iCurve0.GetNearestPoint(ptLastEnd, null);

// Modify range of the first edge
double e0min,e0Max;
iEdge0.GetRange(out e0min, out e0Max);
Debug.Assert(uLastEnd  > e0Max);
iEdge0.SetRange(e0min, uLastEnd );
Regards

Post Reply