def SamplePointsOnSphere():
    samples = rs.GetInteger("Number of points", 10, 1)
    if samples is None: return
    rs.EnableRedraw(False)
    rs.AddSphere([0, 0, 0], 1)
    rs.AddPoints(GetPointsEquiAngularlyDistancedOnSphere(samples))
    rs.EnableRedraw(True)
Ejemplo n.º 2
0
def divide_curve():
    # get user input
    res, obj_refs = RhinoGet.GetMultipleObjects("Curves to divide",
        False, ObjectType.EdgeFilter | ObjectType.Curve)
    if res <> Result.Success: return res
    curves = [obj_ref.Curve() for obj_ref in obj_refs]

    distance_between_divisions = rs.GetReal(
      message = "Distance between divisions",
      number = 5.0, minimum = 1.0)
    if distance_between_divisions == None: return

    # generate the points
    points = []
    for curve in curves:
      t0 = curve.Domain.Min
      points.append(curve.PointAt(t0))

      sphere_center = curve.PointAt(t0)
      t = t0
      rest_of_curve = curve
      while True:
        sphere = Sphere(sphere_center, distance_between_divisions)
        b, overlapCurves, intersectPoints = Intersection.CurveBrep(
                               rest_of_curve, sphere.ToBrep(), 0.0)
        if b == False or (overlapCurves.Length == 0 and intersectPoints.Length == 0):
          break
        t, point = nextIntersectParamAndPoint(
          overlapCurves, intersectPoints, rest_of_curve)
        points.append(point)
        sphere_center = point
        rest_of_curve = curve.Split(t)[1]

    rs.AddPoints(points)
    rs.Redraw()
Ejemplo n.º 3
0
 def test_SimpleWithSurfaceAndDefaults(self):
     id = rs.AddCircle((0, 0, 0), 20)
     srf_id = rs.AddPlanarSrf(id)
     pt_ids = rs.AddPoints([(-20, 0, 0), (0, 20, 0), (20, 0, 0)])
     id = rs.AddPatch(pt_ids, srf_id)
     brep = rs.coercebrep(id, True)
     self.assertTrue(brep.IsSurface)
def SampleFibonacciSphere():
    samples = rs.GetInteger("Number of points", 10, 1)
    if samples is None: return
    rs.EnableRedraw(False)
    rs.AddSphere([0, 0, 0], 1)
    rs.AddPoints(FibonacciSphere(samples))
    rs.EnableRedraw(True)
def EndingCap(stuff1, stuff2):

    plyu = ChainLink(stuff1[0][0], stuff1[0][1])
    plyd = ChainLink(stuff1[1][0], stuff1[1][1])

    rs.AddPoints(plyu)
    rs.AddPoints(plyd)

    polu = Rhino.Geometry.Polyline(plyu)
    pold = Rhino.Geometry.Polyline(plyd)

    polu = scriptcontext.doc.Objects.AddPolyline(plyu)
    pold = scriptcontext.doc.Objects.AddPolyline(plyd)

    up = rs.AddPlanarSrf([polu])
    down = rs.AddPlanarSrf([pold])

    rs.AddPoints([
        stuff2[0][0][len(stuff2[0][0]) - 1], stuff1[0][0][0], stuff1[0][1][0],
        stuff2[0][1][len(stuff2[0][1]) - 1]
    ])
    rs.AddPoints([
        stuff2[1][0][len(stuff2[1][0]) - 1], stuff1[1][0][0], stuff1[1][1][0],
        stuff2[1][1][len(stuff2[1][1]) - 1]
    ])

    uplink = rs.AddSrfPt([
        stuff2[0][0][len(stuff2[0][0]) - 1], stuff1[0][0][0], stuff1[0][1][0],
        stuff2[0][1][len(stuff2[0][1]) - 1]
    ])
    downlink = rs.AddSrfPt([
        stuff2[1][0][len(stuff2[1][0]) - 1], stuff1[1][0][0], stuff1[1][1][0],
        stuff2[1][1][len(stuff2[1][1]) - 1]
    ])

    rs.DeleteObjects([polu, pold])

    return [[uplink, up[0]], [downlink, down[0]]]
Ejemplo n.º 6
0
def ImportPoints(filename):
    if not filename: return

    #read each line from the file
    file = open(filename, "r")
    contents = file.readlines()
    file.close()

    # local helper function
    def __point_from_string(text):
        items = text.strip("()\n").split(",")
        x = float(items[0])
        y = float(items[1])
        z = float(items[2])
        return x, y, z

    contents = [__point_from_string(line) for line in contents]
    points = rs.AddPoints(contents)
    return points
Ejemplo n.º 7
0
def ImportPoints():
    #prompt the user for a file to import
    filter = "Comma Seperated Values (*.csv)|*.csv|All Files (*.*)|*.*||"
    filename = rs.OpenFileName("Open Point File", filter)
    if not filename: return

    #read each line from the file
    file = open(filename, "r")
    contents = file.readlines()
    file.close()

    # local helper function
    def __point_from_string(text):
        items = text.strip("()\n").split(",")
        x = float(items[0])
        y = float(items[1])
        z = float(items[2])
        return x, y, z

    contents = [__point_from_string(line) for line in contents]
    rs.AddPoints(contents)
Ejemplo n.º 8
0
def make_join(edge, n_joins, dx, dy, inner, truncate):

    pts = rs.DivideCurve(edge, n_joins)
    outer_pts, inner_pts, pairs_ordered = [], [], []
    extrapt = None

    outer_pts = rs.AddPoints(pts)
    inner_pts = rs.CopyObjects(outer_pts, [dx, dy, 0])
    if inner == True:
        extrapt = outer_pts[0]
        outer_pts = outer_pts[1:]
    else:
        extrapt = inner_pts[0]
        inner_pts = inner_pts[1:]

    pairs_o = zip(outer_pts[0::2], outer_pts[1::2])
    pairs_i = zip(inner_pts[0::2], inner_pts[1::2])

    if inner is True:
        pairs_ordered = flatten(zip(pairs_i, pairs_o))
        endpts = [inner_pts[-2], inner_pts[-1]]
    else:
        pairs_ordered = flatten(zip(pairs_o, pairs_i))
        endpts = [outer_pts[-2], outer_pts[-1]]

    pairs_ordered = pairs_ordered + endpts

    if truncate is True:
        v = rs.VectorUnitize(
            rs.VectorCreate(pairs_ordered[0], pairs_ordered[1]))
        v = rs.VectorScale(v, T_OBOX)
        rs.MoveObject(pairs_ordered[-1], v)
        rs.MoveObject(pairs_ordered[0], rs.VectorReverse(v))

    pl = rs.AddPolyline(pairs_ordered)
    rs.DeleteObject(extrapt)
    rs.DeleteObjects(outer_pts)
    rs.DeleteObjects(inner_pts)
    return pl
Ejemplo n.º 9
0
def addArcLeader():
    """
    Automatically calculates and annotates the length of a curve object,
    used primarily for arc length
    
    Input parameters: None    
    
    Returns: Guid if successful
             None if failure    
    """

    try:
        #assign empty variables
        points = []
        leader = None

        #get curve
        crv = rs.GetCurveObject("Select curve object")
        crvLen = rs.CurveLength(crv[0])  #get curve's length

        #get points
        pts = rs.GetPoints("AddPoints, press enter when done")
        points = rs.AddPoints(pts)

        #make leader
        leader = rs.AddLeader(points,
                              text="ArcLength: " + str(round(crvLen, 3)))
        return leader

    except Exception:
        pass

    finally:
        if points:
            rs.DeleteObjects(
                points)  #points will be deleted even upon exception
        return leader
Ejemplo n.º 10
0
def fractalizeCurve(curve, numsteps, output_lines):
    numsteps -= 1  
    
    #Get endpoints from input curve
    curvePoints = rs.AddPoints(rs.CurvePoints(curve))
    pt0 = curvePoints[0]
    pt1 = curvePoints[1]
    
    #rotate input curve by input angle and form a triangle
    new_pt = rs.RotateObject(pt1, pt0, angle, axis=None, copy=True)
    
    new_line1 = rs.AddCurve([pt0, new_pt])
    new_line2 = rs.AddCurve([new_pt, pt1])
    
    #Append all the new lines into an input list
    output_lines.append(new_line1)
    output_lines.append(new_line2)
    
    #iterate the function as many times as requested
    if numsteps > 0:
        fractalizeCurve(new_line1, (numsteps), output_lines)
        fractalizeCurve(new_line2, (numsteps), output_lines)
    else:
        return output_lines        
Ejemplo n.º 11
0
import System
import System.Windows.Forms as Forms
from System.Windows.Forms import *
import System.Drawing as Drawing
from System.Drawing import *
import Rhino
import rhinoscriptsyntax as rs

baseObj = rs.AddLine((0, 0, 0), (0, -200, 0))
poly = rs.GetObject('sel crv', 4, False)

pts = rs.CurveEditPoints(poly)
rs.AddPoints(pts)


def orientObjAlongPolyPts(obj, pts, baseVect=(0, 1, 0)):
    up = (0, 0, 1)
    for i in range(0, len(pts) - 1):
        if i < (len(pts) - 2):
            p0 = pts[i]
            p1 = pts[i + 1]
            p2 = pts[i + 2]

            v1 = rs.VectorUnitize(p1 - p0)
            v2 = rs.VectorUnitize(p2 - p1)
            n1 = rs.VectorCrossProduct(v1, up)
            n2 = rs.VectorCrossProduct(v2, up)
            mid = rs.VectorAdd(n1, n2)
            n = rs.VectorUnitize(mid)
        else:
            p0 = pts[i]
