Menu
Logged-In As
ACCOUNTNot Logged In
Design new API function to reduce duplication #2BRL-CAD
Status: ClosedTime to complete:
72 hrs
Mentors: Sean
This task involves designing a new function that will measurably help reduce code duplication. You'll need to have already identified a piece of duplicated code that needs to be refactored and/or modified.
This task involves writing just the header file declaration and a doxygen comment that fully describes how the function behaves. It is your responsibility to make sure that the return types and function arguments are well thought out, fit well with our existing conventions, and is a clean simple yet effective design. Think it through.
Submit a patch file with your change, modifying the corresponding public include/header file that goes with the library being modified.
Note candidate libraries to modify are our core libraries:
- libbu for basic utility functions
- libbn for basic math and simple geometry functions
- librt / libnmg / libbrep for more complicated geometry functions
- libanalyze for analysis functions
- libged for geometry editing (commands)
- ... see src/README for a brief listing
Uploaded Work
File name/URL | File size | Date submitted | |
---|---|---|---|
bn_poly_header.patch | 1.3 KB | January 01 2014 19:14 UTC |
I would like to work on this task.
This task has been assigned to Johannes Schulte. You have 72 hours to complete this task, good luck!
The work on this task is ready to be reviewed.
You're introducing a different naming convention, so that's the only adjustment I'd suggest. Otherwise this looks good.
"equations" refer to a bn_poly*, suggest using "planes" instead (for which there are other examples in the API). I suggest adjusting the function name to:
bn_polygon_mk_pts_planes()
It's also worth noting the relevant function bn_mkpoint_3planes() (which does have a naming inconsistency, should be bn_mk_point_3planes or bn_mk_pt_3planes), which might be helpful in the implementation.
Congratulations, this task has been completed successfully.