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

# Rhino.Geometry.Ray3d

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

```                    if bldgMesh!=[]:
#calculate intersection
ray = rc.Geometry.Ray3d(testPoint, rc.Geometry.Vector3d(*patchVec)) # generate the ray
if rc.Geometry.Intersect.Intersection.MeshRay(bldgMesh, ray) >= 0.0: check = 0;

```
```                    if vecAngle < (PI/2):
check = 1; # this is simply here becuse I can't trust the break!! Isn't it stupid?
ray = rc.Geometry.Ray3d(testPts[i], patchVec) # generate the ray

if bldgMesh!=None:
```
```                    if vecAngle < (PI/2):
check = 1; # this is simply here becuse I can't trust the break! Isn't it stupid?
ray = rc.Geometry.Ray3d(testPts[i], vector) # generate the ray

if bldgMesh!=None:
```

```            for vec in _sunVectors:
if context_:
if rc.Geometry.Intersect.Intersection.MeshRay(contextMesh, rc.Geometry.Ray3d(pt, vec)) < 0:
sunLines[ptCount].append(rc.Geometry.Line(pt, lineLength * vec))
else: sunLines[ptCount].append(0)
```

```    id = rhutil.coerceguid(surface_ids, False)
if id: surface_ids = [id]
ray = Rhino.Geometry.Ray3d(start_point, direction)
breps = []
for id in surface_ids:
```

```            normalVector = getRayVector(testSurfaces[i], testPt)
# create the meshRay
ray = rc.Geometry.Ray3d(testPt, normalVector)
# run the intersection
if rc.Geometry.Intersect.Intersection.MeshRay(joinedContext, ray) >= 0.0:
```

```        for vector in startVectors:
vector.Unitize()
ray = rc.Geometry.Ray3d(testPt, vector)
if numOfBounce>0:
intPts = rc.Geometry.Intersect.Intersection.RayShoot(ray, [cleanBrep], numOfBounce)
```

```            for vec in _sunVectors:
if context_:
if rc.Geometry.Intersect.Intersection.MeshRay(contextMesh, rc.Geometry.Ray3d(pt, vec)) < 0:
sunLines[ptCount].append(rc.Geometry.Line(pt, lineLength * vec))
else: sunLines[ptCount].append(0)
```

```            vector.Unitize()
testPt = rc.Geometry.Point3d.Add(testPt, -vector * firstBounceLen)
ray = rc.Geometry.Ray3d(testPt, vector)

if numOfBounce>0 and rc.Geometry.Vector3d.VectorAngle(vector, ptsNormals[ptCount]) < math.pi/2:
```

```                    meshSrfCen = BrepMesh.Faces.GetFaceCenter(face) # store face centers
rayPtBases.append(meshSrfCen)
rays.append(rc.Geometry.Ray3d(meshSrfCen, srfNormal))

for targetZone in HBZoneObjects:
```