Closed GoogleCodeExporter closed 9 years ago
Peter,
I'm sorry I can't help you with the Python stuff. It's just not something I'm good
at. I just wanted to say that I am pleased that someone is looking at why all
the
spaces are removed from the generated GCode. It's something that annoys me. I
believe the removal of spaces makes it much less readable and that the saving
in disc
space is irrelevant.
Thanks
David Nicholls
Original comment by David.Ni...@gmail.com
on 24 Jul 2009 at 11:13
I like spaces too for the 'modern' controls that I have in my own shop. They
make
things a lot more readable. However, I have seen cases where older Fanuc
controls run
out of memory when there are spaces between all coordinates in long (over 64k)
programs. Those old controls can be a problem.
It might be good to be able to toggle the behavior for spaces.
Thanks,
Dan
Original comment by ddfalck2...@yahoo.com
on 24 Jul 2009 at 11:25
This is another one of those times when I remember that I'm a programmer by
trade and
a machinist by hobby.
Original comment by David.Ni...@gmail.com
on 24 Jul 2009 at 11:31
I have repeated this problem.
If I add a space to my nc file, then iso_read.py creates the xml file with text
like
this:
<ncblock>
<text col="blocknum">N20</text>
<text col="prep">G90</text>
<mode units="1.0" />
<text col="prep">G21</text>
<text col="prep">G17</text>
<text> </text>
<text col="prep">G54</text>
</ncblock>
( I added a space after G17 )
However this is not being read as a space!
The relevent code is in HeeksCNC/src/NCCode.cpp
void ColouredText::ReadFromXMLElement(TiXmlElement* element)
{
m_color_type = CNCCode::GetColor(element->Attribute("col"));
// get the text
const char* text = element->GetText();
GetText() seems to ignore the space ( <text> </text> )
I don't know how to fix this yet...
Sorry.
Original comment by danhe...@gmail.com
on 25 Jul 2009 at 2:00
Late yesterday I found solution to replace
self.add_text(word, col)
with
self.add_text(words, col)
with similar changes to lines, arcs and repadid moves
Original comment by peter.fo...@chello.sk
on 25 Jul 2009 at 2:42
Excuse me, not
self.add_text(words,col)
but
self.add_text(self.line, col)
Original comment by peter.fo...@chello.sk
on 25 Jul 2009 at 2:45
Dan, have a look in tinyxmlparser.cpp- there are references to removing
whitespaces
or keeping them.
Original comment by ddfalck2...@yahoo.com
on 25 Jul 2009 at 3:05
It looks like in tinyxml.cpp this line is set to condense whitespaces(line 34):
TiXmlBase::condenseWhiteSpace = true;
Here is a little bit of info:
http://www.grinninglizard.com/tinyxmldocs/classTiXmlBase.html#e0
Original comment by ddfalck2...@yahoo.com
on 25 Jul 2009 at 3:13
I presume this just adds the whole line.
Doesn't this lose the colors in the text?
I will try the solution suggested by Dan Falck.
>>peter.fo...@chello.sk, Jul 25 (3 days ago)
>>self.add_text(self.line, col)
Original comment by danhe...@gmail.com
on 28 Jul 2009 at 5:17
This is fixed now.
We changed the py files to write
<text><![CDATA[ ]]></text>
in the xml file, so that the spaces are not ignored
Original comment by danhe...@gmail.com
on 1 Aug 2009 at 10:48
peter.fo...@chello.sk, Is this fixed for you now?
Can you give us your rez.py and rez_read.py files, so we can add them to this
project?
Original comment by danhe...@gmail.com
on 1 Aug 2009 at 4:57
Original issue reported on code.google.com by
peter.fo...@chello.sk
on 24 Jul 2009 at 9:45