Null output file from gcodetools?

cnc-club.ru for English speaking users
bob
Новичок
Сообщения: 8
Зарегистрирован: 04 апр 2011, 05:04
Репутация: 0
Контактная информация:

Null output file from gcodetools?

Сообщение bob »

Hello,
First thing is -- thank you for your work on gcodetools!
Have a fresh install of Inkscape in Ubuntu-10.10 and gcodetools-1.6.04.
Everything appears to work fine -- except the specified output file is of size zero (0) bytes.
I did the "7 clicks" spiral tutorial with same results.
I did the two answers in the FAQ (Q8) with same result.
I am missing something simple, I think.
Any ideas from the group will be appreciated.
Tnx, Bob
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Null output file from gcodetools?

Сообщение Nick »

Does it raise any error, or message?

Attach your svg file...
bob
Новичок
Сообщения: 8
Зарегистрирован: 04 апр 2011, 05:04
Репутация: 0
Контактная информация:

Re: Null output file from gcodetools?

Сообщение bob »

Thanks for your reply.
No error message issued, just information as follows:
Orientation points have not been defined! A default set of orientation points has been automatically added.
Cutting tool has not been defined! A default tool has been automatically added.
If I do the orientation and select a tool, these messages disappear, and no errors or messages are output.
I converted the Object->Path and verified this operation was successful (Path 13 nodes)
Using Inkscape version: 0.48
My simple drawing.svg is attached.
Thank you,
Bob
Вложения
drawing.svg
(2.36 КБ) 1222 скачивания
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Null output file from gcodetools?

Сообщение Nick »

Does it adds any path to the drawing? Like this:
drawing to gcode.png (12945 просмотров) <a class='original' href='./download/file.php?id=1360&sid=4fcea6ccc597b66c0c10997cc362a69b&mode=view' target=_blank>Загрузить оригинал (96.87 КБ)</a>
Are you selecting the path?
Is Select all paths if nothing is selected on the Options tab being checked?

Is output.ngc completely empty or it contains something?
What's about header and footer files in the output dir?

And one more, turn on logging: checbox at the preferences tab, and fill in full file name and path to save the log. And attach log here please.


------------

I've done path to gcode using several different versions of gcodetools, and all of them worked fine with your drawing...
bob
Новичок
Сообщения: 8
Зарегистрирован: 04 апр 2011, 05:04
Репутация: 0
Контактная информация:

Re: Null output file from gcodetools?

Сообщение bob »

Hello,
Sorry for the slow response, have been outside doing chores around the house.

Does it adds any path to the drawing? Like this: "drawing to gcode.png"
No -- have never seen these paths added to the drawing.

Are you selecting the path?
Yes, the path is selected

Is Select all paths if nothing is selected on the Options tab being checked?
Yes, if I do not select the path the routine tries to use all paths

Is output.ngc completely empty or it contains something?
What's about header and footer files in the output dir?
On ONE occasion, I did get a top and bottom header output. Think this happened after I changed the units on the drawing to inches (was px, previously). Maybe, this is a clue? Other than this one occasion, the file is size 0 and I have not been able to reproduce the output! Strange.

And one more, turn on logging: checbox at the preferences tab, and fill in full file name and path to save the log. And attach log here please.
Log file is attached.

I've done path to gcode using several different versions of gcodetools, and all of them worked fine with your drawing...
Well, there is hope. I still suspect something simple/stupid on my part in the Inkscape setup.

Thank you for your time on this; I appreciate it. I'll continue to try to find whatever is prohibiting the output.
Regards,
Bob
Вложения
log2.txt
(1.43 КБ) 1279 скачиваний
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Null output file from gcodetools?

Сообщение Nick »

Think this happened after I changed the units on the drawing to inches (was px, previously).
No there should not be any connection to that.

According to log, Gcodetools stops somewhere in the Orientation points procedure...

Can you attach your svg file after applying Path to Gcode. With all orientation points ad tool's definition added.


------------

Orientation points procedure uses numpy module, check it's version. But if there any problem with it the error message should be raised...

-----------
Try add this line to gcodetools.py remaining indents

Код: Выделить всё

			print_("Computing transformation matrixes")
before these lines (near line 3280)

Код: Выделить всё

			self.transform_matrix_reverse[layer] = numpy.linalg.inv(self.transform_matrix[layer]).tolist()		
			print_("\n Layer '%s' transformation matrixes:" % layer.get(inkex.addNS('label','inkscape')) )
And see if the log changes...
bob
Новичок
Сообщения: 8
Зарегистрирован: 04 апр 2011, 05:04
Репутация: 0
Контактная информация:

Re: Null output file from gcodetools?

Сообщение bob »

