Import LinuxCNC source tree

This commit is contained in:
Wang Dequan
2026-08-20 06:17:39 +08:00
commit 2c814634c3
9429 changed files with 10556013 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
This is a simulation configuration for a 6 axis machine with one table rotary and two spindle rotary joints
This simulation also includes a python remap of Gcodes for tilted workplane (TWP) functionality.
Both the kinematic and the twp remap support nutation of the secondary rotary joints (ie A or B ) form 0 to 90°.
Hence this also works for the 'usual' orthogonal spindle rotary-tilt type machines by setting the nutation angle to 90°.
Implemented TWP functionality:
G68.2 : defines twp using euler-angles, pitch-roll-yaw, 2-vectors, 3 points, optionally with offset in XYZ and rotation in XY
G68.3 : defines twp from current tool orientation, optionally with offset in XYZ and rotation in XY
G68.4 : same as G68.2 but as an incremental definition from an active TWP plane
G69 : cancels the current twp (resets all parameters, moves to G54 and sets Identity kinematics)
G53.1 (P) : spindle orientation without tcp, switches to G59 and activates tool kinematics
G53.3 (P XYZ) : same as G53.1 but with simultaneous move the the XYZ coords on the twp plane
G53.6 (P) : same as G53.1 but spindle orientation with tcp
- Spindle is C primary, A secondary or B secondary as defined in the [TWP] section of the ini file
- All G53.x commands will respect axis limits as set in the ini file for the respective primary and secondary spindle joints.
- The P word sets the orientation strategy: 0(default)=shortest distance,
1=positive rotation only,
2=negative rotation only
(this applies to the primary rotary, the secondary moves the shortest distance)
For more:
https://forum.linuxcnc.org/show-your-stuff/49103-kinematic-model-for-a-5axis-mill-with-universal-nutating-head?start=0#271334
Full Documentation can be found at:
https://github.com/Sigma1912/LinuxCNC_Demo_Configs/tree/main/table-rotary_spindle-rotary-nutating/Documentation

View File

@@ -0,0 +1,15 @@
o<circular_pocket>sub
; activate tool radius compensation
g42
; circular pocket
g1 x50 f5000
g2 i-25 z20
g2 i-25 z0
g2 i-25 z-20
g2 i-50 z-20
; deactivate tool radius compensation
g40
g1 x0 y0
g0 z50
o<circular_pocket>endsub
M2

View File

@@ -0,0 +1,17 @@
G69
g10 l2 p0 x1000 y-1000 z-1000
m6 t3 g43 h3
g68.2 q121 i25 j-10
g53.1
o100 REPEAT[100]
g68.4 q131 i35 j35 k0
g53.6
g0 x50y50z100
g0 x-50
g0 y-50
g0 x50
g0 y50
o100 ENDREPEAT
g69
M2

View File

@@ -0,0 +1,23 @@
g69
g10 l2 p0 x1300 y-200 z-1400
m6 t3 g43 h3
g68.2 q121 i0 j5
g53.1
g0 x0y0z100
o100 REPEAT[1000]
g68.4 x50 q232 i45 j0 k0
g53.6
;g52 x100
g0 x0y0z100
o<square> call
g68.4 x-50 q323 i0 j-45 k0
g53.6
;G52 x-100
g0 x0y0z100
o<square> call
o100 ENDREPEAT
g69
M2

View File

@@ -0,0 +1,20 @@
G69
g10 l2 p0 x1000 y-1000 z-1000
m6 t3 g43 h3
g68.2 q121 i25 j-10
g53.1
o100 REPEAT[100]
g68.4 q131 i-35 j-35 k0
;g53.3 p0 x50y50z150
g53.6
x50y50z150
g0 z100
g0 x-50
g0 y-50
g0 x50
g0 y50
g0 x0y0z120
o100 ENDREPEAT
g69
M2

View File

@@ -0,0 +1,12 @@
g69
g10 l2 p0 x1300 y-200 z-1400
m6 t3 g43 h3
g0 x0y0z100
g68.2 x50 y50 z-50 q121 i30 j15
g53.3 x0y0z100
o<square> call
;g69
M2

View File

@@ -0,0 +1,9 @@
o<square>sub
g0 x50y50z100
g0 x-50
g0 y-50
g0 x50
g0 y50
g0 x0y0z120
g52 x0y0z0
o<square>endsub

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,20 @@
# This is a component of LinuxCNC
# Copyright 2011, 2012, 2013 Dewey Garrett <dgarrett@panix.com>,
# Michael Haberler <git@mah.priv.at>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
import remap

View File

