Editing Deuces
From BRL-CAD
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 119: | Line 119: | ||
| | ||
+ | {| style="background-color:#fefefe; border-style: solid; border-width: 4px;" width="100%" | ||
+ | | style="padding: 20px;" | | ||
+ | === Debug and fix a bug converting cylinders === | ||
+ | |||
+ | BRL-CAD has many 3D object types, one of them being a "Right Hyperbolic Cylinder". If you run MGED with "mged -c cylinder.g", then run "make rhc rhc" on the mged> command prompt, it will create one. If you then quit mged and run "dbupgrade -r cylinder.g" and reopen the file with "mged -c cylinder.g", the rhc object will be corrupted (try running "l rhc" in mged before and after). | ||
+ | |||
+ | This task's goal is to reproduce, identify, and fix the bug so that the rhc object doesn't get corrupted. To do this, you'll want to use a debugger like lldb or gdb or Visual Studio (there are tutorials all over the web if you've never used a debugger), or simply use print statements. | ||
+ | |||
+ | See the rt_rhc_import5(), ..export5(), .._import4(), and .._export4() functions as they implement the read/write support. | ||
+ | |||
+ | Code: | ||
+ | * src/librt/primitives/rhc/rhc.c, <- you'll probably need to modify this file | ||
+ | * src/librt/primitives/table.c | ||
+ | * include/rtgeom.h | ||
+ | |||
+ | | ||
+ | |} | ||
+ | | ||
{| style="background-color:#fefefe; border-style: solid; border-width: 4px;" width="100%" | {| style="background-color:#fefefe; border-style: solid; border-width: 4px;" width="100%" |