Thanks for your patience....
Numpy version from Synaptic Pkg Mgr is numpy 1:1.3.0-3build1
I inserted the print_(...) and looks like the routine stops a the same place as before.
Have attached the drawing and log file as requested. The output file is still 0 bytes; can't imagine why or how I got a top and bottom header on just one occasion. (Am having some doubts about this release of Ubuntu)
Thanks again,
Bob
Вложения
drawing-2.svg
(11.66 КБ) 1362 скачивания
log2.txt
(1.43 КБ) 1759 скачиваний
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Null output file from gcodetools?

Сообщение Nick »

hmmmm....
we know for sure that it passes through
print_("Layer '%s' Orientation points: " % orientation_layer.get(inkex.addNS('label','inkscape')))
and does not get to the
self.transform_matrix_reverse[layer] = numpy.linalg.inv(self.transform_matrix[layer]).tolist()

can you make one more test change the following code (it's about the same place)

Код: Выделить всё

				if len(points)==3:
					print_("Layer '%s' Orientation points: " % orientation_layer.get(inkex.addNS('label','inkscape')))
					for point in points:
						print_(point)
					#	Zcoordinates definition taken from Orientatnion point 1 and 2 
					self.Zcoordinates[layer] = [max(points[0][1][2],points[1][1][2]), min(points[0][1][2],points[1][1][2])]
					matrix = numpy.array([
								[points[0][0][0], points[0][0][1], 1, 0, 0, 0, 0, 0, 0],
								[0, 0, 0, points[0][0][0], points[0][0][1], 1, 0, 0, 0],
								[0, 0, 0, 0, 0, 0, points[0][0][0], points[0][0][1], 1],
								[points[1][0][0], points[1][0][1], 1, 0, 0, 0, 0, 0, 0],
								[0, 0, 0, points[1][0][0], points[1][0][1], 1, 0, 0, 0],
								[0, 0, 0, 0, 0, 0, points[1][0][0], points[1][0][1], 1],
								[points[2][0][0], points[2][0][1], 1, 0, 0, 0, 0, 0, 0],
								[0, 0, 0, points[2][0][0], points[2][0][1], 1, 0, 0, 0],
								[0, 0, 0, 0, 0, 0, points[2][0][0], points[2][0][1], 1]
							])
								
					if numpy.linalg.det(matrix)!=0 :
						m = numpy.linalg.solve(matrix,
							numpy.array(
								[[points[0][1][0]], [points[0][1][1]], [1], [points[1][1][0]], [points[1][1][1]], [1], [points[2][1][0]], [points[2][1][1]], [1]]	
										)
							).tolist()
						self.transform_matrix[layer] = [[m[j*3+i][0] for i in range(3)] for j in range(3)]
					
					else :
						self.error(_("Orientation points are wrong! (if there are two orientation points they should not be the same. If there are three orientation points they should not be in a straight line.)"),"wrong_orientation_points")
				else :
					self.error(_("Orientation points are wrong! (if there are two orientation points they should not be the same. If there are three orientation points they should not be in a straight line.)"),"wrong_orientation_points")

			self.transform_matrix_reverse[layer] = numpy.linalg.inv(self.transform_matrix[layer]).tolist()		
			print_("\n Layer '%s' transformation matrixes:" % layer.get(inkex.addNS('label','inkscape')) )
to

Код: Выделить всё


				if len(points)==3:
					print_("Layer '%s' Orientation points: " % orientation_layer.get(inkex.addNS('label','inkscape')))
					for point in points:
						print_(point)
					#	Zcoordinates definition taken from Orientatnion point 1 and 2 
					self.Zcoordinates[layer] = [max(points[0][1][2],points[1][1][2]), min(points[0][1][2],points[1][1][2])]
					print_("matrix = ")
					matrix = numpy.array([
								[points[0][0][0], points[0][0][1], 1, 0, 0, 0, 0, 0, 0],
								[0, 0, 0, points[0][0][0], points[0][0][1], 1, 0, 0, 0],
								[0, 0, 0, 0, 0, 0, points[0][0][0], points[0][0][1], 1],
								[points[1][0][0], points[1][0][1], 1, 0, 0, 0, 0, 0, 0],
								[0, 0, 0, points[1][0][0], points[1][0][1], 1, 0, 0, 0],
								[0, 0, 0, 0, 0, 0, points[1][0][0], points[1][0][1], 1],
								[points[2][0][0], points[2][0][1], 1, 0, 0, 0, 0, 0, 0],
								[0, 0, 0, points[2][0][0], points[2][0][1], 1, 0, 0, 0],
								[0, 0, 0, 0, 0, 0, points[2][0][0], points[2][0][1], 1]
							])
					print_("if numpy")
					if numpy.linalg.det(matrix)!=0 :
						print_("then")
						m = numpy.linalg.solve(matrix,
							numpy.array(
								[[points[0][1][0]], [points[0][1][1]], [1], [points[1][1][0]], [points[1][1][1]], [1], [points[2][1][0]], [points[2][1][1]], [1]]	
										)
							).tolist()
						print_("transform_...")	
						self.transform_matrix[layer] = [[m[j*3+i][0] for i in range(3)] for j in range(3)]
					
					else :
						self.error(_("Orientation points are wrong! (if there are two orientation points they should not be the same. If there are three orientation points they should not be in a straight line.)"),"wrong_orientation_points")
				else :
					self.error(_("Orientation points are wrong! (if there are two orientation points they should not be the same. If there are three orientation points they should not be in a straight line.)"),"wrong_orientation_points")
			print_("reverse...")	
			self.transform_matrix_reverse[layer] = numpy.linalg.inv(self.transform_matrix[layer]).tolist()		
			print_("\n Layer '%s' transformation matrixes:" % layer.get(inkex.addNS('label','inkscape')) )


And see are there any changes to the log file


Thanks for your perseverance :)!
bob
Новичок
Сообщения: 8
Зарегистрирован: 04 апр 2011, 05:04
Репутация: 0
Контактная информация:

Re: Null output file from gcodetools?

Сообщение bob »

Okay, I made the changes and, yes, the log file is changed a little. Now, seems to stop at "if numpy"

Am new to Python and the whole "indent" thing; so, took a little while to get things lined up. And, I think the indents may have been lost in transmission. Anyway, the program is running now without complaining about indents and I have attached the log file.

May be time for me to start learning Python!
Thanks,
Bob
Вложения
log2.txt
(1.67 КБ) 1319 скачиваний
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Null output file from gcodetools?

Сообщение Nick »

Yes it seems to stop there.

try to run python from the console and paste there the following (no indents here):

Код: Выделить всё

import numpy
a = numpy.array([[450.0, 1052.3622046999999, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 450.0, 1052.3622046999999, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 450.0, 1052.3622046999999, 1.0], [0.0, 1052.3622046999999, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 1052.3622046999999, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1052.3622046999999, 1.0], [450.0, 1502.3622046999999, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 450.0, 1502.3622046999999, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 450.0, 1502.3622046999999, 1.0]] )
b = numpy.array([[5.0], [0.0], [1], [0.0], [0.0], [1], [5.0], [-5.0], [1]] )
numpy.linalg.det(a)
numpy.linalg.solve(a,b)
It should answer something like:

Код: Выделить всё

>>> numpy.linalg.det(a)
8303765624999999.0
>>> numpy.linalg.solve(a,b)
array([[  1.11111111e-02],
       [  0.00000000e+00],
       [  0.00000000e+00],
       [  7.28583860e-19],
       [ -1.11111111e-02],
       [  1.16929134e+01],
       [  0.00000000e+00],
       [  0.00000000e+00],
       [  1.00000000e+00]])
PS I use Tabs as indents, and it appears that forum has converted tabs into spaces....
bob
Новичок
Сообщения: 8
Зарегистрирован: 04 апр 2011, 05:04
Репутация: 0
Контактная информация:

Re: Null output file from gcodetools?

Сообщение bob »

Looks like the numpy module is broken to me; here's the output:
--------------------------------------------------------------------------------
bob@taos:~$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> a = numpy.array([[450.0, 1052.3622046999999, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 450.0, 1052.3622046999999, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 450.0, 1052.3622046999999, 1.0], [0.0, 1052.3622046999999, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 1052.3622046999999, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1052.3622046999999, 1.0], [450.0, 1502.3622046999999, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 450.0, 1502.3622046999999, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 450.0, 1502.3622046999999, 1.0]] )
>>> b = numpy.array([[5.0], [0.0], [1], [0.0], [0.0], [1], [5.0], [-5.0], [1]] )
>>> numpy.linalg.det(a)
Illegal instruction
bob@taos:~$
--------------------------------------------------------------------------------

I get the same result with a simple 2x2 array. Something is broken with this installation.

Thanks again,
Bob
bob
Новичок
Сообщения: 8
Зарегистрирован: 04 апр 2011, 05:04
Репутация: 0
Контактная информация:

Re: Null output file from gcodetools?

Сообщение bob »

Hello,
uncool answering my own post but further evidence the numpy module is not well on this system:
-------------------------------------------------------------------------------------
bob@taos:~$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.test()
Running unit tests for numpy
NumPy version 1.3.0
NumPy is installed in /usr/lib/python2.6/dist-packages/numpy
Python version 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) [GCC 4.4.5]
nose version 0.11.1
..........Illegal instruction
bob@taos:~$

Bob
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Null output file from gcodetools?

Сообщение Nick »

