Editing User:Xuwei/DevLog2019
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 44: | Line 44: | ||
=Coding Period= | =Coding Period= | ||
− | + | ==May 27th== | |
− | |||
*Looking at both libdxfrw(libdxfrw.h, dxfreader.cpp) and OpenSCAD(dxfdata.cc, dxfdim.cc, import.cc) relative code. | *Looking at both libdxfrw(libdxfrw.h, dxfreader.cpp) and OpenSCAD(dxfdata.cc, dxfdim.cc, import.cc) relative code. | ||
**Comparing the differences between these two on how they handle DXF data. | **Comparing the differences between these two on how they handle DXF data. | ||
Line 55: | Line 54: | ||
**dxflib does not store any entities, only pass supported entities. | **dxflib does not store any entities, only pass supported entities. | ||
**A useful link for understanding dxflib data structure.[https://qcad.org/doc/dxflib/2.5/classref/class_d_l___dxf.html] | **A useful link for understanding dxflib data structure.[https://qcad.org/doc/dxflib/2.5/classref/class_d_l___dxf.html] | ||
− | + | ==May 28th== | |
*Move on to reading dxflib code for now | *Move on to reading dxflib code for now | ||
**Continue reading the link about the data structure of dxflib above. | **Continue reading the link about the data structure of dxflib above. | ||
**Trying to understand form the connection between dxflib and OpenSCAD code base. | **Trying to understand form the connection between dxflib and OpenSCAD code base. | ||
*Continue reading dxfdata.cc | *Continue reading dxfdata.cc | ||
− | + | ==May 29th== | |
*Found another one existing integration with dxflib that I can use it as reference.[https://github.com/CauldronDevelopmentLLC/CAMotics/tree/master/src CAMotics] | *Found another one existing integration with dxflib that I can use it as reference.[https://github.com/CauldronDevelopmentLLC/CAMotics/tree/master/src CAMotics] | ||
*Continue on reading dxflib and import.cc, dxfdata.cc. | *Continue on reading dxflib and import.cc, dxfdata.cc. | ||
Line 66: | Line 65: | ||
*Fill out the comparison [https://github.com/openscad/openscad/wiki/DXF-Library-overview wiki page] | *Fill out the comparison [https://github.com/openscad/openscad/wiki/DXF-Library-overview wiki page] | ||
− | + | ==May 30th== | |
*Had to go the dentist this morning, will catch up the afternoon and at night. | *Had to go the dentist this morning, will catch up the afternoon and at night. | ||
*Keep browsing for more information for those four libraries. | *Keep browsing for more information for those four libraries. | ||
*Reading [https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf DXF standard] to learn how DXF format works | *Reading [https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf DXF standard] to learn how DXF format works | ||
− | + | ==May 31th== | |
*Searching more information for potential libraries. | *Searching more information for potential libraries. | ||
**Add more information that found to the comparison page. | **Add more information that found to the comparison page. | ||
*Learning how to integrate the library from the [https://ribbonsoft.com/doc/dxflib/2.5/reference/contents.html instruction] written by QCAD. | *Learning how to integrate the library from the [https://ribbonsoft.com/doc/dxflib/2.5/reference/contents.html instruction] written by QCAD. | ||
− | + | ==June 3rd== | |
− | |||
− | |||
*We stick with using BRL-CAD's code for now. | *We stick with using BRL-CAD's code for now. | ||
*Try to implement the circle entity. | *Try to implement the circle entity. | ||
Line 85: | Line 82: | ||
**Having some issue with ADDLINE. Will dig into that later. | **Having some issue with ADDLINE. Will dig into that later. | ||
− | + | ==June 4th== | |
*Push few commits on [https://github.com/leonplust/openscad/tree/dxf-import import_dxf branch]. | *Push few commits on [https://github.com/leonplust/openscad/tree/dxf-import import_dxf branch]. | ||
**Basically create a new import_dxf() function that replace the old dxfdata.cc | **Basically create a new import_dxf() function that replace the old dxfdata.cc | ||
**Implement a simple geometry to test out the function | **Implement a simple geometry to test out the function | ||
− | + | ==June 5th== | |
*Modify the code committed yesterday to output a simple circle. | *Modify the code committed yesterday to output a simple circle. | ||
*Trying to understand layer, block. | *Trying to understand layer, block. | ||
− | + | ==June 6th== | |
*Created a new branch [https://github.com/leonplust/brlcadDXF/tree/prototype prototype] on brlcadDXF repo. | *Created a new branch [https://github.com/leonplust/brlcadDXF/tree/prototype prototype] on brlcadDXF repo. | ||
**Trying to clean up the code so that it could compile independently. | **Trying to clean up the code so that it could compile independently. | ||
− | + | ==June 7th== | |
*Switch some functions and datatype and continue on cleaning up the code. | *Switch some functions and datatype and continue on cleaning up the code. | ||
*Spend most of my day studying the exam tonight. Will make up the time tomorrow. | *Spend most of my day studying the exam tonight. Will make up the time tomorrow. | ||
− | + | ==June 8th== | |
*Walked through the whole file line by line and cleaned up as much as I can so far. There are still many details that I need to learn to clean up the rest. | *Walked through the whole file line by line and cleaned up as much as I can so far. There are still many details that I need to learn to clean up the rest. | ||
− | + | ==June 10th== | |
*Made changes to dxf-g.c according to the answer from brlcad. | *Made changes to dxf-g.c according to the answer from brlcad. | ||
− | + | ==June 11th== | |
*fix bu_list with std::list and related functions, etc. | *fix bu_list with std::list and related functions, etc. | ||
− | + | ==June 12th== | |
*Add functions for circle eclipse from vmath.h, color.h. | *Add functions for circle eclipse from vmath.h, color.h. | ||
− | + | ==June 13th== | |
*Added more functions from dependencies. | *Added more functions from dependencies. | ||
*uploaded a file that records to-do list, question, notes, etc. | *uploaded a file that records to-do list, question, notes, etc. | ||
− | + | ==June 14th== | |
*few fixes on dxf-g.cc. | *few fixes on dxf-g.cc. | ||
*Study for the midterm tonight for the most of the day will make up the hours tomorrow. | *Study for the midterm tonight for the most of the day will make up the hours tomorrow. | ||
− | + | ==June 15th== | |
*Finished converting all bu_list data structure to std::list except in one function drawmtext(). | *Finished converting all bu_list data structure to std::list except in one function drawmtext(). | ||
**drawmtext() may be removed later. | **drawmtext() may be removed later. | ||
− | + | ==June 17th== | |
*Finished fixing all bu_vert_tree structure. | *Finished fixing all bu_vert_tree structure. | ||
*Started on fixing vls a bit. | *Started on fixing vls a bit. | ||
− | + | ==June 18th== | |
*Finished fixing all vls except those in the main(). | *Finished fixing all vls except those in the main(). | ||
− | + | ==June 19th== | |
*Finished most of the parts of dxf-g.c. | *Finished most of the parts of dxf-g.c. | ||
** Create a new branch [https://github.com/leonplust/brlcadDXF/tree/test test] for testing and commented out some less necessary functions to test. | ** Create a new branch [https://github.com/leonplust/brlcadDXF/tree/test test] for testing and commented out some less necessary functions to test. | ||
Line 135: | Line 132: | ||
** Need to fix the segmentation fault. | ** Need to fix the segmentation fault. | ||
− | + | ==June 20th== | |
*Fixed numbers of segmentation faults mainly caused by malloc. | *Fixed numbers of segmentation faults mainly caused by malloc. | ||
− | + | ==June 21st== | |
*Fix strncmp function error | *Fix strncmp function error | ||
*Tested with circle, ellipse, failed at block section. | *Tested with circle, ellipse, failed at block section. | ||
*Tried to reconstruct block_list, block_head data structure. | *Tried to reconstruct block_list, block_head data structure. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |