diff --git a/at-dim/area.lsp b/at-dim/area.lsp new file mode 100644 index 0000000000000000000000000000000000000000..7ed3a8ebecade81bb7d50106c7b319b98d745b21 --- /dev/null +++ b/at-dim/area.lsp @@ -0,0 +1,16 @@ +(defun at-dim:area () + (@::help "标注区域的面积值") + (setq lwpls (pickset:to-list (ssget '((0 . "lwpolyline")(70 . 1))))) + (mapcar + (function + (lambda(x) + (entity:make-text + (strcat + (rtos (* 1e-6 (vla-get-area (e2o x))) 2 3) + "m\U+00B2") + (point:centroid (curve:get-points x)) + (* (@::get-config '@::draw-scale) 2.5) + 0 0.8 0 "MM"))) + lwpls) + ) + diff --git a/at-dim/at-dim.lsp b/at-dim/at-dim.lsp index e3a7a57b3974da7559034336205c8e05f1b82bad..37e170259fb3ac9fc4a6ac7953f62524e2b057c9 100644 --- a/at-dim/at-dim.lsp +++ b/at-dim/at-dim.lsp @@ -24,6 +24,7 @@ (@:add-menu "ע" "ȷֻ" "(at-dim:menu-dimarc-div)" ) (@:add-menu "ע" "з" "(at-dim:cutting-symbol)") (@:add-menu "ע" "ע" "(@dim:sum-dim)") +(@:add-menu "ע" "ע" "(at-dim:area)") (defun @dim:setup (/ res) (setq @::tmp-search-str "@dim") diff --git a/at-dim/pkg.lsp b/at-dim/pkg.lsp index c4ee9efef50b2ee69f633bc7ed580437d3f829f6..f3c144b9896295c03f8cb989cb69992628a72553 100644 --- a/at-dim/pkg.lsp +++ b/at-dim/pkg.lsp @@ -13,5 +13,6 @@ (:FILES "at-dim" "coord" "cutting-symbol" - "dimarc" + "dimarc" + "area" "sum-dim"))) diff --git a/at-layout/add-mapsheet.lsp b/at-layout/add-mapsheet.lsp new file mode 100644 index 0000000000000000000000000000000000000000..c7dc1ad27fdf48a65f8e13cc99ac20d49f9d8182 --- /dev/null +++ b/at-layout/add-mapsheet.lsp @@ -0,0 +1,38 @@ +(defun @layout:add-mapsheet-a4 () + (@::help "视口加A4图框") + (setq vps (pickset:to-list (ssget '((0 . "viewport"))))) + (mapcar + '(lambda(x) + (vla-update + (e2o + (block:insert + "A4" + (strcat (if (@::get-config '@pm:tuku) + (@::get-config '@pm:tuku) + "D:/Design/standard") + "/") + (polar (polar (entity:getdxf x 10) 0 (* 0.5 (@::scale 210))) + (* 1.5 pi) (* 0.5 (@::scale 297))) + 0 1)))) + vps) + ) + +(defun @layout:add-mapsheet-a3 () + (@::help "视口加A3图框") + (setq vps (pickset:to-list (ssget '((0 . "viewport"))))) + (mapcar + '(lambda(x) + (vla-update + (e2o + (block:insert + "A3" + (strcat (if (@::get-config '@pm:tuku) + (@::get-config '@pm:tuku) + "D:/Design/standard") + "/") + (polar (polar (entity:getdxf x 10) 0 (* 0.5 (@::scale 420))) + (* 1.5 pi) (* 0.5 (@::scale 297))) + 0 1)))) + vps) + ) + diff --git a/at-layout/at-layout.lsp b/at-layout/at-layout.lsp index 44d2d341b94a35f6374c708c00d7191a2c4cd642..e72b057cf2d94bd2e4eb912e26914e70e2ad258a 100644 --- a/at-layout/at-layout.lsp +++ b/at-layout/at-layout.lsp @@ -14,6 +14,8 @@ ("清理空布局"(@layout:purge)) ("分图到布局"(@layout:divide-map)) ("分堆分图"(@layout:divide-cluster)) + ("视口加A4框"(@layout:add-mapsheet-a4)) + ("视口加A3框"(@layout:add-mapsheet-a3)) ) ) (defun @layout:setup (/ res) diff --git a/at-layout/pkg.lsp b/at-layout/pkg.lsp index 47bc65a7752908358fb4a0c4185670f8981e935a..008cdee44c94d1fb50ee19aa68b6a5df66fa0084 100755 --- a/at-layout/pkg.lsp +++ b/at-layout/pkg.lsp @@ -2,7 +2,7 @@ (:FULL-NAME . "@lisp布局") (:AUTHOR . "VitalGG") (:EMAIL . "vitalgg@gmail.com") - (:VERSION . "0.1.8") + (:VERSION . "1.0.0") (:LOCALE . "CHS") (:CATEGORY . "布局") (:REQUIRED . "base") @@ -15,4 +15,5 @@ "merge" "divide-map" "stat-vp" + "add-mapsheet" "purge")))