Forgot password?

Create an account!

Forum

« back

RhinoScript – Need realy help!

Messages

Please log in to write a message.

  • 3. burakp (Oct 30, 2014 16.59):

    thank you very much. I will work on the links . I hope someone help me more about it.

  • 2. Johannes (Oct 30, 2014 11.58):

    Hi,

    just a short answere. I think you should take a look at "circle packing" and "nesting". Both topics can be very complex. But alot of people worked on them and there are some "ready made" algorithms.

    Nesting script of Hanno Stehling:
    rhinoscript.org/scripts/24

    Grasshopper
    Google -> grasshopper circle packing

    Johannes

  • 1. burakp (Oct 30, 2014 00.25):

    Hello guys,

    In my school project we are working on doing nesting algorithms and our project is nesting a 2 circle on 1m*1m . The problem is we are very new about to use rhinoscript and we need to call the circles inside the rectangle randomly and they should not touch each other and they cannot move out of rectangle. We did it with locating circle positions specificly but need to do it randomly using algorithm. Do you guys have any solution or suggestion we really stuck!

    Call Main()
    Sub Main()
    Dim aa,bb,cc,A,B,C,D,AB,BC,CD,DA,Circle1,Circle2,ci11,ci12,ci13,ci21,ci22,xc,yc,


    aa = 100
    bb = 100
    cc = aa / 4
    A = array(0, 0, 0)
    B = array(0, aa, 0)
    C = array(bb, aa, 0)
    D = array(bb, 0, 0)

    AB = Rhino.addline(A, B)
    BC = Rhino.addline(B, C)
    CD = Rhino.addline(C, D)
    DA = Rhino.addline(D, A)

    ci11 = array(0, cc, 0)
    ci12 = array(cc, 0, 0)
    ci13 = array(cc, 2 * cc, 0)
    ci21 = array(0, 3 * cc, 0)
    ci22 = array(2 * cc, 3 * cc, 0)

    Circle1 = Rhino.AddCircle3Pt(ci11, ci12, ci13)
    Circle2 = Rhino.AddCircle3Pt(ci13, ci21, ci22)

Recommend

Why are these buttons gray?