Grasshopper

algorithmic modeling for Rhino

Hi,

I would like to ask for the error dealing with bouding box.

Here is my code

import rhinoscriptsyntax as rs
import math
import random
import Rhino.Geometry.BoundingBox
import Rhino.Geometry as rg
import scriptcontext as sc

corner = rs.BoundingBox(bx)

However, python returns error "Could not convert Rhino.Geometry.Box to a Point3d". Is there any step I did not take? the method is supposed to return a list of box corners

Views: 1018

Replies to This Discussion

 I thought importing rhinoscriptsyntax was enough. And yeah I thought I dont need to convert the last line to list too. 

Thank you very much!!

Hi

If you call rhinocommon, you should use GetBoundingBox methods.

http://developer.rhino3d.com/api/RhinoCommonWin/html/M_Rhino_Geomet...

If you call rhinoscriptsyntax, you can use the pts = rs.BoundingBox (x)
a = rs.AddBox (pts) function.

 Check the attached file. I hope this helps

Attachments:

Thank you! I kinda got it previously. Just trying to understand how the library and syntax of rhino objects in python work. I used the same code but I guess the difference was that I set my box input as Box instead of object so the method Boundingbox didnt work. Thank you!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service