{"action":"created","issue":{"url":"https://api.github.com/repos/Plant-Root-Soil-Interactions-Modelling/CRootBox/issues/13","repository_url":"https://api.github.com/repos/Plant-Root-Soil-Interactions-Modelling/CRootBox","labels_url":"https://api.github.com/repos/Plant-Root-Soil-Interactions-Modelling/CRootBox/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/Plant-Root-Soil-Interactions-Modelling/CRootBox/issues/13/comments","events_url":"https://api.github.com/repos/Plant-Root-Soil-Interactions-Modelling/CRootBox/issues/13/events","html_url":"https://github.com/Plant-Root-Soil-Interactions-Modelling/CRootBox/issues/13","id":325704230,"node_id":"MDU6SXNzdWUzMjU3MDQyMzA=","number":13,"title":"Python ToolBox","user":{"login":"sathyanarayanrao","id":37840819,"node_id":"MDQ6VXNlcjM3ODQwODE5","avatar_url":"https://avatars0.githubusercontent.com/u/37840819?v=4","gravatar_id":"","url":"https://api.github.com/users/sathyanarayanrao","html_url":"https://github.com/sathyanarayanrao","followers_url":"https://api.github.com/users/sathyanarayanrao/followers","following_url":"https://api.github.com/users/sathyanarayanrao/following{/other_user}","gists_url":"https://api.github.com/users/sathyanarayanrao/gists{/gist_id}","starred_url":"https://api.github.com/users/sathyanarayanrao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sathyanarayanrao/subscriptions","organizations_url":"https://api.github.com/users/sathyanarayanrao/orgs","repos_url":"https://api.github.com/users/sathyanarayanrao/repos","events_url":"https://api.github.com/users/sathyanarayanrao/events{/privacy}","received_events_url":"https://api.github.com/users/sathyanarayanrao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-23T13:25:38Z","updated_at":"2018-06-12T14:53:48Z","closed_at":"2018-06-05T08:28:26Z","author_association":"NONE","body":"Hello CRootBox team,\r\n\r\nI could not succeed in building a python shared library using the python building guide.txt \r\n\r\nThe first line : \r\n\r\n1. comment line 16 \"// #define PYTHON_WRAPPER ...\"\r\n\r\n### I could not find such a line in main.cpp at line 16. Can you please help. \r\n\r\n2. compile the CRootBox model with the following command line\r\n\r\n   g++ examples/Exudation/gauss_legendre.cpp *.cpp -std=c++11 -c -fpic \r\n\r\n3. outcomment line 16 again\r\n\r\n4. g++ -std=c++11 -O3 -fpic -shared -o py_rootbox.so -Wl,-soname,\"py_rootbox.so\" PythonRootSystem.cpp -I/usr/include/python3.4 -lboost_python-py34 ModelParameter.o Root.o RootSystem.o analysis.o sdf.o tropism.o gauss_legendre.o\r\n\r\n### How do I change the step 4 to python 3.6, just change py34 to py36 ? \r\n\r\n- /usr/include/python3.4    is the path to the file pyconfig.h\r\n- boost_python needs to be installed, there will be a file /usr/lib/x86_64-linux-gnu/libboost_python-py34.so\r\n"},"comment":{"url":"https://api.github.com/repos/Plant-Root-Soil-Interactions-Modelling/CRootBox/issues/comments/396618993","html_url":"https://github.com/Plant-Root-Soil-Interactions-Modelling/CRootBox/issues/13#issuecomment-396618993","issue_url":"https://api.github.com/repos/Plant-Root-Soil-Interactions-Modelling/CRootBox/issues/13","id":396618993,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjYxODk5Mw==","user":{"login":"xiaoranzhou","id":29843510,"node_id":"MDQ6VXNlcjI5ODQzNTEw","avatar_url":"https://avatars3.githubusercontent.com/u/29843510?v=4","gravatar_id":"","url":"https://api.github.com/users/xiaoranzhou","html_url":"https://github.com/xiaoranzhou","followers_url":"https://api.github.com/users/xiaoranzhou/followers","following_url":"https://api.github.com/users/xiaoranzhou/following{/other_user}","gists_url":"https://api.github.com/users/xiaoranzhou/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaoranzhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaoranzhou/subscriptions","organizations_url":"https://api.github.com/users/xiaoranzhou/orgs","repos_url":"https://api.github.com/users/xiaoranzhou/repos","events_url":"https://api.github.com/users/xiaoranzhou/events{/privacy}","received_events_url":"https://api.github.com/users/xiaoranzhou/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T14:53:48Z","updated_at":"2018-06-12T14:53:48Z","author_association":"NONE","body":"Hi sathyanarayanrao,\r\n\r\nAfter you define the SDF_PlantBox you need to use other functions to apply it. For example.\r\n`// 1.creates a cylindrical soil core with top radius 5 cm, bot radius 5 cm, height 50cm, not square but circular\r\n    SDF_PlantContainer soilcore(5,5,40,false);\r\n\r\n    //2. creates a square 27*27 cm containter with height 1.5 cm (used in parametrisation experiment)\r\n    SDF_PlantBox rhizotron(1.4,27,27);\r\n\r\n    //3. creates a square rhizotron r*r, with height h, rotated around the x-axis for angle alpha\r\n    double r = 20;\r\n    double h = 4;\r\n    double alpha = 45.;\r\n    SDF_PlantContainer rhizotron2(r,r,h,true);\r\n    Vector3d posA = Vector3d(0,r,-h/2); // origin before rotation\r\n    Matrix3d A = Matrix3d::rotX(alpha/180.*3.14);\r\n    posA = A.times(posA); // origin after rotation\r\n    SDF_RotateTranslate rotatedRhizotron(&rhizotron2,alpha,0,posA.times(-1));\r\n\r\n    //rootsystem.setGeometry(&soilcore); // pick one of the geometries\r\n    rootsystem.setGeometry(&rhizotron); // pick one of the geometries\r\n    //rootsystem.setGeometry(&rotatedRhizotron); // pick one of the geometries\r\n`\r\n\r\nThey are actually in example2.h\r\nhttps://github.com/Plant-Root-Soil-Interactions-Modelling/CRootBox/blob/master/examples/example2.h here"}}
{"actor":{"display_login":"xiaoranzhou"}}