资源简介
laserengraver,一个激光扩展

代码片段和文件信息
#!/usr/bin/env python
‘‘‘
dxf_input.py - input a DXF file >= (AutoCAD Release 13 == AC1012)
Copyright (C) 2008 2009 Alvin Penner penner@vaxxine.com
Copyright (C) 2009 Christian Mayer inkscape@christianmayer.de
- thanks to Aaron Spike for inkex.py and simplestyle.py
- without which this would not have been possible
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. 59 Temple Place Suite 330 Boston MA 02111-1307 USA
‘‘‘
import inkex simplestyle math
from StringIO import StringIO
from urllib import quote
def export_MTEXT():
# mandatory group codes : (1 or 3 10 20) (text x y)
if (vals[groups[‘1‘]] or vals[groups[‘3‘]]) and vals[groups[‘10‘]] and vals[groups[‘20‘]]:
x = vals[groups[‘10‘]][0]
y = vals[groups[‘20‘]][0]
# optional group codes : (21 40 50) (direction text height mm text angle)
size = 12 # default fontsize in px
if vals[groups[‘40‘]]:
size = scale*vals[groups[‘40‘]][0]
attribs = {‘x‘: ‘%f‘ % x ‘y‘: ‘%f‘ % y ‘style‘: ‘font-size: %.1fpx; fill: %s‘ % (size color)}
angle = 0 # default angle in degrees
if vals[groups[‘50‘]]:
angle = vals[groups[‘50‘]][0]
attribs.update({‘transform‘: ‘rotate (%f %f %f)‘ % (-angle x y)})
elif vals[groups[‘21‘]]:
if vals[groups[‘21‘]][0] == 1.0:
attribs.update({‘transform‘: ‘rotate (%f %f %f)‘ % (-90 x y)})
elif vals[groups[‘21‘]][0] == -1.0:
attribs.update({‘transform‘: ‘rotate (%f %f %f)‘ % (90 x y)})
attribs.update({inkex.addNS(‘linespacing‘‘sodipodi‘): ‘125%‘})
node = inkex.etree.SubElement(layer ‘text‘ attribs)
text = ‘‘
if vals[groups[‘3‘]]:
for i in range (0 len(vals[groups[‘3‘]])):
text += vals[groups[‘3‘]][i]
if vals[groups[‘1‘]]:
text += vals[groups[‘1‘]][0]
found = text.find(‘\P‘) # new line
while found > -1:
tspan = inkex.etree.SubElement(node ‘tspan‘ {inkex.addNS(‘role‘‘sodipodi‘): ‘line‘})
tspan.text = text[:found]
text = text[(found+2):]
found = text.find(‘\P‘)
tspan = inkex.etree.SubElement(node ‘tspan‘ {inkex.addNS(‘role‘‘sodipodi‘): ‘line‘})
tspan.text = text
def export_POINT():
# mandatory group codes : (10 20) (
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1800 2011-03-05 15:04 dxf_input.inx
文件 24775 2011-03-05 15:04 dxf_input.py
文件 143951 2011-03-16 07:17 laserengraver.py
文件 1771 2011-03-16 07:17 laserengraver_laser.inx
相关资源
- IAR-Keygen-2019+附使用教程.zip
-
st
yles 引文样式语言( CSL ) 引文样 - flash as3 多点触控-缩放-旋转-滑动.zi
- IMX385驱动代码.zip
- sony_imx385.zip
- Origin2019最新中文版用户入门使用手册
- ucosII源代码 2.9版本全 Micrium-uCOS-II-V
- SX1301 +sx1255 GATEWAY.zip
- SX126x_LORA驱动程序(包含完整的工程文
- STM32 DS3231驱动.zip
- 7-zip压缩包
- EC20相关.zip
- 21天学会嵌入式开发STM32.zip
- Intel(R) 82579V网卡驱动for server20033
- 企业工资管理系统.zip
- OdooHotelManagementSystem 基于Odoo的酒店管
- 代码项目“生成”微博、知乎、
- 迅雷敏感资源限制解除小工具.zip
- 美松打印机SDK MsPrintSDK-Demo-DLL-CShare-
- BullZip PDF Printer v10.10.0.2307 官方版
- 今日头条源码.zip
- teleportultra_22658.zip
-
Notepad++xm
l格式化插件和json格式化插 - Surface pro 7 SD卡固定硬盘X64驱动带数字
- 解决方案-超过100帧/秒的速度从单色摄
- DMA+stm32 407.zip
- 4_USART串口通信(空闲中断+DMA.zip
- AutoCAD v2016 官方.zip
- Elsevier爱思唯尔的word模板.zip
- u014556429_10418431.zip
评论
共有 条评论