Exploring Heekscad extrude function using code::blocks debug

Ok….
Downloaded and compiled and fresh copy of heekscad.  Time to get that morning cup of coffee.

Last time I did something similar to this I hunted down the extrude icon which is stored as “extrude.png” .    Need to search on “extrude” and eventually choose an appropriate breakpoint for the c::b debugger.

src/HeeksFrame.cpp|742|if(!wxGetApp().CheckForNOrMore(wxGetApp().m_marked_list->list(), 1, SketchType, _(“Pick one or more sketches, to create extruded body from\n( hold down Ctrl key to select more than one solid )”), _(“Extrude”)))return;|
src/HeeksFrame.cpp|1331|AddMenuItem(solids_menu, _(“Extrude a sketch”), ToolImage(_T(“extrude”)), OnExtrudeButton);|
src/HeeksFrame.cpp|1424|AddToolBarTool(m_solidBar, _T(“Extrude”), ToolImage(_T(“extrude”)), _(“Extrude a wire or face”), OnExtrudeButton);|

Alrighty…. It looks like the magic term is OnExtrudeButton

src/HeeksFrame.cpp|740|static void OnExtrudeButton( wxCommandEvent& event )|
src/HeeksFrame.cpp|1332|AddMenuItem(solids_menu, _(“Extrude a sketch”), ToolImage(_T(“extrude”)), OnExtrudeButton);|
src/HeeksFrame.cpp|1425|AddToolBarTool(m_solidBar, _T(“Extrude”), ToolImage(_T(“extrude”)), _(“Extrude a wire or face”), OnExtrudeButton);|

Sooo.. I guess we need to set a breakpoint in here to follow along.

static void OnExtrudeButton( wxCommandEvent& event )
{
if(!wxGetApp().CheckForNOrMore(wxGetApp().m_marked_list->list(), 1, SketchType, _(“Pick one or more sketches, to create extruded body from\n( hold down Ctrl key to select more than one solid )”), _(“Extrude”)))return;
PickCreateExtrusion();
}

A couple of days ago I tried to extrude a circle it didn’t work. I was able to extrude a rectangle…. Lets try a circle first.

If I draw a circle, select it, and click on the extrude I get this message.

Pick one or more sketches, to create extruded body from
( hold down Ctrl key to select more than one solid )

So…. the break point was not stripped out…
Lets try… Selecting two intersecting surfaces and see what happens.
Same message… Hmmm…
Lets throw a rectangle into the mix to see what happens.
Ok…. the rectangle is extruded and nothing happens to the circles…. I suppose we should just mentally file that for now…

{
if(!wxGetApp().CheckForNOrMore(wxGetApp().m_marked_list->list(), 1, SketchType, _(“Pick one or more sketches, to create extruded body from\n( hold down Ctrl key to select more than one solid )”), _(“Extrude”)))return;
PickCreateExtrusion();
}

Well… Ok then PickCreateExtrusion is the path I want to do down but it seems like there is a whole bunch of stuff going on just prior to that, that I should probably understand.  Yikess… is there are bunch of stuff going on here… I’ve been stepping deep into the code, single stepping and exploring.  Eventually I get bored an choose continue. It seems off and on I  get this SIGPIPE broken pipe message from the IDE… I’m not sure is this is a heeks cad,  code::blocks, Linux, or I’m doing something really stupid issue at this point…  Googling seems to get some very non-helpful answers…..  So… for the moment .. Although this sort of explains it.
Well then again this explains it even better http://en.wikipedia.org/wiki/SIGPIPE
And this kind provides some more enligthenment:http://en.wikipedia.org/wiki/Pipeline_(Unix)
Ok.. Then… It seems there might be some timing out issues within the OS… Seems to make sense, since when I surfing and came back to single step through the debugger, I got the broken pipe….
So.. the moral to the story for the moment is to start the debugger after I get the cut of coffee… not before;)..
Heekscad seems to be making heavy use of lists from the standard template library STL.    I’m a little fuzzy on this STL stuff, but I seem to recall it being discussed in the Paul Kunz C++ lecture series… Lets see I believe I had the lecture series bookmark in my favorites…  I’m going to need to over sections 15 and 16 again….  Darn it…. This sight still doesn’t work in linux…. Time publish and see if I can go over to the wife’s windows machine…..
#$% Of course the wife has a brand new computer and doesn’t have the necessary plugin’s installed…..Let me see… I seem to recall there is another version of the lecture with less issues.. back to my notes.  (You’d think I’d have a search feature on my metalshaperman…. who designed this crappy website… )
Oh… this brings back some memories..

[Edit].
Setting a break point on this line for where things get interesting:

HeeksObj* CreateExtrusion(std::list<HeeksObj*> list, double height)

Posted in Uncategorized | Leave a comment

Problems with my first heekcad rapidSVN update.

Ok…. So I think I fixed my first bug in Heekscad…. and I’m trying to upload my code…But for some reason RapidSVN is giving me this error.

Execute: Update
Error: Error while performing action: Working copy ‘/home/jonas/Desktop/HeeksCAD/src’ locked
Ready

Apparently, this is not a big deal according to this:…
http://subversion.tigris.org/faq.html#wedged-wc
So… According to this all I need to do is this..
jonas@Ubuntu4:~$ svn cleanup working-copy
svn: ‘working-copy’ does not exist
jonas@Ubuntu4:~$ sudo updatedb
[sudo] password for jonas:
jonas@Ubuntu4:~$ locate working-copy
jonas@Ubuntu4:~$
Ok…. Time for the brute force method….

Fire up the not so rapid rapidSVN.
I’m going to copy my project file into the desktop and just going to blow away heekscad in my desktop.

duh….. Maybe I should read the instructions first:http://code.google.com/p/heekscad/source/checkout

Lets try this again….
For a command line I did the following:

svn checkout https://heekscad.googlecode.com/svn/trunk/ /home/jonas/Desktop/HeeksCAD –username yourusername

The first time did this….. I stuck in the password I got from http://code.google.com/p/heekscad/source/checkout when is was logged in.  Apparently you just need to do this once.

I got some interesting idea’s from this link http://www.cmcrossroads.com/content/view/6517/120/

I’m interesting in see if there is anything echo back in the makefile.

Ok… Here’s some more info on makefiles.

I keep getting errors with RapidSVN

Execute: Unlock
Error: Error while performing action: Working copy ‘/home/jonas/Desktop/HeeksCAD/src’ locked
Ready

http://makepp.sourceforge.net/1.19/makepp_statements.html

This might be the solution to my error issues I was getting

http://www.nabble.com/Error:-locked-td22086862.html

Oh…. I just tried this:

