Forgot password?

Create an account!


« back

RhinoScript – Problem with Rhino.AddFilletCurve()


Please log in to write a message.

  • 2. Hanno (Dec 14, 2008 12.22):

    Hi Zechelon,

    do you still need help with this one? If so, please give some short example code that shows the problem. Because it's difficult to help if you first have to get the code running with some missing (global?) variables like hs_Schnittpunkte...

  • 1. Zechelon (Dec 08, 2008 13.47):

    I'am trying to generate a fillet line between to lines - not unusual...
    Here is my code:

    Option Explicit

    Call Main()

    Sub Main()
            Dim pl_Rect(3), a, b, p_Schnitt, p_Umfang(9), pl_Umfang, pl_InnenWand, srf_Wand, l_Extr

            pl_Rect(0) = Rhino.AddPolyline (array ( Array(-a/2,0,0),  Array(a/2,0,0), Array(a/2,b,0),  Array(-a/2,b,0),  Array(-a/2,0,0)  ))
            pl_Rect(1) = Rhino.AddPolyline (array ( Array(-a/2,0,0),  Array(a/2,0,0), Array(a/2,b,0),  Array(-a/2,b,0),  Array(-a/2,0,0)  ))
            pl_Rect(2) = Rhino.AddPolyline (array ( Array(-a/2,0,0),  Array(a/2,0,0), Array(a/2,b,0),  Array(-a/2,b,0),  Array(-a/2,0,0)  ))
            pl_Rect(1) = Rhino.RotateObject (pl_Rect(1),Array(0,0,0),120)
            pl_Rect(2) = Rhino.RotateObject (pl_Rect(2),Array(0,0,0),***240***)
            p_Umfang(0) = Rhino.CurvePoints(pl_Rect(0))(2)
            p_Umfang(1) = Rhino.CurvePoints(pl_Rect(0))(3)
            p_Umfang(2) = hs_Schnittpunkte (pl_Rect(0),pl_Rect(1)) (1,1)
            p_Umfang(3) = Rhino.CurvePoints(pl_Rect(1))(2)
            p_Umfang(4) = Rhino.CurvePoints(pl_Rect(1))(3)
            p_Umfang(5) = hs_Schnittpunkte (pl_Rect(2),pl_Rect(1)) (1,1)
            p_Umfang(6) = Rhino.CurvePoints(pl_Rect(2))(2)
            p_Umfang(7) = Rhino.CurvePoints(pl_Rect(2))(3)
            p_Umfang(8) = hs_Schnittpunkte (pl_Rect(2),pl_Rect(0)) (1,1)

            'Generiere Umfang und Innengrenze des Bauk├Ârpers       
            pl_Umfang = Rhino.AddPolyline (Array ( p_Umfang (0),p_Umfang (1),p_Umfang (2),p_Umfang (3),p_Umfang (4),p_Umfang (5),p_Umfang (6),p_Umfang (7),p_Umfang (8),p_Umfang (0) ))

            'zeichne Abrundung im oberen Geschoss
            Dim  f_Abstand, pl_Abrundung
            f_Abstand = Rhino.VectorSubtract (p_Umfang(8),p_Umfang(5))
            f_Abstand = Rhino.VectorLength(f_Abstand)
            Dim strCurve0, strCurve1

            strCurve0 = Rhino.AddLine(p_Umfang(5), p_Umfang(4))
            strCurve1 = Rhino.AddLine(p_Umfang(8), p_Umfang(0))
            pl_Abrundung = Rhino.AddFilletCurve (strCurve0, strCurve1, f_Abstand)

    End Sub

    My Problem is that, if I change the angle in line 19 (240┬░) only for 0.01, the Fillet-function don't work. If I try it manual with the "Fillet Courve"-button in the program, there is no problem but in the script it doesnt work.

    Hope someone can help my...




Why are these buttons gray?