Re: [Emc-developers] [Hosted Weblate] New commentinLinuxCNC/LinuxCNC Documentation

2022-07-07 Thread gene heskett

On 7/7/22 18:32, Steffen Möller wrote:


On 05.07.22 15:34, gene heskett wrote:

On 7/5/22 08:26, andy pugh wrote:

On Tue, 5 Jul 2022 at 11:47, Steffen Möller via Emc-developers
 wrote:


degrees. Values returned by unary operations which return angle
measures
('ACOS', 'ASIN', and 'ATAN') are also in degrees.
This is unexpected. Radial is the default for these functions about
everywhere
else. This should be made more explicit.

I would imagine that most CNC operators will expect degrees. Can you
imagine trying to type in a right-angle in MDI in radians?

G1 @20 ^ 90

is far more practical than

G1 @20 ^ 1.570796327


I agree with Andy on this one Steffan, for CNC, radians is a PITA.
My current project is a hard maple vise screw, about 18.5" inches
long. To carve a
2 start, 12mm pitch thread is 187,000 degrees, LinuxCNC tracks that
perfectly. As a
retired broadcast engineer, everything I've had to do has always been
done in degrees.
Including measuring guy wire tensions by the intercept method using a
riflescope is
SOP.


Uh, sorry, missunderstanding. I was spending too much time in weblate
and forgot how this may be read without that documentation-context. I do
not suggest that you should change the function, my comment only refers
to the documentation that should explicitly state 0-360 or something to
render it absolutely clear to everyone. But admittedly I still hope to
find the constant Pi defined somewhere and then 90 is about as easy as 
Pi/2.



Actually, its not 0 to 360, linuxcnc can track to any reasonable degrees.

I have some thread carving code that move's y a bit over 300 mm's, while
turning B from 0 to 187000 degrees.. arriving at that point, I turn B 
187360 the clean
up the stop point, then turn it back to 187180, then take y back to the 
starting

point while driving B to 180. That cuts the threads 2nd start thread. Pix of
one of the screws on my web page in the sig.


Cheers,
Steffen






___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers



Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] tool database in python

2022-07-07 Thread andy pugh
On Thu, 7 Jul 2022 at 18:25, Jose Luis  wrote:

And this is using the tool database schema?

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] [Hosted Weblate] New comment inLinuxCNC/LinuxCNC Documentation

2022-07-07 Thread Steffen Möller


On 05.07.22 15:34, gene heskett wrote:

On 7/5/22 08:26, andy pugh wrote:

On Tue, 5 Jul 2022 at 11:47, Steffen Möller via Emc-developers
 wrote:


degrees. Values returned by unary operations which return angle
measures
('ACOS', 'ASIN', and 'ATAN') are also in degrees.
This is unexpected. Radial is the default for these functions about
everywhere
else. This should be made more explicit.

I would imagine that most CNC operators will expect degrees. Can you
imagine trying to type in a right-angle in MDI in radians?

G1 @20 ^ 90

is far more practical than

G1 @20 ^ 1.570796327


I agree with Andy on this one Steffan, for CNC, radians is a PITA.
My current project is a hard maple vise screw, about 18.5" inches
long. To carve a
2 start, 12mm pitch thread is 187,000 degrees, LinuxCNC tracks that
perfectly. As a
retired broadcast engineer, everything I've had to do has always been
done in degrees.
Including measuring guy wire tensions by the intercept method using a
riflescope is
SOP.


Uh, sorry, missunderstanding. I was spending too much time in weblate
and forgot how this may be read without that documentation-context. I do
not suggest that you should change the function, my comment only refers
to the documentation that should explicitly state 0-360 or something to
render it absolutely clear to everyone. But admittedly I still hope to
find the constant Pi defined somewhere and then 90 is about as easy as Pi/2.

Cheers,
Steffen






___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] Is it still possible to build RTAI debs?

2022-07-07 Thread Alec Ari via Emc-developers
Ayoo,

There is no x86_64/amd64 in the kernel, x86 covers both:

64-bit assembly:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/x86/entry/entry_64.S?h=v4.19.251

32-bit:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/x86/entry/entry_32.S?h=v4.19.251

Alec


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] tool database in python

2022-07-07 Thread Jose Luis


On 21/6/22 23:18, Jose Luis wrote:


On 18/6/22 1:47, andy pugh wrote:
On Fri, 17 Jun 2022 at 17:07, Jose Luis  
wrote:


Still need to figure the parts from linuxcnc like where i can get or 
put

the data.

Dewey added an interface. I'll be honest and say that it isn't how I
would have done it. But I didn't do it so

https://linuxcnc.org/docs/devel/html/tooldatabase/tooldatabase.html




Hello,

 where in the source tree can i place the db_program so it goes to 