@@ -0,0 +1,87 @@
#!/usr/bin/env python3
import hal
import linuxcnc
h = hal.component("twp-helper-comp")
# this pin reflects the machine.analog pin used for the
# twp-status
h.newpin("twp-status", hal.HAL_FLOAT, hal.HAL_IN)
# these pins are created here from 'twp-status''
h.newpin("twp-is-redefined", hal.HAL_BIT, hal.HAL_OUT)
h.newpin("twp-is-defined", hal.HAL_BIT, hal.HAL_OUT)
h.newpin("twp-is-active", hal.HAL_BIT, hal.HAL_OUT)
# twp origin vector
h.newpin("twp-ox-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-oy-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-oz-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-ox", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("twp-oy", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("twp-oz", hal.HAL_FLOAT, hal.HAL_OUT)
# twp x-orientation vector
h.newpin("twp-xx-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-xy-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-xz-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-xx", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("twp-xy", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("twp-xz", hal.HAL_FLOAT, hal.HAL_OUT)
# twp z-orientation vector
h.newpin("twp-zx-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-zy-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-zz-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-zx", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("twp-zy", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("twp-zz", hal.HAL_FLOAT, hal.HAL_OUT)
# twp origin vector in machine coordinate system
h.newpin("twp-ox-world-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-oy-world-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-oz-world-in", hal.HAL_FLOAT, hal.HAL_IN)
h.newpin("twp-ox-world", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("twp-oy-world", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("twp-oz-world", hal.HAL_FLOAT, hal.HAL_OUT)
h.ready()
# create a connection to the status channel
s = linuxcnc.stat()
try:
while 1:
# publish twp-status
if h['twp-status'] == 1:
h['twp-is-defined'] = 1
h['twp-is-active'] = 0
elif h['twp-status'] == 2:
h['twp-is-defined'] = 1
h['twp-is-active'] = 1
else:
h['twp-is-defined'] = 0
h['twp-is-active'] = 0
# passthrough the twp arguments
h['twp-ox'] = h['twp-ox-in']
h['twp-oy'] = h['twp-oy-in']
h['twp-oz'] = h['twp-oz-in']
h['twp-xx'] = h['twp-xx-in']
h['twp-xy'] = h['twp-xy-in']
h['twp-xz'] = h['twp-xz-in']
h['twp-zx'] = h['twp-zx-in']
h['twp-zy'] = h['twp-zy-in']
h['twp-zz'] = h['twp-zz-in']
# we only want to expose offsets when twp is not defined
if not h['twp-is-defined']:
s.poll() # get current values
g5x_offset = s.g5x_offset
h['twp-ox-world'] = g5x_offset[0]
h['twp-oy-world'] = g5x_offset[1]
h['twp-oz-world'] = g5x_offset[2]
else : # use the values from the remap
h['twp-ox-world'] = h['twp-ox-world-in']
h['twp-oy-world'] = h['twp-oy-world-in']
h['twp-oz-world'] = h['twp-oz-world-in']
except KeyboardInterrupt:
raise SystemExit

View File

@@ -0,0 +1,67 @@
# This is a component of LinuxCNC
# Copyright 2011, 2013 Dewey Garrett <dgarrett@panix.com>, Michael
# Haberler <git@mah.priv.at>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
import inspect
import emccanon
# O-word procedure to trap into the Pydevd debugger
# start debug server in Eclipse, then
# call as 'O<pydevd> call' from MDI
# example setup for debugging embedded Python code
# see http://pydev.org/manual_adv_remote_debugger.html
# if this points to a valid directory,
def call_pydevd():
""" trap into the pydevd debugger"""
import os,sys
pydevdir= '/home/mah/.eclipse/org.eclipse.platform_3.5.0_155965261/plugins/org.python.pydev.debug_2.0.0.2011040403/pysrc/'
# the 'emctask' module is present only in the milltask instance, otherwise both the UI and
# milltask would try to connect to the debug server.
if os.path.isdir(pydevdir) and 'emctask' in sys.builtin_module_names:
sys.path.append(pydevdir)
sys.path.insert(0,pydevdir)
try:
import pydevd
emccanon.MESSAGE("pydevd imported, connecting to Eclipse debug server...")
pydevd.settrace()
except:
emccanon.MESSAGE("no pydevd module found")
pass
def lineno():
""" return line number in the current Python script """
return inspect.currentframe().f_back.f_lineno
def error_stack(self):
""" print the Interpreters error stack (function names) """
print("error stack level=%d" % (self.stack_index))
for s in self.stack():
print("--'%s'" % (s))
def callstack(self):
""" print the O-Word call stack """
for i in range(self.call_level):
c = self.sub_context[i]
print("%d: pos=%d seq=%d filename=%s sub=%s" % (i,c.position, c.sequence_number,c.filename,c.subname))

View File

@@ -0,0 +1,24 @@
;M428 by remap: kinstype==0 (IDENTITY kinematics)
o<428remap>sub
#<kinstype> = 0
#<SWITCHKINS_PIN> = 3 ; set N as required: motion.analog-out-0N
o1 if [exists [#<_hal[motion.switchkins-type]>]]
o1 else
(debug,M428:Missing [RS274NGC]HAL_PIN_VARS=1)
(debug,STOP)
M2
o1 endif
M66 E0 L0 ; force synch
M68 E#<SWITCHKINS_PIN> Q#<kinstype> ; set kinstype value
M66 E0 L0 ; force synch
o2 if [[#<_task> EQ 1] AND [#<_hal[motion.switchkins-type]> NE #<kinstype>]]
(debug,M428: Wrong motion.switchkins-type)
(debug,or missing hal net to analog-out-0x)
(debug,STOP)
M2
o2 else
o2 endif
o<428remap>endsub

View File

@@ -0,0 +1,24 @@
;M429 by remap: kinstype==1 TCP kinematics
o<429remap>sub
#<kinstype> = 1
#<SWITCHKINS_PIN> = 3 ; set N as required: motion.analog-out-0N
o1 if [exists [#<_hal[motion.switchkins-type]>]]
o1 else
(debug,M429:Missing [RS274NGC]HAL_PIN_VARS=1)
(debug,STOP)
M2
o1 endif
M66 E0 L0 ; force synch
M68 E#<SWITCHKINS_PIN> Q#<kinstype> ; set kinstype value
M66 E0 L0 ; force synch
o2 if [[#<_task> EQ 1] AND [#<_hal[motion.switchkins-type]> NE #<kinstype>]]
(debug,M429:Wrong motion.switchkins-type)
(debug,or missing hal net to analog-out-0x)
(debug,STOP)
M2
o2 else
o2 endif
o<429remap>endsub

View File

@@ -0,0 +1,24 @@
;M430 by remap: kinstype==2 Tool kinematics
o<430remap>sub
#<kinstype> = 2
#<SWITCHKINS_PIN> = 3 ; set N as required: motion.analog-out-0N
o1 if [exists [#<_hal[motion.switchkins-type]>]]
o1 else
(debug,M430:Missing [RS274NGC]HAL_PIN_VARS=1)
(debug,STOP)
M2
o1 endif
M66 E0 L0 ; force synch
M68 E#<SWITCHKINS_PIN> Q#<kinstype> ; set kinstype value
M66 E0 L0 ; force synch
o2 if [[#<_task> EQ 1] AND [#<_hal[motion.switchkins-type]> NE #<kinstype>]]
(debug,M430:Wrong motion.switchkins-type)
(debug,or missing hal net to analog-out-0x)
(debug,STOP)
M2
o2 else
o2 endif
o<430remap>endsub

View File

@@ -0,0 +1,14 @@
; this is the wrapper remap to orient the spindle using IDENTITY kinematics G53.1
o<g531remap>sub
M66 L0 E0 ;force sync, stop read ahead
o100 if [EXISTS [#<P>]]
o100 else
#<P> = 0 ;if no P word has been passed we use the default (0)
o100 endif
M68 E3 Q0 ;switch to identity kinematic
M66 L0 E0
M530 P#<P> ;orient the spindle with P word
M66 L0 E0
o<g531remap>endsub
m2

View File

@@ -0,0 +1,20 @@
; this is the wrapper remap to orient the spindle using IDENTITY kinematics G53.3 with simultaneous move to XYZ (in tool coordinates)
o<g533remap>sub
M66 L0 E0 ;force sync, stop read ahead
o100 if [[EXISTS [#<X>]] AND [EXISTS [#<Y>]] AND [EXISTS [#<Z>]]]
M68 E3 Q0 ;switch to identity kinematic
o100 else
(abort, G53.3: X,Y and Z words are required) ;it is an error if X,Y or Z word is missing
o100 endif
o105 if [EXISTS [#<P>]] ;check if a P word has been passed
;(print, P=#<P>)
o105 else
#<P> = 0 ;if no P word has been passed we use the default (0)
o105 endif
M66 L0 E0
;Note we can not pass XYZ words to an m-code so we send coords as ijk and handle it in remap.py
M530 P#<P> I#<X> J#<Y> K#<Z> ;orient the spindle with P word and xyz as ijk
M66 L0 E0
o<g533remap>endsub
m2

View File

@@ -0,0 +1,14 @@
; this is the wrapper remap to orient the spindle using TCP kinematics G53.6
o<g536remap>sub
M66 L0 E0 ;force sync, stop read ahead
o100 if [EXISTS [#<P>]]
o100 else
#<P> = 0 ;if no P word has been passed we use the default (0)
o100 endif
M68 E3 Q1 ;switch to tcp kinematic
M66 L0 E0
M530 P#<P> ;orient the spindle with P word
M66 L0 E0
o<g536remap>endsub
m2

View File

@@ -0,0 +1,11 @@
; this is the wrapper remap to cancel TWP
o<g69remap>sub
M66 L0 E0 ; force sync, stop read ahead
M469 ; call the python G69_core code
M68 E3 Q0 ; switch to identity kins
M68 E2 Q0 ; reset twp-state to 'undefined' (0)
G54 ; switch to G54
M66 L0 E0 ; force sync, stop read ahead
o<g69remap>endsub
m2

View File

@@ -0,0 +1,26 @@
;This is a workaround for a bug that leads to stat.gcodes and parameter[5250]
;to get out of sync after some program aborts
;in [RS274NGC] section of the ini add: ON_ABORT_COMMAND = o <on_abort> call
;save this to a path specified in SUBROUTINE_PATH =
;NOTE: we cannot run remapped codes here only custom Mcodes (ie M100..M199)
o<on_abort_no_twp_reset> sub
;Workaround for
;https://github.com/LinuxCNC/linuxcnc/issues/2745
;https://github.com/LinuxCNC/linuxcnc/issues/2908
;store current offset index
#1 = #5220
; we must switch through at least 3 indexes
G59.3
G59.2
G59.1
; restore the index from above
o101 if [#1 GT 6]
(print, Code [#1-6])
G[59+[#1-6]/10]
o101 else
G[53+#1]
o101 endif
;(msg, on_abort sub executed)
o<on_abort_no_twp_reset> endsub
m2

View File

@@ -0,0 +1,15 @@
;This is a workaround for a bug that leads to stat.gcodes and parameter[5250]
;to get out of sync after some program aborts
;in [RS274NGC] section of the ini add: ON_ABORT_COMMAND = o <on_abort> call
;save this to a path specified in SUBROUTINE_PATH =
;NOTE: we cannot run remapped codes here only custom Mcodes (ie M100..M199)
o<on_abort_with_twp_reset> sub
;(msg, on_abort START)
M68 E2 Q0 ; reset twp-state to 'undefined' (0)
M68 E3 Q0 ; set IDENTITY kins
G64 P0.01 ; reset the toolpath tolerance as this sometimes gets set to zero on estop events
G54 ; switch to G54
(msg, on_abort END)
o<on_abort_with_twp_reset> endsub
M2

View File

@@ -0,0 +1,11 @@
# switchkins pyvcp connections
net :kinstype.is-0 <= kinstype.is-0 => pyvcp.multilabel.0.legend0
net :kinstype.is-1 <= kinstype.is-1 => pyvcp.multilabel.0.legend1
net :kinstype.is-2 <= kinstype.is-2 => pyvcp.multilabel.0.legend2
net :vismach-clear <= pyvcp.vismach-clear => vismach.plotclear
net :type0-button <= pyvcp.type0-button => halui.mdi-command-00
net :type1-button <= pyvcp.type1-button => halui.mdi-command-01
net :type2-button <= pyvcp.type2-button => halui.mdi-command-02

View File

@@ -0,0 +1,566 @@
#!/usr/bin/env python3
# This is a machine simulation for the 'xyzacb-trsrn' simulation config in linuxcnc
# Author: David mueller
# email: mueller_david@hotmail.com
import hal
import math
import sys
import os
from vismach import *
# getting the name of the directory
# where the this file is present.
current = os.path.dirname(os.path.realpath(__file__))
# Getting the parent directory name
# where the current directory is present.
parent = os.path.dirname(current)
# adding the parent directory to
# the sys.path.
sys.path.append(parent)
# now we can import the module in the parent
# directory.
# Machine zero as measured from center surface of the rotary c table
machine_zero_x = -1000
machine_zero_y = 1000
machine_zero_z = 2000
'''
try: # Expect files in working directory
# NOTE to run this file as standalone python script absolute paths might have to be used to find the stl files
# create the work piece from file
work_piece = AsciiSTL(filename="./work_piece_1.stl")
except Exception as detail:
print(detail)
raise SystemExit("gen-xyzacb-trsrn-gui requires stl files in working directory")
'''
for setting in sys.argv[1:]: exec(setting)
c = hal.component("xyzacb-trsrn-gui")
# axis_x
c.newpin("axis_x", hal.HAL_FLOAT, hal.HAL_IN)
# axis_y
c.newpin("axis_y", hal.HAL_FLOAT, hal.HAL_IN)
# head vertical slide
c.newpin("axis_z", hal.HAL_FLOAT, hal.HAL_IN)
# rotary_a
c.newpin("rotary_a", hal.HAL_FLOAT, hal.HAL_IN)
# rotary_b
c.newpin("rotary_b", hal.HAL_FLOAT, hal.HAL_IN)
# rotary_c
c.newpin("rotary_c", hal.HAL_FLOAT, hal.HAL_IN)
# nutation-angle
c.newpin("nutation_angle", hal.HAL_FLOAT, hal.HAL_IN)
# tool offsets
c.newpin("tool_length", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("tool_diameter", hal.HAL_FLOAT, hal.HAL_IN)
# geometric offsets in the spindle-rotary-assembly
c.newpin("pivot_y", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("pivot_z", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("offset_x", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("offset_y", hal.HAL_FLOAT, hal.HAL_IN)
# rot-point offsets distances from pivot point ( spindle AB)
# to rotation axis ( table C)
c.newpin("rot_axis_y", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("rot_axis_z", hal.HAL_FLOAT, hal.HAL_IN)
# selected kinematics
c.newpin("kinstype_select", hal.HAL_FLOAT, hal.HAL_IN)
# work piece show/hide
c.newpin("hide_work_piece_1", hal.HAL_BIT, hal.HAL_IN)
# spindle body show/hide
c.newpin("hide_spindle_body", hal.HAL_BIT, hal.HAL_IN)
# work piece show/hide
c.newpin("hide_somethingelse", hal.HAL_BIT, hal.HAL_IN)
# scale coordinate system indicators
c.newpin("scale_coords", hal.HAL_FLOAT, hal.HAL_IN)
# twp pins
c.newpin("twp_status", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_defined", hal.HAL_BIT, hal.HAL_IN)
c.newpin("twp_active", hal.HAL_BIT, hal.HAL_IN)
# the origin of the twp plane display needs to be independent of the work offsets
# because those offsets change as the kinematic switches between world and tool
c.newpin("twp_ox_world", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_oy_world", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_oz_world", hal.HAL_FLOAT, hal.HAL_IN)
# origin of the twp
c.newpin("twp_ox", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_oy", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_oz", hal.HAL_FLOAT, hal.HAL_IN)
# normal vector defining the temporary work plane as set by user with G68.2
c.newpin("twp_zx", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_zy", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_zz", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_xx", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_xy", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_xz", hal.HAL_FLOAT, hal.HAL_IN)
c.ready()
# give endpoint Z values and radii
# resulting cylinder is on the Z axis
class HalToolCylinder(CylinderZ):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 6 # default if hal pin not set
if (c.tool_diameter > 0): r = c.tool_diameter/2
return -c.tool_length, r, 0, r
# used to create the spindle housing as set by the variable 'pivot_z'
class HalSpindleHousingZ(CylinderZ):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 140
length = c.pivot_z + 200
# start the spindle housing at height 100 above the spindle nose
return length, r, 100, r
# used to create the spindle rotary as set by the variable 'pivot_y'
class HalSpindleHousingY(CylinderY):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 120
length = c.pivot_y + 150
return length, r-30, 0, r
# used to create an indicator for the variable 'pivot_z'
class HalPivotZ(CylinderZ):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 2
length = c.pivot_z
# start the spindle housing at height 100 above the spindle nose
return length, 1, 0, r
# used to create an indicator for the variable 'pivot_y'
class HalPivotY(CylinderY):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 2
length = -c.pivot_y
return length, r, 0, 1
# used to create an indicator for the variable 'offset_x'
class HalOffsetX(CylinderX):
def __init__(self, comp, *args):
CylinderX.__init__(self, *args)
self.comp = c
def coords(self):
r = 2
length = -c.offset_x
return length, r, 0, 1
# used to create an indicator for the variable 'offset_y'
class HalOffsetY(CylinderY):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 2
length = -c.offset_y
return length, r, 0, 1
# used to create a thin tool-offset indicator
class HalToolOffset(CylinderZ):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 2
return -c.tool_length, 1, 0, r
class CoordSystem(Collection):
# creates a visual object for a coordinate system
def __init__(self, comp, r=4, l=500):
# set arrow length
al = l/10
self.parts = [Color([1,0,0,1],[CylinderX(0,r,l,r)]),
Color([1,0,0,1],[CylinderX(l,2*r,l+al,1)]),
Color([0,1,0,1],[CylinderY(0,r,l,r)]),
Color([0,1,0,1],[CylinderY(l,2*r,l+al,1)]),
Color([0,0,1,1],[CylinderZ(0,r,l,r)]),
Color([0,0,1,1],[CylinderZ(l,2*r,l+al,1)]),
]
class Point(Collection):
# creates a visual object for a point
def __init__(self, comp, r=1, l=20, color=[1,1,1,1]):
self.parts = [Color(color,[CylinderX(-l,r,l,r)]),
Color(color,[CylinderY(-l,r,l,r)]),
Color(color,[CylinderZ(-l,r,l,r)])
]
# used to rotate parts around the nutation axis
class HalRotateNutation(HalVectorRotate):
def __init__(self, parts, comp, var, th, x, y, z):
HalVectorRotate.__init__(self, parts, comp, var, th, x, y, z)
self.parts = parts
self.comp = c
self.var = var
self.th = th
def get_values(self):
th = self.th
x = 0
y = th*sin(radians(c.nutation_angle))
z = th*cos(radians(c.nutation_angle))
return th, x, y, z
#indicators
# create vismach coordinates to show the origin during construction of the model
vismach_coords = CoordSystem(c,2,5000)
# create absolute coordinates
abs_coords = CoordSystem(c,8,300)
abs_coords = HalScale([abs_coords],c,1,1,1,"scale_coords")
# create work coordinates that represent work_offset offset
work_coords = CoordSystem(c,2,100)
work_coords = HalScale([work_coords],c,1,1,1,"scale_coords")
# work coordinates for identity mode
work_coords_ident = HalShow([work_coords],c,0,"kinstype_select")
# work coordinates for tcp mode
work_coords_tcp = HalShow([work_coords],c,1,"kinstype_select")
# work coordinates for tool mode
work_coords_tool = HalShow([work_coords],c,2,"kinstype_select")
# rotate to match the current tool orientation
work_coords_tool = HalRotateNutation([work_coords_tool],c,"rotary_b",-1,0,0,0)
work_coords_tool = HalRotate([work_coords_tool],c,"rotary_c",1,0,0,1)
# move the coords to the designated (x,y,z)-home position
abs_coords = Translate([abs_coords], machine_zero_x, machine_zero_y, machine_zero_z)
work_coords_ident = Translate([work_coords_ident], machine_zero_x, machine_zero_y, machine_zero_z)
work_coords_tcp = Translate([work_coords_tcp] , machine_zero_x, machine_zero_y, machine_zero_z)
work_coords_tool = Translate([work_coords_tool] , machine_zero_x, machine_zero_y, machine_zero_z)
# move the work offsets by the work_offset
work_coords_ident = HalVectorTranslate([work_coords_ident],c,"twp_ox_world","twp_oy_world","twp_oz_world")
work_coords_tcp = HalVectorTranslate([work_coords_tcp] ,c,"twp_ox_world","twp_oy_world","twp_oz_world")
work_coords_tool = HalVectorTranslate([work_coords_tool] ,c,"twp_ox_world","twp_oy_world","twp_oz_world")
# create a visual indicator for the position of the control point
ctrl_pt = Point(c)
# move the control point indicator to the control-position
#ctrl_pt = HalVectorTranslate([ctrl_pt],c,"abs_pos_x","abs_pos_y","abs_pos_z")
ctrl_pt = HalTranslate([ctrl_pt],c,"tool_length",0,0,-1)
# create an indicator line from the reference point to the work_offset position
line_work_offset = Color([1,1,1,1],[HalLine(c,0,0,0,"twp_ox_world","twp_oy_world","twp_oz_world",1,1)])
line_work_offset = Translate([line_work_offset], machine_zero_x, machine_zero_y, machine_zero_z)
coords = Collection([
abs_coords,
work_coords_ident,
work_coords_tool,
#ctrl_pt,
line_work_offset,
])
# create a visual for the position of the rotational axis of the rotary C table
# as set by the user with the "rot-axis-x" and "rot-axis-y" sliders in the axis gui
rot_axis = Color([1,1,0.3,1],[CylinderX(0,2,-2000,2)])
# move the rot_axis indicator by the designated (x,y)-home offset
rot_axis= Translate([rot_axis], 0, machine_zero_y, machine_zero_z)
# now move it to the position set by the user
rot_axis = HalVectorTranslate([rot_axis],c,0,"rot_axis_y","rot_axis_z")
#/indicators
#tool-side
tooltip = Capture()
tool_cylinder = Collection([
HalToolCylinder(c),
# this indicates the spindle nose when no tool-offset is active
CylinderZ(-0.1, 0, 0.1, 10),
])
tool_cylinder = HalShow([tool_cylinder],c,True,"hide_spindle_body",0,1)
# create an indicator for the tool-offset when spindle-body is hidden
ind_tool_offset = Color([1,0,1,0],[HalToolOffset(c)])
tool = Collection([
HalTranslate([tooltip], c, "tool_length", 0,0,-1),
tool_cylinder,
ind_tool_offset
])
tool = Color([1,0,1,0], [tool] )
# create an indicator for the variable pivot_z
ind_pivot_z = Color([0,0,0.75,1],[HalPivotZ(CylinderZ)])
# create an indicator for the variable pivot_y
ind_pivot_y = Color([0,0.75,0,1],[HalPivotY(CylinderY)])
# move the pivot_y indicator so it extends from the pivot point
ind_pivot_y = HalVectorTranslate([ind_pivot_y],c,0,"pivot_y","pivot_z",1)
# create the spindle housing that contains the spindle
spindle_housing = Collection([
# spindle
Color([0.7,0.7,0,1],[CylinderZ(0,50,50,100)]),
Color([0.7,0.7,0,1],[CylinderZ(50,100,100,100)]),
# spindle housing vertical length as set by 'pivot_z'
Color([0.7,0.7,0,1],[HalSpindleHousingZ(CylinderZ)])
])
spindle_housing = HalShow([spindle_housing],c,True,"hide_spindle_body",0,1)
spindle_housing = Collection([
tool,
spindle_housing,
ind_pivot_z
])
# spindle housing horizontal length as set by 'pivot_y'
spindle_housing_horizontal = Color([0.7,0.7,0,1],[HalSpindleHousingY(c)])
# move up along the spindle housing
spindle_housing_horizontal = Translate([spindle_housing_horizontal],0,0,50)
# move farther up by the pivot_z value
spindle_housing_horizontal = HalVectorTranslate([spindle_housing_horizontal],c,0,0,"pivot_z",1)
# make it hidable
spindle_housing_horizontal = HalShow([spindle_housing_horizontal],c,True,"hide_spindle_body",0,1)
spindle_housing = Collection([
spindle_housing,
spindle_housing_horizontal,
ind_pivot_y
])
# move the spindle and it's vertical housing by the values set for the pivot lengths
# so the vismach origin is in the pivot point
spindle_housing = HalVectorTranslate([spindle_housing],c,0,"pivot_y","pivot_z",-1)
# create a visual for the rotary c axis
ind_axis_c = Color([1,1,0.3,1],[CylinderZ(0,1,400,1)])
ind_pivot_point = Collection([
Color([1,1,1,1],[CylinderX(-200,1,200,1)]),
Color([1,1,1,1],[CylinderY(-200,1,200,1)]),
# arrow indicating the up position
Color([1,1,1,1],[CylinderY(200,5,210,1)]),
# sphere for the actual pivot point
Color([1,1,0.3,1],[Sphere(0,0,0,5)]),
ind_axis_c
])
# create the part of joint b that attaches to the spindle body
spindle_housing_nut = Collection([
Color([0.7,0.7,0,1],[CylinderZ(0,60,150,145)]),
Color([0.7,0.7,0,1],[CylinderZ(150,145,180,145)])
])
# rotate the nutation joint to the nutation angle
spindle_housing_nut = HalRotate([spindle_housing_nut],c,"nutation_angle",-1,1,0,0)
spindle_housing_nut = HalShow([spindle_housing_nut],c,True,"hide_spindle_body",0,1)
# create HAL-link for a-axis rotational joint"
spindle_housing = HalRotateNutation([spindle_housing],c,"rotary_b",-1,0,1,0)
# move the joint using the offset values as set by the user in the gui panel
spindle_housing = HalVectorTranslate([spindle_housing],c,"offset_x","offset_y",0,-1)
spindle_housing = Collection([
spindle_housing,
spindle_housing_nut
])
# create an indicator for x-offset
ind_offset_x = Color([1,0,0,1],[HalOffsetX(c)])
# create an indicator for y-offset
ind_offset_y = Color([0,1,0,1],[HalOffsetY(c)])
ind_offset_y = HalTranslate([ind_offset_y],c,"offset_x", -1,0,0)
# create an indicator for rotational axis B
ind_axis_a = Color([1,1,0.3,1],[CylinderZ(0,1,400,1)])
ind_axis_a = HalRotate([ind_axis_a],c,"nutation_angle",-1,1,0,0)
# move the indicator by the offset values as set by the user in the gui panel
ind_axis_a = HalVectorTranslate([ind_axis_a],c,"offset_x","offset_y",0,-1)
spindle_indicators = Collection([
ind_offset_x,
ind_offset_y,
ind_pivot_point,
ind_axis_a,
])
# create part of joint B that attaches to the body of rotary c
spindle_rotary_nut = Collection([
Color([1,0.5,0,0],[CylinderZ(180,145,300,145)]),
Color([1,0.5,0,0],[CylinderZ(300,145,310,125)]),
])
# rotate the nutation joint to the nutation angle
spindle_rotary_nut = HalRotate([spindle_rotary_nut],c,"nutation_angle",-1,1,0,0)
# create the part that connects the nutation joint to the rotary C
spindle_rotary_arm = Color([1,0.5,0,0],[BoxCenteredXY(300, 600, 100)])
spindle_rotary_arm = Rotate([spindle_rotary_arm],50,-1,0,0)
spindle_rotary_arm = Translate([spindle_rotary_arm],0,120,200)
# create where the plate the arm connects to the xyz-slide
spindle_rotary_plate = Color([1,0.5,0,0],[CylinderZ(0,160,50,180)])
# move the plate up where it connects to the arm
spindle_rotary_plate = Translate([spindle_rotary_plate],0,0,400)
spindle_rotary = Collection([
spindle_rotary_nut,
spindle_rotary_arm,
spindle_rotary_plate
])
# make it hidable
spindle_rotary = HalShow([spindle_rotary],c,True,"hide_spindle_body",0,1)
# join the two parts to a spindle assembly
spindle_assembly = Collection([
spindle_housing,
spindle_rotary,
spindle_indicators
])
# create HAL-link for c-axis rotational joint"
spindle_assembly = HalRotate([spindle_assembly],c,"rotary_c",1,0,0,1)
# add a block for the y-axis to the spindle_assembly
slide_xyz = Color([0.6,0.8,0.3,0], [Box(-250, -200, 0, 250, 3000, 500)])
# move so the spindle assembly attaches to the bottom front
slide_xyz = Translate([slide_xyz],0,0,450)
slide_xyz = HalShow([slide_xyz],c,True,"hide_spindle_body",0,1)
spindle_xyz = Collection([
spindle_assembly,
slide_xyz
])
# move the spindle and it's vertical housing by the values set for the pivot lengths
# so the vismach origin is in the center of the spindle nose
spindle_xyz = HalVectorTranslate([spindle_xyz],c,0,"pivot_y","pivot_z")
spindle_xyz = HalVectorTranslate([spindle_xyz],c,"offset_x","offset_y",0)
# spindle head and y-slide move with x
spindle_xyz = HalTranslate([spindle_xyz],c,"axis_x",1,0,0)
# spindle head and y-slide move with y
spindle_xyz = HalTranslate([spindle_xyz],c,"axis_y",0,1,0)
# spindle head and y-slide move with z
spindle_xyz = HalTranslate([spindle_xyz],c,"axis_z",0,0,1)
# move the spindle_xyz to it's designated home position
spindle_xyz = Translate([spindle_xyz], machine_zero_x, machine_zero_y, machine_zero_z)
#/tool-side
#work-side
work = Capture()
# create a simple cube
work_piece = BoxCenteredXY(600, 600, 600)
# create a more complex work piece from stl
#work_piece = Translate([work_piece],0,0,0)
work_piece = Color([0.5,0.5,0.5,0.9], [work_piece])
# move the workpiece
work_piece = Translate([work_piece],0,300,300)
work_piece = HalShow([work_piece],c,1,"hide_work_piece_1",0,1)
# create a block that holds the rotary a table
rotary_table_housing = Color([0.2,0.2,0.2,0],[BoxCenteredXY(2000, 2000, -1000)])
# move so the surface set below from the current XY plane
rotary_table_housing = Translate([rotary_table_housing],0,0,-20)
# create rotary_table_a
rotary_table_a = Color([0.1,0.7,0.9,0],[CylinderZ(0,920,-800,920)])
# create 'slots' in x and y on the rotary table
table_console = Color([0.5,0.5,0.5,0.9],[BoxCenteredXY(1840, 200, 1200)])
# move so the surface is on the rotation axis
table_console = Translate([table_console],0,-100,0)
slot_z_w = Color([1,1,1,1],[BoxCenteredXY(10, 1840, 0.9)])
# create indicator of at positive end of x slot
slot_pocket = Color([1,1,1,1],[CylinderZ(0,20,1,20)])
slot_pocket = Translate([slot_pocket],900,0,0)
rotary_table_a = Collection([
work,
work_piece,
rotary_table_a,
table_console,
slot_z_w
])
# create HAL-link for a-axis rotational joint"
rotary_table_a = HalRotate([rotary_table_a],c,"rotary_a",-1,0,0,1)
rotary_table_a = Collection([
rotary_table_a,
rotary_table_housing
])
# rotate into the yz plane
rotary_table_a = Rotate([rotary_table_a],90,0,1,0)
# rotate so the table_console is horizontal
rotary_table_a = Rotate([rotary_table_a],90,1,0,0)
rotary_table_a = Translate([rotary_table_a ],-1700,0,0)
# rotate the tcp coords with the rotary table
work_coords_tcp = HalRotate([work_coords_tcp],c,"rotary_a",-1,1,0,0)
# create the work_plane using the origin (as measured from current work offset (world),
# normal vector vz(zx,zy,zz) and x-orientation vector vx(xx,xy,xz)
# these are used to create a transformation matrix
# with y-orientation vector being the cross_product(vz, vx)
work_plane = HalGridFromNormalAndDirection(c,
"twp_ox", "twp_oy", "twp_oz",
"twp_xx", "twp_xy", "twp_xz",
"twp_zx", "twp_zy", "twp_zz"
)
# for twp-defined = true, we show the plane in gray
work_plane_defined = Color([0.7,0.7,0.7,1],[work_plane])
work_plane_defined = HalShow([work_plane_defined],c,0,"twp_active")
# for twp-active = true, we show the plane in pink
work_plane_active = Color([1,0,1,1],[work_plane])
work_plane_active = HalShow([work_plane_active],c,1,"twp_active")
# create a coordinate system for the twp-plane
work_plane_coords = HalCoordsFromNormalAndDirection(c,
"twp_ox", "twp_oy", "twp_oz",
"twp_xx", "twp_xy", "twp_xz",
"twp_zx", "twp_zy", "twp_zz",
10,3
)
work_plane = Collection([work_plane_defined, work_plane_active, work_plane_coords])
# make the work_plane hidable
work_plane = HalShow([work_plane],c,1,"twp_defined")
# move plane by home offset
work_plane = Translate([work_plane], machine_zero_x, machine_zero_y, machine_zero_z)
# move plane to current work offset
work_plane = HalVectorTranslate([work_plane],c,"twp_ox_world","twp_oy_world","twp_oz_world")
table = Collection([
rotary_table_a,
rot_axis,
work_coords_tcp,
coords,
work_plane
])
#/work-side
#base
base = Collection([
# base
Box(-3500, -1000, -1500, 3500, 3000, -1300),
# column back
Box(-2000, 1800, -1500, 2000, 4000, 3500)
])
base = Color([0.2,0.2,0.2,1], [base] )
#/base
model = Collection([table, spindle_xyz, base])
#hud
myhud = Hud()
myhud.show("XYZACB-trsrn")
myhud.show("----------------")
myhud.show("TWP-Status:")
myhud.add_txt("Undefined",0)
myhud.add_txt("Defined",1)
myhud.add_txt("Tool oriented",2)
myhud.add_txt("",[1,2,3])
myhud.add_txt("TWP-Orientation Vector X:",[1,2,3])
myhud.add_pin("Xx: {:8.3f}","xyzacb-trsrn-gui.twp_xx",[1,2,3])
myhud.add_pin("Xy: {:8.3f}","xyzacb-trsrn-gui.twp_xy",[1,2,3])
myhud.add_pin("Xz: {:8.3f}","xyzacb-trsrn-gui.twp_xz",[1,2,3])
myhud.add_txt("",[1,2,3])
myhud.add_txt("TWP-Orientation Vector Z:",[1,2,3])
myhud.add_pin("Zx: {:8.3f}","xyzacb-trsrn-gui.twp_zx",[1,2,3])
myhud.add_pin("Zy: {:8.3f}","xyzacb-trsrn-gui.twp_zy",[1,2,3])
myhud.add_pin("Zz: {:8.3f}","xyzacb-trsrn-gui.twp_zz",[1,2,3])
myhud.add_txt("",[1,2,3])
myhud.show_tags_in_pin("xyzacb-trsrn-gui.twp_status")
#/hud
main(model, tooltip, work, size=4000, hud=myhud, lat=-60, lon=25)

View File

@@ -0,0 +1,560 @@
#!/usr/bin/env python3
# This is a machine simulation for the 'xyzbca-trsrn' simulation config in linuxcnc
# Author: David mueller
# email: mueller_david@hotmail.com
import hal
import math
import sys
import os
from vismach import *
# getting the name of the directory
# where the this file is present.
current = os.path.dirname(os.path.realpath(__file__))
# Getting the parent directory name
# where the current directory is present.
parent = os.path.dirname(current)
# adding the parent directory to
# the sys.path.
sys.path.append(parent)
# now we can import the module in the parent
# directory.
# Machine zero as measured from center surface of the rotary c table
machine_zero_x = -1000
machine_zero_y = 1000
machine_zero_z = 2000
'''
try: # Expect files in working directory
# NOTE to run this file as standalone python script absolute paths might have to be used to find the stl files
# create the work piece from file
work_piece = AsciiSTL(filename="./work_piece_1.stl")
except Exception as detail:
print(detail)
raise SystemExit("xyzbca-trsrn-gui requires stl files in working directory")
'''
for setting in sys.argv[1:]: exec(setting)
c = hal.component("xyzbca-trsrn-gui")
# axis_x
c.newpin("axis_x", hal.HAL_FLOAT, hal.HAL_IN)
# axis_y
c.newpin("axis_y", hal.HAL_FLOAT, hal.HAL_IN)
# head vertical slide
c.newpin("axis_z", hal.HAL_FLOAT, hal.HAL_IN)
# rotary_a
c.newpin("rotary_a", hal.HAL_FLOAT, hal.HAL_IN)
# rotary_b
c.newpin("rotary_b", hal.HAL_FLOAT, hal.HAL_IN)
# rotary_c
c.newpin("rotary_c", hal.HAL_FLOAT, hal.HAL_IN)
# nutation-angle
c.newpin("nutation_angle", hal.HAL_FLOAT, hal.HAL_IN)
# tool offsets
c.newpin("tool_length", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("tool_diameter", hal.HAL_FLOAT, hal.HAL_IN)
# geometric offsets in the spindle-rotary-assembly
c.newpin("pivot_x", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("pivot_z", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("offset_x", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("offset_y", hal.HAL_FLOAT, hal.HAL_IN)
# rot-point offsets distances from pivot point ( spindle AB)
# to rotation axis ( table C)
c.newpin("rot_axis_x", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("rot_axis_z", hal.HAL_FLOAT, hal.HAL_IN)
# selected kinematics
c.newpin("kinstype_select", hal.HAL_FLOAT, hal.HAL_IN)
# work piece show/hide
c.newpin("hide_work_piece_1", hal.HAL_BIT, hal.HAL_IN)
# spindle body show/hide
c.newpin("hide_spindle_body", hal.HAL_BIT, hal.HAL_IN)
# work piece show/hide
c.newpin("hide_somethingelse", hal.HAL_BIT, hal.HAL_IN)
# scale coordinate system indicators
c.newpin("scale_coords", hal.HAL_FLOAT, hal.HAL_IN)
# twp pins
c.newpin("twp_status", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_defined", hal.HAL_BIT, hal.HAL_IN)
c.newpin("twp_active", hal.HAL_BIT, hal.HAL_IN)
# the origin of the twp plane display needs to be independent of the work offsets
# because those offsets change as the kinematic switches between world and tool
c.newpin("twp_ox_world", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_oy_world", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_oz_world", hal.HAL_FLOAT, hal.HAL_IN)
# origin of the twp
c.newpin("twp_ox", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_oy", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_oz", hal.HAL_FLOAT, hal.HAL_IN)
# normal vector defining the temporary work plane as set by user with G68.2
c.newpin("twp_zx", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_zy", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_zz", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_xx", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_xy", hal.HAL_FLOAT, hal.HAL_IN)
c.newpin("twp_xz", hal.HAL_FLOAT, hal.HAL_IN)
c.ready()
# give endpoint Z values and radii
# resulting cylinder is on the Z axis
class HalToolCylinder(CylinderZ):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 6 # default if hal pin not set
if (c.tool_diameter > 0): r = c.tool_diameter/2
return -c.tool_length, r, 0, r
# used to create the spindle housing as set by the variable 'pivot_z'
class HalSpindleHousingZ(CylinderZ):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 140
length = c.pivot_z + 200
# start the spindle housing at height 100 above the spindle nose
return length, r, 100, r
# used to create the spindle rotary as set by the variable 'pivot_x'
class HalSpindleHousingX(CylinderX):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 120
length = c.pivot_x + 150
return length, r-30, 0, r
# used to create an indicator for the variable 'pivot_z'
class HalPivotZ(CylinderZ):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 2
length = c.pivot_z
# start the spindle housing at height 100 above the spindle nose
return length, 1, 0, r
# used to create an indicator for the variable 'pivot_x'
class HalPivotX(CylinderX):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 2
length = -c.pivot_x
return length, r, 0, 1
# used to create an indicator for the variable 'offset_x'
class HalOffsetX(CylinderX):
def __init__(self, comp, *args):
CylinderX.__init__(self, *args)
self.comp = c
def coords(self):
r = 2
length = -c.offset_x
return length, r, 0, 1
# used to create an indicator for the variable 'offset_y'
class HalOffsetY(CylinderY):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 2
length = -c.offset_y
return length, r, 0, 1
# used to create a thin tool-offset indicator
class HalToolOffset(CylinderZ):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = c
def coords(self):
r = 2
return -c.tool_length, 1, 0, r
class CoordSystem(Collection):
# creates a visual object for a coordinate system
def __init__(self, comp, r=4, l=500):
# set arrow length
al = l/10
self.parts = [Color([1,0,0,1],[CylinderX(0,r,l,r)]),
Color([1,0,0,1],[CylinderX(l,2*r,l+al,1)]),
Color([0,1,0,1],[CylinderY(0,r,l,r)]),
Color([0,1,0,1],[CylinderY(l,2*r,l+al,1)]),
Color([0,0,1,1],[CylinderZ(0,r,l,r)]),
Color([0,0,1,1],[CylinderZ(l,2*r,l+al,1)]),
]
class Point(Collection):
# creates a visual object for a point
def __init__(self, comp, r=1, l=20, color=[1,1,1,1]):
self.parts = [Color(color,[CylinderX(-l,r,l,r)]),
Color(color,[CylinderY(-l,r,l,r)]),
Color(color,[CylinderZ(-l,r,l,r)])
]
# used to rotate parts around the nutation axis
class HalRotateNutation(HalVectorRotate):
def __init__(self, parts, comp, var, th, x, y, z):
HalVectorRotate.__init__(self, parts, comp, var, th, x, y, z)
self.parts = parts
self.comp = c
self.var = var
self.th = th
def get_values(self):
th = self.th
x = th*sin(radians(c.nutation_angle))
y = 0
z = th*cos(radians(c.nutation_angle))
return th, x, y, z
#indicators
# create vismach coordinates to show the origin during construction of the model
vismach_coords = CoordSystem(c,2,5000)
# create absolute coordinates
abs_coords = CoordSystem(c,8,300)
abs_coords = HalScale([abs_coords],c,1,1,1,"scale_coords")
# create work coordinates that represent work_offset offset
work_coords = CoordSystem(c,2,100)
work_coords = HalScale([work_coords],c,1,1,1,"scale_coords")
# work coordinates for identity mode
work_coords_ident = HalShow([work_coords],c,0,"kinstype_select")
# work coordinates for tcp mode
work_coords_tcp = HalShow([work_coords],c,1,"kinstype_select")
# work coordinates for tool mode
work_coords_tool = HalShow([work_coords],c,2,"kinstype_select")
# rotate to match the current tool orientation
work_coords_tool = HalRotateNutation([work_coords_tool],c,"rotary_a",-1,0,0,0)
work_coords_tool = HalRotate([work_coords_tool],c,"rotary_c",1,0,0,1)
# move the coords to the designated (x,y,z)-home position
abs_coords = Translate([abs_coords], machine_zero_x, machine_zero_y, machine_zero_z)
work_coords_ident = Translate([work_coords_ident], machine_zero_x, machine_zero_y, machine_zero_z)
work_coords_tcp = Translate([work_coords_tcp] , machine_zero_x, machine_zero_y, machine_zero_z)
work_coords_tool = Translate([work_coords_tool] , machine_zero_x, machine_zero_y, machine_zero_z)
# move the work offsets by the work_offset
work_coords_ident = HalVectorTranslate([work_coords_ident],c,"twp_ox_world","twp_oy_world","twp_oz_world")
work_coords_tcp = HalVectorTranslate([work_coords_tcp] ,c,"twp_ox_world","twp_oy_world","twp_oz_world")
work_coords_tool = HalVectorTranslate([work_coords_tool] ,c,"twp_ox_world","twp_oy_world","twp_oz_world")
# create a visual indicator for the position of the control point
ctrl_pt = Point(c)
# move the control point indicator to the control-position
#ctrl_pt = HalVectorTranslate([ctrl_pt],c,"abs_pos_x","abs_pos_y","abs_pos_z")
ctrl_pt = HalTranslate([ctrl_pt],c,"tool_length",0,0,-1)
# create an indicator line from the reference point to the work_offset position
line_work_offset = Color([1,1,1,1],[HalLine(c,0,0,0,"twp_ox_world","twp_oy_world","twp_oz_world",1,1)])
line_work_offset = Translate([line_work_offset], machine_zero_x, machine_zero_y, machine_zero_z)
coords = Collection([
abs_coords,
work_coords_ident,
work_coords_tool,
#ctrl_pt,
line_work_offset,
])
# create a visual for the position of the rotational axis of the rotary C table
# as set by the user with the "rot-axis-x" and "rot-axis-y" sliders in the axis gui
rot_axis = Color([1,1,0.3,1],[CylinderY(0,2,2000,2)])
# move the rot_axis indicator by the designated (x,y)-home offset
rot_axis= Translate([rot_axis], machine_zero_x, 0, machine_zero_z)
# now move it to the position set by the user
rot_axis = HalVectorTranslate([rot_axis],c,"rot_axis_x",0,"rot_axis_z")
#/indicators
#tool-side
tooltip = Capture()
tool_cylinder = Collection([
HalToolCylinder(c),
# this indicates the spindle nose when no tool-offset is active
CylinderZ(-0.1, 0, 0.1, 10),
])
tool_cylinder = HalShow([tool_cylinder],c,True,"hide_spindle_body",0,1)
# create an indicator for the tool-offset when spindle-body is hidden
ind_tool_offset = Color([1,0,1,0],[HalToolOffset(c)])
tool = Collection([
HalTranslate([tooltip], c, "tool_length", 0,0,-1),
tool_cylinder,
ind_tool_offset
])
tool = Color([1,0,1,0], [tool] )
# create an indicator for the variable pivot_z
ind_pivot_z = Color([0,0,0.75,1],[HalPivotZ(CylinderZ)])
# create an indicator for the variable pivot_x
ind_pivot_x = Color([0.75,0,0,1],[HalPivotX(CylinderX)])
# move the pivot_x indicator so it extends from the pivot point
ind_pivot_x = HalVectorTranslate([ind_pivot_x],c,"pivot_x",0,"pivot_z",1)
# create the spindle housing that contains the spindle
spindle_housing = Collection([
# spindle
Color([0.7,0.7,0,1],[CylinderZ(0,50,50,100)]),
Color([0.7,0.7,0,1],[CylinderZ(50,100,100,100)]),
# spindle housing vertical length as set by 'pivot_z'
Color([0.7,0.7,0,1],[HalSpindleHousingZ(CylinderZ)])
])
spindle_housing = HalShow([spindle_housing],c,True,"hide_spindle_body",0,1)
spindle_housing = Collection([
tool,
spindle_housing,
ind_pivot_z
])
# spindle housing horizontal length as set by 'pivot_x'
spindle_housing_horizontal = Color([0.7,0.7,0,1],[HalSpindleHousingX(c)])
# move up along the spindle housing
spindle_housing_horizontal = Translate([spindle_housing_horizontal],0,0,50)
# move farther up by the pivot_z value
spindle_housing_horizontal = HalVectorTranslate([spindle_housing_horizontal],c,0,0,"pivot_z",1)
# make it hidable
spindle_housing_horizontal = HalShow([spindle_housing_horizontal],c,True,"hide_spindle_body",0,1)
spindle_housing = Collection([
spindle_housing,
spindle_housing_horizontal,
ind_pivot_x
])
# move the spindle and it's vertical housing by the values set for the pivot lengths
# so the vismach origin is in the pivot point
spindle_housing = HalVectorTranslate([spindle_housing],c,"pivot_x",0,"pivot_z",-1)
# create a visual for the rotary c axis
ind_axis_c = Color([1,1,0.3,1],[CylinderZ(0,1,400,1)])
ind_pivot_point = Collection([
Color([1,1,1,1],[CylinderX(-200,1,200,1)]),
Color([1,1,1,1],[CylinderY(-200,1,200,1)]),
# arrow indicating the up position
Color([1,1,1,1],[CylinderY(200,5,210,1)]),
# sphere for the actual pivot point
Color([1,1,0.3,1],[Sphere(0,0,0,5)]),
ind_axis_c
])
# create the part of joint A that attaches to the spindle body
spindle_housing_nut = Collection([
Color([0.7,0.7,0,1],[CylinderZ(0,60,150,145)]),
Color([0.7,0.7,0,1],[CylinderZ(150,145,180,145)])
])
# rotate the nutation joint to the nutation angle
spindle_housing_nut = HalRotate([spindle_housing_nut],c,"nutation_angle",1,0,1,0)
spindle_housing_nut = HalShow([spindle_housing_nut],c,True,"hide_spindle_body",0,1)
# create HAL-link for a-axis rotational joint"
spindle_housing = HalRotateNutation([spindle_housing],c,"rotary_a",-1,0,0,0)
# move the joint using the offset values as set by the user in the gui panel
spindle_housing = HalVectorTranslate([spindle_housing],c,"offset_x","offset_y",0,-1)
spindle_housing = Collection([
spindle_housing,
spindle_housing_nut
])
# create an indicator for x-offset
ind_offset_x = Color([1,0,0,1],[HalOffsetX(c)])
# create an indicator for y-offset
ind_offset_y = Color([0,1,0,1],[HalOffsetY(c)])
ind_offset_y = HalTranslate([ind_offset_y],c,"offset_x", -1,0,0)
# create an indicator for rotational axis A
ind_axis_a = Color([1,1,0.3,1],[CylinderZ(0,1,400,1)])
ind_axis_a = HalRotate([ind_axis_a],c,"nutation_angle",1,0,1,0)
# move the indicator by the offset values as set by the user in the gui panel
ind_axis_a = HalVectorTranslate([ind_axis_a],c,"offset_x","offset_y",0,-1)
spindle_indicators = Collection([
ind_offset_x,
ind_offset_y,
ind_pivot_point,
ind_axis_a,
])
# create part of joint A that attaches to the body of rotary c
spindle_rotary_nut = Collection([
Color([1,0.5,0,0],[CylinderZ(180,145,300,145)]),
Color([1,0.5,0,0],[CylinderZ(300,145,310,125)]),
])
# rotate the nutation joint to the nutation angle
spindle_rotary_nut = HalRotate([spindle_rotary_nut],c,"nutation_angle",1,0,1,0)
# create the part that connects the nutation joint to the rotary C
spindle_rotary_arm = Color([1,0.5,0,0],[BoxCenteredXY(300, 600, 100)])
spindle_rotary_arm = Rotate([spindle_rotary_arm],50,-1,0,0)
spindle_rotary_arm = Translate([spindle_rotary_arm],0,120,200)
# rotate so it slants in the machine-x direction
spindle_rotary_arm = Rotate([spindle_rotary_arm],90,0,0,-1)
# create where the plate the arm connects to the xyz-slide
spindle_rotary_plate = Color([1,0.5,0,0],[CylinderZ(0,160,50,180)])
# move the plate up where it connects to the arm
spindle_rotary_plate = Translate([spindle_rotary_plate],0,0,400)
spindle_rotary = Collection([
spindle_rotary_nut,
spindle_rotary_arm,
spindle_rotary_plate
])
# make it hidable
spindle_rotary = HalShow([spindle_rotary],c,True,"hide_spindle_body",0,1)
# join the two parts to a spindle assembly
spindle_assembly = Collection([
spindle_housing,
spindle_rotary,
spindle_indicators
])
# create HAL-link for c-axis rotational joint"
spindle_assembly = HalRotate([spindle_assembly],c,"rotary_c",1,0,0,1)
# add a block for the y-axis to the spindle_assembly
slide_xyz = Color([0.6,0.8,0.3,0], [Box(-250, -200, 0, 250, 3000, 500)])
# move so the spindle assembly attaches to the bottom front
slide_xyz = Translate([slide_xyz],0,0,450)
slide_xyz = HalShow([slide_xyz],c,True,"hide_spindle_body",0,1)
spindle_xyz = Collection([
spindle_assembly,
slide_xyz
])
# move the spindle and it's vertical housing by the values set for the pivot lengths
# so the vismach origin is in the center of the spindle nose
spindle_xyz = HalVectorTranslate([spindle_xyz],c,"pivot_x",0,"pivot_z")
spindle_xyz = HalVectorTranslate([spindle_xyz],c,"offset_x","offset_y",0)
# spindle head and y-slide move with x
spindle_xyz = HalTranslate([spindle_xyz],c,"axis_x",1,0,0)
# spindle head and y-slide move with y
spindle_xyz = HalTranslate([spindle_xyz],c,"axis_y",0,1,0)
# spindle head and y-slide move with z
spindle_xyz = HalTranslate([spindle_xyz],c,"axis_z",0,0,1)
# move the spindle_xyz to it's designated home position
spindle_xyz = Translate([spindle_xyz], machine_zero_x, machine_zero_y, machine_zero_z)
#/tool-side
#work-side
work = Capture()
# create a simple cube
work_piece = BoxCenteredXY(600, 600, 600)
# create a more complex work piece from stl
#work_piece = Translate([work_piece],0,0,0)
work_piece = Color([0.5,0.5,0.5,0.9], [work_piece])
# move the workpiece
work_piece = Translate([work_piece],0,300,300)
work_piece = HalShow([work_piece],c,1,"hide_work_piece_1",0,1)
# create rotary_table_c
rotary_table_b = Color([0.1,0.7,0.9,0],[CylinderZ(0,920,-800,920)])
# create 'slots' in x and y on the rotary table
table_console = Color([0.5,0.5,0.5,0.9],[BoxCenteredXY(1840, 200, 1200)])
# move so the surface is on the rotation axis
table_console = Translate([table_console],0,-100,0)
slot_z_w = Color([1,1,1,1],[BoxCenteredXY(10, 1840, 0.9)])
# create indicator of at positive end of x slot
slot_pocket = Color([1,1,1,1],[CylinderZ(0,20,1,20)])
slot_pocket = Translate([slot_pocket],900,0,0)
rotary_table_b = Collection([
work,
work_piece,
rotary_table_b,
table_console,
slot_z_w,
])
# rotate into the xz plane
rotary_table_b = Rotate([rotary_table_b],90,1,0,0)
# create HAL-link for rotary table
rotary_table_b = HalRotate([rotary_table_b],c,"rotary_b",-1,0,1,0)
rotary_table_b = Translate([rotary_table_b ],0,1700,0)
# rotate the tcp coords with the rotary table
work_coords_tcp = HalRotate([work_coords_tcp],c,"rotary_b",-1,0,1,0)
# create the work_plane using the origin (as measured from current work offset (world),
# normal vector vz(zx,zy,zz) and x-orientation vector vx(xx,xy,xz)
# these are used to create a transformation matrix
# with y-orientation vector being the cross_product(vz, vx)
work_plane = HalGridFromNormalAndDirection(c,
"twp_ox", "twp_oy", "twp_oz",
"twp_xx", "twp_xy", "twp_xz",
"twp_zx", "twp_zy", "twp_zz"
)
# for twp-defined = true, we show the plane in gray
work_plane_defined = Color([0.7,0.7,0.7,1],[work_plane])
work_plane_defined = HalShow([work_plane_defined],c,0,"twp_active")
# for twp-active = true, we show the plane in pink
work_plane_active = Color([1,0,1,1],[work_plane])
work_plane_active = HalShow([work_plane_active],c,1,"twp_active")
# create a coordinate system for the twp-plane
work_plane_coords = HalCoordsFromNormalAndDirection(c,
"twp_ox", "twp_oy", "twp_oz",
"twp_xx", "twp_xy", "twp_xz",
"twp_zx", "twp_zy", "twp_zz",
10,3
)
work_plane = Collection([work_plane_defined, work_plane_active, work_plane_coords])
# make the work_plane hidable
work_plane = HalShow([work_plane],c,1,"twp_defined")
# move plane by home offset
work_plane = Translate([work_plane], machine_zero_x, machine_zero_y, machine_zero_z)
# move plane to current work offset
work_plane = HalVectorTranslate([work_plane],c,"twp_ox_world","twp_oy_world","twp_oz_world")
table = Collection([
rotary_table_b,
rot_axis,
work_coords_tcp,
coords,
work_plane,
])
#/work-side
#base
base = Collection([
# base
Box(-3500, -1000, -1500, 3500, 3000, -1300),
# column back
Box(-2000, 1800, -1500, 2000, 4000, 3500)
])
base = Color([0.2,0.2,0.2,1], [base] )
#/base
model = Collection([table, spindle_xyz, base,])
#hud
myhud = Hud()
myhud.show("XYZBCA-trsrn")
myhud.show("----------------")
myhud.show("TWP-Status:")
myhud.add_txt("Undefined",0)
myhud.add_txt("Defined",1)
myhud.add_txt("Tool oriented",2)
myhud.add_txt("",[1,2,3])
myhud.add_txt("TWP-Orientation Vector X:",[1,2,3])
myhud.add_pin("Xx: {:8.3f}","xyzbca-trsrn-gui.twp_xx",[1,2,3])
myhud.add_pin("Xy: {:8.3f}","xyzbca-trsrn-gui.twp_xy",[1,2,3])
myhud.add_pin("Xz: {:8.3f}","xyzbca-trsrn-gui.twp_xz",[1,2,3])
myhud.add_txt("",[1,2,3])
myhud.add_txt("TWP-Orientation Vector Z:",[1,2,3])
myhud.add_pin("Zx: {:8.3f}","xyzbca-trsrn-gui.twp_zx",[1,2,3])
myhud.add_pin("Zy: {:8.3f}","xyzbca-trsrn-gui.twp_zy",[1,2,3])
myhud.add_pin("Zz: {:8.3f}","xyzbca-trsrn-gui.twp_zz",[1,2,3])
myhud.add_txt("",[1,2,3])
myhud.show_tags_in_pin("xyzbca-trsrn-gui.twp_status")
#/hud
main(model, tooltip, work, size=4000, hud=myhud, lat=-60, lon=25)

View File

@@ -0,0 +1,16 @@
This is a simulation configuration for a 6 axis machine with the following kinematic:
XYZ - linear cartesian
A - table rotary
C - spindle rotary
B - spindle nutating
The spindle rotary assembly is fully configurable using sliders in the side panel of the gui
The kinematic component includes the following modes:
IDENTITY: Trivial kinematics with a one-to-one mapping of joints to axes
TCP: Coordinated xyz motion with rotation around the tool center point
TOOL: Coordinated xyz motion in the current tool coordinate system
Also see the README in the parent directory.

View File

@@ -0,0 +1,102 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<vbox>
<labelframe text="A Rotation Axis Offset">
<font>("Helvetica",14)</font>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>" "</text>
</label>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>"Physical location of rotation-axis in the model\n in absolute machine coordinates:"</text>
</label>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>" y: -1000\n z: -2000"</text>
</label>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>" "</text>
</label>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>"these are also the correct 'rot-axis' settings\n for this model"</text>
</label>
</hbox>
<hbox>
<label>
<text>"y-rot-axis: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"y-rot-axis"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>-1000</initval>
<min_>-1900</min_>
<max_>1000</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"z-rot-axis: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"z-rot-axis"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>-2000</initval>
<min_>-2900</min_>
<max_>1100</max_>
</scale>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>" "</text>
</label>
</hbox>
<hbox>
<label>
<text>"Use hover + mouse wheel to change values"</text>
<font>("Helvetica",6)</font>
</label>
</hbox>
</labelframe>
</vbox>
<!-- create a space to the next element -->
<vbox>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",4)</font>
</label>
</hbox>
</vbox>
<vbox>
<hbox>
<label>
<text>" To test change values above\n reload and restart\n the demo gcode "</text>
<font>("Helvetica",10)</font>
</label>
</hbox>
</vbox>
</vbox>
</pyvcp>

View File

@@ -0,0 +1,632 @@
solid Part2
facet normal -1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
vertex -2.500000e+02 2.500000e+02 0.000000e+00
vertex -2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal -0.000000e+00 -1.000000e+00 0.000000e+00
outer loop
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
vertex -2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal 0.000000e+00 -1.000000e+00 0.000000e+00
outer loop
vertex 2.500000e+02 -2.500000e+02 0.000000e+00
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
vertex -2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex -2.500000e+02 2.500000e+02 0.000000e+00
vertex 2.500000e+02 -2.500000e+02 0.000000e+00
vertex -2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal 1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
vertex 2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal 1.000000e+00 0.000000e+00 -0.000000e+00
outer loop
vertex 2.500000e+02 2.500000e+02 0.000000e+00
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex -2.500000e+02 2.500000e+02 0.000000e+00
vertex 2.500000e+02 2.500000e+02 0.000000e+00
vertex 2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal -1.000000e+00 -0.000000e+00 -0.000000e+00
outer loop
vertex -2.500000e+02 2.500000e+02 3.000000e+02
vertex -2.500000e+02 2.500000e+02 0.000000e+00
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 0.000000e+00 -7.071068e-01 7.071068e-01
outer loop
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
vertex -5.000000e+01 -5.000000e+01 5.000000e+02
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 0.000000e+00 -7.071068e-01 7.071068e-01
outer loop
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal -7.071068e-01 0.000000e+00 7.071068e-01
outer loop
vertex -5.000000e+01 -5.000000e+01 5.000000e+02
vertex -2.500000e+02 2.500000e+02 3.000000e+02
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071067e-01 0.000000e+00 7.071069e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071067e-01 1.745782e-08 7.071068e-01
outer loop
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
vertex 2.006929e+02 -1.947439e+01 3.493071e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071067e-01 3.070633e-08 7.071068e-01
outer loop
vertex 2.006929e+02 -1.947439e+01 3.493071e+02
vertex 1.933181e+02 -3.631866e+01 3.566819e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071068e-01 3.842491e-08 7.071068e-01
outer loop
vertex 1.933181e+02 -3.631866e+01 3.566819e+02
vertex 1.821387e+02 -4.825789e+01 3.678613e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071068e-01 4.600219e-08 7.071068e-01
outer loop
vertex 1.821387e+02 -4.825789e+01 3.678613e+02
vertex 1.686644e+02 -5.367963e+01 3.813356e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071068e-01 5.675223e-08 7.071068e-01
outer loop
vertex 1.686644e+02 -5.367963e+01 3.813356e+02
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071068e-01 6.583240e-08 7.071068e-01
outer loop
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 6.524362e-02 9.957342e-01 -6.524364e-02
outer loop
vertex 1.193599e+02 -5.185163e+01 3.599295e+02
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
vertex 1.333091e+02 -5.367963e+01 3.459802e+02
endloop
endfacet
facet normal 6.524360e-02 9.957342e-01 -6.524363e-02
outer loop
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
vertex 1.686644e+02 -5.367963e+01 3.813356e+02
vertex 1.333091e+02 -5.367963e+01 3.459802e+02
endloop
endfacet
facet normal -1.935088e-01 9.618257e-01 1.935089e-01
outer loop
vertex 1.686644e+02 -5.367963e+01 3.813356e+02
vertex 1.467833e+02 -4.825789e+01 3.325060e+02
vertex 1.333091e+02 -5.367963e+01 3.459802e+02
endloop
endfacet
facet normal 7.071067e-01 1.912466e-07 7.071068e-01
outer loop
vertex 1.467833e+02 -4.825789e+01 3.325060e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.333091e+02 -5.367963e+01 3.459802e+02
endloop
endfacet
facet normal 7.071070e-01 2.229500e-07 7.071066e-01
outer loop
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.193599e+02 -5.185163e+01 3.599295e+02
vertex 1.333091e+02 -5.367963e+01 3.459802e+02
endloop
endfacet
facet normal -1.935088e-01 9.618257e-01 1.935089e-01
outer loop
vertex 1.821387e+02 -4.825789e+01 3.678613e+02
vertex 1.467833e+02 -4.825789e+01 3.325060e+02
vertex 1.686644e+02 -5.367963e+01 3.813356e+02
endloop
endfacet
facet normal 3.151846e-01 8.951633e-01 -3.151847e-01
outer loop
vertex 1.068195e+02 -4.302078e+01 3.724698e+02
vertex 1.421749e+02 -4.302078e+01 4.078251e+02
vertex 1.193599e+02 -5.185163e+01 3.599295e+02
endloop
endfacet
facet normal 3.151847e-01 8.951632e-01 -3.151848e-01
outer loop
vertex 1.421749e+02 -4.302078e+01 4.078251e+02
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
vertex 1.193599e+02 -5.185163e+01 3.599295e+02
endloop
endfacet
facet normal 7.071067e-01 3.410209e-07 7.071069e-01
outer loop
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.068195e+02 -4.302078e+01 3.724698e+02
vertex 1.193599e+02 -5.185163e+01 3.599295e+02
endloop
endfacet
facet normal 7.071068e-01 3.664266e-08 7.071068e-01
outer loop
vertex 1.421749e+02 -4.302078e+01 4.078251e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
vertex -5.000000e+01 2.500000e+02 5.000000e+02
vertex -5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal -7.071068e-01 0.000000e+00 7.071068e-01
outer loop
vertex -5.000000e+01 2.500000e+02 5.000000e+02
vertex -2.500000e+02 2.500000e+02 3.000000e+02
vertex -5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex -5.000000e+01 2.500000e+02 5.000000e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal 7.071068e-01 7.037430e-07 7.071068e-01
outer loop
vertex 1.421749e+02 -4.302078e+01 4.078251e+02
vertex 1.327370e+02 -2.837975e+01 4.172629e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal 7.071069e-01 -4.915623e-07 7.071066e-01
outer loop
vertex 1.327370e+02 -2.837975e+01 4.172629e+02
vertex 1.276764e+02 -9.905863e+00 4.223236e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal 7.071068e-01 -0.000000e+00 7.071068e-01
outer loop
vertex 1.276764e+02 -9.905863e+00 4.223236e+02
vertex 1.276764e+02 9.905863e+00 4.223236e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal 7.071068e-01 0.000000e+00 7.071068e-01
outer loop
vertex 1.276764e+02 9.905863e+00 4.223236e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal -4.261270e-01 7.980172e-01 4.261272e-01
outer loop
vertex 1.821387e+02 -4.825789e+01 3.678613e+02
vertex 1.579628e+02 -3.631866e+01 3.213266e+02
vertex 1.467833e+02 -4.825789e+01 3.325060e+02
endloop
endfacet
facet normal 7.071064e-01 -8.249345e-08 7.071072e-01
outer loop
vertex 1.579628e+02 -3.631866e+01 3.213266e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.467833e+02 -4.825789e+01 3.325060e+02
endloop
endfacet
facet normal -4.261273e-01 7.980170e-01 4.261273e-01
outer loop
vertex 1.933181e+02 -3.631866e+01 3.566819e+02
vertex 1.579628e+02 -3.631866e+01 3.213266e+02
vertex 1.821387e+02 -4.825789e+01 3.678613e+02
endloop
endfacet
facet normal 5.225582e-01 6.736956e-01 -5.225583e-01
outer loop
vertex 9.738170e+01 -2.837975e+01 3.819076e+02
vertex 1.327370e+02 -2.837975e+01 4.172629e+02
vertex 1.068195e+02 -4.302078e+01 3.724698e+02
endloop
endfacet
facet normal 5.225580e-01 6.736957e-01 -5.225583e-01
outer loop
vertex 1.327370e+02 -2.837975e+01 4.172629e+02
vertex 1.421749e+02 -4.302078e+01 4.078251e+02
vertex 1.068195e+02 -4.302078e+01 3.724698e+02
endloop
endfacet
facet normal 7.071067e-01 2.969849e-07 7.071068e-01
outer loop
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 9.738170e+01 -2.837975e+01 3.819076e+02
vertex 1.068195e+02 -4.302078e+01 3.724698e+02
endloop
endfacet
facet normal -6.011944e-01 5.264319e-01 6.011944e-01
outer loop
vertex 1.933181e+02 -3.631866e+01 3.566819e+02
vertex 1.653375e+02 -1.947439e+01 3.139518e+02
vertex 1.579628e+02 -3.631866e+01 3.213266e+02
endloop
endfacet
facet normal 7.071068e-01 6.091928e-07 7.071068e-01
outer loop
vertex 1.653375e+02 -1.947439e+01 3.139518e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.579628e+02 -3.631866e+01 3.213266e+02
endloop
endfacet
facet normal -6.011941e-01 5.264323e-01 6.011944e-01
outer loop
vertex 2.006929e+02 -1.947439e+01 3.493071e+02
vertex 1.653375e+02 -1.947439e+01 3.139518e+02
vertex 1.933181e+02 -3.631866e+01 3.566819e+02
endloop
endfacet
facet normal 6.593572e-01 3.612418e-01 -6.593575e-01
outer loop
vertex 9.232107e+01 -9.905863e+00 3.869683e+02
vertex 1.276764e+02 -9.905863e+00 4.223236e+02
vertex 9.738170e+01 -2.837975e+01 3.819076e+02
endloop
endfacet
facet normal 6.593574e-01 3.612416e-01 -6.593575e-01
outer loop
vertex 1.276764e+02 -9.905863e+00 4.223236e+02
vertex 1.327370e+02 -2.837975e+01 4.172629e+02
vertex 9.738170e+01 -2.837975e+01 3.819076e+02
endloop
endfacet
facet normal 7.071069e-01 -1.940928e-07 7.071066e-01
outer loop
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 9.232107e+01 -9.905863e+00 3.869683e+02
vertex 9.738170e+01 -2.837975e+01 3.819076e+02
endloop
endfacet
facet normal -6.950667e-01 1.837499e-01 6.950670e-01
outer loop
vertex 2.006929e+02 -1.947439e+01 3.493071e+02
vertex 1.679117e+02 -1.781979e-14 3.113776e+02
vertex 1.653375e+02 -1.947439e+01 3.139518e+02
endloop
endfacet
facet normal 7.071065e-01 -4.679821e-07 7.071071e-01
outer loop
vertex 1.679117e+02 -1.781979e-14 3.113776e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.653375e+02 -1.947439e+01 3.139518e+02
endloop
endfacet
facet normal -6.950670e-01 1.837494e-01 6.950670e-01
outer loop
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
vertex 1.679117e+02 -1.781979e-14 3.113776e+02
vertex 2.006929e+02 -1.947439e+01 3.493071e+02
endloop
endfacet
facet normal 7.071066e-01 0.000000e+00 -7.071069e-01
outer loop
vertex 9.232107e+01 9.905863e+00 3.869683e+02
vertex 1.276764e+02 9.905863e+00 4.223236e+02
vertex 9.232107e+01 -9.905863e+00 3.869683e+02
endloop
endfacet
facet normal 7.071066e-01 0.000000e+00 -7.071069e-01
outer loop
vertex 1.276764e+02 9.905863e+00 4.223236e+02
vertex 1.276764e+02 -9.905863e+00 4.223236e+02
vertex 9.232107e+01 -9.905863e+00 3.869683e+02
endloop
endfacet
facet normal 7.071069e-01 0.000000e+00 7.071066e-01
outer loop
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 9.232107e+01 9.905863e+00 3.869683e+02
vertex 9.232107e+01 -9.905863e+00 3.869683e+02
endloop
endfacet
facet normal -6.950669e-01 -1.837499e-01 6.950669e-01
outer loop
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
vertex 1.653375e+02 1.947439e+01 3.139518e+02
vertex 1.679117e+02 -1.781979e-14 3.113776e+02
endloop
endfacet
facet normal 7.071065e-01 4.679821e-07 7.071071e-01
outer loop
vertex 1.653375e+02 1.947439e+01 3.139518e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.679117e+02 -1.781979e-14 3.113776e+02
endloop
endfacet
facet normal -6.950668e-01 -1.837494e-01 6.950671e-01
outer loop
vertex 2.006929e+02 1.947439e+01 3.493071e+02
vertex 1.653375e+02 1.947439e+01 3.139518e+02
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
endloop
endfacet
facet normal 7.071069e-01 1.940928e-07 7.071066e-01
outer loop
vertex 9.738170e+01 2.837975e+01 3.819076e+02
vertex 9.232107e+01 9.905863e+00 3.869683e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071070e-01 -2.229500e-07 7.071066e-01
outer loop
vertex 1.333091e+02 5.367963e+01 3.459802e+02
vertex 1.193599e+02 5.185163e+01 3.599295e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071067e-01 -3.410209e-07 7.071069e-01
outer loop
vertex 1.193599e+02 5.185163e+01 3.599295e+02
vertex 1.068195e+02 4.302078e+01 3.724698e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071067e-01 -2.969849e-07 7.071068e-01
outer loop
vertex 1.068195e+02 4.302078e+01 3.724698e+02
vertex 9.738170e+01 2.837975e+01 3.819076e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071068e-01 -6.091928e-07 7.071068e-01
outer loop
vertex 1.653375e+02 1.947439e+01 3.139518e+02
vertex 1.579628e+02 3.631866e+01 3.213266e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071064e-01 8.249345e-08 7.071072e-01
outer loop
vertex 1.579628e+02 3.631866e+01 3.213266e+02
vertex 1.467833e+02 4.825789e+01 3.325060e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071067e-01 -1.912466e-07 7.071068e-01
outer loop
vertex 1.467833e+02 4.825789e+01 3.325060e+02
vertex 1.333091e+02 5.367963e+01 3.459802e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071067e-01 -1.745782e-08 7.071068e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.006929e+02 1.947439e+01 3.493071e+02
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
endloop
endfacet
facet normal 6.593573e-01 -3.612418e-01 -6.593575e-01
outer loop
vertex 9.738170e+01 2.837975e+01 3.819076e+02
vertex 1.327370e+02 2.837975e+01 4.172629e+02
vertex 9.232107e+01 9.905863e+00 3.869683e+02
endloop
endfacet
facet normal 6.593573e-01 -3.612416e-01 -6.593576e-01
outer loop
vertex 1.327370e+02 2.837975e+01 4.172629e+02
vertex 1.276764e+02 9.905863e+00 4.223236e+02
vertex 9.232107e+01 9.905863e+00 3.869683e+02
endloop
endfacet
facet normal 7.071073e-01 3.038186e-07 7.071063e-01
outer loop
vertex 1.327370e+02 2.837975e+01 4.172629e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 1.276764e+02 9.905863e+00 4.223236e+02
endloop
endfacet
facet normal -6.011943e-01 -5.264319e-01 6.011945e-01
outer loop
vertex 2.006929e+02 1.947439e+01 3.493071e+02
vertex 1.579628e+02 3.631866e+01 3.213266e+02
vertex 1.653375e+02 1.947439e+01 3.139518e+02
endloop
endfacet
facet normal 7.071067e-01 -3.070633e-08 7.071068e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 1.933181e+02 3.631866e+01 3.566819e+02
vertex 2.006929e+02 1.947439e+01 3.493071e+02
endloop
endfacet
facet normal -6.011942e-01 -5.264323e-01 6.011942e-01
outer loop
vertex 1.933181e+02 3.631866e+01 3.566819e+02
vertex 1.579628e+02 3.631866e+01 3.213266e+02
vertex 2.006929e+02 1.947439e+01 3.493071e+02
endloop
endfacet
facet normal 5.225581e-01 -6.736956e-01 -5.225584e-01
outer loop
vertex 1.068195e+02 4.302078e+01 3.724698e+02
vertex 1.421749e+02 4.302078e+01 4.078251e+02
vertex 9.738170e+01 2.837975e+01 3.819076e+02
endloop
endfacet
facet normal 5.225581e-01 -6.736957e-01 -5.225582e-01
outer loop
vertex 1.421749e+02 4.302078e+01 4.078251e+02
vertex 1.327370e+02 2.837975e+01 4.172629e+02
vertex 9.738170e+01 2.837975e+01 3.819076e+02
endloop
endfacet
facet normal 7.071065e-01 -3.015717e-07 7.071071e-01
outer loop
vertex 1.421749e+02 4.302078e+01 4.078251e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 1.327370e+02 2.837975e+01 4.172629e+02
endloop
endfacet
facet normal -4.261271e-01 -7.980172e-01 4.261271e-01
outer loop
vertex 1.933181e+02 3.631866e+01 3.566819e+02
vertex 1.467833e+02 4.825789e+01 3.325060e+02
vertex 1.579628e+02 3.631866e+01 3.213266e+02
endloop
endfacet
facet normal 7.071068e-01 -3.842491e-08 7.071068e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 1.821387e+02 4.825789e+01 3.678613e+02
vertex 1.933181e+02 3.631866e+01 3.566819e+02
endloop
endfacet
facet normal -4.261272e-01 -7.980170e-01 4.261274e-01
outer loop
vertex 1.821387e+02 4.825789e+01 3.678613e+02
vertex 1.467833e+02 4.825789e+01 3.325060e+02
vertex 1.933181e+02 3.631866e+01 3.566819e+02
endloop
endfacet
facet normal 3.151846e-01 -8.951633e-01 -3.151847e-01
outer loop
vertex 1.193599e+02 5.185163e+01 3.599295e+02
vertex 1.547152e+02 5.185163e+01 3.952848e+02
vertex 1.068195e+02 4.302078e+01 3.724698e+02
endloop
endfacet
facet normal 3.151847e-01 -8.951632e-01 -3.151848e-01
outer loop
vertex 1.547152e+02 5.185163e+01 3.952848e+02
vertex 1.421749e+02 4.302078e+01 4.078251e+02
vertex 1.068195e+02 4.302078e+01 3.724698e+02
endloop
endfacet
facet normal 7.071068e-01 -9.688457e-09 7.071068e-01
outer loop
vertex 1.547152e+02 5.185163e+01 3.952848e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 1.421749e+02 4.302078e+01 4.078251e+02
endloop
endfacet
facet normal -1.935088e-01 -9.618257e-01 1.935089e-01
outer loop
vertex 1.821387e+02 4.825789e+01 3.678613e+02
vertex 1.333091e+02 5.367963e+01 3.459802e+02
vertex 1.467833e+02 4.825789e+01 3.325060e+02
endloop
endfacet
facet normal 7.071068e-01 -4.600219e-08 7.071068e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 1.686644e+02 5.367963e+01 3.813356e+02
vertex 1.821387e+02 4.825789e+01 3.678613e+02
endloop
endfacet
facet normal -1.935088e-01 -9.618257e-01 1.935089e-01
outer loop
vertex 1.686644e+02 5.367963e+01 3.813356e+02
vertex 1.333091e+02 5.367963e+01 3.459802e+02
vertex 1.821387e+02 4.825789e+01 3.678613e+02
endloop
endfacet
facet normal 6.524362e-02 -9.957342e-01 -6.524364e-02
outer loop
vertex 1.333091e+02 5.367963e+01 3.459802e+02
vertex 1.686644e+02 5.367963e+01 3.813356e+02
vertex 1.193599e+02 5.185163e+01 3.599295e+02
endloop
endfacet
facet normal 6.524361e-02 -9.957342e-01 -6.524362e-02
outer loop
vertex 1.686644e+02 5.367963e+01 3.813356e+02
vertex 1.547152e+02 5.185163e+01 3.952848e+02
vertex 1.193599e+02 5.185163e+01 3.599295e+02
endloop
endfacet
facet normal 7.071068e-01 -3.417517e-08 7.071068e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 1.547152e+02 5.185163e+01 3.952848e+02
endloop
endfacet
facet normal 7.071068e-01 -5.675223e-08 7.071068e-01
outer loop
vertex 1.686644e+02 5.367963e+01 3.813356e+02
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 1.547152e+02 5.185163e+01 3.952848e+02
endloop
endfacet
facet normal 0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex -2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.500000e+02 2.500000e+02 0.000000e+00
vertex -2.500000e+02 2.500000e+02 0.000000e+00
endloop
endfacet
facet normal -0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex -2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.500000e+02 2.500000e+02 0.000000e+00
endloop
endfacet
facet normal -0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex -5.000000e+01 2.500000e+02 5.000000e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex -2.500000e+02 2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex -2.500000e+02 2.500000e+02 3.000000e+02
endloop
endfacet
endsolid

View File

@@ -0,0 +1,290 @@
[EMC]
VERSION = 1.1
MACHINE = xyzacb-trsrn (switchkins)
DEBUG = 0
[DISPLAY]
EMBED_TAB_NAME = TCP
EMBED_TAB_COMMAND = pyvcp pyvcp_embed_tab_tcp.xml
GEOMETRY = XYZABC
OPEN_FILE = ../demos/incremental_repetition.ngc
PYVCP = ./xyzacb-trsrn.xml
JOG_AXES = XYZABC
DISPLAY = axis
MAX_ANGULAR_VELOCITY = 360
MAX_LINEAR_VELOCITY = 1500
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2
PROGRAM_PREFIX = ../demos
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 1
#EDITOR = gedit
TOOL_EDITOR = tooledit z diam
TKPKG = Ngcgui 1.0
NGCGUI_FONT = Helvetica -12 normal
[RS274NGC]
RS274NGC_STARTUP_CODE = G17 G21 G40 G49 G54 G64 P0.001 G80 G90 G92.1 G94 G97 G98
ON_ABORT_COMMAND = o <on_abort_no_twp_reset> call
#ON_ABORT_COMMAND = o <on_abort_with_twp_reset> call
SUBROUTINE_PATH = ../remap_subs:../demos
HAL_PIN_VARS = 1
REMAP = M428 modalgroup=10 ngc=428remap
REMAP = M429 modalgroup=10 ngc=429remap
REMAP = M430 modalgroup=10 ngc=430remap
REMAP = G53.1 modalgroup=1 argspec=p ngc=g531remap
REMAP = G53.3 modalgroup=1 argspec=pxyz ngc=g533remap
REMAP = G53.6 modalgroup=1 argspec=p ngc=g536remap
REMAP = M530 modalgroup=10 python=g53x_core
REMAP = G68.2 modalgroup=1 argspec=pqxyzijkr python=g682
REMAP = G68.3 modalgroup=1 argspec=xyzr python=g683
REMAP = G68.4 modalgroup=1 argspec=pqxyzijkr python=g684
REMAP = G69 modalgroup=1 ngc=g69remap
REMAP = M469 modalgroup=10 python=g69_core
PARAMETER_FILE = xyzacb-trsrn.var
[PYTHON]
# where to find the Python code:
# code specific for this configuration
PATH_APPEND = ../python
# import the following Python module
TOPLEVEL = ../python/toplevel.py
# the higher the more verbose tracing of the Python plugin
LOG_LEVEL = 3
[KINS]
KINEMATICS = xyzacb_trsrn
JOINTS = 6
[TWP]
# this defines the primary spindle rotation
PRIMARY = C
# this defines the secnodary spindle rotation (ie the one closest to the tool)
SECONDARY = B
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
POSTGUI_HALFILE = xyzacb-trsrn_postgui.hal
#HALCMD = loadusr ../python/feed_zero.py
# signal reflecting twp states (0=undefined, 1=defined, 2=active)
HALCMD = net twp-status <= motion.analog-out-02
# connection required for control of motion.switchkins-type
HALCMD = net :kinstype-select <= motion.analog-out-03 => motion.switchkins-type
# connections required for the kinematics component
HALCMD = net :tool-offset motion.tooloffset.z xyzacb_trsrn_kins.tool-offset-z
HALCMD = net :rot-axis-y xyzacb_trsrn_kins.y-rot-axis
HALCMD = net :rot-axis-z xyzacb_trsrn_kins.z-rot-axis
HALCMD = net :nutation-angle xyzacb_trsrn_kins.nut-angle
HALCMD = net :pivot-y xyzacb_trsrn_kins.y-pivot
HALCMD = net :pivot-z xyzacb_trsrn_kins.z-pivot
HALCMD = net :offset-x xyzacb_trsrn_kins.x-offset
HALCMD = net :offset-y xyzacb_trsrn_kins.y-offset
# load the required twp-helper component and its hal connections
HALCMD = loadusr -W ../python/twp-helper-comp.py
#twp-status
HALCMD = net twp-status => twp-helper-comp.twp-status
HALCMD = net twp-is-defined <= twp-helper-comp.twp-is-defined
HALCMD = net twp-is-active <= twp-helper-comp.twp-is-active
# current twp parameters
HALCMD = net twp-ox-world <= twp-helper-comp.twp-ox-world
HALCMD = net twp-oy-world <= twp-helper-comp.twp-oy-world
HALCMD = net twp-oz-world <= twp-helper-comp.twp-oz-world
HALCMD = net twp-ox <= twp-helper-comp.twp-ox
HALCMD = net twp-oy <= twp-helper-comp.twp-oy
HALCMD = net twp-oz <= twp-helper-comp.twp-oz
HALCMD = net twp-zx <= twp-helper-comp.twp-zx
HALCMD = net twp-zy <= twp-helper-comp.twp-zy
HALCMD = net twp-zz <= twp-helper-comp.twp-zz
HALCMD = net twp-xx <= twp-helper-comp.twp-xx
HALCMD = net twp-xy <= twp-helper-comp.twp-xy
HALCMD = net twp-xz <= twp-helper-comp.twp-xz
# load the optional vismach-gui and its hal connections
HALCMD = loadusr -W ../vismach/xyzacb-trsrn-gui.py
# vismach machine signals
HALCMD = net :axis-x joint.0.pos-fb xyzacb-trsrn-gui.axis_x
HALCMD = net :axis-y joint.1.pos-fb xyzacb-trsrn-gui.axis_y
HALCMD = net :axis-z joint.2.pos-fb xyzacb-trsrn-gui.axis_z
HALCMD = net :rotary-a joint.3.pos-fb xyzacb-trsrn-gui.rotary_a
HALCMD = net :rotary-b joint.4.pos-fb xyzacb-trsrn-gui.rotary_b
HALCMD = net :rotary-c joint.5.pos-fb xyzacb-trsrn-gui.rotary_c
HALCMD = net :tool-diam halui.tool.diameter xyzacb-trsrn-gui.tool_diameter
HALCMD = net :tool-offset xyzacb-trsrn-gui.tool_length
HALCMD = net :kinstype-select xyzacb-trsrn-gui.kinstype_select
HALCMD = net :nutation-angle xyzacb-trsrn-gui.nutation_angle
HALCMD = net :pivot-y xyzacb-trsrn-gui.pivot_y
HALCMD = net :pivot-z xyzacb-trsrn-gui.pivot_z
HALCMD = net :offset-x xyzacb-trsrn-gui.offset_x
HALCMD = net :offset-y xyzacb-trsrn-gui.offset_y
HALCMD = net :rot-axis-y xyzacb-trsrn-gui.rot_axis_y
HALCMD = net :rot-axis-z xyzacb-trsrn-gui.rot_axis_z
HALCMD = net :hide-work-piece-1 xyzacb-trsrn-gui.hide_work_piece_1
HALCMD = net :hide-spindle-body xyzacb-trsrn-gui.hide_spindle_body
HALCMD = net :scale-coords xyzacb-trsrn-gui.scale_coords
# vismach twp signals
HALCMD = net twp-ox-world xyzacb-trsrn-gui.twp_ox_world
HALCMD = net twp-oy-world xyzacb-trsrn-gui.twp_oy_world
HALCMD = net twp-oz-world xyzacb-trsrn-gui.twp_oz_world
HALCMD = net twp-ox xyzacb-trsrn-gui.twp_ox
HALCMD = net twp-oy xyzacb-trsrn-gui.twp_oy
HALCMD = net twp-oz xyzacb-trsrn-gui.twp_oz
HALCMD = net twp-zx xyzacb-trsrn-gui.twp_zx
HALCMD = net twp-zy xyzacb-trsrn-gui.twp_zy
HALCMD = net twp-zz xyzacb-trsrn-gui.twp_zz
HALCMD = net twp-xx xyzacb-trsrn-gui.twp_xx
HALCMD = net twp-xy xyzacb-trsrn-gui.twp_xy
HALCMD = net twp-xz xyzacb-trsrn-gui.twp_xz
HALCMD = net twp-status xyzacb-trsrn-gui.twp_status
HALCMD = net twp-is-defined xyzacb-trsrn-gui.twp_defined
HALCMD = net twp-is-active xyzacb-trsrn-gui.twp_active
[HALUI]
# NOTE: kinstype==0 is identity kins because sparm=identityfirst
# M428:identity kins (motion.switchkins-type==0 startupDEFAULT)
# M429: tcp kins (motion.switchkins-type==1)
# M430: tool kins (motion.switchkins-type==2)
MDI_COMMAND = M428
MDI_COMMAND = M429
MDI_COMMAND = M430
[TRAJ]
COORDINATES = XYZABC
LINEAR_UNITS = mm
ANGULAR_UNITS = deg
DEFAULT_LINEAR_VELOCITY = 100
MAX_LINEAR_VELOCITY = 120
MAX_LINEAR_ACCELERATION = 700
DEFAULT_LINEAR_ACCELERATION = 300
[EMCMOT]
EMCMOT = motmod
SERVO_PERIOD = 1000000
COMM_TIMEOUT = 1
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[EMCIO]
TOOL_TABLE = xyzacb-trsrn.tbl
[AXIS_X]
MIN_LIMIT = -5000
MAX_LIMIT = 5000
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
[AXIS_Y]
MIN_LIMIT = -5000
MAX_LIMIT = 5000
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
[AXIS_Z]
MIN_LIMIT = -5000
MAX_LIMIT = 5000
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
# table rotary axis
[AXIS_A]
MIN_LIMIT = -360
MAX_LIMIT = 360
MAX_VELOCITY = 30
MAX_ACCELERATION = 300
# spindle secondary axis
[AXIS_B]
MIN_LIMIT = -185
MAX_LIMIT = 185
MAX_VELOCITY = 30
MAX_ACCELERATION = 302
# spindle primary axis
[AXIS_C]
MIN_LIMIT = -320
MAX_LIMIT = 320
MAX_VELOCITY = 30
MAX_ACCELERATION = 301
[JOINT_0]
TYPE = LINEAR
HOME = 0
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
MIN_LIMIT = -5000
MAX_LIMIT = 5000
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0
[JOINT_1]
TYPE = LINEAR
HOME = 0
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
MIN_LIMIT = -5000
MAX_LIMIT = 5000
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0
[JOINT_2]
TYPE = LINEAR
HOME = 0
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
MIN_LIMIT = -5000
MAX_LIMIT = 5000
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0
#table rotary
[JOINT_3]
TYPE = ANGULAR
HOME = 0
MAX_VELOCITY = 30
MAX_ACCELERATION = 300
MIN_LIMIT = -360
MAX_LIMIT = 360
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0
# spindle secondary axis
[JOINT_4]
TYPE = ANGULAR
HOME = 0
MAX_VELOCITY = 30
MAX_ACCELERATION = 300
MIN_LIMIT = -185
MAX_LIMIT = 185
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0
# spindle primary axis
[JOINT_5]
TYPE = ANGULAR
HOME = 0
MAX_VELOCITY = 30
MAX_ACCELERATION = 300
MIN_LIMIT = -320
MAX_LIMIT = 320
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0

View File

@@ -0,0 +1,4 @@
T1 P1 D1
T2 P2 Z50 D8
T3 P3 Z100 D20
T4 P4 Z120 D40

View File

@@ -0,0 +1,301 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<relief>"ridge"</relief>
<bd>5</bd>
<label>
<text>"SWITCHKINS"</text>
<relief>RIDGE</relief>
<bd>3</bd>
</label>
<multilabel>
<legends>["0: IDENTITY", "1: TCP ", "2: TOOL "]</legends>
<font>("Helvetica",16)</font>
<bg>"black"</bg>
<fg>"yellow"</fg>
</multilabel>
<button>
<halpin>"type0-button"</halpin>
<text>" IDENTITY "</text>
<bd>3</bd>
</button>
<button>
<halpin>"type1-button"</halpin>
<text>" TCP "</text>
<bd>3</bd>
</button>
<button>
<halpin>"type2-button"</halpin>
<text>" TOOL "</text>
<bd>3</bd>
</button>
<!-- create a space to the next element -->
<vbox>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",4)</font>
</label>
</hbox>
</vbox>
<vbox>
<labelframe text="Joint position">
<font>("Helvetica",14)</font>
<hbox>
<vbox>
<hbox>
<label>
<text>"0: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint0"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"1: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint1"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"2: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint2"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
</vbox>
<vbox>
<label>
<text>" "</text>
<font>("Helvetica",10)</font>
</label>
</vbox>
<vbox>
<hbox>
<label>
<text>"3: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint3"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"4: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint4"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"5: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint5"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
</vbox>
</hbox>
</labelframe>
</vbox>
<!-- create a space to the next element -->
<vbox>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",4)</font>
</label>
</hbox>
</vbox>
<vbox>
<relief>"ridge"</relief>
<bd>5</bd>
<button>
<halpin>"vismach-clear"</halpin>
<text>"vismach-clear"</text>
<bd>3</bd>
</button>
</vbox>
<vbox>
<checkbutton>
<halpin>"hide-work-piece-1"</halpin>
<text>"Hide work piece 1"</text>
</checkbutton>
<checkbutton>
<halpin>"hide-spindle-body"</halpin>
<text>"Hide spindle body"</text>
</checkbutton>
</vbox>
<!-- create a space to the next element -->
<vbox>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",4)</font>
</label>
</hbox>
</vbox>
<!-- create another vertical panel -->
<vbox>
<relief>"ridge"</relief>
<bd>5</bd>
<vbox>
<labelframe text="Spindle Offsets">
<font>("Helvetica",14)</font>
<hbox>
<label>
<text>"nutation-angle: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"nut-angle"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>55</initval>
<min_>0</min_>
<max_>90</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"y-pivot-length: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"y-pivot"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>50</initval>
<min_>0</min_>
<max_>300</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"z-pivot-length: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"z-pivot"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>120</initval>
<min_>0</min_>
<max_>300</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"x-offset: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"x-offset"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>0</initval>
<min_>-20</min_>
<max_>20</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"y-offset: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"y-offset"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>0</initval>
<min_>-20</min_>
<max_>40</max_>
</scale>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>" "</text>
</label>
</hbox>
<hbox>
<label>
<text>"Scale Coords: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"scale-coords"</halpin>
<resolution>0.05</resolution>
<orient>HORIZONTAL</orient>
<initval>1</initval>
<min_>0</min_>
<max_>2</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"Use hover + mouse wheel to change values"</text>
<font>("Helvetica",6)</font>
</label>
</hbox>
</labelframe>
</vbox>
<!-- create a space to the next element -->
<vbox>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",4)</font>
</label>
</hbox>
</vbox>
<vbox>
<hbox>
<label>
<text>" To test change values above\n reload and restart\n the demo gcode "</text>
<font>("Helvetica",10)</font>
</label>
</hbox>
</vbox>
</vbox>
</pyvcp>

View File

@@ -0,0 +1,32 @@
# switchkins pyvcp connections for:
# xyzbca-trsrn.ini
net :kinstype.is-0 <= kinstype.is-0 => pyvcp.multilabel.0.legend0
net :kinstype.is-1 <= kinstype.is-1 => pyvcp.multilabel.0.legend1
net :kinstype.is-2 <= kinstype.is-2 => pyvcp.multilabel.0.legend2
net :vismach-clear <= pyvcp.vismach-clear => vismach.plotclear
net :type0-button <= pyvcp.type0-button => halui.mdi-command-00
net :type1-button <= pyvcp.type1-button => halui.mdi-command-01
net :type2-button <= pyvcp.type2-button => halui.mdi-command-02
net :axis-x => pyvcp.joint0
net :axis-y => pyvcp.joint1
net :axis-z => pyvcp.joint2
net :rotary-a => pyvcp.joint3
net :rotary-b => pyvcp.joint4
net :hide-work-piece-1 <= pyvcp.hide-work-piece-1
net :hide-spindle-body <= pyvcp.hide-spindle-body
net :nutation-angle <= pyvcp.nut-angle-f
net :pivot-y <= pyvcp.y-pivot-f
net :pivot-z <= pyvcp.z-pivot-f
net :offset-x <= pyvcp.x-offset-f
net :offset-y <= pyvcp.y-offset-f
net :rot-axis-y <= tcp.y-rot-axis-f
net :rot-axis-z <= tcp.z-rot-axis-f
net :scale-coords <= pyvcp.scale-coords-f

View File

@@ -0,0 +1,16 @@
This is a simulation configuration for a 6 axis machine with the following kinematic:
XYZ - linear cartesian
B - table rotary
C - spindle rotary
A - spindle nutating
The spindle rotary assembly is fully configurable using sliders in the side panel of the gui
The kinematic component includes the following modes:
IDENTITY: Trivial kinematics with a one-to-one mapping of joints to axes
TCP: Coordinated xyz motion with rotation around the tool center point
TOOL: Coordinated xyz motion in the current tool coordinate system
Also see the README in the parent directory.

View File

@@ -0,0 +1,102 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<vbox>
<labelframe text="C Rotation Axis Offset">
<font>("Helvetica",14)</font>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>" "</text>
</label>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>"Physical location of rotation-axis in the model\n in absolute machine coordinates:"</text>
</label>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>" x: 1000\n z: -1000"</text>
</label>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>" "</text>
</label>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>"these are also the correct 'rot-axis' settings\n for this model"</text>
</label>
</hbox>
<hbox>
<label>
<text>"x-rot-axis: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"x-rot-axis"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>1000</initval>
<min_>-1900</min_>
<max_>1900</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"z-rot-axis: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"z-rot-axis"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>-2000</initval>
<min_>-2900</min_>
<max_>1100</max_>
</scale>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>" "</text>
</label>
</hbox>
<hbox>
<label>
<text>"Use hover + mouse wheel to change values"</text>
<font>("Helvetica",6)</font>
</label>
</hbox>
</labelframe>
</vbox>
<!-- create a space to the next element -->
<vbox>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",4)</font>
</label>
</hbox>
</vbox>
<vbox>
<hbox>
<label>
<text>" To test change values above\n reload and restart\n the demo gcode "</text>
<font>("Helvetica",10)</font>
</label>
</hbox>
</vbox>
</vbox>
</pyvcp>

View File

@@ -0,0 +1,632 @@
solid Part2
facet normal -1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
vertex -2.500000e+02 2.500000e+02 0.000000e+00
vertex -2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal -0.000000e+00 -1.000000e+00 0.000000e+00
outer loop
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
vertex -2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal 0.000000e+00 -1.000000e+00 0.000000e+00
outer loop
vertex 2.500000e+02 -2.500000e+02 0.000000e+00
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
vertex -2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex -2.500000e+02 2.500000e+02 0.000000e+00
vertex 2.500000e+02 -2.500000e+02 0.000000e+00
vertex -2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal 1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
vertex 2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal 1.000000e+00 0.000000e+00 -0.000000e+00
outer loop
vertex 2.500000e+02 2.500000e+02 0.000000e+00
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex -2.500000e+02 2.500000e+02 0.000000e+00
vertex 2.500000e+02 2.500000e+02 0.000000e+00
vertex 2.500000e+02 -2.500000e+02 0.000000e+00
endloop
endfacet
facet normal -1.000000e+00 -0.000000e+00 -0.000000e+00
outer loop
vertex -2.500000e+02 2.500000e+02 3.000000e+02
vertex -2.500000e+02 2.500000e+02 0.000000e+00
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 0.000000e+00 -7.071068e-01 7.071068e-01
outer loop
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
vertex -5.000000e+01 -5.000000e+01 5.000000e+02
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 0.000000e+00 -7.071068e-01 7.071068e-01
outer loop
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal -7.071068e-01 0.000000e+00 7.071068e-01
outer loop
vertex -5.000000e+01 -5.000000e+01 5.000000e+02
vertex -2.500000e+02 2.500000e+02 3.000000e+02
vertex -2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071067e-01 0.000000e+00 7.071069e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071067e-01 1.745782e-08 7.071068e-01
outer loop
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
vertex 2.006929e+02 -1.947439e+01 3.493071e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071067e-01 3.070633e-08 7.071068e-01
outer loop
vertex 2.006929e+02 -1.947439e+01 3.493071e+02
vertex 1.933181e+02 -3.631866e+01 3.566819e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071068e-01 3.842491e-08 7.071068e-01
outer loop
vertex 1.933181e+02 -3.631866e+01 3.566819e+02
vertex 1.821387e+02 -4.825789e+01 3.678613e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071068e-01 4.600219e-08 7.071068e-01
outer loop
vertex 1.821387e+02 -4.825789e+01 3.678613e+02
vertex 1.686644e+02 -5.367963e+01 3.813356e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071068e-01 5.675223e-08 7.071068e-01
outer loop
vertex 1.686644e+02 -5.367963e+01 3.813356e+02
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 7.071068e-01 6.583240e-08 7.071068e-01
outer loop
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
vertex 2.500000e+02 -2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 6.524362e-02 9.957342e-01 -6.524364e-02
outer loop
vertex 1.193599e+02 -5.185163e+01 3.599295e+02
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
vertex 1.333091e+02 -5.367963e+01 3.459802e+02
endloop
endfacet
facet normal 6.524360e-02 9.957342e-01 -6.524363e-02
outer loop
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
vertex 1.686644e+02 -5.367963e+01 3.813356e+02
vertex 1.333091e+02 -5.367963e+01 3.459802e+02
endloop
endfacet
facet normal -1.935088e-01 9.618257e-01 1.935089e-01
outer loop
vertex 1.686644e+02 -5.367963e+01 3.813356e+02
vertex 1.467833e+02 -4.825789e+01 3.325060e+02
vertex 1.333091e+02 -5.367963e+01 3.459802e+02
endloop
endfacet
facet normal 7.071067e-01 1.912466e-07 7.071068e-01
outer loop
vertex 1.467833e+02 -4.825789e+01 3.325060e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.333091e+02 -5.367963e+01 3.459802e+02
endloop
endfacet
facet normal 7.071070e-01 2.229500e-07 7.071066e-01
outer loop
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.193599e+02 -5.185163e+01 3.599295e+02
vertex 1.333091e+02 -5.367963e+01 3.459802e+02
endloop
endfacet
facet normal -1.935088e-01 9.618257e-01 1.935089e-01
outer loop
vertex 1.821387e+02 -4.825789e+01 3.678613e+02
vertex 1.467833e+02 -4.825789e+01 3.325060e+02
vertex 1.686644e+02 -5.367963e+01 3.813356e+02
endloop
endfacet
facet normal 3.151846e-01 8.951633e-01 -3.151847e-01
outer loop
vertex 1.068195e+02 -4.302078e+01 3.724698e+02
vertex 1.421749e+02 -4.302078e+01 4.078251e+02
vertex 1.193599e+02 -5.185163e+01 3.599295e+02
endloop
endfacet
facet normal 3.151847e-01 8.951632e-01 -3.151848e-01
outer loop
vertex 1.421749e+02 -4.302078e+01 4.078251e+02
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
vertex 1.193599e+02 -5.185163e+01 3.599295e+02
endloop
endfacet
facet normal 7.071067e-01 3.410209e-07 7.071069e-01
outer loop
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.068195e+02 -4.302078e+01 3.724698e+02
vertex 1.193599e+02 -5.185163e+01 3.599295e+02
endloop
endfacet
facet normal 7.071068e-01 3.664266e-08 7.071068e-01
outer loop
vertex 1.421749e+02 -4.302078e+01 4.078251e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
vertex 1.547152e+02 -5.185163e+01 3.952848e+02
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
vertex -5.000000e+01 2.500000e+02 5.000000e+02
vertex -5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal -7.071068e-01 0.000000e+00 7.071068e-01
outer loop
vertex -5.000000e+01 2.500000e+02 5.000000e+02
vertex -2.500000e+02 2.500000e+02 3.000000e+02
vertex -5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex -5.000000e+01 2.500000e+02 5.000000e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal 7.071068e-01 7.037430e-07 7.071068e-01
outer loop
vertex 1.421749e+02 -4.302078e+01 4.078251e+02
vertex 1.327370e+02 -2.837975e+01 4.172629e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal 7.071069e-01 -4.915623e-07 7.071066e-01
outer loop
vertex 1.327370e+02 -2.837975e+01 4.172629e+02
vertex 1.276764e+02 -9.905863e+00 4.223236e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal 7.071068e-01 -0.000000e+00 7.071068e-01
outer loop
vertex 1.276764e+02 -9.905863e+00 4.223236e+02
vertex 1.276764e+02 9.905863e+00 4.223236e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal 7.071068e-01 0.000000e+00 7.071068e-01
outer loop
vertex 1.276764e+02 9.905863e+00 4.223236e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 5.000000e+01 -5.000000e+01 5.000000e+02
endloop
endfacet
facet normal -4.261270e-01 7.980172e-01 4.261272e-01
outer loop
vertex 1.821387e+02 -4.825789e+01 3.678613e+02
vertex 1.579628e+02 -3.631866e+01 3.213266e+02
vertex 1.467833e+02 -4.825789e+01 3.325060e+02
endloop
endfacet
facet normal 7.071064e-01 -8.249345e-08 7.071072e-01
outer loop
vertex 1.579628e+02 -3.631866e+01 3.213266e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.467833e+02 -4.825789e+01 3.325060e+02
endloop
endfacet
facet normal -4.261273e-01 7.980170e-01 4.261273e-01
outer loop
vertex 1.933181e+02 -3.631866e+01 3.566819e+02
vertex 1.579628e+02 -3.631866e+01 3.213266e+02
vertex 1.821387e+02 -4.825789e+01 3.678613e+02
endloop
endfacet
facet normal 5.225582e-01 6.736956e-01 -5.225583e-01
outer loop
vertex 9.738170e+01 -2.837975e+01 3.819076e+02
vertex 1.327370e+02 -2.837975e+01 4.172629e+02
vertex 1.068195e+02 -4.302078e+01 3.724698e+02
endloop
endfacet
facet normal 5.225580e-01 6.736957e-01 -5.225583e-01
outer loop
vertex 1.327370e+02 -2.837975e+01 4.172629e+02
vertex 1.421749e+02 -4.302078e+01 4.078251e+02
vertex 1.068195e+02 -4.302078e+01 3.724698e+02
endloop
endfacet
facet normal 7.071067e-01 2.969849e-07 7.071068e-01
outer loop
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 9.738170e+01 -2.837975e+01 3.819076e+02
vertex 1.068195e+02 -4.302078e+01 3.724698e+02
endloop
endfacet
facet normal -6.011944e-01 5.264319e-01 6.011944e-01
outer loop
vertex 1.933181e+02 -3.631866e+01 3.566819e+02
vertex 1.653375e+02 -1.947439e+01 3.139518e+02
vertex 1.579628e+02 -3.631866e+01 3.213266e+02
endloop
endfacet
facet normal 7.071068e-01 6.091928e-07 7.071068e-01
outer loop
vertex 1.653375e+02 -1.947439e+01 3.139518e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.579628e+02 -3.631866e+01 3.213266e+02
endloop
endfacet
facet normal -6.011941e-01 5.264323e-01 6.011944e-01
outer loop
vertex 2.006929e+02 -1.947439e+01 3.493071e+02
vertex 1.653375e+02 -1.947439e+01 3.139518e+02
vertex 1.933181e+02 -3.631866e+01 3.566819e+02
endloop
endfacet
facet normal 6.593572e-01 3.612418e-01 -6.593575e-01
outer loop
vertex 9.232107e+01 -9.905863e+00 3.869683e+02
vertex 1.276764e+02 -9.905863e+00 4.223236e+02
vertex 9.738170e+01 -2.837975e+01 3.819076e+02
endloop
endfacet
facet normal 6.593574e-01 3.612416e-01 -6.593575e-01
outer loop
vertex 1.276764e+02 -9.905863e+00 4.223236e+02
vertex 1.327370e+02 -2.837975e+01 4.172629e+02
vertex 9.738170e+01 -2.837975e+01 3.819076e+02
endloop
endfacet
facet normal 7.071069e-01 -1.940928e-07 7.071066e-01
outer loop
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 9.232107e+01 -9.905863e+00 3.869683e+02
vertex 9.738170e+01 -2.837975e+01 3.819076e+02
endloop
endfacet
facet normal -6.950667e-01 1.837499e-01 6.950670e-01
outer loop
vertex 2.006929e+02 -1.947439e+01 3.493071e+02
vertex 1.679117e+02 -1.781979e-14 3.113776e+02
vertex 1.653375e+02 -1.947439e+01 3.139518e+02
endloop
endfacet
facet normal 7.071065e-01 -4.679821e-07 7.071071e-01
outer loop
vertex 1.679117e+02 -1.781979e-14 3.113776e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.653375e+02 -1.947439e+01 3.139518e+02
endloop
endfacet
facet normal -6.950670e-01 1.837494e-01 6.950670e-01
outer loop
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
vertex 1.679117e+02 -1.781979e-14 3.113776e+02
vertex 2.006929e+02 -1.947439e+01 3.493071e+02
endloop
endfacet
facet normal 7.071066e-01 0.000000e+00 -7.071069e-01
outer loop
vertex 9.232107e+01 9.905863e+00 3.869683e+02
vertex 1.276764e+02 9.905863e+00 4.223236e+02
vertex 9.232107e+01 -9.905863e+00 3.869683e+02
endloop
endfacet
facet normal 7.071066e-01 0.000000e+00 -7.071069e-01
outer loop
vertex 1.276764e+02 9.905863e+00 4.223236e+02
vertex 1.276764e+02 -9.905863e+00 4.223236e+02
vertex 9.232107e+01 -9.905863e+00 3.869683e+02
endloop
endfacet
facet normal 7.071069e-01 0.000000e+00 7.071066e-01
outer loop
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 9.232107e+01 9.905863e+00 3.869683e+02
vertex 9.232107e+01 -9.905863e+00 3.869683e+02
endloop
endfacet
facet normal -6.950669e-01 -1.837499e-01 6.950669e-01
outer loop
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
vertex 1.653375e+02 1.947439e+01 3.139518e+02
vertex 1.679117e+02 -1.781979e-14 3.113776e+02
endloop
endfacet
facet normal 7.071065e-01 4.679821e-07 7.071071e-01
outer loop
vertex 1.653375e+02 1.947439e+01 3.139518e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
vertex 1.679117e+02 -1.781979e-14 3.113776e+02
endloop
endfacet
facet normal -6.950668e-01 -1.837494e-01 6.950671e-01
outer loop
vertex 2.006929e+02 1.947439e+01 3.493071e+02
vertex 1.653375e+02 1.947439e+01 3.139518e+02
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
endloop
endfacet
facet normal 7.071069e-01 1.940928e-07 7.071066e-01
outer loop
vertex 9.738170e+01 2.837975e+01 3.819076e+02
vertex 9.232107e+01 9.905863e+00 3.869683e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071070e-01 -2.229500e-07 7.071066e-01
outer loop
vertex 1.333091e+02 5.367963e+01 3.459802e+02
vertex 1.193599e+02 5.185163e+01 3.599295e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071067e-01 -3.410209e-07 7.071069e-01
outer loop
vertex 1.193599e+02 5.185163e+01 3.599295e+02
vertex 1.068195e+02 4.302078e+01 3.724698e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071067e-01 -2.969849e-07 7.071068e-01
outer loop
vertex 1.068195e+02 4.302078e+01 3.724698e+02
vertex 9.738170e+01 2.837975e+01 3.819076e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071068e-01 -6.091928e-07 7.071068e-01
outer loop
vertex 1.653375e+02 1.947439e+01 3.139518e+02
vertex 1.579628e+02 3.631866e+01 3.213266e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071064e-01 8.249345e-08 7.071072e-01
outer loop
vertex 1.579628e+02 3.631866e+01 3.213266e+02
vertex 1.467833e+02 4.825789e+01 3.325060e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071067e-01 -1.912466e-07 7.071068e-01
outer loop
vertex 1.467833e+02 4.825789e+01 3.325060e+02
vertex 1.333091e+02 5.367963e+01 3.459802e+02
vertex 1.297918e+02 -4.615752e-15 3.494975e+02
endloop
endfacet
facet normal 7.071067e-01 -1.745782e-08 7.071068e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.006929e+02 1.947439e+01 3.493071e+02
vertex 2.032670e+02 -6.905210e-16 3.467330e+02
endloop
endfacet
facet normal 6.593573e-01 -3.612418e-01 -6.593575e-01
outer loop
vertex 9.738170e+01 2.837975e+01 3.819076e+02
vertex 1.327370e+02 2.837975e+01 4.172629e+02
vertex 9.232107e+01 9.905863e+00 3.869683e+02
endloop
endfacet
facet normal 6.593573e-01 -3.612416e-01 -6.593576e-01
outer loop
vertex 1.327370e+02 2.837975e+01 4.172629e+02
vertex 1.276764e+02 9.905863e+00 4.223236e+02
vertex 9.232107e+01 9.905863e+00 3.869683e+02
endloop
endfacet
facet normal 7.071073e-01 3.038186e-07 7.071063e-01
outer loop
vertex 1.327370e+02 2.837975e+01 4.172629e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 1.276764e+02 9.905863e+00 4.223236e+02
endloop
endfacet
facet normal -6.011943e-01 -5.264319e-01 6.011945e-01
outer loop
vertex 2.006929e+02 1.947439e+01 3.493071e+02
vertex 1.579628e+02 3.631866e+01 3.213266e+02
vertex 1.653375e+02 1.947439e+01 3.139518e+02
endloop
endfacet
facet normal 7.071067e-01 -3.070633e-08 7.071068e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 1.933181e+02 3.631866e+01 3.566819e+02
vertex 2.006929e+02 1.947439e+01 3.493071e+02
endloop
endfacet
facet normal -6.011942e-01 -5.264323e-01 6.011942e-01
outer loop
vertex 1.933181e+02 3.631866e+01 3.566819e+02
vertex 1.579628e+02 3.631866e+01 3.213266e+02
vertex 2.006929e+02 1.947439e+01 3.493071e+02
endloop
endfacet
facet normal 5.225581e-01 -6.736956e-01 -5.225584e-01
outer loop
vertex 1.068195e+02 4.302078e+01 3.724698e+02
vertex 1.421749e+02 4.302078e+01 4.078251e+02
vertex 9.738170e+01 2.837975e+01 3.819076e+02
endloop
endfacet
facet normal 5.225581e-01 -6.736957e-01 -5.225582e-01
outer loop
vertex 1.421749e+02 4.302078e+01 4.078251e+02
vertex 1.327370e+02 2.837975e+01 4.172629e+02
vertex 9.738170e+01 2.837975e+01 3.819076e+02
endloop
endfacet
facet normal 7.071065e-01 -3.015717e-07 7.071071e-01
outer loop
vertex 1.421749e+02 4.302078e+01 4.078251e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 1.327370e+02 2.837975e+01 4.172629e+02
endloop
endfacet
facet normal -4.261271e-01 -7.980172e-01 4.261271e-01
outer loop
vertex 1.933181e+02 3.631866e+01 3.566819e+02
vertex 1.467833e+02 4.825789e+01 3.325060e+02
vertex 1.579628e+02 3.631866e+01 3.213266e+02
endloop
endfacet
facet normal 7.071068e-01 -3.842491e-08 7.071068e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 1.821387e+02 4.825789e+01 3.678613e+02
vertex 1.933181e+02 3.631866e+01 3.566819e+02
endloop
endfacet
facet normal -4.261272e-01 -7.980170e-01 4.261274e-01
outer loop
vertex 1.821387e+02 4.825789e+01 3.678613e+02
vertex 1.467833e+02 4.825789e+01 3.325060e+02
vertex 1.933181e+02 3.631866e+01 3.566819e+02
endloop
endfacet
facet normal 3.151846e-01 -8.951633e-01 -3.151847e-01
outer loop
vertex 1.193599e+02 5.185163e+01 3.599295e+02
vertex 1.547152e+02 5.185163e+01 3.952848e+02
vertex 1.068195e+02 4.302078e+01 3.724698e+02
endloop
endfacet
facet normal 3.151847e-01 -8.951632e-01 -3.151848e-01
outer loop
vertex 1.547152e+02 5.185163e+01 3.952848e+02
vertex 1.421749e+02 4.302078e+01 4.078251e+02
vertex 1.068195e+02 4.302078e+01 3.724698e+02
endloop
endfacet
facet normal 7.071068e-01 -9.688457e-09 7.071068e-01
outer loop
vertex 1.547152e+02 5.185163e+01 3.952848e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 1.421749e+02 4.302078e+01 4.078251e+02
endloop
endfacet
facet normal -1.935088e-01 -9.618257e-01 1.935089e-01
outer loop
vertex 1.821387e+02 4.825789e+01 3.678613e+02
vertex 1.333091e+02 5.367963e+01 3.459802e+02
vertex 1.467833e+02 4.825789e+01 3.325060e+02
endloop
endfacet
facet normal 7.071068e-01 -4.600219e-08 7.071068e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 1.686644e+02 5.367963e+01 3.813356e+02
vertex 1.821387e+02 4.825789e+01 3.678613e+02
endloop
endfacet
facet normal -1.935088e-01 -9.618257e-01 1.935089e-01
outer loop
vertex 1.686644e+02 5.367963e+01 3.813356e+02
vertex 1.333091e+02 5.367963e+01 3.459802e+02
vertex 1.821387e+02 4.825789e+01 3.678613e+02
endloop
endfacet
facet normal 6.524362e-02 -9.957342e-01 -6.524364e-02
outer loop
vertex 1.333091e+02 5.367963e+01 3.459802e+02
vertex 1.686644e+02 5.367963e+01 3.813356e+02
vertex 1.193599e+02 5.185163e+01 3.599295e+02
endloop
endfacet
facet normal 6.524361e-02 -9.957342e-01 -6.524362e-02
outer loop
vertex 1.686644e+02 5.367963e+01 3.813356e+02
vertex 1.547152e+02 5.185163e+01 3.952848e+02
vertex 1.193599e+02 5.185163e+01 3.599295e+02
endloop
endfacet
facet normal 7.071068e-01 -3.417517e-08 7.071068e-01
outer loop
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 1.547152e+02 5.185163e+01 3.952848e+02
endloop
endfacet
facet normal 7.071068e-01 -5.675223e-08 7.071068e-01
outer loop
vertex 1.686644e+02 5.367963e+01 3.813356e+02
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 1.547152e+02 5.185163e+01 3.952848e+02
endloop
endfacet
facet normal 0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex -2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.500000e+02 2.500000e+02 0.000000e+00
vertex -2.500000e+02 2.500000e+02 0.000000e+00
endloop
endfacet
facet normal -0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex -2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex 2.500000e+02 2.500000e+02 0.000000e+00
endloop
endfacet
facet normal -0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex -5.000000e+01 2.500000e+02 5.000000e+02
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex -2.500000e+02 2.500000e+02 3.000000e+02
endloop
endfacet
facet normal 0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex 5.000000e+01 2.500000e+02 5.000000e+02
vertex 2.500000e+02 2.500000e+02 3.000000e+02
vertex -2.500000e+02 2.500000e+02 3.000000e+02
endloop
endfacet
endsolid

View File

@@ -0,0 +1,287 @@
[EMC]
VERSION = 1.1
MACHINE = xyzbca-trsrn (switchkins)
DEBUG = 0
[DISPLAY]
EMBED_TAB_NAME = TCP
EMBED_TAB_COMMAND = pyvcp pyvcp_embed_tab_tcp.xml
GEOMETRY = XYZABC
OPEN_FILE = ../demos/incremental_repetition.ngc
PYVCP = ./xyzbca-trsrn.xml
JOG_AXES = XYZABC
DISPLAY = axis
MAX_ANGULAR_VELOCITY = 360
MAX_LINEAR_VELOCITY = 1500
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2
PROGRAM_PREFIX = ../demos
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 1
#EDITOR = gedit
TOOL_EDITOR = tooledit z diam
TKPKG = Ngcgui 1.0
NGCGUI_FONT = Helvetica -12 normal
[RS274NGC]
RS274NGC_STARTUP_CODE = G17 G21 G40 G49 G54 G64 P0.001 G80 G90 G92.1 G94 G97 G98
#ON_ABORT_COMMAND = o <on_abort_no_twp_reset> call
ON_ABORT_COMMAND = o <on_abort_with_twp_reset> call
SUBROUTINE_PATH = ../remap_subs:../demos
HAL_PIN_VARS = 1
REMAP = M428 modalgroup=10 ngc=428remap
REMAP = M429 modalgroup=10 ngc=429remap
REMAP = M430 modalgroup=10 ngc=430remap
REMAP = G53.1 modalgroup=1 argspec=p ngc=g531remap
REMAP = G53.3 modalgroup=1 argspec=pxyz ngc=g533remap
REMAP = G53.6 modalgroup=1 argspec=p ngc=g536remap
REMAP = M530 modalgroup=10 python=g53x_core
REMAP = G68.2 modalgroup=1 argspec=pqxyzijkr python=g682
REMAP = G68.3 modalgroup=1 argspec=xyzr python=g683
REMAP = G68.4 modalgroup=1 argspec=pqxyzijkr python=g684
REMAP = G69 modalgroup=1 ngc=g69remap
REMAP = M469 modalgroup=10 python=g69_core
PARAMETER_FILE = xyzbca-trsrn.var
[PYTHON]
# where to find the Python code:
# code specific for this configuration
PATH_APPEND = ../python
# import the following Python module
TOPLEVEL = ../python/toplevel.py
# the higher the more verbose tracing of the Python plugin
LOG_LEVEL = 3
[KINS]
KINEMATICS = xyzbca_trsrn
JOINTS = 6
[TWP]
# this defines the primary spindle rotation
PRIMARY = C
# this defines the secnodary spindle rotation (ie the one closest to the tool)
SECONDARY = A
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
POSTGUI_HALFILE = xyzbca-trsrn_postgui.hal
# signal reflecting twp states (0=undefined, 1=defined, 2=active)
HALCMD = net twp-status <= motion.analog-out-02
# connection required for control of motion.switchkins-type
HALCMD = net :kinstype-select <= motion.analog-out-03 => motion.switchkins-type
# connections required for the kinematics component
HALCMD = net :tool-offset motion.tooloffset.z xyzbca_trsrn_kins.tool-offset-z
HALCMD = net :rot-axis-x xyzbca_trsrn_kins.x-rot-axis
HALCMD = net :rot-axis-z xyzbca_trsrn_kins.z-rot-axis
HALCMD = net :nutation-angle xyzbca_trsrn_kins.nut-angle
HALCMD = net :pivot-x xyzbca_trsrn_kins.x-pivot
HALCMD = net :pivot-z xyzbca_trsrn_kins.z-pivot
HALCMD = net :offset-x xyzbca_trsrn_kins.x-offset
HALCMD = net :offset-y xyzbca_trsrn_kins.y-offset
# load the required twp-helper component and its hal connections
HALCMD = loadusr -W ../python/twp-helper-comp.py
#twp-status
HALCMD = net twp-status => twp-helper-comp.twp-status
HALCMD = net twp-is-defined <= twp-helper-comp.twp-is-defined
HALCMD = net twp-is-active <= twp-helper-comp.twp-is-active
# current twp parameters
HALCMD = net twp-ox-world <= twp-helper-comp.twp-ox-world
HALCMD = net twp-oy-world <= twp-helper-comp.twp-oy-world
HALCMD = net twp-oz-world <= twp-helper-comp.twp-oz-world
HALCMD = net twp-ox <= twp-helper-comp.twp-ox
HALCMD = net twp-oy <= twp-helper-comp.twp-oy
HALCMD = net twp-oz <= twp-helper-comp.twp-oz
HALCMD = net twp-zx <= twp-helper-comp.twp-zx
HALCMD = net twp-zy <= twp-helper-comp.twp-zy
HALCMD = net twp-zz <= twp-helper-comp.twp-zz
HALCMD = net twp-xx <= twp-helper-comp.twp-xx
HALCMD = net twp-xy <= twp-helper-comp.twp-xy
HALCMD = net twp-xz <= twp-helper-comp.twp-xz
# load the optional vismach-gui and its hal connections
HALCMD = loadusr -W ../vismach/xyzbca-trsrn-gui.py
HALCMD = net :axis-x joint.0.pos-fb xyzbca-trsrn-gui.axis_x
HALCMD = net :axis-y joint.1.pos-fb xyzbca-trsrn-gui.axis_y
HALCMD = net :axis-z joint.2.pos-fb xyzbca-trsrn-gui.axis_z
HALCMD = net :rotary-a joint.3.pos-fb xyzbca-trsrn-gui.rotary_a
HALCMD = net :rotary-b joint.4.pos-fb xyzbca-trsrn-gui.rotary_b
HALCMD = net :rotary-c joint.5.pos-fb xyzbca-trsrn-gui.rotary_c
HALCMD = net :tool-diam halui.tool.diameter xyzbca-trsrn-gui.tool_diameter
HALCMD = net :tool-offset xyzbca-trsrn-gui.tool_length
HALCMD = net :kinstype-select xyzbca-trsrn-gui.kinstype_select
HALCMD = net :nutation-angle xyzbca-trsrn-gui.nutation_angle
HALCMD = net :pivot-x xyzbca-trsrn-gui.pivot_x
HALCMD = net :pivot-z xyzbca-trsrn-gui.pivot_z
HALCMD = net :offset-x xyzbca-trsrn-gui.offset_x
HALCMD = net :offset-y xyzbca-trsrn-gui.offset_y
HALCMD = net :rot-axis-x xyzbca-trsrn-gui.rot_axis_x
HALCMD = net :rot-axis-z xyzbca-trsrn-gui.rot_axis_z
HALCMD = net :hide-work-piece-1 xyzbca-trsrn-gui.hide_work_piece_1
HALCMD = net :hide-spindle-body xyzbca-trsrn-gui.hide_spindle_body
HALCMD = net :scale-coords xyzbca-trsrn-gui.scale_coords
HALCMD = net twp-ox-world xyzbca-trsrn-gui.twp_ox_world
HALCMD = net twp-oy-world xyzbca-trsrn-gui.twp_oy_world
HALCMD = net twp-oz-world xyzbca-trsrn-gui.twp_oz_world
HALCMD = net twp-ox xyzbca-trsrn-gui.twp_ox
HALCMD = net twp-oy xyzbca-trsrn-gui.twp_oy
HALCMD = net twp-oz xyzbca-trsrn-gui.twp_oz
HALCMD = net twp-zx xyzbca-trsrn-gui.twp_zx
HALCMD = net twp-zy xyzbca-trsrn-gui.twp_zy
HALCMD = net twp-zz xyzbca-trsrn-gui.twp_zz
HALCMD = net twp-xx xyzbca-trsrn-gui.twp_xx
HALCMD = net twp-xy xyzbca-trsrn-gui.twp_xy
HALCMD = net twp-xz xyzbca-trsrn-gui.twp_xz
HALCMD = net twp-status xyzbca-trsrn-gui.twp_status
HALCMD = net twp-is-defined xyzbca-trsrn-gui.twp_defined
HALCMD = net twp-is-active xyzbca-trsrn-gui.twp_active
[HALUI]
# NOTE: kinstype==0 is identity kins because sparm=identityfirst
# M428:identity kins (motion.switchkins-type==0 startupDEFAULT)
# M429: tcp kins (motion.switchkins-type==1)
# M430: tool kins (motion.switchkins-type==2)
MDI_COMMAND = M428
MDI_COMMAND = M429
MDI_COMMAND = M430
[TRAJ]
COORDINATES = XYZABC
LINEAR_UNITS = mm
ANGULAR_UNITS = deg
DEFAULT_LINEAR_VELOCITY = 100
MAX_LINEAR_VELOCITY = 120
MAX_LINEAR_ACCELERATION = 700
DEFAULT_LINEAR_ACCELERATION = 300
[EMCMOT]
EMCMOT = motmod
SERVO_PERIOD = 1000000
COMM_TIMEOUT = 1
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[EMCIO]
TOOL_TABLE = xyzbca-trsrn.tbl
[AXIS_X]
MIN_LIMIT = -5000
MAX_LIMIT = 5000
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
[AXIS_Y]
MIN_LIMIT = -5000
MAX_LIMIT = 5000
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
[AXIS_Z]
MIN_LIMIT = -5000
MAX_LIMIT = 5000
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
# spindle secondary axis
[AXIS_A]
MIN_LIMIT = -185
MAX_LIMIT = 185
MAX_VELOCITY = 30
MAX_ACCELERATION = 300
# table rotary axis
[AXIS_B]
MIN_LIMIT = -360
MAX_LIMIT = 360
MAX_VELOCITY = 30
MAX_ACCELERATION = 302
# spindle primary rotating axis
[AXIS_C]
MIN_LIMIT = -320
MAX_LIMIT = 320
MAX_VELOCITY = 30
MAX_ACCELERATION = 301
[JOINT_0]
TYPE = LINEAR
HOME = 0
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
MIN_LIMIT = -5000
MAX_LIMIT = 5000
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0
[JOINT_1]
TYPE = LINEAR
HOME = 0
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
MIN_LIMIT = -5000
MAX_LIMIT = 5000
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0
[JOINT_2]
TYPE = LINEAR
HOME = 0
MAX_VELOCITY = 200
MAX_ACCELERATION = 700
MIN_LIMIT = -5000
MAX_LIMIT = 5000
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0
# spindle secondary joint
[JOINT_3]
TYPE = ANGULAR
HOME = 0
MAX_VELOCITY = 30
MAX_ACCELERATION = 300
MIN_LIMIT = -185
MAX_LIMIT = 185
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0
# table rotating joint
[JOINT_4]
TYPE = ANGULAR
HOME = 0
MAX_VELOCITY = 30
MAX_ACCELERATION = 300
MIN_LIMIT = -360
MAX_LIMIT = 360
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0
# spindle primary joint
[JOINT_5]
TYPE = ANGULAR
HOME = 0
MAX_VELOCITY = 30
MAX_ACCELERATION = 300
MIN_LIMIT = -320
MAX_LIMIT = 320
HOME_SEARCH_VEL = 0
HOME_SEQUENCE = 0

View File

@@ -0,0 +1,4 @@
T1 P1 D1
T2 P2 Z50 D8
T3 P3 Z100 D20
T4 P4 Z120 D40

View File

@@ -0,0 +1,301 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<relief>"ridge"</relief>
<bd>5</bd>
<label>
<text>"SWITCHKINS"</text>
<relief>RIDGE</relief>
<bd>3</bd>
</label>
<multilabel>
<legends>["0: IDENTITY", "1: TCP ", "2: TOOL "]</legends>
<font>("Helvetica",16)</font>
<bg>"black"</bg>
<fg>"yellow"</fg>
</multilabel>
<button>
<halpin>"type0-button"</halpin>
<text>" IDENTITY "</text>
<bd>3</bd>
</button>
<button>
<halpin>"type1-button"</halpin>
<text>" TCP "</text>
<bd>3</bd>
</button>
<button>
<halpin>"type2-button"</halpin>
<text>" TOOL "</text>
<bd>3</bd>
</button>
<!-- create a space to the next element -->
<vbox>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",4)</font>
</label>
</hbox>
</vbox>
<vbox>
<labelframe text="Joint position">
<font>("Helvetica",14)</font>
<hbox>
<vbox>
<hbox>
<label>
<text>"0: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint0"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"1: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint1"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"2: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint2"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
</vbox>
<vbox>
<label>
<text>" "</text>
<font>("Helvetica",10)</font>
</label>
</vbox>
<vbox>
<hbox>
<label>
<text>"3: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint3"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"4: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint4"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"5: "</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"joint5"</halpin>
<font>("Helvetica",10)</font>
<format>"4.4f"</format>
</number>
</hbox>
</vbox>
</hbox>
</labelframe>
</vbox>
<!-- create a space to the next element -->
<vbox>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",4)</font>
</label>
</hbox>
</vbox>
<vbox>
<relief>"ridge"</relief>
<bd>5</bd>
<button>
<halpin>"vismach-clear"</halpin>
<text>"vismach-clear"</text>
<bd>3</bd>
</button>
</vbox>
<vbox>
<checkbutton>
<halpin>"hide-work-piece-1"</halpin>
<text>"Hide work piece 1"</text>
</checkbutton>
<checkbutton>
<halpin>"hide-spindle-body"</halpin>
<text>"Hide spindle body"</text>
</checkbutton>
</vbox>
<!-- create a space to the next element -->
<vbox>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",4)</font>
</label>
</hbox>
</vbox>
<!-- create another vertical panel -->
<vbox>
<relief>"ridge"</relief>
<bd>5</bd>
<vbox>
<labelframe text="Spindle Offsets">
<font>("Helvetica",14)</font>
<hbox>
<label>
<text>"nutation-angle: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"nut-angle"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>55</initval>
<min_>0</min_>
<max_>90</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"x-pivot-length: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"x-pivot"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>50</initval>
<min_>0</min_>
<max_>300</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"z-pivot-length: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"z-pivot"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>120</initval>
<min_>0</min_>
<max_>300</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"x-offset: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"x-offset"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>0</initval>
<min_>-20</min_>
<max_>20</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"y-offset: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"y-offset"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>0</initval>
<min_>-20</min_>
<max_>40</max_>
</scale>
</hbox>
<hbox>
<label>
<font>("Helvetica",8)</font>
<text>" "</text>
</label>
</hbox>
<hbox>
<label>
<text>"Scale Coords: "</text>
<font>("Helvetica",10)</font>
</label>
<scale>
<font>("Helvetica",10)</font>
<width>"12"</width>
<halpin>"scale-coords"</halpin>
<resolution>0.05</resolution>
<orient>HORIZONTAL</orient>
<initval>1</initval>
<min_>0</min_>
<max_>2</max_>
</scale>
</hbox>
<hbox>
<label>
<text>"Use hover + mouse wheel to change values"</text>
<font>("Helvetica",6)</font>
</label>
</hbox>
</labelframe>
</vbox>
<!-- create a space to the next element -->
<vbox>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",4)</font>
</label>
</hbox>
</vbox>
<vbox>
<hbox>
<label>
<text>" To test change values above\n reload and restart\n the demo gcode "</text>
<font>("Helvetica",10)</font>
</label>
</hbox>
</vbox>
</vbox>
</pyvcp>

View File

@@ -0,0 +1,32 @@
# switchkins pyvcp connections for:
# xyzbca-trsrn.ini
net :kinstype.is-0 <= kinstype.is-0 => pyvcp.multilabel.0.legend0
net :kinstype.is-1 <= kinstype.is-1 => pyvcp.multilabel.0.legend1
net :kinstype.is-2 <= kinstype.is-2 => pyvcp.multilabel.0.legend2
net :vismach-clear <= pyvcp.vismach-clear => vismach.plotclear
net :type0-button <= pyvcp.type0-button => halui.mdi-command-00
net :type1-button <= pyvcp.type1-button => halui.mdi-command-01
net :type2-button <= pyvcp.type2-button => halui.mdi-command-02
net :axis-x => pyvcp.joint0
net :axis-y => pyvcp.joint1
net :axis-z => pyvcp.joint2
net :rotary-a => pyvcp.joint3
net :rotary-b => pyvcp.joint4
net :hide-work-piece-1 <= pyvcp.hide-work-piece-1
net :hide-spindle-body <= pyvcp.hide-spindle-body
net :nutation-angle <= pyvcp.nut-angle-f
net :pivot-x <= pyvcp.x-pivot-f
net :pivot-z <= pyvcp.z-pivot-f
net :offset-x <= pyvcp.x-offset-f
net :offset-y <= pyvcp.y-offset-f
net :rot-axis-x <= tcp.x-rot-axis-f
net :rot-axis-z <= tcp.z-rot-axis-f
net :scale-coords <= pyvcp.scale-coords-f