jonas@Ubuntu4:~$ sudo aptitude remove subversion
[sudo] password for jonas:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reading extended state information
Initializing package states… Done
Writing extended state information… Done
Building tag database… Done
The following packages are unused and will be REMOVED:
ant ant-optional javahelp2 junit junit4 libaccess-bridge-java
libcommons-beanutils-java libcommons-collections3-java
libcommons-digester-java libcommons-logging-java libdb4.5-java
libfreemarker-java libjsch-java libjtidy-java liblucene2-java
libnb-platform7-devel-java libnb-platform7-java libopencascade6.2
libregexp-java libservlet2.3-java libswing-layout-java libtriangle-1.6
libtriangle-dev libwxbase2.6-dev libxml-commons-resolver1.1-java rhino
subversion wx2.6-headers
The following packages have been kept back:
app-install-data-commercial
The following partially installed packages will be configured:
acpid cron
0 packages upgraded, 0 newly installed, 28 to remove and 1 not upgraded.
Need to get 0B of archives. After unpacking 178MB will be freed.
Do you want to continue? [Y/n/?] y
Writing extended state information… Done
(Reading database … 329334 files and directories currently installed.)
Removing ant-optional …
Removing ant …
Removing libnb-platform7-java …
Removing libnb-platform7-devel-java …
Removing javahelp2 …
Removing junit …
Removing junit4 …
Removing libaccess-bridge-java …
Removing liblucene2-java …
Removing libcommons-digester-java …
Removing libcommons-beanutils-java …
Removing libcommons-collections3-java …
Removing libcommons-logging-java …
Removing libdb4.5-java …
Removing libfreemarker-java …
Removing libjsch-java …
Removing libjtidy-java …
Removing libopencascade6.2 …
Removing libregexp-java …
Removing libservlet2.3-java …
Removing libswing-layout-java …
Removing libtriangle-dev …
Removing libtriangle-1.6 …
Removing libwxbase2.6-dev …
Removing libxml-commons-resolver1.1-java …
Removing rhino …
Removing subversion …
Removing wx2.6-headers …
Processing triggers for man-db …
Processing triggers for libc6 …
ldconfig deferred processing now taking place
Setting up cron (3.0pl1-100ubuntu2.1) …
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] […] .
-n: not really
-f: force
dpkg: error processing cron (–configure):
subprocess post-installation script returned error exit status 1
Setting up acpid (1.0.4-5ubuntu9.3) …
* Stopping Hardware abstraction layer hald                              [ OK ]
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] […] .
-n: not really
-f: force
dpkg: error processing acpid (–configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
cron
acpid
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up acpid (1.0.4-5ubuntu9.3) …
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] […] .
-n: not really
-f: force
dpkg: error processing acpid (–configure):
subprocess post-installation script returned error exit status 1
Setting up cron (3.0pl1-100ubuntu2.1) …
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] […] .
-n: not really
-f: force
dpkg: error processing cron (–configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
acpid
cron
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reading extended state information
Initializing package states… Done
Writing extended state information… Done
Building tag database… Done
jonas@Ubuntu4:~$

I don’t think that’s what I wanted to do… Oh c$%p
Well…. I think I want the libopencascade6.2 back at least… I think I got that from a backport…
Well Lets see.

Ok…. this is weird….

jonas@Ubuntu4:~$ locate libopencascade6.2
/var/lib/dpkg/info/libopencascade6.2.list
/var/lib/dpkg/info/libopencascade6.2.postrm

It appears openovations has moved libopencascade6.2 into debian and I haven’t  adjusted my sources.list yet. … (which is apparently why it go removed) I ran my compiled heekscad and it got weird on me.  I rebuilt my project from scratch thinking I was going to get a message that it was missing dependancies or something… but instead it compiled and run ok…. I don’t understand that.    More for another day….

Ok…. Sooo…. This doesn’t seem to be working… Some one one the heekscad site said he had version 9.6 working…. Ok… Doesn’t look like anybody is backporting in a fix in Ubuntu…. So….
I guess the prudent thing to do would be to go to the source so to speak… Use the source luke…
Sorry…… the family is watching galaxy quest at the moment and I seem to be having a sci-fi theme tonght…

It’s morning… Back to RapidSVN I got some install instructions from the heekscad group..

Got basic instructions on how to get this working here…http://www.tuxfiles.org/linuxhelp/softinstall.html.  I must say it very well written.  Ok… Lets put the to together…

Download the Source  http://www.rapidsvn.org/download/release/0.9.6/rapidsvn-0.9.6.tar.gz
Install following (Synaptic) :

APR(dev)  ( I clicked on libr1apr-dev)  (lib1apr, lib1aprutil1 (already installed) /We’ll see if that’s enough)
NEON(dev) ( I clicked on libneon27-dev) (libneon27, libneon27-gnutils (already installed)
Subversion Headers(clicked on libsvn-dev (that apparently loaded up a bunch of dependancies.. libsvn1,libssvncpp0c2a was already loaded)

In summary:

libapr1-dev (version 1.2.11-1) will be installed
libaprutil1-dev (version 1.2.12+dfsg-3ubuntu0.1) will be installed
libdb4.6-dev (version 4.6.21-6ubuntu1) will be installed
libldap2-dev (version 2.4.9-0ubuntu0.8.04.2) will be installed
libneon27-dev (version 0.27.2-1) will be installed
libpcre3-dev (version 7.4-1ubuntu2.1) will be installed
libpcrecpp0 (version 7.4-1ubuntu2.1) will be installed
libsqlite3-dev (version 3.4.2-2) will be installed
libsvn-dev (version 1.5.1dfsg1-1ubuntu2~hardy2) will be installed
uuid-dev (version 1.2-1.40.8-2ubuntu2) will be installed

Ok… Then here is the history of what I did.

505  cd downloads
506  ls
507  tar xvzf rapidsvn-0.9.6.tar.gz
508  ls
509  cd rapidsvn-0.9.6
510  ./configure
511  make
512  sudo make install
513  sudo ln -s /usr/local/lib/libsvncpp.so.1 /usr/lib/libsvncpp.so.1
514  rapidsvn
515  history

I had some issues when I tried to download the source so I deleted the link, the files and tried to start from scratch..  I also made the minor fix for RUNINPLACE
Ok… Lets see here’s the link:http://code.google.com/p/heekscad/wiki/CompilingForUbuntu

Ok.. I just did a

make clean
make
sudo make install
in my src directory.. Closed the terminal, fired it back up (to get to my home directory.. I fired it up worked fine..
Tried to fire up the executable in the source directory and got the error message as expected.
Back to the src directory.

After installing if I enter a
RUNINPLACE=yes make
I get a message that everything is updated.

Soo… I needed to

make clean
RUNINPLACE=yes make
And this seems to have worked fine.
So I made some changes that I want to up load…
Ok… So I’m pretty sure I did everything correctly.
I did an update, clean and commit.  and I can’t get past the password.
I keep getting bounced back to the inputbox and when I hit enter I get this:

Execute: Commit
Error: Error while performing action: Commit failed (details follow):
MKACTIVITY of ‘/svn/!svn/act/55d882bc-315a-46b3-9d66-7fd9e717e76b’: authorization failed (http://heekscad.googlecode.com)
Ready

Back from vacation…. Lets see if I can pick this up again….
Ok…. I’ve been gone for a few days so…….

I’m going to delete the reference in rapidsvn and  blow away my heekscad directory to start from scratch…… Soo…. Lets see what happens..

Fire up rapidsvn.. Select Repository=> Checkout
Enter…
Repository Url:
https://heekscad.googlecode.com/svn/trunk/

Path:
/home/jonas/Desktop/HeeksCAD

And I take a look at where I wanted to fix the RUNINPLACE code and……. It’s been fixed already…  Plus it looks like Dan Heeks and company has added a code::blocks project file….
Leave for vacation for a few days and a bunch of stuff changes….
Well…… go figure… I guess no first rapidSVN update tonight…

Posted in OpenCascade, Uncategorized | Leave a comment

Playing around with Heekscad and RapidSVN

I had downloaded heeksCAD using SVN and had recopied the project to hack it up.
I want to start playaround with rapidSVN a little bit more and see if I can stay in-sync with the changes.
I don’t know if this was the write thing to do.  But I blew away everything in by desktop heekscad including and downloaded.
I copied my project file from what I had hacked up and fired it up.

I got this:

————– Build: Debug in HeeksCAD —————

WARNING: Can’t read file’s timestamp: /home/jonas/Desktop/HeeksCAD/src/glfont.cpp
Linking console executable: ../HeeksCAD_Executable_NotTheBestSolution/bin/HeeksCAD
g++: obj/Debug/src/glfont.o: No such file or directory
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings

I think something might be missing from the repository… Need to look at this… but quite time in the house is over:(

Posted in Uncategorized | Leave a comment

Heekscad revolve

There is a features request for revolving a sketch into a solid.

I thought I might try googling a little to see what I could come up with.

http://lignumcad.sourceforge.net/doc/en/HTML/SOHTML/TechnicalReference.html

http://www.opencascade.org/org/forum/thread_8675/

Ok…. I think I found the magic term. BRepPrimAPI_MakeRevol

And this looks very very interesting here:
http://www.opencascade.org/org/forum/thread_13617/

Posted in Uncategorized | Leave a comment

Heekscad following the path for a fileopen for a dxf file.

This is me just having my version of fun here.
I downloaded a dxf of a bridge, and I thought it be interesting to see if I could figure out what all is going on when the program loads this this up.
There are probably better ways of doing this, but I thought I’d try this for starters.

It seems that the graphics are loaded up on my debug version at /home/jonas/HeeksCAD_Executable_NotTheBestSolution/share/heekscad/bitmaps.
It look like the file icon I was long for “open.png”  Just to make sure I drew a little smilley face it using GIMP and tried running my debug version from C::B.  Yep… Go the correct file..

So… should be able to search for all occurences of open.png (hopefully it will just be just one).
Ok.. Not that’s curious… I got a big nada… Hmm…  tryed a search on “open”.  I think I found it.

src/HeeksFrame.cpp|1403|m_toolBar->AddTool(wxID_OPEN, _T(“Open”), ToolImage(_T(“open”)), _(“Open file”));|

Just out of curiosity, I’m curious what kind of error message, I’ll get rename the file so heekscad can’t find it.”
This error message pops up:
Can’t load image from file ‘/home/jonas/HeeksCAD_Executable_NotTheBestSolution/bin/../share/heekscad/bitmaps/open.png’: file does not exist.

Ok.. I guess I should change it back.
So… There’s an object toolimage
So… Here is why the “open.png” search didn’t work
interface/ToolImage.cpp|16|ToolImage::ToolImage(const wxString& name):wxImage(wxGetApp().GetExeFolder() + _T(“/../share/heekscad/bitmaps/”) + name + _T(“.png”), wxBITMAP_TYPE_PNG)|
Here is the object declaration of Toolimage.

class ToolImage: public wxImage{
public:
#ifdef HEEKSCAD
static float m_button_scale;
static const int full_size;
static const int default_bitmap_size;
#endif

ToolImage(const wxString& name);

static int GetBitmapSize();
#ifdef HEEKSCAD
static void SetBitmapSize(int size);
#endif
};

Ok… So much for ToolImage.
The next thing to search for is the occurrence wxID_OPEN:

src/HeeksFrame.cpp|76|EVT_MENU(wxID_OPEN, CHeeksFrame::OnOpenButton)|
src/HeeksFrame.cpp|179|file_menu->Append( wxID_OPEN, _( “Open” ) );|
src/HeeksFrame.cpp|1403|m_toolBar->AddTool(wxID_OPEN, _T(“Open”), ToolImage(_T(“open”)), _(“Open file”));|

So… I think the next thing I’m looking for is CHeeksFrame::OnOpenButton

src/HeeksFrame.cpp|76|EVT_MENU(wxID_OPEN, CHeeksFrame::OnOpenButton)|
src/HeeksFrame.cpp|753|void CHeeksFrame::OnOpenButton( wxCommandEvent& event )|

Which leads me to this section of code:

void CHeeksFrame::OnOpenButton( wxCommandEvent& event )
{
wxFileDialog dialog(this, _(“Open file”), wxEmptyString, wxEmptyString, wxGetApp().GetKnownFilesWildCardString());
dialog.CentreOnParent();

if (dialog.ShowModal() == wxID_OK)
{
if(wxGetApp().CheckForModifiedDoc())
{
wxGetApp().Reset();
wxGetApp().OpenFile(dialog.GetPath().c_str());
wxGetApp().OnNewOrOpen(true);
wxGetApp().SetLikeNewFile();
}
}
}

Which makes me say heh?  Good place for me to stop and do something like eat… But first mess with the “Open file” text in wxFileDialog dialog(this, _(“Open file”), to see if I’m where I think I am. This sort like common dialog control  in vb but not quite… I need to figure this out to see where this goes next…
A couple things need to be researched:

wxfileDialog and wxGetApp
Googling for wxGetAPP this sort of popped up….
Looks interesting but I need to stay on track: http://www.classes.cs.uchicago.edu/archive/2003/fall/51044-1/sw/wxX11-2.4.2/demos/

Ok…this is off the wxwidgets.org site.

::wxGetApp

wxAppDerivedClass& wxGetApp()

This function doesn’t exist in wxWidgets but it is created by using the IMPLEMENT_APP macro. Thus, before using it anywhere but in the same module where this macro is used, you must make it available using DECLARE_APP.

The advantage of using this function compared to directly using the global wxTheApp pointer is that the latter is of type wxApp * and so wouldn’t allow you to access the functions specific to your application class but not present in wxApp while wxGetApp() returns the object of the right type.

IMPLEMENT_APP(HeeksCADapp) appear in the code.  So it appears that the function definitions are called out in HeekCADapp.  So I have a trail of breadcrumbs to follow.

I wanted to try a little experiment the code.:
//wxGetApp().Reset();
HeeksCADapp().Reset;
wxGetApp().OpenFile(filepath.c_str());
wxGetApp().OnNewOrOpen(true);
wxGetApp().SetLikeNewFile();

So it got this error when I compiled.

/home/jonas/HeeksCAD/src/HeeksFrame.cpp||In member function ‘void CHeeksFrame::OnRecentFile(wxCommandEvent&)’:|
/home/jonas/HeeksCAD/src/HeeksFrame.cpp|1050|error: statement cannot resolve address of overloaded function|
||=== Build finished: 1 errors, 0 warnings ===|

I need to think about this a little. I’m not understanding something. JTTODO I’ll try to pick that up later.
[Edit 6/11]
Ok… This is going to be one long post. Lets see if I pop off a little here before I go to work.
It appear’s that “HeeksCADapp::Reset()” has a bunch of interesting things going on but are what I’m interested in following at the moment:

void HeeksCADapp::Reset(){
m_marked_list->Clear(true);
m_marked_list->Reset();
std::set::iterator It;
for(It = observers.begin(); It != observers.end(); It++){
Observer *ov = *It;
ov->Clear();
}
Clear();
EndHistory();
delete history;
history = new MainHistory;
m_current_coordinate_system = NULL;
m_doing_rollback = false;
gp_Vec vy(0, 1, 0), vz(0, 0, 1);
m_frame->m_graphics->m_view_point.SetView(vy, vz);
m_filepath = wxString(_(“Untitled”)) + _T(“.heeks”);
m_hidden_for_drag.clear();
m_show_grippers_on_drag = true;
*m_ruler = HRuler();
SetInputMode(m_select_mode);

ResetIDs();
}

It think what I’m interested in learning is down this path,”wxGetApp().OnNewOrOpen(true);”
Let’s see what that looks like:
void HeeksCADapp::OnNewOrOpen(bool open)
{
for(std::list::iterator It = m_loaded_libraries.begin(); It != m_loaded_libraries.end(); It++){
wxDynamicLibrary* shared_library = *It;
bool success;
void(*fnOnNewOrOpen)(int) = (void(*)(int))(shared_library->GetSymbol(_T(“OnNewOrOpen”), &success));
if(fnOnNewOrOpen){
(*fnOnNewOrOpen)(open ? 1:0);
}
}
}

Welll…. Ok…. First glance it doesn’t look like we’re doing any dxf”ish. Hmmm devil is in the details.
Wait a second… I think I jumped a little to far ahead… I need to go back to wxGetApp().OpenFile(filepath.c_str());

bool HeeksCADapp::OpenFile(const wxChar *filepath, bool import_not_open, HeeksObj* paste_into)
{
m_in_OpenFile = true;
m_file_open_or_import_type = FileOpenOrImportTypeOther;

// returns true if file open was successful
wxString wf(filepath);
wf.LowerCase();

bool open_failed = false;

if(import_not_open)StartHistory();

if(wf.EndsWith(_T(“.heeks”)) || wf.EndsWith(_T(“.HEEKS”)))
{
m_file_open_or_import_type = FileOpenOrImportTypeHeeks;
OpenXMLFile(filepath, import_not_open, paste_into);
}
else if(wf.EndsWith(_T(“.svg”)) || wf.EndsWith(_T(“.SVG”)))
{
OpenSVGFile(filepath, import_not_open);
}
else if(wf.EndsWith(_T(“.stl”)) || wf.EndsWith(_T(“.STL”)))
{
OpenSTLFile(filepath, import_not_open);
}
else if(wf.EndsWith(_T(“.dxf”)) || wf.EndsWith(_T(“.DXF”)))
{
m_file_open_or_import_type = FileOpenOrImportTypeDxf;
OpenDXFFile(filepath, import_not_open);
}

// check for images
else if(OpenImageFile(filepath, import_not_open))
{
}

// check for solid files
else if(CShape::ImportSolidsFile(filepath, import_not_open))
{
}
else
{
// error
wxString str = wxString(_(“Invalid file type chosen”)) + _T(” “) + _(“expecting”) + _T(” “) + GetKnownFilesCommaSeparatedList();
wxMessageBox(str);
open_failed = true;
}

if(import_not_open)EndHistory();

if(!open_failed)
{
if(!import_not_open)
{
WereAdded(m_objects);
m_filepath.assign(filepath);
InsertRecentFileItem(filepath);
SetFrameTitle();
}
}

m_in_OpenFile = false;

return true;
}

On a side note. I’m just starting to play with code::blocks books marks.
Looking at :

void HeeksCADapp::OpenDXFFile(const wxChar *filepath, bool undoably)
{
HeeksDxfRead dxf_file(filepath);
dxf_file.DoRead(undoably);
}

[edit June 12]
I’m wondering if there is a easier way of doing this.
I guess there is two ways of looking at this. Knowing where you where you started and figure out where your going…. or…. find a particular point in the code and figure out how you got there.

Might as well keep going here:
Searching on “DoRead” I come up with this…
void CDxfRead::DoRead(bool undoably)
{
if(m_fail)return;

get_line();

while(!((*m_ifs).eof()))
{
if(!strcmp(m_str, “0”))
{
get_line();

if(!strcmp(m_str, “LINE”)){
if(!ReadLine(undoably))return;
continue;
}
else if(!strcmp(m_str, “ARC”)){
if(!ReadArc(undoably))return;
continue;
}
else if(!strcmp(m_str, “CIRCLE”)){
if(!ReadCircle(undoably))return;
continue;
}
else if(!strcmp(m_str, “ELLIPSE”)){
if(!ReadEllipse(undoably))return;
continue;
}
else if(!strcmp(m_str, “SPLINE”)){
if(!ReadSpline(undoably))return;
continue;
}
else if(!strcmp(m_str, “LWPOLYLINE”)){
if(!ReadLwPolyLine(undoably))return;
continue;
}
}

get_line();
}
}
I think I jumped a few steps here from  but it appears to be stll heeks software ware we’re in…

Posted in Uncategorized | Leave a comment

Looking for C++ debugging techniques.

I starting to feel more comfortable with the C::B ide. But I still not very versed in C++ debugging techniques. I remember in the Paul Kunz course he mentioned some technique that could track some routines called. It was one of those, “Oh I need to remember that” moments,… I did… just not where and what…Oh well..
Anyway… might have been Dtrace
I’m not sure I’m a level where I need to mess with that..

Well, code::blocks has debugging tools.. I suppose I should rtfm
Bunch of stuff in there I suppose..
[ edit 6/12/09 ] I found something more of interest here.
Quoting verbatim:
Debugger:

* Interfaces GNU GDB
* Also supports MS CDB (not fully featured)
* Full breakpoints support:
o Code breakpoints
o Data breakpoints (read, write and read/write)
o Breakpoint conditions (break only when an expression is true)
o Breakpoint ignore counts (break only after certain number of hits)
* Display local function symbols and arguments
* User-defined watches (support for watching user-defined types through scripting)
* Call stack
* Disassembly
* Custom memory dump
* Switch between threads
* View CPU registers

So lets see what I get with GNU GDB … I just checked synaptic, code is loaded up on my system.

Ok… I seem to have found some code::blocks instructions

This seems like this this my be the topic of another post.

Posted in Uncategorized | Leave a comment

Starting to chew.. on the HeeksCAD code.

Ok… My main goal in looking at Heekscad is to gain and understand on how opencascade goes from the OCC code to a OpenGl graphics window.  It has been very frustrating to me to see a simple makebottle example OCC provides with no explanation on how to get it drawn on the screen.  Well if there is a explanation  I haven’t run across it.  I guess it might be rudimentary to guys who have degrees in this stuff, but it’s not to me(not yet anyway).  I would like to make a heavily documented how to on how get that darn makebottle working… anyway that’s the goal anyway I guess we’ll see if I get there.  But first we need to just have some fun and poke and prode a little under the hood of heeks cad to figure out how it interacts with opencascade libraries.

The heeksCad source code had be found here.

Heekcad being a Wxwidgets project, doesn’t have a main(not one that you’ll see in your source anyway)   As explained here , the magic terms you need to look for to figure out the starting point are the macro called IMPLEMENT_APP and the then OnInit

src/HeeksCAD.cpp|77|IMPLEMENT_APP(HeeksCADapp)|

src/HeeksCAD.cpp|172|bool HeeksCADapp::OnInit()|
src/HeeksCAD.h|151|virtual bool OnInit();|
src/propgrid.cpp|604|virtual bool OnInit() { wxPGGlobalVars = new wxPGGlobalVarsClass(); return true; }|

I’m not sure what the deal is with the propgrid.cpp but what I’m looking for is the HeeksCAD.cpp and HeeksCAD.h

Ok… Time to start poking around..
One thing that caught my mind was:HeeksConfig config;
HeeksConfig is object declared here

// HeeksConfig.h
// Copyright (c) 2009, Dan Heeks
// This program is released under the BSD license. See the file COPYING for details.
#include <wx/config.h>
#include <wx/confbase.h>
#include <wx/fileconf.h>

class HeeksConfig: public wxConfig
{
public:
HeeksConfig():wxConfig(_T(“HeeksCAD”)){}
~HeeksConfig(){}
};

This sort of takes care of program variable automatically for you depending on which OS your in.
It will stick setting in the registry or an INI (in windows) or could be /etc or the home directory..
I found my in jonas@Ubuntu4:~$ locate .HeeksCAD
/home/jonas/.HeeksCAD

Takeing a look inside the file looks like this:

MainFrameWidth=1279
MainFrameHeight=725
MainFramePosX=1
MainFramePosY=49
AuiPerspective=layout2|name=ToolBar;caption=General Tools;state=2108156;dir=1;layer=10;row=0;pos=0;prop=100000;bestw=328;besth=40;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=GeomBar;caption=Geometry Tools;state=2108156;dir=1;layer=10;row=0;pos=339;prop=100000;bestw=292;besth=40;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=520;floaty=288;floatw=309;floath=64|name=SolidBar;caption=Solid Tools;state=2108156;dir=1;layer=10;row=1;pos=1;prop=100000;bestw=392;besth=40;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=736;floaty=259;floatw=345;floath=64|name=ViewingBar;caption=Viewing Tools;state=2108156;dir=1;layer=10;row=1;pos=404;prop=100000;bestw=292;besth=40;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=679;floaty=334;floatw=309;floath=64|name=TransformBar;caption=Transformation Tools;state=2108159;dir=1;layer=10;row=0;pos=52;prop=100000;bestw=256;besth=40;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=618;floaty=411;floatw=273;floath=64|name=Graphics;caption=Graphics;state=768;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=800;besth=600;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=Objects;caption=Objects;state=2099196;dir=4;layer=1;row=0;pos=0;prop=100000;bestw=300;besth=400;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=Options;caption=Options;state=2099196;dir=4;layer=1;row=0;pos=1;prop=100000;bestw=300;besth=200;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=Input;caption=Input;state=2099196;dir=4;layer=1;row=0;pos=2;prop=100000;bestw=300;besth=200;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=Properties;caption=Properties;state=2099196;dir=4;layer=1;row=0;pos=3;prop=100000;bestw=300;besth=200;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|dock_size(5,0,0)=504|dock_size(4,1,0)=234|dock_size(1,10,0)=42|dock_size(1,10,1)=42|
ToolImageSize=24
Perspective=0
DrawEnd=0
DrawInters=0
DrawCentre=0
DrawMidpoint=0
DrawNearest=0
DrawTangent=0
DrawCoords=1
DrawScreen=0
DrawToGrid=1
DrawGrid=1
DrawRadius=5
BackgroundColor=242 204 162
CurrentColor=0 0 0
ConstructionColor=0 0 255
RotateMode=0
Antialiasing=0
GridMode=3
m_light_push_matrix=1
WheelForwardAway=1
ZoomingReversed=0
CtrlDoesRotate=0
DrawDatum=1
DrawDatumSolid=1
DatumSize=30
DatumSizeIsPixels=1
DrawRuler=0
RegularShapesMode=0
RegularShapesNSides=6
RegularShapesRectRad=0
RegularShapesObRad=2
ExtrudeRemovesSketches=1
LoftRemovesSketches=1
GraphicsTextMode=2
DxfMakeSketch=1
FaceToSketchDeviation=0.1
RecentFilePath0=/home/jonas/Desktop/heekscaddata/bridge.dxf
RecentFilePath1=
RecentFilePath2=
RecentFilePath3=
RecentFilePath4=
RecentFilePath5=
RecentFilePath6=
RecentFilePath7=
RecentFilePath8=
RecentFilePath9=
RecentFilePath10=
RecentFilePath11=
RecentFilePath12=
RecentFilePath13=
RecentFilePath14=
RecentFilePath15=
RecentFilePath16=
RecentFilePath17=
RecentFilePath18=
RecentFilePath19=

heekscad todo: Seems like view should pop up as last one saved.  I suppose that will show up.. one day..

Hmm… What next. In the heekscad.H I found some very interesting function definitions that look interesting to me.
void OpenXMLFile(const wxChar *filepath, bool undoably = false, HeeksObj* paste_into = NULL);
void OpenSVGFile(const wxChar *filepath, bool undoably = false);
void OpenSTLFile(const wxChar *filepath, bool undoably = false);
void OpenDXFFile(const wxChar *filepath, bool undoably = false);
bool OpenImageFile(const wxChar *filepath, bool undoably = false);
bool OpenFile(const wxChar *filepath, bool import_not_open = false, HeeksObj* paste_into = NULL);

Playing around I opened a filed called Bridge.dxf that I downed loaded somwhere off the net.  See if I can follow how all this is happening.. I think that’s something for tomorrow morning..

Posted in Uncategorized | Leave a comment

Code::blocks Project file for HeeksCad ugly but it works.

This is a little sample Code::Blocks project file that I got to work for Heekscad.  HeeksCAD is evolving pretty quickly.  There is discussion on the the heekscad about a option under development RUNNINPLACE which will be far more interesting that this..   The roadblock I ran into using Codeblocks is the program looks up the graphic icons.
The Makefile install executable as
/usr/local/bin/HeeksCAD
The executable basically backs up one  and then looks folders:
/usr/local/share/heekscad/bitmaps
/usr/local/share/heekscad/icons.
Basically,  if you create the executable in the source code directory, that graphic elements are not stored that way… And if  target /usr/local/bin…  you require sudo.   There is probably a way around that but I just want to start play with the code to see how it works.
Basically I created a folder in for the the executable in my local directory (no sudo required)
/home/jonas/HeeksCAD_Executable_NotTheBestSolution/bin

And dumped the graphics in:

/home/jonas/HeeksCAD_Executable_NotTheBestSolution/share/heekscad/icons
/home/jonas/HeeksCAD_Executable_NotTheBestSolution/share/heekscad/bitmaps.

This is a crappy project file but it was good enough to get me going. (I haven’t done this for a we’ll see if this works. Hear’s the link

Posted in Uncategorized | 1 Comment

Compiling HeeksCAD with Code::Blocks

It’s way too late and I should be in bed…. but this is way to0 fun…

Anyway… I downloaded the source for HeeksCAD has was able to get it to compile with the existing makefile.  (So… I know what I got is good)…
I copied the project over to another folder and deleted the object file and am working on trying to get to run in code::blocks.
I’m widdling away at the errors and learning a bunch in the process.

This is where I left off with the errors’

obj/Debug/interface/ObjList.o||In function ObjList::ReadBaseXML(TiXmlElement*)':|
/home/jonas/HeeksCAD/interface/ObjList.cpp|246|undefined reference to
TiXmlHandle::FirstChildElement() const’|
obj/Debug/interface/ObjList.o||In function TiXmlNode::NextSiblingElement()':|
/home/jonas/HeeksCAD/interface/../tinyxml/tinyxml.h|649|undefined reference to
TiXmlNode::NextSiblingElement() const’|
obj/Debug/interface/PropertyCheck.o||In function wxStringBase':|
/usr/include/wx-2.8/wx/string.h|351|undefined reference to
wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)’|
obj/Debug/src/Cone.o||In function CCone::SetFromXMLElement(TiXmlElement*)':|
/home/jonas/HeeksCAD/src/Cone.cpp|365|undefined reference to
TiXmlAttribute::DoubleValue() const’|
/home/jonas/HeeksCAD/src/Cone.cpp|366|undefined reference to TiXmlAttribute::DoubleValue() const'|
/home/jonas/HeeksCAD/src/Cone.cpp|367|undefined reference to
TiXmlAttribute::DoubleValue() const’|
/home/jonas/HeeksCAD/src/Cone.cpp|369|undefined reference to TiXmlAttribute::DoubleValue() const'|
/home/jonas/HeeksCAD/src/Cone.cpp|370|undefined reference to
TiXmlAttribute::DoubleValue() const’|
obj/Debug/src/Cone.o:/home/jonas/HeeksCAD/src/Cone.cpp|371|more undefined references to TiXmlAttribute::DoubleValue() const' follow|
obj/Debug/src/Cone.o||In function
CCone::SetXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/Cone.cpp|335|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
/home/jonas/HeeksCAD/src/Cone.cpp|336|undefined reference to
TiXmlElement::SetDoubleAttribute(char const*, double)’|
/home/jonas/HeeksCAD/src/Cone.cpp|337|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
/home/jonas/HeeksCAD/src/Cone.cpp|340|undefined reference to
TiXmlElement::SetDoubleAttribute(char const*, double)’|
/home/jonas/HeeksCAD/src/Cone.cpp|341|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
obj/Debug/src/Cone.o:/home/jonas/HeeksCAD/src/Cone.cpp|342|more undefined references to
TiXmlElement::SetDoubleAttribute(char const*, double)’ follow|
obj/Debug/src/Cone.o||In function TiXmlAttribute::Next()':|
/home/jonas/HeeksCAD/src/../tinyxml/tinyxml.h|854|undefined reference to
TiXmlAttribute::Next() const’|
obj/Debug/src/CoordinateSystem.o||In function CoordinateSystem::WriteXML(TiXmlNode*)':|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1298|undefined reference to
TiXmlElement::TiXmlElement(char const*)’|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1299|undefined reference to TiXmlNode::LinkEndChild(TiXmlNode*)'|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1300|undefined reference to
Ttc(wchar_t const*)’|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1300|undefined reference to TiXmlElement::SetAttribute(char const*, char const*)'|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1301|undefined reference to
TiXmlElement::SetDoubleAttribute(char const*, double)’|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1302|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1303|undefined reference to
TiXmlElement::SetDoubleAttribute(char const*, double)’|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1304|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1305|undefined reference to
TiXmlElement::SetDoubleAttribute(char const*, double)’|
obj/Debug/src/CoordinateSystem.o:/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1306|more undefined references to TiXmlElement::SetDoubleAttribute(char const*, double)' follow|
obj/Debug/src/CoordinateSystem.o||In function
CoordinateSystem::ReadFromXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1329|undefined reference to Ctt(char const*)'|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1330|undefined reference to
TiXmlAttribute::DoubleValue() const’|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1331|undefined reference to TiXmlAttribute::DoubleValue() const'|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1332|undefined reference to
TiXmlAttribute::DoubleValue() const’|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1333|undefined reference to TiXmlAttribute::DoubleValue() const'|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1334|undefined reference to
TiXmlAttribute::DoubleValue() const’|
obj/Debug/src/CoordinateSystem.o:/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1335|more undefined references to TiXmlAttribute::DoubleValue() const' follow|
obj/Debug/src/Cuboid.o||In function
CCuboid::SetXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/Cuboid.cpp|209|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
/home/jonas/HeeksCAD/src/Cuboid.cpp|210|undefined reference to
TiXmlElement::SetDoubleAttribute(char const*, double)’|
/home/jonas/HeeksCAD/src/Cuboid.cpp|211|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
/home/jonas/HeeksCAD/src/Cuboid.cpp|214|undefined reference to
TiXmlElement::SetDoubleAttribute(char const*, double)’|
/home/jonas/HeeksCAD/src/Cuboid.cpp|215|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
obj/Debug/src/Cuboid.o:/home/jonas/HeeksCAD/src/Cuboid.cpp|216|more undefined references to
TiXmlElement::SetDoubleAttribute(char const*, double)’ follow|
obj/Debug/src/Cylinder.o||In function CCylinder::SetFromXMLElement(TiXmlElement*)':|
/home/jonas/HeeksCAD/src/Cylinder.cpp|193|undefined reference to
TiXmlAttribute::DoubleValue() const’|
/home/jonas/HeeksCAD/src/Cylinder.cpp|194|undefined reference to TiXmlAttribute::DoubleValue() const'|
/home/jonas/HeeksCAD/src/Cylinder.cpp|195|undefined reference to
TiXmlAttribute::DoubleValue() const’|
/home/jonas/HeeksCAD/src/Cylinder.cpp|197|undefined reference to TiXmlAttribute::DoubleValue() const'|
/home/jonas/HeeksCAD/src/Cylinder.cpp|198|undefined reference to
TiXmlAttribute::DoubleValue() const’|
obj/Debug/src/Cylinder.o:/home/jonas/HeeksCAD/src/Cylinder.cpp|199|more undefined references to TiXmlAttribute::DoubleValue() const' follow|
obj/Debug/src/Cylinder.o||In function
CCylinder::SetXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/Cylinder.cpp|163|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
/home/jonas/HeeksCAD/src/Cylinder.cpp|164|undefined reference to
TiXmlElement::SetDoubleAttribute(char const*, double)’|
/home/jonas/HeeksCAD/src/Cylinder.cpp|165|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
/home/jonas/HeeksCAD/src/Cylinder.cpp|168|undefined reference to
TiXmlElement::SetDoubleAttribute(char const*, double)’|
/home/jonas/HeeksCAD/src/Cylinder.cpp|169|undefined reference to TiXmlElement::SetDoubleAttribute(char const*, double)'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|

I think I might need to add some stuff to the Code::Blocks project file.
I searched for tinyxml and this is what I came up with:

/home/jonas/HeeksCAD/tinyxml
/home/jonas/HeeksCAD/tinyxml/.svn
/home/jonas/HeeksCAD/tinyxml/tinystr.cpp
/home/jonas/HeeksCAD/tinyxml/tinystr.h
/home/jonas/HeeksCAD/tinyxml/tinyxml.cpp
/home/jonas/HeeksCAD/tinyxml/tinyxml.h
/home/jonas/HeeksCAD/tinyxml/tinyxmlerror.cpp
/home/jonas/HeeksCAD/tinyxml/tinyxmlparser.cpp
/home/jonas/HeeksCAD/tinyxml/.svn/all-wcprops
/home/jonas/HeeksCAD/tinyxml/.svn/entries
/home/jonas/HeeksCAD/tinyxml/.svn/format
/home/jonas/HeeksCAD/tinyxml/.svn/prop-base
/home/jonas/HeeksCAD/tinyxml/.svn/props
/home/jonas/HeeksCAD/tinyxml/.svn/text-base
/home/jonas/HeeksCAD/tinyxml/.svn/tmp
/home/jonas/HeeksCAD/tinyxml/.svn/prop-base/tinystr.cpp.svn-base
/home/jonas/HeeksCAD/tinyxml/.svn/prop-base/tinyxml.cpp.svn-base
/home/jonas/HeeksCAD/tinyxml/.svn/prop-base/tinyxmlerror.cpp.svn-base
/home/jonas/HeeksCAD/tinyxml/.svn/prop-base/tinyxmlparser.cpp.svn-base
/home/jonas/HeeksCAD/tinyxml/.svn/text-base/tinystr.cpp.svn-base
/home/jonas/HeeksCAD/tinyxml/.svn/text-base/tinystr.h.svn-base
/home/jonas/HeeksCAD/tinyxml/.svn/text-base/tinyxml.cpp.svn-base
/home/jonas/HeeksCAD/tinyxml/.svn/text-base/tinyxml.h.svn-base
/home/jonas/HeeksCAD/tinyxml/.svn/text-base/tinyxmlerror.cpp.svn-base
/home/jonas/HeeksCAD/tinyxml/.svn/text-base/tinyxmlparser.cpp.svn-base
/home/jonas/HeeksCAD/tinyxml/.svn/tmp/prop-base
/home/jonas/HeeksCAD/tinyxml/.svn/tmp/props
/home/jonas/HeeksCAD/tinyxml/.svn/tmp/text-base

Something to look at tommorow.
Ok... This might account for some of the issue... I need to study what's going on here.
http://sourceforge.net/scm/?type=cvs&group_id=13559

I took a look at the makefile it think what I need add is defined here.
OBJECTS=AboutBox.o advprops.o BezierCurve.o Cone.o ConversionTools.o CoordinateSystem.o Cuboid.o Cylinder.o DigitizedPoint.o DigitizeMode.o DimensionDrawing.o Drawing.o dxf.o svg.o Edge.o Face.o Geom.o glfont.o GLList.o GraphicsCanvas.o Grid.o Gripper.o GripperSelTransform.o Group.o HArc.o HCircle.o HDimension.o HeeksCAD.o HeeksFrame.o HeeksPrintout.o HILine.o HEllipse.o HImage.o History.o HLine.o HPoint.o HSpline.o HText.o HXml.o Images.o InputModeCanvas.o LineArcDrawing.o Loop.o MagDragWindow.o manager.o MarkedList.o ObjPropsCanvas.o odcombo.o OptionsCanvas.o Plugins.o PointDrawing.o PointOrWindow.o PropertiesCanvas.o PropertyTrsf.o PropertyVertex.o propgrid.o props.o RegularShapesDrawing.o RemoveOrAddTool.o RuledSurface.o Ruler.o SelectMode.o Shape.o ShapeData.o Sketch.o Solid.o Sphere.o StlSolid.o StretchTool.o TransformTool.o TransformTools.o TreeCanvas.o Vertex.o ViewPoint.o ViewRotating.o ViewZooming.o Window.o Wire.o wxImageLoader.o HeeksCADInterface.o HeeksColor.o HeeksObj.o LeftAndRight.o MarkedObject.o ObjList.o PropertyCheck.o PropertyChoice.o PropertyColor.o PropertyDouble.o PropertyLength.o PropertyInt.o PropertyList.o PropertyString.o strconv.o ToolImage.o ToolList.o tinyxml.o tinyxmlerror.o tinyxmlparser.o

tinyxml.o tinyxmlerror.o tinyxmlparser.o

/home/jonas/HeeksCAD/tinyxml/tinyxml.h
Need to add the directory tinyxml and add the appropriate header/ cpp files to the project.

Ok... That took care of that problem.... Recompiling here the next set.
This one seem to be a little more tricky..
||=== HeeksCAD, Debug ===|
obj/Debug/interface/PropertyCheck.o||In function
wxStringBase’:|
/usr/include/wx-2.8/wx/string.h|351|undefined reference to wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)'|
obj/Debug/src/CoordinateSystem.o||In function
CoordinateSystem::WriteXML(TiXmlNode*)’:|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1300|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/CoordinateSystem.o||In function
CoordinateSystem::ReadFromXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1329|undefined reference to Ctt(char const*)'|
obj/Debug/src/HDimension.o||In function
HDimension::WriteXML(TiXmlNode*)’:|
/home/jonas/HeeksCAD/src/HDimension.cpp|167|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HDimension.o||In function
HDimension::ReadFromXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/HDimension.cpp|216|undefined reference to Ctt(char const*)'|
obj/Debug/src/HImage.o||In function
HImage::WriteXML(TiXmlNode*)’:|
/home/jonas/HeeksCAD/src/HImage.cpp|206|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HImage.o||In function
HImage::ReadFromXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/HImage.cpp|234|undefined reference to Ctt(char const*)'|
obj/Debug/src/HText.o||In function
HText::WriteXML(TiXmlNode*)’:|
/home/jonas/HeeksCAD/src/HText.cpp|141|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HText.o||In function
HText::ReadFromXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/HText.cpp|175|undefined reference to Ctt(char const*)'|
obj/Debug/src/HXml.o||In function
HXml::GetShortString() const’:|
/home/jonas/HeeksCAD/src/HXml.cpp|16|undefined reference to Ctt(char const*)'|
obj/Debug/src/HeeksCAD.o||In function
HeeksCADapp::create_font()’:|
/home/jonas/HeeksCAD/src/HeeksCAD.cpp|2833|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HeeksCAD.o||In function
HeeksCADapp::get_text_size(wchar_t const*, float*, float*)’:|
/home/jonas/HeeksCAD/src/HeeksCAD.cpp|2864|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HeeksCAD.o||In function
HeeksCADapp::render_text(wchar_t const*)’:|
/home/jonas/HeeksCAD/src/HeeksCAD.cpp|2851|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HeeksCAD.o||In function
HeeksCADapp::SaveXMLFile(std::list > const&, wchar_t const*, bool)’:|
/home/jonas/HeeksCAD/src/HeeksCAD.cpp|1000|undefined reference to Ttc(wchar_t const*)'|
/home/jonas/HeeksCAD/src/HeeksCAD.cpp|1033|undefined reference to
Ttc(wchar_t const*)’|
obj/Debug/src/HeeksCAD.o:/home/jonas/HeeksCAD/src/HeeksCAD.cpp|1053|more undefined references to Ttc(wchar_t const*)' follow|
obj/Debug/src/HeeksCAD.o||In function
HeeksCADapp::OpenXMLFile(wchar_t const*, bool, HeeksObj*)’:|
/home/jonas/HeeksCAD/src/HeeksCAD.cpp|631|undefined reference to Ctt(char const*)'|
obj/Debug/src/HeeksCAD.o||In function
HeeksCADapp::Paste(HeeksObj*)’:|
/home/jonas/HeeksCAD/src/HeeksCAD.cpp|2791|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HeeksCAD.o||In function
ReadSTEPFileFromXMLElement’:|
/home/jonas/HeeksCAD/src/HeeksCAD.cpp|482|undefined reference to Ctt(char const*)'|
/home/jonas/HeeksCAD/src/HeeksCAD.cpp|521|undefined reference to
Ttc(wchar_t const*)’|
/home/jonas/HeeksCAD/src/HeeksCAD.cpp|546|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HeeksCAD.o||In function
TiXmlString::operator=(char const*)’:|
/home/jonas/HeeksCAD/src/../tinyxml/tinystr.h|112|undefined reference to TiXmlString::assign(char const*, unsigned int)'|
obj/Debug/src/HeeksCAD.o||In function
TiXmlString::quit()’:|
/home/jonas/HeeksCAD/src/../tinyxml/tinystr.h|255|undefined reference to TiXmlString::nullrep_'|
obj/Debug/src/HeeksCAD.o:(.rodata._ZTV11HeeksCADapp[vtable for HeeksCADapp]+0x90)||undefined reference to
wxApp::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*)’|
obj/Debug/src/HeeksCAD.o:(.rodata._ZTV11HeeksCADapp[vtable for HeeksCADapp]+0x94)||undefined reference to wxAppConsole::OnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*)'|
obj/Debug/src/HeeksFrame.o||In function
wxCloseEvent::Veto(bool)’:|
/usr/include/wx-2.8/wx/event.h|1409|undefined reference to wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)'|
obj/Debug/src/HeeksFrame.o||In function
wxArrayString::Item(unsigned int) const’:|
/usr/include/wx-2.8/wx/arrstr.h|154|undefined reference to wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)'|
obj/Debug/src/MarkedList.o||In function
MarkedList::CopySelectedItems()’:|
/home/jonas/HeeksCAD/src/MarkedList.cpp|394|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/Plugins.o||In function
wxStringBase::at(unsigned int)’:|
/usr/include/wx-2.8/wx/string.h|433|undefined reference to wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)'|
obj/Debug/src/Shape.o||In function
CShape::ExportSolidsFile(std::list > const&, wchar_t const*, std::map, std::allocator > >*)’:|
/home/jonas/HeeksCAD/src/Shape.cpp|899|undefined reference to Ttc(wchar_t const*)'|
/home/jonas/HeeksCAD/src/Shape.cpp|919|undefined reference to
Ttc(wchar_t const*)’|
obj/Debug/src/Shape.o||In function CShape::ImportSolidsFile(wchar_t const*, bool, std::map, std::allocator > >*, HeeksObj*)':|
/home/jonas/HeeksCAD/src/Shape.cpp|770|undefined reference to
Ttc(wchar_t const*)’|
/home/jonas/HeeksCAD/src/Shape.cpp|817|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/Sketch.o||In function
CSketch::GetProperties(std::list
>*)’:|
/home/jonas/HeeksCAD/src/Sketch.cpp|137|undefined reference to Ctt(char const*)'|
obj/Debug/src/StlSolid.o||In function
CStlSolid::read_from_file(wchar_t const*)’:|
/home/jonas/HeeksCAD/src/StlSolid.cpp|44|undefined reference to Ttc(wchar_t const*)'|
/home/jonas/HeeksCAD/src/StlSolid.cpp|80|undefined reference to
Ctt(char const*)’|
obj/Debug/src/advprops.o||In function wxColourPropertyClass::GetColour(int)':|
/home/jonas/HeeksCAD/src/advprops.cpp|1164|undefined reference to
wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)’|
obj/Debug/src/advprops.o||In function wxPGConstructSpinCtrlEditorClass()':|
/home/jonas/HeeksCAD/src/advprops.cpp|177|undefined reference to
wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)’|
obj/Debug/src/advprops.o||In function wxMultiChoicePropertyClass::GenerateValueAsString()':|
/home/jonas/HeeksCAD/src/advprops.cpp|1571|undefined reference to
wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)’|
obj/Debug/src/advprops.o||In function wxColourPropertyClass::DoSetValue(wxPGVariant)':|
/home/jonas/HeeksCAD/src/advprops.cpp|1164|undefined reference to
wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)’|
obj/Debug/src/advprops.o||In function wxFontPropertyClass::ChildChanged(wxPGProperty*)':|
/home/jonas/HeeksCAD/src/advprops.cpp|617|undefined reference to
wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)’|
obj/Debug/src/advprops.o:/home/jonas/HeeksCAD/src/advprops.cpp|125|more undefined references to wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)' follow|
obj/Debug/src/dxf.o||In function
CDxfRead’:|
/home/jonas/HeeksCAD/src/dxf.cpp|160|undefined reference to Ttc(wchar_t const*)'|
/home/jonas/HeeksCAD/src/dxf.cpp|160|undefined reference to
Ttc(wchar_t const*)’|
obj/Debug/src/dxf.o||In function CDxfWrite':|
/home/jonas/HeeksCAD/src/dxf.cpp|23|undefined reference to
Ttc(wchar_t const*)’|
/home/jonas/HeeksCAD/src/dxf.cpp|23|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/manager.o||In function
wxPropertyGridManager::GetPageRoot(int) const’:|
/home/jonas/HeeksCAD/src/manager.cpp|946|undefined reference to wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)'|
/home/jonas/HeeksCAD/src/manager.cpp|947|undefined reference to
wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)’|
obj/Debug/src/manager.o||In function wxPropertyGridManager::SetTargetPage(int)':|
/home/jonas/HeeksCAD/src/manager.cpp|737|undefined reference to
wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)’|
/home/jonas/HeeksCAD/src/manager.cpp|738|undefined reference to wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|