PATH?



Thanks
#!/usr/bin/env python3

import os
import sys
import re


from tools_db.base import Session, Base, engine
from tools_db.tool_database import Tools, Offsets, Pockets, Spindles

from tooldb import tooldb_callbacks # functions (g,p,l,u)
from tooldb import tooldb_tools # list of tool numbers
from tooldb import tooldb_loop  # main loop


# Catch unhandled exceptions
def excepthook(exc_type, exc_msg, exc_tb):
print(exc_type, file=sys.stderr)
print(exc_msg, file=sys.stderr)
print(exc_tb, file=sys.stderr)


sys.excepthook = excepthook


class DataBaseManager():
def __init__(self):
super(DataBaseManager, self).__init__()

Base.metadata.create_all(engine)

self.session = Session()

tools = self.session.query(Tools).all()
tool_list = list()

for tool in tools:
tool_list.append(tool.number)

tooldb_tools(tool_list)
tooldb_callbacks(self.user_get_tool,
 self.user_put_tool,
 self.user_load_spindle,
 self.user_unload_spindle)

self.tool_list = tool_list

self.tools = dict()

def close(self):
self.session.close()

def user_get_tool(self, tool_no):
# print(f"GET tool {tool_no}", file = sys.stderr)

tool = self.session.query(Tools).filter(Tools.number == tool_no).one()
offsets = self.session.query(Offsets).filter(Offsets.tools_id == tool_no).one()
pocket = self.session.query(Pockets).filter(Pockets.tools_id == tool_no).one()

data = [f"T{tool.number}",
f"P{pocket.slot_pos}",
f"D{offsets.diameter}",
f"X{offsets.x_offset}",
f"Y{offsets.y_offset}",
f"Z{offsets.z_offset}",
f"A{offsets.a_offset}",
f"B{offsets.b_offset}",
f"C{offsets.c_offset}",
f"U{offsets.u_offset}",
f"V{offsets.v_offset}",
f"W{offsets.w_offset}"]

return " ".join(data)


def user_put_tool(self, tool_no, params):
# print(f"PUT tool {tool_no} {params}", file=sys.stderr)

tool = self.session.query(Tools).filter(Tools.number == tool_no).one()
offsets = self.session.query(Offsets).filter(Offsets.tools_id == tool_no).one()
pocket = self.session.query(Pockets).filter(Pockets.tools_id == tool_no).one()

params_list = re.split(r'   | |;', params)

tool_dict = dict()

for param in params_list:
column = param[0]
value = param[1::]
tool_dict[column] = value

tool.number = tool_dict.get("T")

pocket.tools_id = tool_dict.get("P")

offsets.x_offset = tool_dict.get("X")
offsets.y_offset = tool_dict.get("Y")
offsets.z_offset = tool_dict.get("Z")
offsets.a_offset = tool_dict.get("A")
offsets.b_offset = tool_dict.get("B")
offsets.c_offset = tool_dict.get("C")
offsets.i_offset = tool_dict.get("I")
offsets.j_offset = tool_dict.get("J")
offsets.q_offset = tool_dict.get("Q")
offsets.u_offset = tool_dict.get("U")
offsets.v_offset = tool_dict.get("V")
offsets.w_offset = tool_dict.get("W")
offsets.diameter = tool_dict.get("D")

try:
self.session.commit()
except Exception as e:
print(e, file=sys.stderr)

def user_load_spindle(self, toolno, params):
print(f"LOAD SPINDLE {toolno} {params}", file=sys.stderr)

tno = int(toolno)

# TMP = toolline_to_dict(params,['T','P'])
# if TMP['P'] != "0": umsg("user_load_spindle_nonran_tc P=%s\n"%TMP['P'])
# if tno  ==  0:  umsg("user_load_spindle_nonran_tc tno=%d\n"%tno)
#
# # save restore_pocket as pocket may have been altered by apply_db_rules()
# D   = toolline_to_dict(self.tools[tno],all_letters)
# restore_pocket[tno] = D['P']
# D['P'] = "0"
#
# if p0tool != -1:  # accrue time for prior tool:
# stop_tool_timer(p0tool)
# RESTORE = toolline_to_dict(self.tools[p0tool],all_letters)
# RESTORE['P'] = restore_pocket[p0tool]
# self.tools[p0tool] = dict_to_toolline(RESTORE,all_letters)
#
# p0tool = 

Re: [Emc-developers] Is it still possible to build RTAI debs?

2022-07-07 Thread andy pugh
On Thu, 7 Jul 2022 at 05:47, Alec Ari  wrote:
>
> Well, this is the kernel changelog:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/?id=v4.19.250=v4.19.195=2

Am I missing something? Or are there no changes in arch/amd64 ?

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers