| Правила | Регистрация | Пользователи | Сообщения за день |  Справка по форуму | Файлообменник |

Вернуться   Форум DWG.RU > Программное обеспечение > AutoCAD > Подобие XCLIP?

Подобие XCLIP?

Ответ
Поиск в этой теме
Непрочитано 24.08.2004, 17:13 #1
Подобие XCLIP?
Lenich
 
Опер дир
 
Москва
Регистрация: 28.04.2004
Сообщений: 291

Уважаемые!

Есть ли подобная штука для размерных линий и выносок?

Заранее Спасибо!
Просмотров: 4134
 
Непрочитано 24.08.2004, 18:56
#2
Startrek

AutoCAD/AutoLISP
 
Регистрация: 27.08.2003
Seattle/USA
Сообщений: 1,133


WIPEOUT ?
Startrek вне форума  
 
Автор темы   Непрочитано 25.08.2004, 11:25
#3
Lenich

Опер дир
 
Регистрация: 28.04.2004
Москва
Сообщений: 291


Цитата:
Сообщение от Startrek
WIPEOUT ?
Это конечно хорошо, но он не привязан к определенному размеру

Просто при оформлении чертежа в местах пересечения многих размерных линий (когда все размеры уже стоят) нужно оборвать что-то одно, а остальное не обрывать.
Lenich вне форума  
 
Непрочитано 25.08.2004, 15:16
#4
Grinzaid

Архитектор
 
Регистрация: 14.10.2003
Израиль
Сообщений: 365
<phrase 1=


Я бы взял необходимый объект или группу объектов, сделал бы им Copy with Base Point => Paste as Block в ту же точку (для простоты можно брать 0,0,0 но можно и любую другую, считывая её координаты и вставляя Block в эти самые координаты). А потом бы применял XCLIP. Весь поцесс можно автоматизировать.
__________________
С уважением,
Влад Гринзайд.
Grinzaid вне форума  
 
Автор темы   Непрочитано 25.08.2004, 16:21
#5
Lenich

Опер дир
 
Регистрация: 28.04.2004
Москва
Сообщений: 291


Цитата:
Сообщение от Grinzaid
Я бы взял необходимый объект или группу объектов, сделал бы им Copy with Base Point => Paste as Block в ту же точку
При этом ЖЕ теряются все свойства размеров (не отредактировать тебе, не передвинуть, только разбить и заново заБлочить). А мне нужно это делать часто.
Сейчас я это линиями дорисовываю. Т.е. размер становится не цельным а каким-то "составным" чтоли. Когда это сделал один раз и распечатал то нормально, а когда надо двигать, добавлять, удалять и т.д. Вот тут-то и начинается "лишняя" работа.
Lenich вне форума  
 
Непрочитано 25.08.2004, 17:05
#6
Mikhail

инженер-технолог (ГИП)
 
Регистрация: 11.09.2003
Санкт-Петербург
Сообщений: 1,116


Если надо обрывать линии, то можно попробовать поэкспериментировать с типом линий, штриховую поставить и масштаб разный, тогда возможно в местах пересечния будет нужный обрыв.
__________________
Большая беда науки в том, что при восхитительной теории можно получить отвратительные результаты.
Mikhail вне форума  
 
Непрочитано 26.08.2004, 04:39
#7
Vova

Engineer
 
Регистрация: 05.09.2003
New-York
Сообщений: 10,288


