Menu
Logged-In As
ACCOUNTNot Logged In
Write CoreInterface unit test #5BRL-CAD
Status: ClosedTime to complete:
100 hrs
Mentors: Mandeep Kaur, Ishwerdas
The C++ Object-oriented API, called CoreInterface aims to provide an easier-to-use, object-oriented interface over the already very powerful set of BRL-CAD tools some of the primitives(classes representing objects have already been written)
You can check out the core interface code from our subversion repository: svn checkout https://svn.code.sf.net/p/brlcad/code/rt^3/trunk rt^3
Your task is to write a unit test for the torus primitive. It should be put in /rt^3/tests/
Code:
- rt^3/src/coreInterface/Torus.cpp
- rt^3/include/brlcad/Torus.h
Please upload your work in a svn patch(diff) format: svn diff rt^3 my_changes.patch
References:- rt^3/tests/halfspace.cpp
- rt^3/tests/primitives.cpp
- rt^3/tests/PrintTitle.cpp
- rt^3/tests/torus.cpp -- you create this
- rt^3/tests/CMakeLists.txt -- add your new file in here
Uploaded Work
File name/URL | File size | Date submitted | |
---|---|---|---|
torus.cpp | 6.1 KB | December 22 2014 15:22 UTC | |
torus.patch | 7.3 KB | December 23 2014 19:38 UTC |
I would like to work on this task.
This task has been assigned to Yash. You have 100 hours to complete this task, good luck!
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
This task has been assigned to Marc Tannous. You have 100 hours to complete this task, good luck!
Sean, could you join IRC for a second? We were discussing about js canvas a few weeks ago about basic primitives in 2D with randomized gravity that would look good, I think I found something.
Regards,
Marc
Sorry for the lack of patch, I will not be able to access my Linux distro for a while, I just wrote the code in a Windows IDE, and explained everything I've done in comments, I consider I documented it nicely.
In regards to integration within the project : this goes into /tests/coreInterface as torus.cpp .
The following files are to be modified : CMakeLists.txt :
set (ciTests_SRC
halfspace.cpp
primitives.cpp
sphere.cpp
cone.cpp
torus.cpp
)
Primitives.cpp :
if (database.Load(argv[1])) {
test_halfspace(database);
test_sphere(database);
test_cone(database);
test_torus(database);
Primitives.h :
void test_halfspace(BRLCAD::Database database);
void test_sphere(BRLCAD::Database database);
void test_cone(BRLCAD::Database database);
void test_torus(BRLCAD::Databse database);
Regards,
Marc
The work on this task is ready to be reviewed.
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
I think patch format will indeed help reviewing this kind of change where multiple files are affected.
Some minor stylistic points to work on in the meantime since your patches are maturing:
The work on this task is ready to be reviewed.
There are some basic mistakes in your code. You would have seen them if you would have tried to compile it.
However, you put a lot of effort in creating this patch and I will close it. There will be some follow-on tasks for fixing the bugs in your code. I would recommend to wait for and picking one of them first than taking another bone from this series.
Congratulations, this task has been completed successfully.