(Python) Script to draw camera object as closed brep


#1

Is there some script that draws Rhino’s camera object as closed brep? (The 4 triangles and the single rectangle joined)


#2

@MarcusStrube,

Note that you might have to add some checks to the example below.

If the camera or its lens length is getting very small, the brep may get invalid depending on the tolerances.

CameraToBrep.py (1.4 KB)

c.


#3

Great script Clement!


#4

Thank you @djordje, i am not even sure if this is the most efficient way to do it :wink:

c.


#5

Moving CameraFrame to CameraTarget and intersecting lines from CameraLocation to FarRect’s points with that frame might be more efficient.

But your way is absolutely :muscle:. Thank you, Clement!