private void ProcessBlockCurves(List<Curve> blockCurves, Curve region, out List<Curve>r1, out List<Curve>r2,out List<Curve> sectionCurve)
{
    List<Curve> In = new List<Curve>();
    List<Curve> Out = new List<Curve>();
    List<Curve> AllSSegments = new List<Curve>();
    List<double> passs = new List<double>();
    List<Point3d> InterssectPoints = new List<Point3d>();
    List<Curve> sectionCurves = new List<Curve>();


    for (int i = 0;i< blockCurves.Count;i++)
    {
        AllSSegments.AddRange(blockCurves[i].DuplicateSegments());
    }

    foreach (var curve in AllSSegments)
    {

        // Project the curve onto the region's plane if necessary
        Curve projectedCurve = curve.DuplicateCurve();
        projectedCurve = Curve.ProjectToPlane(projectedCurve, Plane.WorldXY);

        var InterectPoints = CurvveCurveIntersection(projectedCurve, region, out passs);
       
        // Check if the curve is completely inside the region
        if (IsCurveInsideRegion(projectedCurve, region))
        {
            In.Add(projectedCurve);
        }
        else
        {
            
            // Check for intersection with the region
            
            if (InterectPoints.Count > 0)
            {
                InterssectPoints.AddRange(InterectPoints);
                // Shatter the curve at the intersection points
                var shatteredCurves = projectedCurve.Split(passs);

                // Check each segment to see if it's inside the region
                foreach (var segment in shatteredCurves)
                {
                    // Use the midpoint of the segment to test if it's inside
                    var midpoint1 = segment.PointAtNormalizedLength(0.5);
                    var midpoint2 = segment.PointAtNormalizedLength(0.8);
                    var midpoint3 = segment.PointAtNormalizedLength(0.2);
                    bool check1 = region.Contains(midpoint1, Plane.WorldXY, 0.001) == PointContainment.Inside;
                    bool check2 = region.Contains(midpoint2, Plane.WorldXY, 0.001) == PointContainment.Inside;
                    bool check3 = region.Contains(midpoint3, Plane.WorldXY, 0.001) == PointContainment.Inside;
                    if (check1&& check2 && check3)
                    {
                        In.Add(segment);
                    }
                    else
                    {
                        Out.Add(segment);
                    }
                }


            }
            else
            {
                Out.Add(projectedCurve);
            }

        }
    }

    List<Point3d> temp1 = new List<Point3d>();
    List<Point3d> temp2 = new List<Point3d>();
    for (int i = 0; i < InterssectPoints.Count; i++)
    {
        Point3d basePoint = InterssectPoints[0];
        if (InterssectPoints[i].X == basePoint.X)
        {
            temp1.Add(InterssectPoints[i]);
        }
        else
        {
            temp2.Add(InterssectPoints[i]);
        }
    }
    Curve SectionLine1 = new Polyline(temp1).ToNurbsCurve();
    Curve SectionLine2 = new Polyline(temp2).ToNurbsCurve();
    sectionCurves.Add(SectionLine1);
    sectionCurves.Add(SectionLine2);
    r1 = In;
    r2 = Out;
    sectionCurve = sectionCurves;
}
I wanf to modify hiss method to based on the points in InterssectPoints list, create Vertical and Horizontal Curves based on  if their X or Y coordinates are equals to each other.