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

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

src/r/h/rhinopython-HEAD/scripts/rhinoscript/pointvector.py   rhinopython(Download)
    vector1 = Rhino.Geometry.Vector3d(vector1.X, vector1.Y, vector1.Z)
    vector2 = Rhino.Geometry.Vector3d(vector2.X, vector2.Y, vector2.Z)
    if not vector1.Unitize() or not vector2.Unitize():
        raise ValueError("unable to unitize vector")
    dot = vector1 * vector2
    vector = rhutil.coerce3dvector(vector, True)
    rc = Rhino.Geometry.Vector3d(vector.X, vector.Y, vector.Z)
    if rc.Unitize(): return rc
 

src/l/a/ladybug-HEAD/src/ladybug_ladybug.py   ladybug(Download)
            northVector = rc.Geometry.Vector3d.YAxis
            northVector.Rotate(math.radians(float(north)), rc.Geometry.Vector3d.ZAxis)
            northVector.Unitize()
            return math.radians(float(north)), northVector
        except Exception, e:
            # print `e`
            try:
                northVector = rc.Geometry.Vector3d(north)
                northVector.Unitize()
        basePoint.Rotate((self.angle2North + self.solAz) + PI, rc.Geometry.Vector3d.ZAxis, self.cenPt)
        sunVector = rc.Geometry.Vector3d(self.cenPt - basePoint.Location)
        sunVector.Unitize()
 
        raduis = 3 * sunScale

src/l/a/ladybug-HEAD/src/Ladybug_Bounce from Surface.py   ladybug(Download)
 
                        lastVector = rc.Geometry.Vector3d(ptList[-2] - ptList[-1])
                        lastVector.Unitize()
 
                        crossProductNormal = rc.Geometry.Vector3d.CrossProduct(intNormal, lastVector)

src/l/a/ladybug-HEAD/src/Ladybug_Shading Mask_II.py   ladybug(Download)
    for pt in visiblePts:
        movingVector = rc.Geometry.Vector3d(pt- cenPt)
        movingVector.Unitize()
 
        newPt = rc.Geometry.Point3d.Add(cenPt, skyRadius * movingVector)

src/l/a/ladybug-HEAD/src/Ladybug_Forward Raytracing.py   ladybug(Download)
 
                        lastVector = rc.Geometry.Vector3d(ptList[-2] - ptList[-1])
                        lastVector.Unitize()
 
                        crossProductNormal = rc.Geometry.Vector3d.CrossProduct(intNormal, lastVector)

src/r/h/rhinopython-HEAD/scripts/rhinoscript/plane.py   rhinopython(Download)
        xaxis = rhutil.coerce3dvector(xaxis, True)
        xaxis = Rhino.Geometry.Vector3d(xaxis)#prevent original xaxis parameter from being unitized too
        xaxis.Unitize()
        yaxis = Rhino.Geometry.Vector3d.CrossProduct(rc.Normal, xaxis)
        rc = Rhino.Geometry.Plane(origin, xaxis, yaxis)

src/l/a/ladybug-HEAD/src/Ladybug_view Rose.py   ladybug(Download)
    def getUnitizedMovingVector(Pt1, Pt2):
        movingVec = rc.Geometry.Vector3d(Pt2 - Pt1)
        movingVec.Unitize()
        return movingVec
 

src/h/o/Honeybee-HEAD/src/Honeybee_Export To OpenStudio.py   Honeybee(Download)
            for pt in pts:
                movingVector = rc.Geometry.Vector3d(cenPt-pt)
                movingVector.Unitize()
                newPt = rc.Geometry.Point3d.Add(pt, movingVector * 2 * sc.doc.ModelAbsoluteTolerance)
                insetPts.append(newPt)

src/h/o/Honeybee-HEAD/src/Honeybee_ Run Energy Simulation.py   Honeybee(Download)
            for pt in pts:
                movingVector = rc.Geometry.Vector3d(cenPt-pt)
                movingVector.Unitize()
                newPt = rc.Geometry.Point3d.Add(pt, movingVector * 2 * sc.doc.ModelAbsoluteTolerance)
                insetPts.append(newPt)