现实测量遇到图纸坐标y值8位,与坐标Y值6位不一致,应该怎样解决
1个回答
展开全部
代码给你,是三维坐标对齐的,二维的也能用用记事本存为DUCS.LSP加载运行即可!
(defun c:ducs()
(setq os (getvar "osmode"))
(setq cm (getvar "cmdecho"))
(setvar "osmode" 9)
(setvar "cmdecho" 0)
(command "ucs" "w")
(setq p1 (getpoint "\n请选取第一点P1:"))
(setq p2 (getpoint "\n请选取第二点P2:"))
(setq p3 (getpoint "\n请选取第三点P3:"))
(setvar "osmode" 0)
(initget 1 )
(setq s1 (getpoint "\n请输入第一点P1实际坐标x1,y1,z1:"))
(initget 1 )
(setq s2 (getpoint "\n请输入第二点P2实际坐标x2,y2,z2:"))
(initget 1 )
(setq s3 (getpoint "\n请输入第三点P3实际坐标x3,y3,z3:"))
(setq l1 (distance p1 p2))
(setq l2 (distance s1 s2))
(setq x "Yes")
(if (> (abs (- l1 l2)) 1);误差控制
(progn
(alert "数据误差较大请点{确定}后选择是否继续")
(initget 1 "Yes No")
(setq x (getkword "\n是否继续? (Yes 或 No)"))
)
)
(IF (= "Yes" X)
(progn
(setq ltm (ssadd))
(command "line" "0,0,0" "1,0,0" "")
(ssadd (entlast) ltm)
(command "line" "0,0,0" "0,1,0" "")
(ssadd (entlast) ltm)
(command "align" ltm "" s1 p1 s2 p2 s3 p3)
(setq LINDAT (ssname ltm 0))
(setq LINdate (entget LINDAT))
(setq uc1 (cdr (assoc '10 LINdate)))
(setq uc2 (cdr (assoc '11 LINdate)))
(setq LINDAT (ssname ltm 1))
(setq LINdate (entget LINDAT))
(setq uc3 (cdr (assoc '11 LINdate)))
(command "erase" ltm "")
(command "ucs" "3" uc1 uc2 uc3)
)
)
(setvar "osmode" os)
(setvar "cmdecho" cm)
(princ)
)
(defun c:ducs()
(setq os (getvar "osmode"))
(setq cm (getvar "cmdecho"))
(setvar "osmode" 9)
(setvar "cmdecho" 0)
(command "ucs" "w")
(setq p1 (getpoint "\n请选取第一点P1:"))
(setq p2 (getpoint "\n请选取第二点P2:"))
(setq p3 (getpoint "\n请选取第三点P3:"))
(setvar "osmode" 0)
(initget 1 )
(setq s1 (getpoint "\n请输入第一点P1实际坐标x1,y1,z1:"))
(initget 1 )
(setq s2 (getpoint "\n请输入第二点P2实际坐标x2,y2,z2:"))
(initget 1 )
(setq s3 (getpoint "\n请输入第三点P3实际坐标x3,y3,z3:"))
(setq l1 (distance p1 p2))
(setq l2 (distance s1 s2))
(setq x "Yes")
(if (> (abs (- l1 l2)) 1);误差控制
(progn
(alert "数据误差较大请点{确定}后选择是否继续")
(initget 1 "Yes No")
(setq x (getkword "\n是否继续? (Yes 或 No)"))
)
)
(IF (= "Yes" X)
(progn
(setq ltm (ssadd))
(command "line" "0,0,0" "1,0,0" "")
(ssadd (entlast) ltm)
(command "line" "0,0,0" "0,1,0" "")
(ssadd (entlast) ltm)
(command "align" ltm "" s1 p1 s2 p2 s3 p3)
(setq LINDAT (ssname ltm 0))
(setq LINdate (entget LINDAT))
(setq uc1 (cdr (assoc '10 LINdate)))
(setq uc2 (cdr (assoc '11 LINdate)))
(setq LINDAT (ssname ltm 1))
(setq LINdate (entget LINDAT))
(setq uc3 (cdr (assoc '11 LINdate)))
(command "erase" ltm "")
(command "ucs" "3" uc1 uc2 uc3)
)
)
(setvar "osmode" os)
(setvar "cmdecho" cm)
(princ)
)
三丰精密设备
2024-04-08 广告
2024-04-08 广告
当然选昆山全三丰精密设备有限公司,日本三丰(Mitutoyo)官方授权代理,mitutoyo专业代理销售服务商.正品销售 货源充足 完善服务.昆山全三丰精密设备有限公司专业代理销售日本三丰量具(Mitutoyo)游标卡尺 千分尺 百分表 杠...
点击进入详情页
本回答由三丰精密设备提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询