Мне кажется, что тебе нужна программа, которая может прорезать дырки в размерных и выносных линиях и оставить размер целиковым. Попробуй это
;;;
;;; =========================================================================
;;; TBRMODD.LSP
;;;
;;; (C) Copyright 1990-1994 by T.B.R
;;;
;;; T.B.R PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
;;; T.B.R SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY
;;; OR FITNESS FOR A PARTICULAR USE.
;;; T.B.R DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
;;; UNINTERRUPTED OR ERROR FREE.
;;;
;;; Laa 94-12-02
;;; Description:
;;;
;;; This program is copyrighted by
;;;
;;; Gerhard Reithofer
;;; Technisches Bro Reithofer
;;;
;;; A-2136 Laa an der Thaya,
;;; Staatsbahnstraae 100
;;;
;;; Tel. +43-2522-8726, Fax +43-2522-87268
;;; D-Netz +43-663-089747
;;; BTX 912516323
;;; CIS 100141,1024
;;;
;;; This program can be used to modify AutoCAD DIMENSIONs without exploding.
;;; The modification is done by redefinig the dimension pseudo-block
;;; Definition. Only lines can be modified in this version. You can remove
;;; lines, lengthen, shorten and break them. The modification will be
;;; removed if an "dimension-updating" command of AutoCAD (e. g. UPDATE,
;;; STRETCH, ROTATE...) is used. The visualisation of the "newly cretated"
;;; dimension depends on the actual state of the DIMVars. In that case you
;;; must repeat the modification command.
;;;
;;; Permission to use, copy, and distribute this software for any purpose and
;;; without fee is hereby granted, provided that it is distributed unmodified
;;; and with all supporting files and documentation, including this file with
;;; the above copyright notice, disclaimer and this permission notice.
;;;
;;; However, documentation extensions (error reports, suggestions for usage or
;;; improvements) may be included, provided that express notice is given that
;;; such extensions are not part of the original product.
;;;
;;; It is also allowed to translate the dialog part (see comment below) into
;;; any foreign language, if you include your (the translators) name and your
;;; copyright.
;;;
;;; Hoping that there are not many errors in the program,
;;; Gerhard Reithofer
;;;
(if (not tbrutilv) ;;; User of the T.B.R Standard user interface don't need it
(progn
(defun ent_head (e) (cdr (assoc -2 e)))
(defun ent_ename (e) (cdr (assoc -1 e)))
(defun ent_etyp (e) (cdr (assoc 0 e)))
(defun ent_name (e) (cdr (assoc 2 e)))
(defun ent_p1 (e) (cdr (assoc 10 e)))
(defun ent_p2 (e) (cdr (assoc 11 e)))
(defun ent_xscl (e) (cdr (assoc 41 e)))
(defun ent_yscl (e) (cdr (assoc 42 e)))
(defun ent_zscl (e) (cdr (assoc 43 e)))
)
)

(defun C:TBRMODD ( / *msg* tr elp ppt mat m0 m1 m2 m3 p1 p2 n1 n2 dm cp pp w1 w2
nlst tmp ang el nel lel fel etyp ltyp sc ent tm oe ne bhead)
;;;
;;; The english dialogue part follows. If you want a german version, remove the
;;; comment from the next (setq *msg* ... statement below, following this one.
;;;
;;; Translate it to any language you want - but include your copyright
;;; if you redistribute the program.
;;;
(setq *msg* (list "Second point:" ;;; Msg 0 - Options
"Delete" ;;; Msg 1
"Length" ;;; Msg 2
"First" ;;; Msg 3

"\nLengthen/Shorten to:" ;;; Msg 4 - Dialogues
"\nFirst point:" ;;; Msg 5
"\nSecond point:" ;;; Msg 6

"Nested block!\n" ;;; Msg 7 - Errors
"Scaled block!\n" ;;; Msg 8
"*** Unused ***" ;;; Msg 9
"\nUnsupportet entity " ;;; Msg 10
"!\nSelect a line of a dimension." ;;; Msg 11
"\nNo demension selected!" ;;; Msg 12
"\nBoth break points must lie on line!" ;;; Msg 13

"\nLine broken!" ;;; Msg 14 - Status messages
"\nLinelength changed!" ;;; Msg 15
"\nLine deleted!" ;;; Msg 16
)
)
;;; *** Deutschsprachige Dialogversion ***
;;; Entfernen Sie die alle Kommentarzeichen von der folgdenden
;;; AutoLISP Anweisung um einen detschsprachigen Dialog zu erhalten.
;;;
;;; (setq *msg* (list "Zweiter Punkt:" ;;; Msg 0
;;; "Entfernen" ;;; Msg 1
;;; "Lnge" ;;; Msg 2
;;; "Erster" ;;; Msg 3
;;;
;;; "\nVerlngern/Verkrzen bis:" ;;; Msg 4
;;; "\nErster Punkt:" ;;; Msg 5
;;; "\nZweiter Punkt:" ;;; Msg 6
;;;
;;; "Verschachtelter Block!\n" ;;; Msg 7
;;; "Skalierter Block!\n" ;;; Msg 8
;;; "*** Unused ***" ;;; Msg 9
;;; "\nDas Element " ;;; Msg 10
;;; " wird nicht untersttzt!\nWhlen Sie die Linie einer Bemaaung." ;;; Msg 11
;;; "\nKeine Bemaaung gewhlt!" ;;; Msg 12
;;; "\nBeide Bruchpunkte mssen auf der Linie liegen!" ;;; Msg 13
;;;
;;; "\nLinie unterbrochen!" ;;; Msg 14
;;; "\nLinienlnge gendert!" ;;; Msg 15
;;; "\nLinie gelscht!" ;;; Msg 16
;;; )
;;; )

(defun ex (str) (princ str) (terpri) (exit)) ;;; Error exit
(defun tr ( pt ) ;;; Transform with (nentselp)world transformation matrix
(list (+ (* (car pt) (car m0)) (* (cadr pt) (car m1)) (* (caddr pt) (car m2)) (car m3))
(+ (* (car pt) (cadr m0)) (* (cadr pt) (cadr m1)) (* (caddr pt) (cadr m2)) (cadr m3))
(+ (* (car pt) (caddr m0)) (* (cadr pt) (caddr m1)) (* (caddr pt) (caddr m2)) (caddr m3))
)
)
(defun pp ( p1 p2 ppt ) ;;; project ppt onto p1-p2
(inters p1 p2 ppt (polar ppt (+ (angle p1 p2) (/ pi 2.0)) 1.0) nil)
)

(defun cp () ;;; Check if both points (n1, n2) are inside the line p1-p2
(if n1
(if (or (> (distance p1 n1) dm) (> (distance p2 n1) dm))
(ex (nth 13 *msg*))
)
)
(if n2
(if (or (> (distance p1 n2) dm) (> (distance p2 n2) dm))
(ex (nth 13 *msg*))
)
)
)

(defun ne(s) ;;; Simple error function
(setq *error* oe)
(princ s)
(while (entmake (list (cons 0 "endblk")))) ;;; Possible pending entmakes...
(command "_REGEN") ;;; Be sure to display correct...
(princ)
)

;;; ************************** main function begin *****************************
(setq oe *error* *error* ne)
(if (setq elp (nentsel))
(progn
(setq nel (car elp) ppt (cadr elp) mat (caddr elp)
m0 (car mat) m1 (cadr mat) m2 (caddr mat) m3 (cadddr mat)
)
(if (setq nlst (cadddr elp)) ;;; Nested block list...
(if (> (length nlst) 1) (ex (nth 7 *msg*))) ;;; ...must have length 1
(ex (nth 12 *msg*))
)
(setq fel (car nlst)) ;;; set 'fel' to block ID
(redraw nel 3) ;;; ??? It does'nt work ??? ;;; 'nel' is the selected sub enity
(setq etyp (ent_etyp (setq ent (entget nel))) ;;; get the sub entity type
ltyp (ent_etyp (entget fel)) ;;; get the block type
)
(if (= ltyp "DIMENSION") ;;; Only DIMs will be processed
(cond
( (= etyp "LINE") ;;; Only lines are supported in this version!
(setq w1 (ent_p1 ent) w2 (ent_p2 ent) ;;; World coords
p1 (trans w1 0 1) p2 (trans w2 0 1) ;;; Local coords
dm (distance w1 w2) n1 ppt
)
(initget 1 (strcat (nth 1 *msg*) " " ;;; Put options into initget
(nth 2 *msg*) " "
(nth 3 *msg*)
)
)
(setq n2 (getpoint (strcat "\n"
(nth 1 *msg*) "/" ;;; Put options into prompt
(nth 2 *msg*) "/"
(nth 3 *msg*) "/"
(nth 0 *msg*)
)
)
)
(cond ((= n2 (nth 1 *msg*)) ;;; "Erase"
(setq n1 nil n2 nil)
)
((= n2 (nth 2 *msg*)) ;;; "Length"
(initget 1) (setq n1 (getpoint (nth 4 *msg*)))
(if (> (distance n1 p2) (distance n1 p1))
(setq n2 n1 n1 nil) ;;; Swap endpoints to nearer endpoint
(setq n2 nil)
)
)
((= n2 (nth 3 *msg*)) ;;; "First"
(initget 1) (setq n1 (getpoint (nth 5 *msg*)))
(initget 1) (setq n2 (getpoint (nth 6 *msg*)))
(cp)
)
( T (cp))
)
(if (setq bhead (tblsearch "BLOCK" (ent_name (entget fel))))
(progn
(entmake bhead) ;;; entmake is used to redefine the block
(if n1 (setq n1 (pp w1 w2 (trans n1 1 fel)))) ;;; trans into
(if n2 (setq n2 (pp w1 w2 (trans n2 1 fel)))) ;;; entities cs
(setq tm (ent_head bhead))
(while (not lel) ;;; loop until ENDBLK
(setq el (entget tm)) ;;; entget entity
(if (equal nel (ent_ename el)) ;;; is it the selected one?
(cond
( (and n1 n2) ;;; Both points on line
(if (> (distance w1 n1) (distance w1 n2))
(setq tmp n1 n1 n2 n2 tmp) ;;; Split the line
) ;;; into two pieces
(setq el (subst (cons 10 w1) (assoc 10 el) el))
(setq el (subst (cons 11 n1) (assoc 11 el) el))
(entmake el) ;;; entMake 1st line
(setq el (subst (cons 10 n2) (assoc 10 el) el))
(setq el (subst (cons 11 w2) (assoc 11 el) el))
(entmake el) ;;; entMake 2nd line
(prompt (nth 14 *msg*))
)
( n1 ;;; Modify 1st point only
(setq el (subst (cons 10 n1) (assoc 10 el) el))
(setq el (subst (cons 11 w1) (assoc 11 el) el))
(entmake el)
(prompt (nth 15 *msg*))
)
( n2 ;;; Modify 2nd point only
(setq el (subst (cons 10 n2) (assoc 10 el) el))
(setq el (subst (cons 11 w2) (assoc 11 el) el))
(entmake el)
(prompt (nth 15 *msg*))
)
( T ;;; Don't (re)make the line
(prompt (nth 16 *msg*))
)
)
(entmake el)
)
(if (= (ent_etyp el) "ENDBLK")
(setq lel T) ;;; EndBlock reached
(setq lel (not (setq tm (entnext tm))))
)
)
(if (setq blist (entmake (list (cons 0 "ENDBLK"))))
(entupd fel) ;;; Visual update of the block
)
)
)
)
(T (prompt (strcat (nth 10 *msg*) etyp (nth 11 *msg*))))
)
(prompt (nth 12 *msg*))
)
)
)
(princ)
)

(defun C:MD() (C:TBRMODD))
(princ "\nAvailable command TBRMODD (or short MD)\n(c) Gerhard Reithofer, Technisches Bro Reithofer - 1994.")
(princ)


После любого редактирования, включая грипсовое, размер восстанавливается. Надо опять подрезать. Хорошо ли это? Кто воспользуется, сообщите
Vova вне форума  
 
Непрочитано 26.08.2004, 04:39
#8
Vova

Engineer
 
Регистрация: 05.09.2003
New-York
Сообщений: 10,288


Повтор получился
Vova вне форума  
 
Автор темы   Непрочитано 26.08.2004, 12:17
#9
Lenich

Опер дир
 
Регистрация: 28.04.2004
Москва
Сообщений: 291


Vova,

Судя по описанию - то что надо. Буду пробовать.

Спасибо.
Lenich вне форума  
 
Автор темы   Непрочитано 27.08.2004, 15:11
#10
Lenich

Опер дир
 
Регистрация: 28.04.2004
Москва
Сообщений: 291


Vova,

Хорошая программа! Спасибо!
Разрывает размерную линию по двум точкам, а после редактирвоания размера линия востанавливается. Ну все как надо.
Жаль не делает тоже самое с выноской.

Может есть ещё что-нибудь?
Lenich вне форума  
Ответ
Вернуться   Форум DWG.RU > Программное обеспечение > AutoCAD > Подобие XCLIP?

Размещение рекламы