Ok... I found something here:
http://lists.wxwidgets.org/pipermail/wx-users/2007-July/101067.html

I guess I need to loose the __WXDEBUG__
I seems to recall putting that into the declaration string.. (I wonder why I was issue in the makefile compiling).. Lets see what happens when I remove -D__WXDEBUG__ from the compiler defines section in code blocks.

That seems to gotten rid of the next error.
Here is the next. Couple of errors:

obj/Debug/src/CoordinateSystem.o||In function CoordinateSystem::WriteXML(TiXmlNode*)’:|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1300|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/CoordinateSystem.o||In function
CoordinateSystem::ReadFromXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/CoordinateSystem.cpp|1329|undefined reference to Ctt(char const*)'|
obj/Debug/src/HDimension.o||In function
HDimension::WriteXML(TiXmlNode*)’:|
/home/jonas/HeeksCAD/src/HDimension.cpp|167|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HDimension.o||In function
HDimension::ReadFromXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/HDimension.cpp|216|undefined reference to Ctt(char const*)'|
obj/Debug/src/HImage.o||In function
HImage::WriteXML(TiXmlNode*)’:|
/home/jonas/HeeksCAD/src/HImage.cpp|206|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HImage.o||In function
HImage::ReadFromXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/HImage.cpp|234|undefined reference to Ctt(char const*)'|
obj/Debug/src/HText.o||In function
HText::WriteXML(TiXmlNode*)’:|
/home/jonas/HeeksCAD/src/HText.cpp|141|undefined reference to Ttc(wchar_t const*)'|
obj/Debug/src/HText.o||In function
HText::ReadFromXMLElement(TiXmlElement*)’:|
/home/jonas/HeeksCAD/src/HText.cpp|175|undefined reference to Ctt(char const*)'|
obj/Debug/src/HXml.o||In function
HXml::GetShortString() const’:|
/home/jonas/HeeksCAD/src/HXml.cpp|16|undefined reference to `Ctt(char const*)’|

I think I might have to compile some more tinyxml stuff…

Posted in Uncategorized | Leave a comment

Gerris Flow Solver

This is a note to self.  This stuff looks very interesting to me.  I wonder if I could apply it to some of my Stirling engine stuff research… That is after I get the other million and one things done that I need/want to get done…  So much to do/ so little time 🙁

http://gfs.sourceforge.net/wiki/index.php/Main_Page

Posted in Uncategorized | Leave a comment