decodes icon indicating copy to clipboard operation
decodes copied to clipboard

How do I use this library

Open johnathaningle opened this issue 5 years ago • 6 comments

Hi,

I was searching GitHub for a library to assist with creating 3d objects in a generative fashion. I came across this repo but have no idea how to use it. Do you have any demos?

Thanks, -John

johnathaningle avatar Mar 28 '20 12:03 johnathaningle

Hi,

this repo is the code for the book Geometric Computation: Foundations for Design. There you will find all the info

rubenbb85 avatar Jun 22 '20 17:06 rubenbb85

I own the book. Still it is unclear to me how to use this library.

aagd avatar Jul 10 '20 15:07 aagd

Open a new terminal and type pip install decodes

Once the library is downloaded and installed, create a new python file, import the library and you are ready to go.

For example:


from decodes import core

origin = core.Point()
my_point = core.Point(0, 3, 4)

print(my_point.distance(origin))

The result should be 5

Is that what you are looking for?

rubenbb85 avatar Jul 11 '20 13:07 rubenbb85

Hi Ruben, many thanks. I can run your example. But still working with the library and the book is frustrating to me. To achieve something like graphical output, which i consider essential for a book about geometry, it is mentioned briefly something called outies (p.21/22) is needed and sends the reader to a documentation that is nowhere to be found. It seemed to me this documentation was planned for the http://decod.es website, which never materialized and now only points to this github repo. I've seen the basic docs included here, but found not a word about outies in there.

aagd avatar Jul 11 '20 18:07 aagd

I have forked the project and added all the information I could find to make the library run. Check the fork here

rubenbb85 avatar Jul 12 '20 09:07 rubenbb85

Hi Ruben, many thanks for this fork, a brilliant idea really. It will help me to get things going, as soon as I have a little time to dig a bit deeper and also update my old Rhino license. I hope I can also help you to extend these docs one day...

aagd avatar Jul 12 '20 13:07 aagd