Difference between revisions of "User:Bhollister/DevLogJuly2015"
From BRL-CAD
Bhollister (talk | contribs) m (→Tues, July 21, 2015) |
Bhollister (talk | contribs) (→Fri, July 31, 2015) |
||
(15 intermediate revisions by the same user not shown) | |||
Line 187: | Line 187: | ||
** i.e. only in "edit" mode do we use create / kill nmg model parts | ** i.e. only in "edit" mode do we use create / kill nmg model parts | ||
* todo: need to investigate further libged/edit.c | * todo: need to investigate further libged/edit.c | ||
− | * | + | * ''if'' we choose color faces / verts diff colors: |
** code proposal: check if in "edit" mode, then: | ** code proposal: check if in "edit" mode, then: | ||
*** either add new function and call it, i.e. something like 'ged_draw_guts_edit_mode()' | *** either add new function and call it, i.e. something like 'ged_draw_guts_edit_mode()' | ||
Line 225: | Line 225: | ||
*/ | */ | ||
</pre> | </pre> | ||
+ | |||
+ | non-brlcad expenditures... | ||
+ | * had another interview 10 AM PST (Skype) - second one this week | ||
+ | * have a third for this week scheduled @ 10 AM PST tomorrow | ||
= Wed, July 22, 2015 = | = Wed, July 22, 2015 = | ||
+ | |||
+ | * researching how vertices are labelled in 'SOLID EDIT' mode | ||
+ | ** traced: ged_view_update(struct bview *gvp) from libged/vutil.c | ||
+ | ** traced: f_sed(ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[]) from mged/chgview.c | ||
+ | ** traced: stateChange(int UNUSED(oldstate), int newstate) from mged/buttons.c | ||
+ | ** usage of [http://brlcad.org/wiki/MGED_CMD_sed sed] command and [http://brlcad.org/wiki/MGED_CMD_facedef facedef] command (relevant to nmg subcommands for updating nmg geometry) | ||
+ | * found label vert functionality: | ||
+ | ** /* Usage: labelvert solid(s) */ '''f_labelvert'''(ClientData UNUSED(clientData), Tcl_Interp *interp, int argc, const char *argv[]) | ||
+ | ** from '''mged/overlay.c''' | ||
+ | ** further calls: | ||
+ | *** librt/vlist.c, rt_label_vlist_verts() --> libbn/font.c, bn_vlist_3string() | ||
+ | * todo: can labelling work for faces / regions / shells without resorting to color change?? | ||
+ | ** color change may involve substantial rework of state setting | ||
+ | ** not to mention other problems for color labelling (visually impaired users, ambiguity in color differences, etc.)?? | ||
+ | |||
+ | non-brlcad expenditures... | ||
+ | * had phone interview @ 10AM PST | ||
= Thurs, July 23, 2015 = | = Thurs, July 23, 2015 = | ||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/63932fe80449968587145fba79371b7bc024701f?diff=split commit #1] removed files associated with CLI stubs for internal nmg api | ||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/27ece977173f135cb69bd4383c72e5ebff98a532?diff=split commit #2] added ged_nmg_kill_v and associated src files | ||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/5edfea7e407163255eb74d02570d74e255541e31 commit #3] fixed parameter ordering for cmface and mm subcommand - for consistency with new syntax | ||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/07c51b26a2f7688fdb0bdb6d3c6f0c6251bff396 commit #4] trying to get vertex labelling to work for subcommand kill V. work-in-progress. currently not building during link phase. | ||
= Fri, July 24, 2015 = | = Fri, July 24, 2015 = | ||
+ | |||
+ | * investigated mged command 'permute' as it relates to altering vertices in object | ||
+ | * investigated mged GUI 'primitive' editor under 'Edit' menu. | ||
+ | ** editor shows vertices (number labels) and allows their coords to be altered by increment / decrement | ||
+ | ** potentially useful for cmd line functions with proposed similar functionality | ||
+ | ** insight into the linkage between vertex # and vertex data structure (how) | ||
+ | |||
+ | non-brlcad time expenditures... | ||
+ | * job application | ||
+ | * car air bag recall (in shop) | ||
= Sat, July 25, 2015 = | = Sat, July 25, 2015 = | ||
+ | |||
+ | n/a | ||
= Sun, July 26, 2015 = | = Sun, July 26, 2015 = | ||
+ | |||
+ | n/a | ||
= Mon, July 27, 2015: '''''Start of Week 10 (of 14)''''' = | = Mon, July 27, 2015: '''''Start of Week 10 (of 14)''''' = | ||
+ | |||
+ | * [http://brlcad.org/wiki/MGED_CMD_nmg#Proposed_subcommands kill V] design updated | ||
+ | ** determined that the best way to select a vertex is to use [http://brlcad.org/wiki/MGED_CMD_labelvert labelvert] on object to select vertex by coords | ||
+ | ** user then issues selected coord for [http://brlcad.org/wiki/MGED_CMD_nmg#Proposed_subcommands kill V] | ||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/c714dcd21a909d7fdd6dfa8116c7db9a858287e9 commit #1] revamped ged_nmg_kill_v. now requiring user to first use 'labelvert' mged command to label vertices in object. todo: work out way to visit all vertices (i.e., or vertexuses) to find matching coords issued to be killed. | ||
= Tues, July 28, 2015 = | = Tues, July 28, 2015 = | ||
+ | |||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/3285aab44203e3c14c6e2b9ef3b49751caef3c4a commit #1] now traversing each edgeuse to find vertexuses that reference a vertex structure with location specified on cli. todo: fix problem with edgeuse check failure. this could be due to invalid model and not problem with routine. | ||
+ | * todo: check above commit with ''known'' valid nmg object | ||
+ | |||
+ | non-brlcad expenditures... | ||
+ | * skype interview @ 11-12 PM Pacific time | ||
= Wed, July 29, 2015 = | = Wed, July 29, 2015 = | ||
+ | |||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/11db05355983400727cd37f2384747a0298eeb0f commit #1] added nmg_m_struct_count as prototypical traversal algo for finding removing specified vertices @ cli. | ||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/9679d23c0061b310151a86063120da7cb378f9d5 commit #2] cleaned up struct counting algorithm and added nmg_kvu where vertices are found. appears to work, but model is not currently being updated... | ||
+ | * if calling wdb_put_internal() at end of ged_nmg_kill_v(), getting a NULL vertexuse ERROR. | ||
+ | ** however, this is what nmg_kvu() performs on the nmg object structure | ||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/1841e1bd0ce3f2f0c84c151dce64b2d06685f8ef commit #3] added call to wdb_put_internal, however this produces ERROR due to NULL vertexuse after calls to nmg_kvu() | ||
= Thurs, July 30, 2015 = | = Thurs, July 30, 2015 = | ||
+ | |||
+ | * ''kill V'' now works! (see commit #2) | ||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/8b18eb753bf38aaa1c43f0ebd275a4e545dec158 commit #1] added the proper nmg_k* calls to removed faceuses, loopuses, or edgeuses that results from removal of selected vertex. | ||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/52cbebc1efcd673ec8b203df6af9caf3b25941d6 commit #2] remove_vertex() was missing some needed calls to remove lu's and eu's they're added now. cleaned up error message as well. cmd leaves it to the user to refresh vertex labelling in overlay. | ||
+ | *[https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/79c07597af1600a595e57447929542d360559b19 commit #3] removed unused vars | ||
+ | * todo: need to update usage for nmg command for new ''kill V'' subcommand | ||
+ | * todo: tomorrow will submit two patches | ||
+ | ** #1 cleanup for nmg_* files not needed | ||
+ | ** #2 ''kill V'' subcommad patch | ||
+ | * spent time trying to make sure build works with applied patch to current trunk | ||
+ | ** didn't quite work which is why two patches are scheduled for tomorrow | ||
+ | ** separating patches into the two above to help avoid build error: ''../../lib/libged.so.20.0.1: undefined reference to `brlcad_interp' '' | ||
= Fri, July 31, 2015 = | = Fri, July 31, 2015 = | ||
+ | |||
+ | * submitted [https://sourceforge.net/p/brlcad/patches/395/ patch 395] | ||
+ | ** originally planned to have two separate patches, but addition of new source file / removal of stubs both were reflected in changes to libged/nmg.c | ||
+ | ** patch contains the following: | ||
+ | *** addition of 'kill V' subcommand | ||
+ | *** see http://brlcad.org/wiki/MGED_CMD_nmg#Proposed_subcommands for 'kill V' usage | ||
+ | *** removed source file stubs for low-level nmg api subcommands | ||
+ | *** reversed order of subcommand and nmg object name syntax (per request) | ||
+ | * [https://github.com/behollis/brlcad-svn-rev65072-gsoc2015/commit/10237773391b9baf2a51125818f51027f8a7de57 commit #1] updated github branch with libged files from svn head; renamed nmg_kill.c to nmg_kill_v.c; added help for kill V |
Latest revision as of 18:51, 31 July 2015
Contents
- 1 Wed, July 1, 2015: Week 6 (of 14)
- 2 Thurs, July 2, 2015
- 3 Fri, July 3, 2015
- 4 Sat, July 4, 2015
- 5 Sun, July 5, 2015
- 6 Mon, July 6, 2015: Start of Week 7 (of 14)
- 7 Tues, July 7, 2015
- 8 Wed, July 8, 2015
- 9 Thurs, July 9, 2015
- 10 Fri, July 10, 2015
- 11 Sat, July 11, 2015
- 12 Sun, July 12, 2015
- 13 Mon, July 13, 2015: Start of Week 8 (of 14)
- 14 Tues, July 14, 2015
- 15 Wed, July 15, 2015
- 16 Thurs, July 16, 2015
- 17 Fri, July 17, 2015
- 18 Sat, July 18, 2015
- 19 Sun, July 19, 2015
- 20 Mon, July 20, 2015: Start of Week 9 (of 14)
- 21 Tues, July 21, 2015
- 22 Wed, July 22, 2015
- 23 Thurs, July 23, 2015
- 24 Fri, July 24, 2015
- 25 Sat, July 25, 2015
- 26 Sun, July 26, 2015
- 27 Mon, July 27, 2015: Start of Week 10 (of 14)
- 28 Tues, July 28, 2015
- 29 Wed, July 29, 2015
- 30 Thurs, July 30, 2015
- 31 Fri, July 31, 2015
Wed, July 1, 2015: Week 6 (of 14)[edit]
- commit #1: filling out vertex info with structures to avoid errors with incomplete data structures
- getting crash in nmg_mvu on line 365: BU_LIST_APPEND(...); need to investigate.
- use case for above: 'make modelname nmg', then 'nmg cmface modelname coords'
- rechecked patch https://sourceforge.net/p/brlcad/patches/387/
- verified by compiling with STRICT enabled. posted build.log to sourceforge.
- problems with compilation apparently not associated with changes. builds fine with STRICT disabled.
Thurs, July 2, 2015[edit]
- Appointment with retinal specialist from 9:30am to Noon PST.
- Not be able to work today due to pupil dilation.
Fri, July 3, 2015[edit]
- Midterm summary located at link
- still investigating nmg_mvu issue for ged_nmg_cmface subcommand:
- likely that the vertexuse is being improperly treated for loop creation.
- should there be a vertexuse present in the model for the new loop (prior to nmg_mvu call from nmg_cmface)??
Sat, July 4, 2015[edit]
- n/a
Sun, July 5, 2015[edit]
- n/a
Mon, July 6, 2015: Start of Week 7 (of 14)[edit]
- commit #1 fixed issue with missing bu_list in vertex struct
- while commit #1 provides a "working" call to nmg_cface with three verts, the face is not visible in the render window??
- ged_nmg_cface appears to make the proper calls...
- once problem is found with rendered model, need to extend for n verts (should be trivial)
- commit #2 attempt to fix issue with ged_nmg_cmface crash in nmg_info/nmg_findeu(); in loop
Tues, July 7, 2015[edit]
- received good direction from brlcad in irc
- reviewed http://www.google-melange.com/gci/task/view/google/gci2014/5546966268248064
- reviewed http://brlcad.org/wiki/NMG
- previously unaware that nmg models could be created with ged_put
- todo: need to plan high-level subcommands after cmface working
- todo: check winding order in cmface, as http://brlcad.org/wiki/NMG mentions potential crashing with incorrect winding order
non-brlcad time expenditures...
- spent some time applying for positions
Wed, July 8, 2015[edit]
- investigated put / get database commands.
- should illuminate sequence of calls needed by subcommands for nmg api calls
- posted related questions in irc
- todo: use info from above to fix mged calls implemented in libged/ged_nmg_cmface.c
- commit #1: null commit to synchronize to github from nonlocal repos
non-brlcad time expenditures...
- oil changed for car; 3 hour wait!
- wrote essay, etc. for instructor position application
Thurs, July 9, 2015[edit]
- investigated get / put nmg object creation...
- need to follow the code from this sequence of calls using 'put' CLI:
- ged_put()
- rt_nmg_make()
- rt_nmg_adjust()
- above sequence of calls creates an nmg object and adds verts / faces
- need to follow the code from this sequence of calls using 'put' CLI:
- todo: revamp *ged_cmface* using preceding process.
- note: apparently using nmgmodel.c was not the best example of manifold nmg object creation!
- todo: once ged_cmface() properly impl and submitted as patch, can move on the spec for high-level subcommand list; perhaps vert / face removal subcommand CLI routines are the easy to start with??
non-brlcad time expenditures...
- VDA 2016 template and reformat of paper for submission
- 10 job applications submitted
Fri, July 10, 2015[edit]
- commit #1 using method from rt_nmg_adjust. still some issues with calls to nmg_cmface. soon to be resolved.
- appears that vert structs are not being filled out correctly and thus crash in cmface; need to test with known "working" args
non-brlcad time expenditures...
- applications
- car in garage again for brake pads
- car will be in garage again next week for air bag recall (ford mustang)
Sat, July 11, 2015[edit]
n/a
Sun, July 12, 2015[edit]
n/a
Mon, July 13, 2015: Start of Week 8 (of 14)[edit]
- commit #1 cmface now working. using rt_nmg_adjust as model for impl.
- commit #2 added variable number of verts for CLI.
- commit #3 check for minimum number of verts for manifold face
- cmface patch 390 submitted
Tues, July 14, 2015[edit]
- mm (make nmg object model) subcommand patch 391 submitted
- updated patch 390 with build fix and code cleanup
- commit #1 cleaned up loop var. removed unused fastf_t declaration
- found potential build problems when BRLCAD_ENABLE_STRICT=YES. noted in patch 390 reply (opennurbs lib)
- todo:
- impl face kill routine as subcommand
- design remaining subcommands (will be higher-level than internal nmg api)
- post usage instructions for simple box creation use case using subcommand 'cmface'
- will need to determine which routines that have been submitted in patch 387 that need to be removed
Wed, July 15, 2015[edit]
- re-tested with 'strict' build options - works!
- updated schedule to include new designs
- created MGED_CMD_nmg design doc
- proposed new subcommands:
- sface
- Selects a face by highlighting it. Subsequent commands for manipulation or removal act on the selected face. By repeating this call, the currently selected face is advanced to the next face in the NMG object of the first encountered shell and region. If an (optional) point is specified, the subcommand finds the closest face to the point and selects that face instead.
- deselect
- Deselects all prior selected parts of the nmg object.
- kface
- Removes the geometry and faceuse of the currently selected face.
- todo: need to get mentor(s) advice and okay before implementing proposed new subcommands
- todo: submit patch to remove calls to low-level api that are not needed
- todo: update top-level command 'nmg' to reflect help / changes
Thurs, July 16, 2015[edit]
- investigated ways to draw geometry different colors
- traced ged_draw, etc.
- this will be needed in order to highlight selected face via 'sface' subcommand
- updated 'nmg' command design page
non-brlcad expenditures...
- applied for more positions
- answered questions from interviewer (email)
Fri, July 17, 2015[edit]
- read / posted a response to mailing list about command design
- investigated design options (see my response)
- investigated implications of various implementations (see my response)
- todo: polish declarative syntax for 'creation' subcommands per Sean's suggestions
- added 'nmg' to mged cmds
non-brlcad expenditures...
- researched university locations for jobs
- found out that I have jury duty in early august - need to postpone if possible
Sat, July 18, 2015[edit]
n/a
Sun, July 19, 2015[edit]
n/a
Mon, July 20, 2015: Start of Week 9 (of 14)[edit]
- updated proposed subcommands
- need to find way of marking model parts
- need to allow users to select desired model parts through model labels in subcommand (see previous link for design ideas)
- investigated color setting with mged
- only found info on comb_color which doesn't appear relevant
- need to find simple way to set real-time geometry window colors (down to an opengl state function possibly?? and trace that back up to the higher-level call)
- libged/draw.c, _ged_drawtrees() sets the wireframe color...need to leverage this functionality for labelling / marking geometry!
non-brlcad expenditures...
- interview scheduled for 10 AM PST (Skype)
Tues, July 21, 2015[edit]
- since arbs have vertex labelling
- may want to rethink (at least) the kill V subcommand
- vertex numbering already works with nmg, but there are some scaling issues
- i.e. vertex labels are not located right on vertices but too far from them
- new create / kill subcommands should be:
- consistent with modal behavior of mged command line
- i.e. only in "edit" mode do we use create / kill nmg model parts
- todo: need to investigate further libged/edit.c
- if we choose color faces / verts diff colors:
- code proposal: check if in "edit" mode, then:
- either add new function and call it, i.e. something like 'ged_draw_guts_edit_mode()'
- or add to already large ged_draw_guts() with conditional logic
- there is only a single struct _ged_client_data used for entire model
- potentially needs to be revamped, since we need it to change per model part
- warning: could be extensive and therefore may have to use existing labelling system
- code proposal: check if in "edit" mode, then:
- found this at the end of /include/ged.h. should be useful.
/*************************************** * Conceptual Documentation for LIBGED * *************************************** * * Below are developer notes for a data structure layout that this * library is being migrated towards. This is not necessarily the * current status of the library, but rather a high-level concept for * how the data might be organized down the road for the core data * structures available for application and extension management. * * struct ged { * dbip * views * >-----. * result() | * } | * | * struct view { <-' * geometry * >------. * update() | * } | * | * struct geometry { <-' * display lists * directory * * update() * } * */
non-brlcad expenditures...
- had another interview 10 AM PST (Skype) - second one this week
- have a third for this week scheduled @ 10 AM PST tomorrow
Wed, July 22, 2015[edit]
- researching how vertices are labelled in 'SOLID EDIT' mode
- traced: ged_view_update(struct bview *gvp) from libged/vutil.c
- traced: f_sed(ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[]) from mged/chgview.c
- traced: stateChange(int UNUSED(oldstate), int newstate) from mged/buttons.c
- usage of sed command and facedef command (relevant to nmg subcommands for updating nmg geometry)
- found label vert functionality:
- /* Usage: labelvert solid(s) */ f_labelvert(ClientData UNUSED(clientData), Tcl_Interp *interp, int argc, const char *argv[])
- from mged/overlay.c
- further calls:
- librt/vlist.c, rt_label_vlist_verts() --> libbn/font.c, bn_vlist_3string()
- todo: can labelling work for faces / regions / shells without resorting to color change??
- color change may involve substantial rework of state setting
- not to mention other problems for color labelling (visually impaired users, ambiguity in color differences, etc.)??
non-brlcad expenditures...
- had phone interview @ 10AM PST
Thurs, July 23, 2015[edit]
- commit #1 removed files associated with CLI stubs for internal nmg api
- commit #2 added ged_nmg_kill_v and associated src files
- commit #3 fixed parameter ordering for cmface and mm subcommand - for consistency with new syntax
- commit #4 trying to get vertex labelling to work for subcommand kill V. work-in-progress. currently not building during link phase.
Fri, July 24, 2015[edit]
- investigated mged command 'permute' as it relates to altering vertices in object
- investigated mged GUI 'primitive' editor under 'Edit' menu.
- editor shows vertices (number labels) and allows their coords to be altered by increment / decrement
- potentially useful for cmd line functions with proposed similar functionality
- insight into the linkage between vertex # and vertex data structure (how)
non-brlcad time expenditures...
- job application
- car air bag recall (in shop)
Sat, July 25, 2015[edit]
n/a
Sun, July 26, 2015[edit]
n/a
Mon, July 27, 2015: Start of Week 10 (of 14)[edit]
- kill V design updated
- commit #1 revamped ged_nmg_kill_v. now requiring user to first use 'labelvert' mged command to label vertices in object. todo: work out way to visit all vertices (i.e., or vertexuses) to find matching coords issued to be killed.
Tues, July 28, 2015[edit]
- commit #1 now traversing each edgeuse to find vertexuses that reference a vertex structure with location specified on cli. todo: fix problem with edgeuse check failure. this could be due to invalid model and not problem with routine.
- todo: check above commit with known valid nmg object
non-brlcad expenditures...
- skype interview @ 11-12 PM Pacific time
Wed, July 29, 2015[edit]
- commit #1 added nmg_m_struct_count as prototypical traversal algo for finding removing specified vertices @ cli.
- commit #2 cleaned up struct counting algorithm and added nmg_kvu where vertices are found. appears to work, but model is not currently being updated...
- if calling wdb_put_internal() at end of ged_nmg_kill_v(), getting a NULL vertexuse ERROR.
- however, this is what nmg_kvu() performs on the nmg object structure
- commit #3 added call to wdb_put_internal, however this produces ERROR due to NULL vertexuse after calls to nmg_kvu()
Thurs, July 30, 2015[edit]
- kill V now works! (see commit #2)
- commit #1 added the proper nmg_k* calls to removed faceuses, loopuses, or edgeuses that results from removal of selected vertex.
- commit #2 remove_vertex() was missing some needed calls to remove lu's and eu's they're added now. cleaned up error message as well. cmd leaves it to the user to refresh vertex labelling in overlay.
- commit #3 removed unused vars
- todo: need to update usage for nmg command for new kill V subcommand
- todo: tomorrow will submit two patches
- #1 cleanup for nmg_* files not needed
- #2 kill V subcommad patch
- spent time trying to make sure build works with applied patch to current trunk
- didn't quite work which is why two patches are scheduled for tomorrow
- separating patches into the two above to help avoid build error: ../../lib/libged.so.20.0.1: undefined reference to `brlcad_interp'
Fri, July 31, 2015[edit]
- submitted patch 395
- originally planned to have two separate patches, but addition of new source file / removal of stubs both were reflected in changes to libged/nmg.c
- patch contains the following:
- addition of 'kill V' subcommand
- see http://brlcad.org/wiki/MGED_CMD_nmg#Proposed_subcommands for 'kill V' usage
- removed source file stubs for low-level nmg api subcommands
- reversed order of subcommand and nmg object name syntax (per request)
- commit #1 updated github branch with libged files from svn head; renamed nmg_kill.c to nmg_kill_v.c; added help for kill V