Tool shapes displayed

More
27 Feb 2014 04:38 #44212 by emcPT
Tool shapes displayed was created by emcPT
In the past days I was programming a bit to represent more than just the standard tools.
My interest is in lathes, and only 2D is covered.

For example if the user wants to display a drill, it is impossible as far as I know, as the diameter of the drill would be provided by the "tool tip" diameter and therefor it will represent a tool rounded on the top != drill.
Currently I was able to turn around this limitation and the user is now able to define (providing Cartesian points in a file) and the tool is representative.
A "shape" column was added to the tool table so that the user can provide connection to the defined shapes. If no shape match it will represent the tool as before (standard linuxcnc).
I am now working on translating the representation depending on the tool orientation and on the radius, and I was hopping that feedback was received to see what people most want around this issue.
Attachments:
The following user(s) said Thank You: BigJohnT, Gary_Nc, joekline9, jlviloria

Please Log in or Create an account to join the conversation.

More
27 Feb 2014 09:26 #44219 by Gary_Nc
Replied by Gary_Nc on topic Tool shapes displayed
This is awesome!!!

Please Log in or Create an account to join the conversation.

More
27 Feb 2014 14:46 #44224 by emcPT
Replied by emcPT on topic Tool shapes displayed
Another nice thing is that the tool display can be with real dimensions.
For example in the attachment I am displaying a part off with 2.5mm width, that will effectively be represented in the display with 2.5mm. This provides a relation between the tool and the preview part.
The code to represent the part of is as simple as:
def shape1():
	shape = numpy.array([ [0.0, 0.0, 0],
	                                          [1.25, 2.5, 1],
						  [30.0, 2.5, 1],
						  [30, 0.0, 2]], dtype=numpy.float32)
Attachments:

Please Log in or Create an account to join the conversation.

More
27 Feb 2014 17:01 #44230 by ArcEye
Replied by ArcEye on topic Tool shapes displayed
Looks good.

How are you implementing this?
Gremlin reading the tool table, getting the extra column data and rendering the tool shape, or some other process?

regards

Please Log in or Create an account to join the conversation.

More
27 Feb 2014 17:20 #44231 by emcPT
Replied by emcPT on topic Tool shapes displayed
I added the column on the tool table and it is being read by all linuxcnc processes that uses the tooltable. So the extra information is available everywhere in linuxcnc.
I then changed the code in glcanon.py where the tools is being drawn, and implemented something like:

If tool have shape on the tooltable, and the shape exists then draw the new tool shape, based on the points provided by the user.
If something fails, the shape is not defined or the shape is not found, draw like before (linuxcnc standard)
So this change does not brake the existing code, only adds more possibility's.

Please Log in or Create an account to join the conversation.

More
28 Feb 2014 16:21 #44252 by newbynobi
Replied by newbynobi on topic Tool shapes displayed
Have you pushed your modifications somewhere?
Did you find a solution for the problem, using a backtool lathe does not show tool shape?

Norbert

Please Log in or Create an account to join the conversation.

More
28 Feb 2014 16:28 #44253 by emcPT
Replied by emcPT on topic Tool shapes displayed
For backtool issue I can draw the tool, but only the "wire" of the tool like it is represented on the images that I attached. This is working fine.

For the current modification (showing others shapes) it is still a beta work. I have some problems, but it is getting done.

Please Log in or Create an account to join the conversation.

More
28 Feb 2014 18:16 #44256 by newbynobi
Replied by newbynobi on topic Tool shapes displayed
Halo,

thanks. If I understand correct, you will publish the modified code later on.
I am asking, because I had the plan to do that work too, but if you do it, I can spend more time for gmoccapy.

Norbert

Please Log in or Create an account to join the conversation.

More
28 Feb 2014 18:43 #44257 by emcPT
Replied by emcPT on topic Tool shapes displayed
Yes,
It makes no sense in using free software, ask questions, have others to help then modify code and keep for yourself :)
You do the same (and I think a lot)

It is yet still to early to release the code. It have a lot of comments and some failures that must be solved. Also a bit of documentation is needed to draw the shapes so that they can make sense. But more options are now working, including the tooltip direction and radius. Also strange forms can be used.
Some tests (successful) in attachment.
Attachments:
The following user(s) said Thank You: jtc

Please Log in or Create an account to join the conversation.

More
02 Mar 2014 07:13 #44308 by newbynobi
Replied by newbynobi on topic Tool shapes displayed
I only answer

I like it!

Norbert

Please Log in or Create an account to join the conversation.

Moderators: piasdom
Time to create page: 0.093 seconds
Powered by Kunena Forum