elliotf / heekscnc

Automatically exported from code.google.com/p/heekscnc
Other
1 stars 0 forks source link

profile op looses sketches when saved and reopen #314

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
this is from Andy Howell's message on the dev email list:

"I had a problem the other day with re-generating python scripts. I thought it 
was an
intermittent problem.

I traced through it in the debugger and it looks like when a file is re-loaded, 
the
profiles don't know about their previous sketches.

To recreate the problem I simply made a rectangle and added a profile op for 
it. Creating
the script before closing the file works. Close and reopening the file and the 
profile
object has an empty list of sketches.

In heekscnc/src/Profile.cpp:839 it iterates through the list of sketches for 
the profile
op. This list is empty when loading an existing file, but non-empty with a new 
profile is
added.

I can't figure out what is suppose to relate the sketches to the profile in the 
.heeks
file. I would guess that something is amiss in writing the .heeks file.

I also noticed that in the "properties' pane for a profile, the 'sketches' 
property is
always set to one. "

I can confirm this bug- the profile op is disconnected from the sketch that 
it's supposed to act upon in a *.heeks file. There may be other ops that don't 
work as well, but I haven't tested yet.

Original issue reported on code.google.com by ddfalck2...@yahoo.com on 10 Jun 2011 at 2:48

GoogleCodeExporter commented 8 years ago
to get things to work I put:

#define OP_SKETCHES_AS_CHILDREN

in NiceTextCtrl.h in the HeeksCAD /interface directory

and uncommented:
// #define OP_SKETCHES_AS_CHILDREN

in Op.h in the HeeksCNC directory

There's probably a more elegant solution.

Original comment by ddfalck2...@yahoo.com on 10 Jun 2011 at 3:11

GoogleCodeExporter commented 8 years ago
I think this one if fixed by adding a define to CMakeLists.txt like this:

add_definitions ( -Wall -DOP_SKETCHES_AS_CHILDREN  )

If it breaks something else, let me know.

Dan

Original comment by ddfalck2...@yahoo.com on 10 Jun 2011 at 6:35