Strange Fillet Surface problem


#1

Dear community,

I encountered a strange surface fillet problem today… The Rhino 3dm file contains three planes, which need to be filleted. The bottom and right plane work, the bottom and left plane don’t, not when I try to fillet after the fillet right, and not even when I try to fillet the left plane first… Trying it manually on the command line and manually selecting the surfaces works fine however, just not in the script… Anything special with the left side plane?

Anyone an idea? Many thanks in advance…

PlanesFillet.3dm (37.2 KB)

I tried the following script:

    Sub Main()
	Dim idPlaneLeft, idPlaneRight, idPlaneBottom, arrTemp
		
	If Not isnull(rhino.allobjects) Then
		rhino.DeleteObjects rhino.allobjects
	End If

	'import and assign objects; adjust path to refer to the file above
	Rhino.Command "_Import D:\UserData\PlanesFillet.3dm"
	arrTemp = rhino.allobjects
	
	idPlaneLeft = arrTemp(0)
	idPlaneRight = arrTemp(2)
	idPlaneBottom = arrTemp(1)
	
	'fillet right and bottom plane
	Rhino.Command "_SelNone"
	Rhino.Command "_FilletSrf _R 45 _SelID " & idPlaneRight & " _SelID " & idPlaneBottom
	
	arrTemp = Rhino.LastCreatedObjects 
	
	'fillet left and bottom plane
	Rhino.ObjectColor idPlaneLeft, RGB(255, 255, 0)
	Rhino.ObjectColor arrTemp(0), RGB(255, 255, 0)
	
	Rhino.Command "_SelNone"
	Rhino.Command "_FilletSrf _R 45 _SelID " & idPlaneLeft & " _SelID " & arrTemp(0)
End Sub

Kind regards,

Filip


#2

Hi Filip, while you pick the surfaces manually using the FilletSrf command, Rhino takes care about the points you´ve picked and passes these points to the internal fillet command as surface parameters. If you select the surfaces by their IDs only, the fillet command will mostly fail. If you know the surface parameters in question, you can pass them to RhinoScripts FilletSurfaces command using:

Rhino.FilletSurfaces (strSurface0, strSurface1, dlbRadius, arrParam0, arrParam1)

Even if the last two values arrParam0 and arrParam1 are optional, it is recommended to pass them to the function. The downside of this function is that is much more relieable method to create the rolling ball fillets, but on the other side, it does not trim back the surfaces. To make it short, robust and fully automated filleting in vb RhinoScript never worked that good. If you work with simple geometry like planes involved in the fillet operation, it may be easier to create a filleted curve and extrude, sweep or loft it (them) to get a similar result…

c.


#3

Thanks, the trick with the arrParam0, arrParam1 seems to do the trick :wink: