chenzhaiyu / abspy

A Python tool for 3D adaptive binary space partitioning and beyond
https://abspy.readthedocs.io/
MIT License
66 stars 10 forks source link

qiuckstart #17

Closed fangxunyes closed 1 year ago

fangxunyes commented 1 year ago

Hi, I follow the your steps to install the packages but failed to run the quick start code. I use your test data ‘test_points.vg’ It shows 'NameError: name 'bounds' is not defined' 1667836011343

then I add ‘from trimesh import bounds’ but it shows ‘TypeError: 'module' object is not subscriptable’ 1667836479358

this are my environment ubuntu 20.04 python=3.9.13 abspy=0.2.1 sage=9.4 others are installed by ‘pip install -r requirements’

Can I get any tips? thank you

chenzhaiyu commented 1 year ago

Hi @fangxunyes, here bounds is just some arbitrary placeholder representing the bounding box of the geometry (hence bounds[:, 0, 2].min() means the minimal Z-value, therefore the additional_planes to append here actually represents the bottom plane of the geometry). You can assign any plane parameters to additional_planes, e.g.,

additional_planes = [[0, 1, 2, 3], [100, 200, 300, -500]]

You can get some idea by checking test_primitive and test_combined.