Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)

src/l/a/ladybug-HEAD/src/Ladybug_Radiation Rose.py   ladybug(Download)
                    for vectorCount, vec in enumerate(tiltedRoseVectors):
                        rcVector = rc.Geometry.Vector3d(vec)
                        rcVector.Rotate(rotatoionAngle, rc.Geometry.Vector3d.ZAxis)
                        patchesNormalVectors[vectorCount] = (rcVector.X, rcVector.Y, rcVector.Z)
 

src/l/a/ladybug-HEAD/src/ladybug_ladybug.py   ladybug(Download)
    def angle2north(self, north):
        try:
            # print north
            northVector = rc.Geometry.Vector3d.YAxis
            northVector.Rotate(math.radians(float(north)), rc.Geometry.Vector3d.ZAxis)
            if angle in mainAngles: mainLine = True
            vector = rc.Geometry.Vector3d(northVector)
            vector.Rotate(-math.radians(angle), rc.Geometry.Vector3d.ZAxis)
            line, basePt, baseCircle, outerCircle = drawLine(cenPt, vector, radius, mainLine, xMove)
            if mainLine == True: compassText.append(mainText[mainAngles.index(angle)])

src/l/a/ladybug-HEAD/src/Ladybug_ShadingDesigner.py   ladybug(Download)
        # Define a vector to be used to generate the planes
        planeVec = rc.Geometry.Vector3d(normalVector.X, normalVector.Y, 0)
        planeVec.Rotate(1.570796, rc.Geometry.Vector3d.ZAxis)
 
        #Define a bounding box for use in calculating the number of shades to generate
                    planeVec = rc.Geometry.Vector3d(normalVector.X, normalVector.Y, 0)
                    planeVec.Rotate(1.570796, rc.Geometry.Vector3d.ZAxis)
                    normalVectorPerp.Rotate((shdAngle*0.01745329), planeVec)
                elif horOrVertical == False:
                    planeVec = rc.Geometry.Vector3d.ZAxis
                    if getAngle2North(normalVectorPerp) < 180:
                        normalVectorPerp.Rotate((shdAngle*0.01745329), planeVec)
                    else: normalVectorPerp.Rotate((shdAngle*-0.01745329), planeVec)

src/l/a/ladybug-HEAD/src/Ladybug_view Rose.py   ladybug(Download)
                #alternate method for midVector
                midVector = rc.Geometry.Vector3d(vector1)
                midVector.Rotate(math.radians(-90), testPlane.Normal)
 
            # create the arc

src/r/h/rhinopython-HEAD/scripts/rhinoscript/pointvector.py   rhinopython(Download)
    angle_radians = Rhino.RhinoMath.ToRadians(angle_degrees)
    rc = Rhino.Geometry.Vector3d(vector.X, vector.Y, vector.Z)
    if rc.Rotate(angle_radians, axis): return rc
 
 

src/l/a/ladybug-HEAD/src/Ladybug_Radiation Calla Lily.py   ladybug(Download)
            hRotationVectors = [];
            northAngle, northVector = lb_preparation.angle2north(north)
            eastVector = rc.Geometry.Vector3d(northVector); eastVector.Rotate(math.radians(-90), rc.Geometry.Vector3d.ZAxis)
            # print eastVector
 
 
                # rotate vertically
                vectorVRotated.Rotate(math.radians(angle), eastVector)
 
                for hAngle in roseHAngles:
                    hVector = rc.Geometry.Vector3d(vectorVRotated)
                    hVector.Rotate(-math.radians(hAngle), rc.Geometry.Vector3d.ZAxis)

src/l/a/ladybug-HEAD/src/Ladybug_Wind Rose.py   ladybug(Download)
                northVector1 = rc.Geometry.Vector3d(northVector)
                northVector2 = rc.Geometry.Vector3d(northVector)
                northVector1.Rotate(-float(math.radians(angle)), rc.Geometry.Vector3d.ZAxis)
                movingVectors.append(northVector1)
                northVector2.Rotate(-float(math.radians(angle + (segAngle/2))), rc.Geometry.Vector3d.ZAxis)