FilletEdge rhino command works but not rhinocommon

I have a pair of edges I’m trying to fillet. The FilletEdge command in rhino does it no problem. But the rhinocommon FilletEdge does not work. It can only fillet one edge at a time, which, combined, doesn’t result in a clean fillet across both edges. Any thoughts on how I can fillet both edges with Rhinocommon?

Pic below. Attached is the 3dm file.

Thank you,
Sam

FilletEdgeTesting.3dm (834.7 KB)

Hi @samlochner,

Are you using Brep.CreateFilletEdges? Can you post some simple, sample code that doesn’t work for you with this model?

– Dale

Hi Dale,

Yes, I’m using Brep.CreateFilletEdges. Below is my code, where LastFront is the brep being worked on.

Thank you,
Sam

Dim EdgeIndicesToFilletList As New List(Of Integer)
            For i = 0 To LastFront.Edges.Count - 1
                If LastFront.Edges(i).GetBoundingBox(True).Max.X < ChopBoxPlaneOrigin.X + 0.1 Then
                    EdgeIndicesToFilletList.Add(i)
                End If
            Next
            Dim TopEdgeIndex, BottomEdgeIndex As Integer
            If LastFront.Edges(EdgeIndicesToFilletList(0)).GetBoundingBox(True).Max.Z > LastFront.Edges(EdgeIndicesToFilletList(1)).GetBoundingBox(True).Max.Z Then
                TopEdgeIndex = EdgeIndicesToFilletList(0)
                BottomEdgeIndex = EdgeIndicesToFilletList(1)
            Else
                TopEdgeIndex = EdgeIndicesToFilletList(1)
                BottomEdgeIndex = EdgeIndicesToFilletList(0)
            End If
            Dim FilletedLastFront = Brep.CreateFilletEdges(LastFront, {TopEdgeIndex, BottomEdgeIndex}, {3}, {3}, BlendType.Fillet, RailType.RollingBall, 0.001)(0)

Use three backticks on the lines before and after the code block.

– Dale

Much cleaner, thanks.

Note that I’ve tried different options for BlendType and RailType without any luck.

Thanks,
Sam

The startRadii and endRadii counts need to match the edgeIndices count, so replace each {3} with {3, 3}

1 Like

That did it, thanks!