Probably it's a problem with ATLAS (Automatically Tuned Linear Algebra Software).
This is almost always caused by using an ATLAS that is built for a different CPU than yours. Usually, the CPU that built the ATLAS binaries has SSE2 instructions while your CPU doesn't.
And one solved case:
In case anyone else comes across the same problem, installing libatlas3gf-sse2 made the problem go away; previously I only had the python-scipy dependency libatlas3gf-base installed.
bob
Новичок
Сообщения: 8
Зарегистрирован: 04 апр 2011, 05:04
Репутация: 0
Контактная информация:

Re: Null output file from gcodetools?

Сообщение bob »

Nick?,
Okay, success!
I installed the package libatlas3gf-sse2; now numpy.test() still does not pass ALL tests but can do the determinant.
And, I get a NC file:
--------------------------------------------
%
(Header)
(Generated by gcodetools from Inkscape.)
(Using default header. To add your own header create file "header" in the output dir.)
M3
(Header end.)
G20 (All units in inches)

G00 Z 1.5000
G00 X 3.3968 Y 7.5556

G01 Z 0.5000 F 100.0000
G01 X 3.3695 Y 7.4808 Z 0.5000 F 400.0000
G01 X 3.3080 Y 7.4583 Z 0.5000
G02 X 3.2167 Y 7.4757 Z 0.5000 I 0.0004 J 0.2510
G01 X 3.1587 Y 7.5159 Z 0.5000
G02 X 3.1130 Y 7.8186 Z 0.5000 I 0.2071 J 0.1861
G02 X 3.3175 Y 8.0317 Z 0.5000 I 0.4106 J -0.1893
G02 X 3.7973 Y 8.0274 Z 0.5000 I 0.2358 J -0.4605
G02 X 4.1111 Y 7.6746 Z 0.5000 I -0.3225 J -0.6027
G02 X 4.0616 Y 7.0164 Z 0.5000 I -0.7073 J -0.2778
G02 X 3.5556 Y 6.6032 Z 0.5000 I -0.7990 J 0.4621
G02 X 2.7183 Y 6.6962 Z 0.5000 I -0.3181 J 0.9505
G02 X 2.2063 Y 7.3571 Z 0.5000 I 0.6029 J 0.9957
G02 X 2.3423 Y 8.3737 Z 0.5000 I 1.1919 J 0.3580
G02 X 3.1587 Y 8.9841 Z 0.5000 I 1.1925 J -0.7437
G02 X 4.3548 Y 8.8057 Z 0.5000 I 0.3977 J -1.4322
G02 X 5.0635 Y 7.8333 Z 0.5000 I -0.8846 J -1.3891
G02 X 4.8428 Y 6.4576 Z 0.5000 I -1.6719 J -0.4373
G02 X 3.7143 Y 5.6508 Z 0.5000 I -1.5857 J 1.0253
G02 X 2.1589 Y 5.9136 Z 0.5000 I -0.4770 J 1.9113
G02 X 1.2540 Y 7.1984 Z 0.5000 I 1.1660 J 1.7823
G02 X 1.5588 Y 8.9336 Z 0.5000 I 2.1503 J 0.5166
G02 X 3.0000 Y 9.9365 Z 0.5000 I 1.9788 J -1.3067
G02 X 4.0165 Y 9.9502 Z 0.5000 I 0.5397 J -2.3182
G02 X 4.9029 Y 9.5849 Z 0.5000 I -0.5104 J -2.4960
G02 X 5.6006 Y 8.9157 Z 0.5000 I -1.4467 J -2.2068
G02 X 6.0159 Y 7.9921 Z 0.5000 I -2.0758 J -1.4885
G02 X 6.0254 Y 6.8792 Z 0.5000 I -2.5510 J -0.5784
G02 X 5.6216 Y 5.9099 Z 0.5000 I -2.7360 J 0.5711
G02 X 4.8865 Y 5.1489 Z 0.5000 I -2.4080 J 1.5905
G02 X 3.8730 Y 4.6984 Z 0.5000 I -1.6173 J 2.2733
G00 Z 1.5000



(Footer)
M5
G00 X0.0000 Y0.0000
M2
(Using default footer. To add your own footer create file "footer" in the output dir.)
(end)
%
--------------------------------------------

Thank you, sir! I'll restore the original program in the extensions directory, learn the details of settings needed to fit my little machine and go make some chips!

Sure do appreciate your time and assistance on tracking down this issue with my AMD processor/Ubuntu installation. And congratulations on getting the gcodetools integrated into the upcoming Inkscape release!

Regards,
Bob
Вложения
drawing-3.svg
(25.42 КБ) 1341 скачивание
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Null output file from gcodetools?

Сообщение Nick »

You are welcome :)!

Hope to see any photos of things made with Gcodetools when you get used to it :roll:.
Ответить

Вернуться в «English forum»