Ejemplo n.º 12
0
import rhinoscriptsyntax as rs

#delete all existing objects
rs.DeleteObjects(rs.AllObjects('select'))

#basic setup of variables
petalRadius = 10 #defines outer edge of flower
petalCount = 10 #number of petals
flowerCenter = (0,0,0) #define center point
petalPoints = [] #start list for point storage
petalCurveWidth = 1 #defines the amount of curve of the petal
petalCurveDistance = 1

outerCircle = rs.AddCircle(flowerCenter,petalRadius)
petalPoints = rs.DivideCurve(outerCircle,petalCount)
rs.AddPoints(petalPoints)

for i in range(0,petalCount):
    #create petal center line
    petalCenterLine = rs.AddLine(petalPoints[i], flowerCenter)
    rs.HideObject(petalCenterLine)
    #find midPoint of petal center line
    petalCenterLineMidPoint = rs.CurveMidPoint(petalCenterLine)
    rs.AddPoint(petalCenterLineMidPoint)
    #draw vector 
    newVector = rs.RotateObject(rs.VectorScale(rs.VectorUnitize(rs.VectorCreate(petalPoints[i],petalCenterLineMidPoint)),petalCurveWidth),petalCenterLineMidPoint,90)
    newPoint = rs.CopyObject(petalCenterLineMidPoint
    #draw a line perpendicular to center line at the midpoint
    #newLine = rs.AddLine(petalPoints[i],petalCenterLineMidPoint)
    #rs.RotateObject(newLine,petalCenterLineMidPoint, 90)
    #rs.HideObject(newLine)
Ejemplo n.º 13
0
# to store all of these points, we need to employ a double list
pointsXY = []
for i in range(N):
    pointsXY.append([])
    for j in range(M):
        curPoint = [i * 60 / float(N), j * 40 / float(M), 0]
        pointsXY[i].append(curPoint)

# Now you have a double list where you can access pointsXY[i][j] as an individual point
print pointsXY[1][3]
# Notice what applying len() to a double list does
print len(pointsXY)
print len(pointsXY[3])

# Since the first index references columns, we can easily draw out a list of points at column i
rs.AddPoints(pointsXY[3])

# Lists and Functions
# Lists can be an input as well as an output of a function


# This function gets equally spaced points along an ellipse drawn in the plane,
# centered at the orign where a and b are the semimajor and semiminor axes, resp.
# Remember: this ellipse can be parametrized as r(t) = (acos(t), bsin(t)), t in [0, 2pi]
def getPointsEllipse(a, b, numPoints):
    pOut = []
    for i in range(numPoints):
        t = i * 2 * math.pi / numPoints
        x = a * math.cos(t)
        y = b * math.sin(t)
        pOut.append([x, y, 0])
Ejemplo n.º 14
0
# -*- coding: cp936 -*-
__author__ = "billpower"
__version__ = "2019.12.25"

import rhinoscriptsyntax as rs

plane = rs.WorldXYPlane()   #��ȡxy��ԭ��Ϊ���ĵIJο�ƽ��
rectangle = rs.AddRectangle(plane,40,40)

dpointsCoordinate = rs.DivideCurve(rectangle,10) #�ȷ�10����
dpoints = rs.AddPoints(dpointsCoordinate)   #���ӵȷֵ�
print(dpoints)

format = "point_%s" #��ʽ���ַ�����ģʽ
dpointe = []
i = 0
for i in  range(len(dpoints)):
    dpointe.append(format % str(i)) #��ʽ���ַ�������һ׷�ӵ��б�
print(dpointe)

dpointx = list(range(len(dpoints))) #�����ȷֵ�����
print(dpointx)

#��Ƭ����������
selepoints = dpoints[x:y]
cubes = []
print(selepoints)
for i in range(len(selepoints)):
    sphere = rs.AddSphere(selepoints[i],3)  #��ȡ[y](Բ�ģ��뾶)
    cube = rs.AddBox(rs.BoundingBox(sphere))    #�����壬plane��
#    id = rs.GetObject(sphere)
Ejemplo n.º 15
0
import rhinoscriptsyntax as rs

xCoordinateList = [51.0918130155,35.9607337,45.5405031,33.4499993,51.0355914,33.6713751,43.6643776,43.7129464,33.4481059352,40.4414214,43.862484,43.6641249,33.4798071,45.5180358,51.0918572,51.0424689,45.507699,36.1783477,36.1883858514,36.1922841,36.2608162,41.4999894,33.4952976,43.6813277,33.4796712,40.0093278,33.4316647997,43.6708846,43.6092686,41.2437831,43.149488,43.1223953,36.2017936,36.2019904392,33.7424883225,41.462443,41.135371,41.5415709,33.2905965,33.4954215852,33.509413,40.326016,43.8201194,43.7333951,36.1486584,36.1316401,45.5687842,33.6397742,51.038371,40.502098,36.154233,43.6619640179,36.1333689916,43.731316,43.820729,40.4257272,43.785955,35.190366,36.3656399,35.301882,35.3209173024,36.271169,50.940876,33.4509416724,35.3121591,35.9995945787,33.4156429,40.326984,40.3481862077,43.6677486,51.067897,36.0804531,36.0641464,40.450866,41.097423,41.5015857,41.097310809,33.6090600169,33.3365234,33.323027,43.7459284,33.7988261379,43.6499721,36.125587,33.406453,33.8696679,36.274166,43.7767190083,43.6691157,40.4524104,35.2023634,35.0684311,43.8099393086,43.5943962837,51.0241624,43.5951494,43.703344498,43.708002,33.3948204829,33.407784,33.4065199,33.4807922,36.0156497,36.0260812,35.267448,36.204563,50.989885,35.138125,33.5303579,33.4753493,41.4124053237,43.7069830501,43.6741639265,41.48011,33.5113776682,43.7781622,33.552166,33.5964781,36.1458459,51.0194262,36.009094,35.9985769,33.6431285,43.6480029,35.207147,36.1590984,43.6910854,43.8612284,35.0314810755,43.6486781,35.058131,45.513282,33.574998,33.4128527,45.5165352,41.4365347,33.6744265138,45.5838977316,33.4455139,36.013238,33.533366039,36.1731404,33.4150296,36.169353,41.2635616,36.1259335,43.7729924508,36.116821,45.5692169547,35.2969227,43.7743736325,41.5016999,41.4189906,43.7420185,36.128501,50.9763220582,33.4108304,41.433751,49.1696,43.6990972,36.071454,36.2747334,43.6541178,35.1856936,45.5208802,36.2777636,33.4514926,33.581795,51.052264,33.4869752,35.1381964,33.6682669,35.3711141,33.4946339713,41.6609362,36.0595548,41.4128257,33.3067339,45.4955724,43.7210775,35.143696,41.4302972,36.1251257758,45.497451,45.497981,33.498163,36.056157,33.3202518,43.546928,40.4784388,43.7625088,40.4774907,50.9630499,43.6068229034,43.8540375,33.4495511,43.8077256,36.0996708,43.6643448,41.4451873,33.3628227,45.5066692,43.5513936331,36.100395,36.0648695,36.0803201,51.0830366,43.6231978727,41.484693,33.7140487952,43.6545234,43.717775,43.6685637,35.2352802152,43.0352412,50.9875994,33.710901,40.4475255,33.4472312421,50.9115407,43.3980604,43.1886375,36.2177894401,36.219850956,43.6822547,43.9627637,43.0734472,36.0620159,36.0608745089,33.24696,43.7611978,35.235799,43.6535007,34.9816006,40.4288805,33.639064,40.4293034,45.5182441,33.526713,35.258015,43.0680121,40.3333391737,33.3212006033,33.3295480752,43.5605,33.3796942,36.1333968,36.1441267,40.4533081,36.147496,43.677867,36.225528717,33.4423485,33.421361,51.046083,36.018286,36.0357492,36.052802,41.2386928,51.0430843,54.2767330303,35.2092456,33.6094708,43.0755448,35.216592,36.1441871,50.8793146,43.7367236,36.2617683,36.013024,36.2534463,36.0844482,36.2393409071,45.5208175,40.446578,44.0715414,43.6537193,36.1819495,36.1142441,36.1152212,43.64842,36.0830847684,43.5424883,45.5080907,43.6586437,43.6586622,36.2008111,33.4652582145,43.649592,33.6778883,43.7353871,35.29668,33.4520613,41.410567,43.5803645,40.4413212,51.0623,43.6618003845,40.4375406448,43.7354496,43.647171,54.2654721,33.4573881,33.4473709,45.525304,43.6616782,33.361167,36.1782272,43.7598602,45.5366615,35.038184,33.4499672,40.4219149,33.5093304,50.9864370924,51.1258797,43.0345605,41.4836888,41.2390767848,40.4425968,43.1836046,51.0380757,45.5002854,34.9249883244,36.0708145046,36.0618411,36.0614372173,33.5388471,43.5932157,43.0747905,36.00958,43.0474061,51.1113605844,45.5161181,41.421421,41.4708527,33.4625569,41.5197415,45.4406764,43.7344962,45.4816022,33.4277492,43.610812,33.418928,36.1487623,43.0431276,43.0375602,40.3950950733,34.999927,35.9429657,43.6649625542,43.6623822,43.482566,43.5652404817,35.3270117,43.6972659,50.9499278576,41.4609961208,43.0626917,40.4365402201,33.641684,33.6102008,45.5042084834,36.239086,45.4702914,33.422922,33.6371458,33.607354,41.1503799451,40.1081556,43.662622,40.4567682795,43.6446974,43.8544895,43.6491122,43.6772213,33.3201578,35.222466,33.3495638,33.3333896,33.3487884,33.8333988,33.8276875987,33.5025088,40.1432102467,41.4050981,40.6301302,33.6114794,43.665279,43.8067504,40.554325,36.2109214,33.308565,41.4205736,43.6591967,33.639204,33.5820946,36.1079011,33.6141136,36.1078546911,33.3034408469,43.6869015,33.33738,33.7107892,33.3030929,50.932756,35.3176964,41.314697,36.14745,33.4816671,41.182831,36.1586223,39.7880364,33.3260297,33.3064112,45.517157,33.6489805,33.6386837,43.5892884,40.389665,33.2748131,33.2840690613,43.557103,36.0648365484,45.535833,36.1252029,33.306832773,33.3260297,35.3400294,33.5839659,36.21836,43.7037901,40.4415434,43.7851326,35.965173,51.1620436449,43.7778782,41.4611912,44.0662691,43.7887556,33.6110622,41.1881043,40.4325553,43.6601316,40.4378416,33.6312394,33.6395017082,45.495873,43.8607259,43.7176325,36.1083176,45.5721514292,43.6530078233,33.4639349551,35.2769773,51.0489909,40.3764422,35.3119953714,35.309098,43.843049,51.124566,33.41936,45.5021365,33.6222797,50.979215049,51.1520846,43.190259,43.5942809,33.571903,43.4486,35.23434,36.2481903,45.5164924,36.075947,40.4514327973,43.6695736876,33.495639801,35.9520457,41.6996005607,43.8356257,33.7997747,41.3633825,45.4963171,43.6489694,41.5222968301,33.4569162,33.4945375095,35.226728,40.46263,33.6107467,33.4474493,33.392384,33.407415,51.1482468,33.2891777,45.759405,50.9818493,36.1050207,36.0742073067,43.0921067407,50.995151,43.6689389,36.0252357,36.172441381,43.7465461,33.3977575,33.3967291038,33.3805639643,33.2770025,33.2664407,36.0635569,36.0633424,33.4522782,35.1727541221,33.6398283,33.6400536994,35.188203,35.070495,43.7247752,33.3946413,43.6700794,33.4304026,35.1882548,40.1160324,35.181658,33.6451904,33.3939564002,33.6997745,45.464849,33.6774893,36.0998195,45.5004743,33.4661401,40.4184068398,43.083544,40.3201378,43.7547555,35.9607337,36.083965,36.0808997,36.0694365743,36.068348,36.0684567,43.6486362,33.3357282,36.1092010079,41.4861183,33.5376926,33.700443,33.4658357,43.670948,36.0054036506,36.2250528,36.2386219,45.6627721,35.2216832,42.9165179,36.1438696,33.325945,45.536628667,36.2811,33.4494697,43.8900384,40.541278,43.5968995769,33.5298443,41.4635203,43.7919409,43.6528924618,35.082577,40.4288994,43.8754658,40.535001054,36.001127,34.9253076,41.3866052,33.4968132,33.6530892,43.6647275,40.6477104,40.6137545,36.0555772643,41.4328001,40.6172685,41.4711326,51.1304402,33.4955136,45.4681816,33.512328,43.8126877,33.480503,36.1697096,35.2658952,43.6704097,40.4418551018,40.4426692,43.067354,35.1764948,41.420174,43.7934578,41.444251,43.7268982,41.4188007332,33.6420644,50.9865298,36.1087723175,36.1274245,36.1020655741,36.1214517,40.4522796,40.447581221,33.5135055,33.580882,33.459432061,40.4603426,43.6498594104,43.6277242,43.0264679,43.6703971,43.8286137628,45.4504073,35.3717637,35.2235173,43.7977079,36.0636175,40.1105432,40.1100646,43.6454458,40.09211,33.3278969,36.123621,36.0985864132,33.869666,33.5808203262,43.6759283,45.4802534,51.0865337,35.1527918,41.51628,45.5762338484,33.589051,33.5811777,33.3803124,51.0453643,43.5575649,43.6577564,36.0776227,43.8469353,36.0969383,33.305987,36.0768636,41.5037247,33.6320579,45.550040767,36.025657,43.6796762,33.305366,33.308734,33.539658,33.464515,33.4516888,33.233132,33.2907112483,33.5089357,33.641527,43.838431,36.2137702,43.7364416,33.4564591,45.5394071,45.5068772,35.2629001,36.1021168,45.5295201,40.48625,35.253329,43.7076725,33.6124852,36.0102005,41.4979271,41.4978734149,36.098302,43.6356334,36.0999048,36.0576634,33.4654263,36.068207,45.5360953,41.133684083,40.4442708,41.6094979,51.1269347,43.0841944,40.421825649,40.450111,36.2535052,33.703234,36.188542,35.0698301554,33.5085,43.068016,41.1503278,41.2525846,43.745727,41.4831995,43.7760596902,43.6858437886,43.1711782,40.4382747,40.4377293,35.0822,35.0748127,40.383605,36.0597788,36.18,36.2029342651,33.385214,43.6625624,33.627381,40.4288935,43.6541958,43.6882141,45.5491343,33.344083,33.4360674,45.4975185589,40.4614336,43.6702458,43.8097261,43.8448702,41.6779924033,33.2790256,43.8186558,33.2957942,41.3142636,33.3173541,41.389179,40.1196601,40.1017582,33.3085839,33.669481,33.68106,33.634323,43.7256702,33.526145,33.528412,43.6664844,36.0881595,45.5190038,36.0884136,51.02371,33.3211123,43.7186121,33.3895516,33.381076,40.5220627,36.1355103,33.4947865,36.2189900672,41.519436831,36.085796,33.4135606,33.4482272,41.4584959,36.0502687,36.0280739,33.4231081,40.4543652331,40.4479980038,43.6641925,43.6129820927,43.7345391535,33.4853999345,33.4658065,43.0852844,41.456412,40.4404227,45.625537,51.0822236,45.5205489,43.655554,33.459458,36.00003,35.1985583,33.177294,33.641201,33.6272318,40.4289429,33.6021201796,40.431988,33.6027450137,45.428589,43.9079343,33.5934206,40.1172406,41.6906985,43.6590858,33.3356181,33.3343595807,43.7838953,33.3344295,43.6775355,33.3207276951,33.3234958,41.660586,41.6816013,43.811483,36.0744873,36.06698978,36.1542955,51.0746309,36.0121484,36.0352186901,36.1710616,33.578533,35.1397577,43.7535967,40.5445287,43.6638137,45.5437499,43.690655,51.0841357,43.7075497,40.3951787,40.27116,41.3852471539,43.6653031,41.5223004,40.316787,41.5006633,50.9447409,45.5461239,35.218525,33.4654804,43.5042914116,43.8269783,33.4661182,33.3650631,45.471625,41.487372,33.4951242,51.0612968242,43.6508652,33.4952504,43.6588089,43.7280502,41.3167840304,41.3090374684,50.9616585,41.3316838,35.2250152485,41.707466,33.4868198035,36.158967,41.5811077,33.3107008,43.6466123,43.892507375,43.1813777,43.5928596437,43.593106,43.1680835,33.511318,41.2761778,43.6466802,43.9994835,36.0704825,36.0709762,35.2542321,35.240751,40.3428688,33.2909097,40.1110535,33.360398,40.1104086,36.14586468,43.6718426,33.5176066,43.6554016,43.0678629771,33.6377597,33.6376142965,33.6345896,33.4986286,33.4986286,33.4976601,33.3782188,33.5097845,43.6259053,41.1459583,33.4520966,43.6651873,43.8116001,43.7892470765,41.314829,41.5016077616,41.4845410659,33.5846795,33.613906,43.8091213,43.6769328402,36.19518,36.1977963,36.211152,42.9257219192,33.4763808,35.2089662726,33.6263585,35.471795,43.6549946,33.5421376,43.6182130788,36.1955672,51.0153502503,43.6492605,35.336302,36.0577039,43.873327,35.1932914,36.0995367,36.0987979051,33.6384704047,33.6045082,33.6080946,36.1429443,35.2611416198,36.1542556,35.9706292,35.9706292,35.9961288,36.1455008,33.2762606274,33.3892466269,33.4043335,33.3884257,33.5747251,36.124794,33.4513418,33.436022,43.9032026,36.1053642,41.2665892,51.0809827506,43.6700794,35.3301529,33.844752,43.5740347579,43.6135211,43.7977472,36.1581178988,43.6841058,33.5743434,33.3931332,33.6717895,33.3790143,33.674741214,41.3861526,43.0818991,36.22770065,36.1725319,43.8585776,36.222261,43.8031918,36.1328088,35.952556,45.477253,36.2103666877,41.3882156,43.653224,36.0289793,36.0295706,40.4383875,43.8504921767,33.4626163,36.2616901,43.8286745,33.3199544,35.289343,43.7078026,40.112825,36.0380218,35.0042934,36.1500292,43.65291,33.4529353961,33.426264,43.653929,36.0122826925,43.6564272,45.5098058,36.0688685,35.370678,45.516671,43.6462692,51.0505046834,43.7019214,33.479721462,36.2009303,41.4189745,41.6750769,36.08641,33.3349701,33.3480179652,43.656345,36.1987797,36.1819825,33.8702759,43.079273,41.5263148,43.620554,41.728778,43.7887023,43.8294719222,40.5414597,41.5389554,41.4601802,43.0846857,43.8434365,33.686416,33.6713524,33.4633848182,40.4875647,36.0308189392,43.8039094,43.6873793,36.0649369,45.5679434,36.0635122,51.0334348768,40.4448788,41.4886311,41.4858367,41.484661,41.4769258,51.0358472,45.4739339,33.4589309,41.4188774,41.487072,41.509265,45.5132244,33.4984232,41.2510246,33.3779199,51.0719639,43.6511809,33.4955326,33.708338,33.7107612363,51.0785983,33.5391611,33.4732242,43.6715509,36.0703388,36.0892531,35.1117752,40.38576,33.4697864,36.1508902,43.6403542,36.1963442,36.146908,36.1445871,36.1590189,43.6836027,40.0828635,35.118827,40.108013,36.2618693,43.8548253506,36.196107,36.0582839,33.5985615,36.0846533,41.463415,40.4415388,43.6915728,43.8035621,36.1931766054,36.0549747,33.4822605,36.156524,36.1500213,43.7031107,36.113498,43.6937551,40.50582,43.6572335,43.7834026,33.546608,43.7739087,41.4627305,41.482804,36.1239576,33.6045209,33.6365668,33.6190065,33.612796582,33.6284879,33.6124896,33.6160293,40.551127,43.805173,35.2249638,35.2253172,33.311801,43.7604548,33.311299,51.0043588,40.3610158,40.3201378,33.7084156,33.6229152,33.6713751,33.6699809,45.499629,40.4884107,40.0935532,43.7061727,41.497788,36.0709462,36.0854079715,43.5527358756,41.4768122,41.4768476,33.4043972,45.5029472,40.4543526,33.5939281,43.4486822,33.4940566541,33.5341482,33.7635354,40.4976197308,33.37907,33.3634187,33.36363,33.4590648,51.0330023,45.5005514,45.508145,43.8254468,51.0340032,33.2826654,43.6820255512,43.78738,41.237138,33.4647598118,36.0934219,35.094868,33.5085398,43.8318556,40.4328604,43.736206,33.4860879291,43.6390985,33.2757431,43.8947178,35.177536,33.4474783801,50.9983518,43.6948006,33.465499,33.5057196,33.5981698,43.6460244,43.6590547,36.0921887,33.363386,35.503011,33.5178471,33.6089474,33.5314673,33.60561,43.5917189,36.0544534379,45.4762241,43.6591061,51.025609,33.5433162,33.3111900133,33.3069252223,33.451845,43.6563207,41.105085,45.497356,33.6106459,33.6275483,33.5961862,45.503073,33.6020658,33.623873,33.7107662,43.6775605,43.8088942,33.4123744,33.3793352987,33.5669912,33.3908326,35.996165,41.50003,43.6560132,40.429091169,43.6503677,45.3703799519,54.488878,51.00232,45.4886189,43.247959,45.5161919,40.4415369,43.7989396929,41.311955,36.1442819258,45.484526,45.4969352,43.776828,40.360514,33.65,43.841873,43.5930411,43.168167,51.0476413183,36.1429328105,40.4391056,36.0584203,43.6561507,34.94889619,51.0930075,51.0694265,36.1974092,43.7914833,33.4636883,33.480526,36.1590861752,45.891387,43.6473037,36.1219473,33.7515572,33.7989731133,43.7596488584,43.6558987,33.4477713542,33.4584383,45.5149703,35.0219135,35.101277,43.6411209106,33.3602393,35.252403,36.0182463309,41.4625514998,36.0419702,51.0460204,33.434102,36.0345888,36.0280822,33.4635529029,33.4754919,43.8167779,43.684723,33.5111214542,33.4828166,34.9243485,33.2749995,43.7257250991,33.2643698669,33.2667706,43.7986682795,43.6650594,43.6734377,36.004902,36.1790447,33.4928613,43.8089713902,43.0925831,40.116833,40.1332734002,33.5908804,43.654412959,36.0832742175,43.8175972,43.6717411,45.5357479,45.6267849,33.62342,33.6086209,33.313707,33.4781149,43.7087233,41.5011857,40.4023147,43.5195839456,33.3929982,35.247997,36.2618136,40.4274522,43.6688657,43.7081764,43.6570217,40.3927887,36.0676364,36.1165794831,43.787913,36.0687779,36.0765176,43.6476173,35.2946606,41.49932,45.5856753,36.1013456997,33.5523141,45.536152,33.5381695905,36.1036262,36.1036262,36.218866,50.8973158,41.4980789,43.6381212285,36.159548,43.6888991,36.1433397,43.6544631,43.573513,33.3483247,40.0908819198,33.624618,40.1425101,40.1133714,33.3636715,40.505161,45.5076691,33.3610287865,43.6362629,41.3510373,41.3752087,43.482566,43.765728,33.4940184,33.497483,33.7978962,33.5028371,33.4986286,33.500302,35.2202754,33.832957,33.5005529,35.2263714,51.0751831,43.2446023,43.7191707,33.5093265,33.4584206,43.6431907,40.54132,41.4607290837,43.6387666,40.4882642,33.4340138,33.4672304,36.085792,36.0931103,33.4593541,43.6559041,41.4322114,40.4522058,40.419915,40.4936763,43.8256647737,33.4765,43.6693139,41.451315,45.5145152,45.5160142,43.6504938,33.3363271,36.1139,45.4679268,41.5393294,33.4786793,43.6474734,45.6067902,43.0834639,43.7063824,41.6103364,40.429454,36.05842,36.0934219,36.0274982,40.3992783,43.6590216,40.4285857,43.677679,51.008539264,33.6131432,36.1589768,41.4535031,36.2195958,43.6511193,33.4942311,40.4447263,33.47603,41.3944132,43.6557974,40.4286571,40.3955213,40.3925456,33.4080648,43.7280205,36.1366898,43.6812912,36.1585279,36.1441841,40.448551,51.1253730365,43.815714,41.437873,41.5198812,41.467478,43.6558643159,45.7579879,33.598145,36.0418276,36.0430990076,43.7683839,33.4660425,33.4666061,50.94883,43.5591243,36.1083176,35.141915,36.1088082,36.2703601346,33.4470273,36.1437742,33.2973003,43.6559148,43.6643583,40.1170954,33.6381654,40.116715,40.112777,33.4520654,43.7953505,33.7985398,43.754089,41.5039284,41.6708548,43.6725772,33.6262751,33.4523351,43.6496153,43.6467127881,43.6841058,33.4648126,33.5763423,33.4664037368,33.6714443,35.9707406,36.011829965,43.6995201,33.2358811,35.0082576,36.009004,33.2337532192,33.321824,35.1762971,35.176328,33.6059251,43.6486125,41.261133,50.980914,41.2397100973,41.2418025,41.242179,41.455434,36.0409228063,40.4411828,43.6812098,33.467159,33.4660973,33.4376759,33.4808986,35.0987499,33.640907,41.4611317195,36.1263992,33.385801,41.5035155,36.0953641961,33.370814,36.1100828,40.4652145,36.1100828,36.1075972875,40.421954,35.028656,35.0591902,40.421601]
yCoordinateList = [-114.031674872,-114.939821,-73.5993003,-112.0769793,-114.0273656,-112.0300171,-79.4144238,-79.6327631,-112.341302074,-79.9564571,-79.3069597,-79.4118861,-112.0911877,-73.5821744,-114.094625,-114.1395743,-73.553407,-115.1769162,-115.186123699,-115.1592718,-115.1711298,-81.6663746,-112.2360764,-79.4278838,-112.2251729,-88.5763857,-112.102958984,-79.3923788,-79.6990349,-81.3566613,-89.206641,-89.2391405,-115.2819809,-115.283122245,-111.977420267,-81.0749908,-81.793211,-81.5699009,-111.7478144,-112.235797843,-112.203724,-80.065199,-79.347455,-79.2242058,-115.2098129,-115.1908263,-73.6054883,-112.0877381,-114.081121,-80.0692605,-115.160753,-79.3912587147,-115.178365074,-79.4651329,-79.338647,-79.7341381,-79.4780042,-80.922471,-115.2244853,-80.801484,-80.7734003228,-115.2677588,-114.1098157,-112.265444762,-80.7728367,-115.183851533,-111.7997071,-79.9573294,-80.0533735153,-79.3961666,-114.056783,-115.0381656,-115.0199541,-79.933919,-81.3882792,-81.5367757,-81.387898922,-112.359004654,-111.7755995,-111.719632,-79.3246225,-111.9304195,-79.3832232,-115.211199,-112.2807774,-112.1508924,-115.252954,-79.6036142656,-79.4260211,-79.9506684,-80.8646618,-80.8419307,-79.4112146813,-79.6411609325,-114.1076364,-79.5299771,-79.4154372029,-79.375814,-111.940654628,-111.945686,-111.939072,-112.1508807,-115.0564666,-115.0467381,-81.187562,-115.1363366,-114.0725412,-80.8774324,-111.925905,-111.9256575,-81.8386494597,-79.3964988202,-79.2873923228,-81.8386038,-112.264272827,-79.415482,-112.260044,-112.037274,-115.2249484,-114.0233174,-114.9905495,-114.9545838,-112.0632966,-79.3991983,-80.724692,-115.3379148,-79.5755866,-79.4349859,-80.8522725105,-79.3972345,-80.8149679,-73.5708912,-111.905421,-111.850775,-73.575107,-81.5311014,-112.257419676,-73.653777726,-112.0320681,-115.0595753,-112.26184575,-115.0779447,-111.7999032,-115.061694,-81.6300589,-115.1352534,-79.4140518612,-115.156943,-73.7522855401,-80.7570358,-79.4140428131,-81.6954561,-81.759744,-79.5910764,-115.080842,-114.072114267,-111.8687698,-81.6187394,8.07395,-79.3597232,-115.0884046,-115.268934,-79.42355,-80.7585543,-73.5626759,-115.1163171,-112.3575759,-112.124448,-114.091734,-112.0541576,-80.7368158,-112.0984938,-80.8014694,-112.169313133,-81.377256,-115.1823852,-82.2331444,-111.7231562,-73.6205803,-79.6137669,-80.721804,-81.3919419,-115.177977871,-73.570966,-73.57722,-111.923683,-115.2813044,-111.9828733,-79.592552,-79.9553131,-79.4105316,-79.9574707,-114.0732958,-79.6515223011,-79.0602093,-112.0789355,-79.452203,-115.1161439,-79.4143913,-81.5643491,-112.169317,-73.5528753,-79.5875633508,-115.1363065,-115.1202663,-115.1217779,-113.9938968,-79.4806638043,-81.784645,-112.11081785,-79.4005358,-79.256849,-79.3954589,-80.7902478849,-89.4535994,-114.02983,-112.095297,-79.9933976,-112.077470528,-114.043001,-79.7081696,-89.2778583,-115.207061079,-115.214004085,-79.3280136,-79.2720693,-89.3962924,-115.2476202,-115.263973573,-111.837422,-79.4656316,-80.8208019,-79.427609,-80.544424,-79.9777854,-112.066128,-79.9724245,-73.5707668,-112.115748,-80.735695,-89.4097221,-79.9442463582,-111.979469061,-111.978608072,-79.709707,-111.766174,-115.2784416,-115.2645316,-79.9490476,-115.2980657,-79.350024,-115.279983521,-111.9554995,-111.850105,-114.075412,-115.1179043,-115.1533426,-115.171496,-81.8127443,-114.0885793,-0.39958789,-80.8607013,-111.7213141,-89.4429998,-80.853049,-115.2726746,-114.0729934,-79.4341663,-115.19221,-115.126224,-115.1539988,-115.2421295,-115.207055658,-73.585413,-79.99496,-79.481693,-79.4258332,-115.2614861,-115.2918073,-115.3090169,-79.3819,-115.032591268,-79.6267698,-73.551814,-79.4408403,-79.4407564,-115.3337749,-112.358536097,-79.383394,-112.0345493,-79.4202155,-81.014259,-111.9725943,-81.7342552,-79.6146305,-80.0035143,-114.0010681,-79.383605957,-79.9488830566,-79.4198638,-79.5128708,-0.4165158,-112.0897301,-112.085531,-73.574703,-79.3828415,-111.9281352,-115.1771494,-79.2274924,-73.5128006,-80.97804,-112.0702225,-79.8863458,-112.3621335,-114.041924805,-114.211121,-89.5438796,-81.7041,-81.3466894627,-79.9822921,-89.2137254,-114.1334855,-73.64646,-80.7452738285,-115.2782516,-115.2519912,-115.269097028,-111.9641728,-79.5689242,-89.3908156,-115.117997,-89.5026303,-114.03701057,-73.5661258,-81.792117,-82.0166107,-112.3521489,-81.4392047,-73.7311873,-79.2581435,-73.630283,-111.9043071,-79.7489863,-111.966847,-115.1641826,-89.3944959,-89.3969074,-80.0670388888,-80.69944,-115.115893,-79.4113332276,-79.4243452,-79.6953266,-79.7007899436,-80.7361868,-79.7487531,-113.97713542,-81.9525268849,-89.3074804,-79.7873096075,-111.977,-112.0149317,-73.562867403,-115.323963,-73.6080367,-111.806875,-112.3370272,-112.179571,-81.3600129135,-88.2297751,-79.3863994,-79.929146092,-79.3923951,-79.5144282,-79.4209542,-79.3529116,-111.7547401,-80.856443,-111.9647783,-111.9127038,-111.9634247,-111.9387457,-111.924795055,-111.9290233,-88.2593630254,-81.7348518,-80.0571186,-112.2398384,-79.385945,-79.2888581,-80.015963,-115.2799156,-111.754828,-81.4995276,-79.3479061,-111.861434,-111.8797651,-115.0563724,-111.8647843,-115.056258748,-111.840818073,-79.3075378,-111.84112,-112.2679751,-111.84037,-113.968063,-80.7720982,-81.6869,-115.156677,-112.0808664,-81.476215,-115.1522836,-88.2659263,-111.8747445,-111.8856436,-73.559112,-112.2239413,-112.2047537,-79.6507108,-80.089434,-111.860077,-111.841194153,-79.580702,-115.151221454,-73.608063,-115.137102,-111.885429716,-111.8747445,-80.7642653,-111.974232,-115.208444,-79.4626597,-79.9961395,-79.3108026,-115.168773,-114.125534976,-79.3446538,-81.4599213,-79.4856801,-79.5319955,-112.2324406,-81.5079145,-79.9232757,-79.6002712,-79.9197512,-112.0313356,-112.032791262,-73.580375,-79.304713,-79.4008505,-115.174085,-73.7542209393,-79.3714184956,-112.271872759,-80.8400448,-114.0860045,-79.9841149,-80.714122653,-80.756007,-79.0279763,-114.207319,-111.8055993,-73.5710265,-112.1728283,-114.083515268,-114.2095631,-89.277452,-79.5329919,-112.446331,-79.705066,-81.074071,-115.2092745,-73.5659853,-114.970541,-80.2518367699,-79.3823492115,-112.003173828,-115.0934834,-81.3873566547,-79.086016,-112.1262084,-81.7605431,-73.5782911,-79.39434,-81.4391266017,-111.9009926,-111.908383816,-81.1336768,-79.95693,-112.1689326,-111.7712724,-111.926508,-111.9393003,-114.1490512,-111.6951824,-74.021777,-114.0704298,-115.1735947,-115.181656606,-89.3614870643,-114.074264,-79.3362796,-115.063995,-115.07913085,-79.4072608,-111.7867419,-111.812024162,-111.75575953,-111.8753357,-111.8210866,-115.0209041,-115.0183786,-111.7093564,-80.8050068859,-112.0472243,-112.067994484,-80.761037,-80.8445179,-79.4553801,-111.8550886,-79.3932896,-112.2026347,-80.8916095,-88.2190133,-80.904886,-111.8987792,-111.873643845,-111.8884619,-74.041374,-112.0360262,-115.1609676,-73.5712025,-112.0821683,-79.6499967948,-89.3771299,-79.6845419,-79.3499924,-114.939821,-115.119842,-115.1391027,-115.177096976,-115.178243,-115.1598516,-79.3817439,-111.854944,-115.169467218,-81.536844,-112.3575622,-112.102338,-112.089181,-79.3928349,-115.117831742,-115.2172268,-115.2334038,-73.8634277,-80.8189258,-89.2193244,-115.081877,-111.689834,-73.5709511963,-115.3036,-111.7349063,-79.419953,-79.818972,-79.7858462217,-112.1162416,-82.0479176,-79.5141283,-79.3798386678,-80.885743,-79.986997,-79.2597961,-80.2291350142,-115.105312,-80.7441894,-81.4404341,-112.1609056,-112.2357715,-79.3741718,-80.0762659,-80.0584256,-115.055911168,-81.9427024,-80.0567122,-81.9519804,-114.0074751,-112.0055093,-73.8246835,-111.995442,-79.3583158,-111.999029,-115.1236952,-81.2113603,-79.3872779,-80.0125872687,-79.998918,-89.4130592,-80.7552608,-81.6188352,-79.2393032,-81.7667118,-79.3420715,-81.8034086376,-112.2252174,-114.0495637,-115.172635517,-115.170815,-115.170864368,-115.1696112,-79.9981513,-80.0043602268,-112.0653262,-111.978891,-112.067664371,-79.9250006,-79.4378175,-79.6269386,-89.4044974,-79.3950228,-79.532507658,-73.4547988,-80.8324703,-80.9441649,-79.2722368,-115.0485098,-88.2313045,-88.2296092,-79.3923588,-88.246514,-111.946049,-115.2074151,-115.297852514,-112.15107,-111.977403402,-79.4508751,-73.5795599,-114.1559546,-80.8402725,-81.55327,-73.328194432,-112.102853,-112.1286448,-111.9410241,-114.0583061,-79.6457634,-79.4013373,-115.196332,-79.3791282,-115.1816964,-111.669982,-115.2097623,-81.6914126,-112.1865508,-73.5829375684,-115.0639178,-79.4361019,-111.7586615,-111.742925,-111.925178,-111.927495,-111.925742,-111.8602856,-111.720331976,-112.2646559,-112.06413,-79.559187,-115.1334096,-79.344201,-111.7269572,-73.6236917,-73.5704334,-81.130743,-114.9306573,-73.6203657,-79.973072,-81.027326,-79.3981607,-112.012193,-114.9931433,-81.6935181,-81.692606658,-115.130709,-79.5953368,-115.1203741,-115.1215682,-112.2750529,-115.17534,-73.6643141,-81.6178286076,-79.9532909,-81.525911,-114.1393285,-89.3765366,-79.9286001921,-79.9858749,-115.1812736,-112.233664,-115.163441,-80.8423129341,-112.341531,-89.4022512,-81.8634179,-81.3600487,-79.292741,-81.7102123,-79.6214711666,-79.6220354363,-89.2652917,-79.9198168,-79.9227349,-80.8772242,-80.8800652,-79.9044137,-115.2791594,-115.14,-115.162307739,-112.212588,-79.4217661,-112.11491,-79.9879698,-79.4004964,-79.3927559,-73.5741785,-112.429098,-112.4222033,-73.5783576965,-79.9648853,-79.3922381,-79.3384229,-79.383705,-81.3085912867,-111.7895523,-79.3304513,-111.900731,-81.5182186,-111.9709155,-82.2139932,-88.2780517,-88.2753144,-111.9786334,-112.239877,-112.239905,-112.237523,-79.452168,-111.925422,-111.9246967,-79.4058478,-115.2856528,-73.5681311,-115.2964312,-114.1097406,-111.9880199,-79.4559215,-111.7185686,-111.8191254,-80.0343204,-115.2784417,-112.0148759,-115.258273815,-81.517162621,-115.2020708,-111.9256926,-111.9269609,-81.47207,-115.1710527,-115.1193868,-111.8402281,-80.1572587037,-80.1587162912,-79.3805449,-79.5583543809,-79.3459670934,-112.365478769,-112.3416512,-89.2759089,-81.897724,-79.9972048,-73.7516459,-114.1322684,-73.5539049,-79.376572,-111.642224,-115.2060308,-80.8525254,-111.5468301,-112.0067284,-112.0121147,-79.7953303,-111.984285317,-79.7936134,-111.983224221,-73.629951,-79.6526462,-112.1594993,-88.2432661,-81.2860738,-79.3914771,-111.9625386,-111.894466648,-79.2530966,-111.759219,-79.4445408,-111.789314188,-111.7205233,-81.3810121,-81.296011,-79.333261,-115.291269,-115.298858285,-115.1537409,-114.1670721,-115.15323,-115.123672485,-115.3667218,-112.152357,-80.6198581,-79.2529672,-79.9628682,-79.3282785,-73.7378374,-79.755163,-114.0034331,-79.398122,-80.0225039,-80.125909,-81.7340621352,-79.4104383,-81.3522926,-80.0694916,-81.6332655,-114.0693342,-73.5940043,-80.79437,-112.0822062,-79.689386174,-79.5514954,-112.0873242,-111.7495419,-73.614214,-81.592588,-112.2060344,-114.209350202,-79.4124287,-111.8821803,-79.3909892,-79.2941435,-81.4408580428,-81.4406439067,-114.0846696,-81.8571743,-80.821249268,-81.3612889,-112.351344346,-115.0826221,-81.3314222,-111.8749872,-79.3847471,-79.2908649171,-89.2317147,-79.6419308465,-79.6422471,-89.2702544,-112.1135141,-81.6264363,-79.3924822,-79.4673562,-115.0774773,-115.0735699,-81.0277775,-81.0384934,-80.1169577,-112.0357137,-88.2441408,-111.798885,-88.2389546,-115.205132095,-79.3876081,-111.9322704,-79.6482922,-89.4012370706,-112.2197221,-112.242239714,-112.2451314,-111.9224398,-111.9224398,-111.9296646,-112.068664,-112.2037058,-79.5035941,-81.4733615,-111.6829159,-79.3805874,-79.243296,-79.5474220812,-81.533734,-81.5375277644,-81.7033495009,-111.8304052,-111.836459,-79.1312376,-79.3894714491,-115.2573615,-115.1918552,-115.24878,-89.3842695108,-112.1291724,-80.8626992335,-112.1875918,-80.874461,-79.3866757,-112.3158945,-79.5725506917,-115.2567877,-114.065194387,-79.3961587,-80.961875,-115.0032125,-79.7283838,-80.8729325,-115.1129681,-115.11800768,-112.037422881,-112.0369918,-112.0663073,-115.2265555,-80.8776911313,-115.2427315,-115.3074646,-115.3074646,-115.2054969,-115.2172127,-111.791338921,-111.841040207,-111.8360327,-111.8351,-111.8619471,-115.1852569,-111.9810917,-111.997864,-79.2695518,-115.150647,-81.6296236,-114.005667256,-79.3932896,-80.7325287,-112.134432,-79.7397623013,-79.4894362,-79.1521372,-115.089755535,-79.4190283,-112.1259291,-111.8765841,-111.9060007,-111.8607944,-111.888050157,-82.0186236,-89.3657578,-115.2214843,-115.197258,-79.5232792,-115.173851,-79.4195095,-115.0646758,-115.0228736,-73.447508,-115.279855169,-81.8048683,-79.3803279,-115.0870226,-115.0625851,-79.7593976,-79.3822566263,-111.9269743,-115.2550906,-79.537128,-111.6869216,-80.798043,-79.3985359,-88.239211,-115.1968084,-80.9453787,-115.3323958,-79.3975229,-111.789559945,-111.802382,-79.3802132,-115.152742267,-79.4070847,-73.5640372,-115.0001196,-81.096992,-73.566597,-79.3631878,-114.0581012,-79.7121212,-111.965015663,-115.2806857,-81.7089072,-81.3148402,-115.290999,-111.9116858,-111.912721247,-79.3989615,-115.2792302,-115.2614307,-112.151132,-89.39021,-81.4375891,-79.528757,-81.245191,-79.2667077,-79.5328831673,-79.778639,-81.4588103,-81.8521955,-89.376234,-79.081848,-112.06652,-112.0300423,-112.353115076,-79.8812642,-114.981086731,-79.2883456,-79.3482166,-115.17313,-73.5526664,-115.1434711,-114.117734377,-79.9484106,-81.7718303,-81.8158178,-81.7834336,-81.8083923,-114.0711193,-74.0604836,-112.0851465,-81.8034285,-81.591684,-81.662804,-73.711708,-112.2924217,-81.3634438,-111.9405712,-114.0630136,-79.3844646,-112.2221158,-112.113784,-112.111477754,-113.9880469,-112.1699845,-111.7364554,-79.3888742,-115.2761354,-115.2792461,-80.9156755,-79.826927,-112.3725655,-115.1633034,-79.4386714,-115.1056747,-115.162372,-115.2747692,-115.2516134,-79.3230886,-88.1890766,-80.720557,-88.222747,-115.1841391,-79.4335190579,-115.19739,-115.2436577,-112.2517631,-115.2403366,-81.475288,-79.9564405,-79.7544654,-79.2934799,-115.304225901,-115.1690569,-111.923489,-115.344993,-115.3330428,-79.3876981,-115.307372,-79.7521383,-79.842708,-79.4480427,-79.5656406,-112.047023,-79.2533629,-81.8509091,-81.8346773,-115.2079142,-112.2629446,-111.9201802,-111.9073016,-111.864413023,-111.9155407,-111.8970777,-111.8926303,-80.021018,-79.414027,-80.8470367,-80.8424885,-111.6915046,-79.3255941,-111.743798,-114.0690338,-79.9065526,-79.6845419,-112.051704,-112.4245931,-112.0300171,-112.0341767,-73.576594,-79.8809619,-88.2376606,-79.4424164,-81.693945,-115.1316867,-115.139156471,-79.7157192427,-81.7902687,-81.8078947,-111.7477174,-73.566784,-79.9828179,-112.3029362,-79.664864,-112.291932526,-112.3418799,-112.0714835,-79.8449595396,-111.9052002,-111.9130595,-111.96354,-112.0996844,-114.0713793,-73.5751246,-73.571079,-79.5384264,-114.0707963,-111.7562143,-79.6119117737,-79.471494,-81.335221,-112.275667414,-115.28005,-80.904612,-112.2355778,-79.267356,-79.9232273,-79.4203754,-112.364484103,-79.6245065,-111.7918256,-79.3365222,-80.889975,-112.045793458,-113.9820401,-79.343337,-112.081565,-112.040429,-112.1507483,-79.4039413,-79.3483378,-115.208471,-111.669485,-80.842235,-112.2417554,-112.036721,-112.2609115,-112.037,-79.667083,-115.261980057,-73.5859978,-79.350019,-114.128391,-112.0479165,-111.743862366,-111.743348837,-111.7334192,-79.4025622,-81.446222,-73.623173,-112.0364356,-112.0595603,-112.0361235,-73.5632229,-112.280129,-112.270154,-112.200364308,-79.4451386,-79.2698542,-111.8489883,-111.835276186,-111.8985922,-111.8556958,-115.2053402,-81.69466,-79.4352469,-79.8130032421,-79.388723,-73.5055055545,-0.6122038,-113.95462,-73.5681876,-89.339923,-73.5585644,-79.958418,-79.4194750115,-81.4475538,-115.046467474,-73.794885,-73.6236614,-79.626367,-79.907714,-112.1,-79.3796056509,-79.642797,-89.265671,-114.074830947,-115.209300752,-80.0711385,-115.2739864,-79.3842642,-80.8479534835,-114.0353912,-113.9344459,-115.1913849,-79.4454729,-112.350825,-112.360666,-115.152887838,-74.157179,-79.5124038,-115.3144258,-111.9913147,-112.065090537,-79.5703868608,-79.4025509,-112.07736969,-112.0780771,-73.5736422,-80.8491687,-80.905303,-79.3768692017,-112.4053046,-81.026523,-115.118084999,-81.495,-115.1320801,-114.0750545,-111.8677129,-115.1191088,-115.119421,-112.341984113,-112.3924311,-79.4523918,-79.356461,-112.113185325,-112.1321233,-80.7448698,-111.7729742,-79.4820323753,-111.736000252,-111.7220739,-79.3181378541,-79.4104068,-79.2837077,-115.245359,-115.2422629,-112.3586909,-79.2233090606,-89.352478,-88.242223,-88.2559525967,-112.4088913,-79.3808555603,-115.152000079,-79.449897,-79.3849472,-73.6141885,-73.8069601,-112.2204813,-112.2563884,-111.696721,-112.0698848,-79.3987793,-81.6774369,-79.7748751,-79.6827332533,-111.9127599,-80.753764,-115.1916486,-79.9767288,-79.3869717,-79.38957,-79.3993567,-79.8100605,-115.1722346,-115.139024607,-79.264716,-115.1768402,-115.1533426,-79.486769,-80.7558599,-81.6943605,-73.5417178,-115.195187889,-112.1339396,-73.61413,-112.147947018,-114.939821,-114.939821,-115.3253819,-114.0638592,-81.5367382,-79.41900298,-115.209064,-79.2995013,-115.2193292,-79.3806653,-79.6455918,-111.8236484,-88.2463012616,-112.136244,-88.244285,-88.2440847,-111.9267821,-79.84395,-73.5530792,-111.910376348,-79.6233609,-81.7841097,-81.8261266,-79.6953266,-79.466437,-111.9251151,-111.922713,-111.9770253,-111.9294198,-111.9224398,-111.9263968,-80.8133228,-111.941444,-111.9231217,-80.7990185,-114.0716738,-89.382403,-79.4558409,-112.2642679,-112.0751448,-79.4239029,-79.777539,-81.852196008,-79.38979,-79.8797105,-112.3030879,-112.2741675,-115.1534625,-115.1502643,-112.340383,-79.383606,-81.4969602,-79.9515557,-79.9294174,-80.2930393,-79.299724102,-112.224647,-79.393574,-81.811928,-73.5738613,-73.5587651,-79.4797612,-111.7648432,-115.066,-73.6202633,-81.4953802,-112.3594424,-79.3839517,-73.8343536,-89.3241989,-79.3977847,-81.5256877,-79.9242666,-115.2721056,-115.28005,-115.0839455,-79.7683503,-79.3491051,-79.984867,-79.3506115,-114.081484136,-112.0749052,-115.2003896,-82.0330224,-115.2520215,-79.4769534,-112.2166761,-79.8857764,-112.222782,-81.4541556,-79.3990465,-79.983834,-80.0673114,-80.0658031,-111.6331178,-79.3887901,-115.1909031,-79.4732295,-115.1935448,-115.1776436,-80.104204,-114.197940179,-79.4241386,-81.8741299,-81.4919968,-81.707812,-79.3994606115,-74.0188473,-112.0069922,-115.1039355,-115.048004774,-79.3711929,-111.9141893,-111.9084736,-114.08494,-79.5775762,-115.174085,-80.728907,-115.173583,-115.273006149,-112.2441039,-115.2914696,-111.8298415,-79.4023148,-79.3840676,-88.2432992,-112.3085435,-88.240606,-88.243852,-111.8064175,-79.5478619,-111.9761591,-79.3579885,-81.6886239,-81.2416989,-79.2885159,-112.0198194,-111.6883735,-79.3719866,-79.4069701295,-79.4190283,-111.9844797,-111.9395558,-111.914229714,-111.1588461,-115.1667207,-115.136044174,-79.4312592,-111.7895167,-80.9435389,-115.12804,-111.858386099,-111.7260572,-80.796586,-80.799683,-112.0363947,-79.4206123,-81.503467,-113.985385,-81.4483062923,-81.4419834,-81.44176,-82.0374687,-115.1017908,-79.7125993,-79.4264768,-111.9084695,-111.9187008,-112.0396631,-112.1507276,-80.7762709,-112.0640979,-81.9515731776,-115.2093936,-111.692548,-81.6869213,-115.175830263,-112.709552,-115.1538714,-79.8272067,-115.1538714,-115.152489349,-79.6615748,-80.8511594,-80.8498829,-80.058565]

points = []
for i in range(len(xCoordinateList)):
    points.append(rs.AddPoints([xCoordinateList[i],yCoordinateList[i],0]))
#consider using a flat projection of the country with the denser areas built up into walls
Ejemplo n.º 16
0
import rhinoscriptsyntax as rs

joints = []
legs = []
legsl = []

jNr = rs.GetInteger(“Enter the number of joints:”,4,2,8)
for i in range(0, jNr): joints.append(rs.GetPoint(“Locate joint nr.”+str(i)))
rs.AddPoints(joints)
goal = rs.GetPoint(“Locate the goal”)
rs.AddPoint(goal)
precision = rs.GetReal(“Enter the precision of the approximation:”,0.1,0.001,1)
arm = rs.AddPolyline(joints)
base = joints[0]
legsl = rs.ExplodeCurves(arm, True)
for l in legsl: legs.append(rs.CurveLength(l))
joints.insert(jNr, goal)
legs.append(0)
error = rs.Distance(goal, joints[jNr-1])

def chain(ch, lh, i):
    while i > 0:
        temp1 = rs.AddLine(ch[i], ch[i-1])
    if lh[i-1] > 0: temp2 = rs.EvaluateCurve(temp1, lh[i-1])
    if lh[i-1] == 0: temp2 = ch[i]
    ch[i-1] = temp2
    #rs.DeleteObject(temp1)
    i = i - 1
    return ch

iteration = 0
Ejemplo n.º 17
0
import rhinoscriptsyntax as rs

#delete all existing objects
rs.DeleteObjects(rs.AllObjects('select'))

#variables
flowerRadius = 10
centerRadius = 2
petalCount = 15
flowerCenter = (0, 0, 0)
petalWidth = 4
petalCurves = []

outerCircle = rs.AddCircle(flowerCenter, flowerRadius)
points = rs.AddPoints(rs.DivideCurve(outerCircle, petalCount))
rs.HideObjects(points)

for i in range(len(points)):
    centerLine = rs.AddLine(points[i], flowerCenter)
    rs.HideObject(centerLine)
    petalMidpoint = rs.AddPoint(rs.CurveMidPoint(centerLine))
    rs.HideObjects(petalMidpoint)
    vector = rs.VectorCreate(points[i], petalMidpoint)
    vector = rs.VectorUnitize(vector)
    vector = rs.VectorScale(vector, (petalWidth / 2))
    vector = rs.VectorRotate(vector, 90, [0, 0, 1])
    petalEdgePoint = rs.CopyObject(petalMidpoint)
    petalEdgePoint = rs.MoveObject(petalEdgePoint, vector)
    curve = rs.AddArc3Pt(flowerCenter, points[i], petalEdgePoint)
    vector2 = rs.VectorRotate(vector, 180, [0, 0, 1])
    petalEdgePoint2 = rs.CopyObject(petalMidpoint)
Ejemplo n.º 18
0
import rhinoscriptsyntax as rs

curves = rs.ObjectsByType(4)
picturePlane = rs.GetObject("select the surface to use as the picture plane",
                            8)
eyePoint = rs.GetObject(
    "select the point to use as the eye, the point at which the projected content will converge",
    1)

#note that we wouldn't need an eye point if our projectors are paralell

for curve in curves:
    pointsOnCurve = rs.DivideCurve(curve, 100)
    intersectionPoints = []
    for point in pointsOnCurve:
        projector = rs.AddLine(point, eyePoint)
        intersections = rs.CurveSurfaceIntersection(projector, picturePlane)
        if intersections:
            intersectionPoint = intersections[0][1]
            intersectionPoints.append(intersectionPoint)
    rs.AddPoints(intersectionPoints)
    rs.AddInterpCurve(
        intersectionPoints,
        1)  #what would be a more precise way to reconstruct the curve?

#add layer management to sep process content from finish content, and to use close/far distinction
Ejemplo n.º 19
0
print stepsy, stepsx

rs.EnableRedraw(False)

ptlist = []

for i in range(stepsy):
    rows = []
    for j in range(stepsx):
        nowpt = [
            j * cellsize + min(xlist), i * cellsize + min(ylist),
            min(zlist)
        ]
        ptonsrf = rs.ProjectPointToSurface(nowpt, srf, [0, 0, 1])
        if len(ptonsrf) > 0:
            rs.AddPoints(ptonsrf)
            rows.append(ptonsrf[0])
        else:
            rows.append(nowpt)
            rs.AddPoint(nowpt)
    ptlist.append(rows)

print len(ptlist), len(rows)
print rows[0]
print rows[1]

#assign variables for text file
ncols = len(ptlist[0])
nrows = len(ptlist)
xllcorner = ptlist[0][0][0]
yllcorner = ptlist[0][0][1]
Ejemplo n.º 20
0
        for i, crv in enumerate(crvs):
            tempPt = rs.EvaluateCurve(crv, rs.CurveClosestPoint(crv, pt))
            dist = rs.Distance(pt, tempPt)
            if dist < closestDist:
                closestDist = dist
                closestIndex = i
        
        tempPt = rs.EvaluateCurve(crvs[closestIndex], rs.CurveClosestPoint(crvs[closestIndex], pt))
        rs.AddLine(tempPt, pt)
        edgeVectors.append(rs.VectorCreate(tempPt, pt))
    return edgeVectors


threshold = 3

srf = rs.VisibleObjects()

myPts = RandomPtsOnSrf(srf, 10)

newPts = rs.AddPoints(myPts)

vecs = EdgeVectors(srf, newPts)
for vec in vecs:
    print rs.VectorLength(vec)
for i, pt in enumerate(newPts):
    rs.MoveObject(pt, rs.VectorScale(vecs[i], .5))

#pts = congregate(newPts, threshold, 50)

#for pt in pts:
#    rs.AddCircle(pt, threshold/2)
Ejemplo n.º 21
0
def directNormalIrad(day, hour):
	return 1000*max(0, -math.cos(hour*math.pi/12) + 1/8.0 - (day-171)**2/115600)

# this module can be used to compute all the solar angles as well as the sun vector for
# any day and time (given in local time)
day = sg.calc_dayOfYear("3/21")
hour = sg.calc_hourDecimal("11:00")

solarAngles = sg.calc_solarAngles(latitude, longitude, timezone, day, hour)
print "Altitude = ", solarAngles[2]
print "Azimuth = ", solarAngles[3]

sun = sg.calc_sunVector(latitude, longitude, timezone, day, hour)
R = 20 #scaling for the sun vector so that it is more visible on canvas
sun[:] = [x*R for x in sun]
rs.AddPoints(sun)


# or to show the sun path throughout the a range of times in the day
startTime= "7:00"
endTime = "19:30"
hourStart = sg.calc_hourDecimal(startTime)
hourEnd = sg.calc_hourDecimal(endTime)
R = 20
N = 20 #number of sample points between starting time and end time
for i in range(N+1):
	sun = sg.calc_sunVector(latitude, longitude, timezone, day, hourStart+i*(hourEnd-hourStart)/N)
	if sun[2] > 0:
		sun[:] = [x*R for x in sun]
		rs.AddPoint(sun)
Ejemplo n.º 22
0
__author__ = "billpower"
__version__ = "2019.12.25"

import rhinoscriptsyntax as rs

plane = rs.WorldXYPlane()   #获取xy以原点为中心的参考平面
rectangle = rs.AddRectangle(plane,40,40)

dpointsCoordinate = rs.DivideCurve(rectangle,10) #等分10矩形
dpoints = rs.AddPoints(dpointsCoordinate)   #增加等分点
print(dpoints)

format = "point_%s" #格式化字符串的模式
dpointe = []
i = 0
for i in  range(len(dpoints)):
    dpointe.append(format % str(i)) #格式化字符串并逐一追加到列表
print(dpointe)

dpointx = list(range(len(dpoints))) #建立等分点索引
print(dpointx)
Ejemplo n.º 23
0
all_points = []
for i in range(0, 100):
    pt = rs.AddPoint(place_pts(100, 100, 100))
    index = rs.PointArrayClosestPoint(cloud, pt)
    cp = cloud[index]
    vect = rs.VectorCreate(cp, pt)
    #move = rs.MoveObject(pt,vect)
    #vector = rs.VectorCreate(index, pt)
    #index_points = rs.PointArrayClosestPoint(pipe_points, pt)
    #vector = rs.VectorCreate(index_points, pt)
    #rs.VectorCreate()
    #unit_vector = rs.VectorUnitize(vector)
    #new_pt = rs.MoveObject(pt, unit_vector)

    project = rs.ProjectPointToSurface(pt, pipe, vect)
    rs.AddPoints(project)

    all_points.append(pt)

#pipe_points = []
#for i in range(300):
#contour = rs.CurveContourPoints(pipe, point1, point2, 1)

#SurfaceDomain requires two arguments, second argument = u or v direction, 0 or 1 respectively
#dom_u = rs.SurfaceDomain(pipe,0)
#dom_v = rs.SurfaceDomain(pipe,1)
#eval_srf = rs.EvaluateSurface()(pipe,uv)

#cloud = rs.GetPoints()
#cloud.append(point1)
#cloud = rs.PointCloudPoints(cloud)
Ejemplo n.º 24
0
#coding=utf-8
import rhinoscriptsyntax as rs

plane = rs.WorldXYPlane()  #建立XY工作平面
mplane = rs.MovePlane(plane, [6, 6.5, 0])  #移动平面
rectangle = rs.AddCircle(mplane, 5)  #建立圆形
dpointsc = rs.DivideCurve(rectangle, 20)  #等分矩形
dpoints = rs.AddPoints(dpointsc)  #增加等分点
for i in range(len(dpoints)):
    rs.AddText(str(i), dpoints[i], 1)  #添加字
print(dpoints)

#sphere = rs.AddSphere(dpoints[3],1)
#cube = rs.AddBox(rs.BoundingBox(sphere))

sdpoints = dpoints[:]  #切片提取点
for i in range(len(sdpoints)):
    sphere = rs.AddSphere(sdpoints[i], 0.5)
    cube = rs.AddBox(rs.BoundingBox(sphere))
    rs.DeleteObject(sphere)  #删除不再使用的球体
    xform = rs.XformTranslation([i, i * 1.3, i * 1.3])  #分步骤执行比gh同步更灵活
    trancube = rs.TransformObject(cube, xform)
Ejemplo n.º 25
0
        else:
            layerName = "far"
            farCount += 1

        projector = rs.AddLine(point, eyePoint)

        rs.ObjectLayer(projector, layerName)

        intersections = rs.CurveSurfaceIntersection(projector, picturePlane)
        if intersections:
            intersectionPoint = intersections[0][1]
            pointObjectInSpace = rs.AddPoint(point)
            rs.ObjectLayer(pointObjectInSpace, layerName)
            intersectionPoints.append(intersectionPoint)

    pointObs = rs.AddPoints(intersectionPoints)
    reconstructedCurve = rs.AddInterpCurve(
        intersectionPoints,
        1)  #what would be a more precise way to reconstruct the curve?

    if closeCount > middleCount and closeCount > farCount:
        rs.ObjectLayer(reconstructedCurve, "close")

    elif middleCount > farCount:
        rs.ObjectLayer(reconstructedCurve, "middle")

    else:
        rs.ObjectLayer(reconstructedCurve, "far")

#add layer management to sep process content from finish content, and to use close/far distinction
Ejemplo n.º 26
0
#整理变量到列表
cpoints = []
cpoints.extend([mstartpoint, mmidpoint, mendpoint])  #追加移动后的点在一个列表中

centercurve = rs.AddCurve(cpoints)  #6.建立有弧度的曲线
#rs.DeleteObject(basicline)
#基本结构线已建立

#建立等分点与数据组织
divicount = 14  #建立等分点变量
Adivipoints = rs.DivideCurve(offsetlineA, divicount)
Bdivipoints = rs.DivideCurve(offsetlineB, divicount)
cendivipoints = rs.DivideCurve(centercurve, divicount)

#在rhino空间中建立点
rs.AddPoints(Adivipoints)
rs.AddPoints(Bdivipoints)
rs.AddPoints(cendivipoints)

#检查变量
patternA = list(range(0, len(Adivipoints), 2))
patternB = list(range(1, len(Adivipoints) + 1, 2))
print(patternA)
print(patternB)

#建立列表
lineAps = []
lineBps = []
lineCps = []

#循环语句,同时分别提取保留点
Ejemplo n.º 27
0
 def test_SimpleWithUVSpansAndDefaults(self):
     pt_ids = rs.AddPoints([(-20, 0, 0), (0, 20, 0), (20, 0, 0)])
     id = rs.AddPatch(pt_ids, (10, 10))
     brep = rs.coercebrep(id, True)
     self.assertTrue(brep.IsSurface)
Ejemplo n.º 28
0
new_object = False
vertex = []
for L1 in vertices_file:
    L1stripped = L1.strip()
    y_split = L1stripped.split(' ')

    if new_object:
        if y_split[0] == 'v':
            vertex.append([float(y_split[1]), float(y_split[2]), 0])
        else:
            counter += 1
            if counter == 1:
                new_object = False

                vertex.append(vertex[0])
                pts_ids = rs.AddPoints(vertex)
                rs.ObjectColor(pts_ids, [255, 0, 0])

                curve_ids = rs.AddPolyline(vertex)
                surf_ids = rs.AddPlanarSrf(curve_ids)

                # This height value can be further edited to reduce complexity
                # A simple way to edit this would be to floor the value to reduce the step sizes possible.
                height = float(y_split[1])

                if height > 0:
                    extrusion_pt = [vertex[0][0], vertex[0][1], height]
                    extrusion_curve = rs.AddLine(vertex[0], extrusion_pt)
                    vol_ids = rs.ExtrudeSurface(surf_ids, extrusion_curve)

    if 'object' in L1stripped:
   
def create_set(x):
    new_set = [x[i:i+8] for i in range(0,len(x),8)]
    return new_set

pt=[]
pt.append((0,0,0))
pt.append((0,int(cube_dim),0))
pt.append((int(cube_dim),int(cube_dim),0))
pt.append((int(cube_dim),0,0))
pt.append((0,0,int(cube_dim)))
pt.append((0,int(cube_dim),int(cube_dim)))
pt.append((int(cube_dim), int(cube_dim), int(cube_dim)))
pt.append((int(cube_dim),0,int(cube_dim)))

cube_pts = rs.AddPoints(pt)

cube_range = range(int(cube_dim) , int(cube_num * cube_dim) , int(cube_dim))

xdir = [rs.CopyObject(i, (r , 0 , 0)) for r in cube_range for i in cube_pts]

xdir = cube_pts + xdir

ydir=[rs.CopyObject(x , (0 , r , 0)) for r in cube_range for x in xdir]

zdir=[rs.CopyObject(x , (0 , 0 , r)) for r in cube_range for x in xdir] + \
     [rs.CopyObject(y , (0 , 0 , r)) for r in cube_range for y in ydir]

all_cube_pts = rs.coerce3dpointlist(xdir + ydir + zdir)

index = [rs.PointArrayClosestPoint(point_cloud, pt) for pt in all_cube_pts]