Dear Devs,
I started on working developing some software for 2D patterning machine. We are going to support .DXF file import fabricate using our machine. Out machine has already developed SDK for drawing basic shapes like arc, lines, polygon, circle etc. I did a search on what are the currently available open source implementations. LibreCad is the best thing I found. I built it for Ubuntu and get debug messages as well. I thought to prune the GUI prats from the LibreCad and build as a DLL by extracting relevant parts from the LibreCad source in windows. Firstly I built the dxfrw project. It seems I could extract shape details from functions in RS_FilterDXFRW source file. But I could not see information like inner filled or not for geometric shapes. Q1. Is the details in these functions are enough to DXF drawings into a graphic canvas (I felt it is not enough)? Then I thought to make use of more source files. I added source files in librecad\src\lib. And to extract geometric shapes in rs_painterqt.cpp. But it seems too difficult to understand for me to work it out. Bellow I put the debug messges I received while I'm running the code. I could receive the bebug messgae as follows. QC_MDIWindow::slotFileOpen RS_EntityContainer::RS_EntityContainer: owner: 45669824 RS_Document::RS_Document() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_VariableDict::addVariable() RS_Graphic::newDoc RS_LayerList::addLayer() RS_LayerList::activate notify: 45669920 begin RS_LayerList::activate end RS_Graphic::open(°└ö♠è) RS_Graphic::newDoc RS_LayerList::addLayer() Trying to import file '°└ö♠è'... RS_FilterDXFRW::RS_FilterDXFRW() RS_FilterDXFRW::RS_FilterDXFRW(): OK The original debug messages for the same file as follows. QC_MDIWindow::slotFileOpen RS_Graphic::newDoc RS_LayerList::addLayer() QG_LayerWidget::update() begin QG_LayerWidget::update() reactivating current layer QG_LayerWidget::activateLayer() begin RS_LayerList::activate notify: 0 begin RS_LayerList::activate end RS_LayerList::activate notify: 0 begin RS_LayerList::activate end QG_LayerWidget::activateLayer() end QG_LayerWidget::update() end QG_LayerWidget::activateLayer() begin RS_LayerList::activate notify: 0 begin RS_LayerList::activate end RS_LayerList::activate notify: 0 begin RS_LayerList::activate end QG_LayerWidget::activateLayer() end RS_Graphic::open(/home/vishwas/LibreCad/LibreCAD/unix/resources/patterns/square.dxf) RS_Graphic::newDoc RS_LayerList::addLayer() QG_LayerWidget::update() begin QG_LayerWidget::update() reactivating current layer QG_LayerWidget::activateLayer() begin RS_LayerList::activate notify: 0 begin RS_LayerList::activate end RS_LayerList::activate notify: 0 begin RS_LayerList::activate end QG_LayerWidget::activateLayer() end QG_LayerWidget::update() end QG_LayerWidget::activateLayer() begin RS_LayerList::activate notify: 0 begin RS_LayerList::activate end RS_LayerList::activate notify: 0 begin RS_LayerList::activate end QG_LayerWidget::activateLayer() end Trying to import file '/home/vishwas/LibreCad/LibreCAD/unix/resources/patterns/square.dxf'... Setting up LFF filter... RS_FilterDXFRW::RS_FilterDXFRW() RS_FilterDXFRW::RS_FilterDXFRW(): OK RS_FilterDXFRW::fileImport DXFRW Filter: importing file '/home/vishwas/LibreCad/LibreCAD/unix/resources/patterns/square.dxf'... RS_EntityContainer::RS_EntityContainer: owner: 1 RS_VariableDict::addVariable() RS_FilterDXFRW::fileImport: reading file RS_VariableDict::addVariable() RS_VariableDict::addVariable() Q2. Can you provide me some guidance to proceed with this? Q3. What is the easiest way to achieve my goal (The Q1 method or Q2 method) Today I found some other thing as well. https://netdxf.codeplex.com/SourceControl/latest. But it seems this is something similar I got from "RS_FilterDXFRW". Thank you. Regards, Vishwa Shanika |
ideally, dxf filter should determine all details of drawings, but we are not there yet.
Please have a look at our LibreCAD_3 project, code is cleaner there.
|
Free forum by Nabble | Edit this page |