Chuyển đến nội dung
Diễn đàn CADViet

quockhanh2008

Thành viên
  • Số lượng nội dung

    14
  • Đã tham gia

  • Lần ghé thăm cuối

Bài đăng được đăng bởi quockhanh2008


  1. Nhanh quá! Cái lisp NN kia giúp tôi đỡ được bao nhiêu công khi phải BO line thanh PLINE.

     

    Giờ đến vễ cửa, cửa đi, cửa sổ... nhiều quá. Copy từ thư viện ra thì lại phải SCALE rồi làng nhằng LAYER không đúng với bản vẽ của mình ! Vậy thì co cách nào không nhỉ?

     

    Bài 5: Vẽ cửa đi

     

    ;-------------------------------------------------------------------------------------
    ;ve cua di 1 canh
    ;-------------------------------------------------------------------------------------
    (defun c:c1 (/ p1 p2 p3 p4 p5 daicua x y)
    (setq osm (getvar "osmode"))  
    (setq	p1     (getpoint "\nHay vao diem goc cua: ")
    
    p2     (getpoint p1 "\nHay vao diem mut cua: ")
    p3     (getpoint p1 "\nHay vao huong cua: ")
    daicua (distance p1 p2)
    x      (car p1)
    y      (car (cdr p1))
    x      25
    y      daicua
    p4     (list x y)
    p5     (list daicua 0)
     )
     (setvar "OSMODE" 0)
     (if (l3d_khongthanghang p1 p2 p3)
       (progn
         (command ".UCS" "3" p1 p2 p3)
         (command ".rectangle" "0,0" p4)
         (command ".Arc" p5 "C" "0,0" p4)
         (command ".UCS" "P")
       )
       (princ "\n3 diem nhap vao khong duoc thang hang")
     )
    (setvar "osmode" osm)       
    )
    ;-------------------------------------------------------------------------------------
    ;ve cua di 2 canh
    ;-------------------------------------------------------------------------------------
    (defun c:c2 (/ p1 p2 p3 p4 p5 daicua x y)
     (setq osm (getvar "osmode"))  
     (setq	p1     (getpoint "\nHay vao diem goc cua: ")
    p2     (getpoint p1 "\nHay vao diem mut cua: ")
    p3     (getpoint p1 "\nHay vao huong cua: ")
    daicua (/ (distance p1 p2) 2.0)
    x      (car p1)
    y      (car (cdr p1))
    x      25
    y      daicua 
    p4     (list x y)
    p5     (list daicua 0)
     )
     (setvar "OSMODE" 0)
     (if (l3d_khongthanghang p1 p2 p3)
       (progn
         (command ".UCS" "3" p1 p2 p3)
         (command ".rectangle" "0,0" p4)
         (command ".Arc" p5 "C" "0,0" p4)
         (command ".UCS" "P")
    
         (command ".UCS" "3" p2 p1 p3)
         (command ".rectangle" "0,0" p4)
         (command ".Arc" p5 "C" "0,0" p4)
         (command ".UCS" "P")
    
       )
    
       (princ "\n3 diem nhap vao khong duoc thang hang")
     )
     (setvar "osmode" osm)       
    )
    ;-------------------------------------------------------------------------------------
    ;ve cua di 4 canh
    ;-------------------------------------------------------------------------------------
    (defun c:c4 (/ p1 p2 p3 p4 p5 daicua x y)
     (setq osm (getvar "osmode"))    
     (setq	p1     (getpoint "\nHay vao diem goc cua: ")
    p2     (getpoint p1 "\nHay vao diem mut cua: ")
    p3     (getpoint p1 "\nHay vao huong cua: ")
    daicua (/ (distance p1 p2) 4.0)
    x      (car p1)
    y      (car (cdr p1))
    x      25
    y      daicua 
    p4     (list x y)
    p5     (list daicua 0)
     )
     (setvar "OSMODE" 0)
     (if (l3d_khongthanghang p1 p2 p3)
       (progn
    
         (setq diem1 (diemgiua p1 (diemgiua p1 p2)))
         (setq diem2 (diemgiua p1 p2))
         (setq diem3 (diemgiua p2 (diemgiua p1 p2)))      
    
         (command ".UCS" "3" p1 p2 p3)
         (command ".rectangle" "0,0" p4)
         (command ".Arc" p5 "C" "0,0" p4)
         (command ".UCS" "P")
    
         (command ".UCS" "3" diem1 p2 p3)
         (command ".rectangle" "0,0" p4)
         (command ".Arc" p5 "C" "0,0" p4)     
         (command ".UCS" "P")      
    
         (command ".UCS" "3" p2 p1 p3)
         (command ".rectangle" "0,0" p4)
         (command ".Arc" p5 "C" "0,0" p4)
         (command ".UCS" "P")
    
         (command ".UCS" "3" diem3 p1 p3)
         (command ".rectangle" "0,0" p4)
         (command ".Arc" p5 "C" "0,0" p4)
         (command ".UCS" "P")
    
       )
    
       (princ "\n3 diem nhap vao khong duoc thang hang")
     )
    (setvar "osmode" osm)         
    )
    ;-----------------------------------------------------------------------------
    

     

    Có 3 lệnh trong lisp này.

    c1: vẽ cửa đi 1 cánh

    c2: vẽ cửa đi 2 cánh

    c4: vẽ cửa đi 4 cánh

     

    Thế còn cửa sổ thì sao nhỉ ?

     

    Bài 6: Vẽ cửa sổ

     

    (defun c:w1(/ data_m l1 l2 p1 p2 check)
    
    (defun wd_import(/ p3 p4 p5 p6)
       (setq data_m (ssget))
       (setq p1 (getpoint "\nfirst point :") p2 (getpoint "\nsecond point :"))
       (setq l1 nil l2 nil check 1)
       (if (not (= nil data_m)) (progn
           (setq l1 (entget (ssname data_m 0)))
           (setq l2 (entget (ssname data_m 1)))
           (if (or (= nil l1) (not (= "LINE" (cdr (assoc 0 l1))))) (setq check 0))
           (if (or (= nil l2) (not (= "LINE" (cdr (assoc 0 l2))))) (setq check 0))
           (if (not (= 0 (-(sslength data_m) 2))) (setq check 0))
           (if (= 1 check) (progn
               (setq p3 (cdr (assoc 10 l1))) (setq p3 (list (nth 0 p3) (nth 1 p3)))
               (setq p4 (cdr (assoc 11 l1))) (setq p4 (list (nth 0 p4) (nth 1 p4)))
               (setq p5 (cdr (assoc 10 l2))) (setq p5 (list (nth 0 p5) (nth 1 p5)))
               (setq p6 (cdr (assoc 11 l2))) (setq p6 (list (nth 0 p6) (nth 1 p6)))
               (if (not (= nil (inters p3 p4 p5 p6 nil))) (setq check 0))
           ))
       ) (setq check 0))
       (princ)
    )
    
    (defun wd_procced()
    
    (defun mkv(/ p3 p4 p5 p6 p7 p8 p9 ls1 ls2 getom ll1)
    
       (setq p3 (cdr (assoc 10 l1))) 
       (setq p4 (cdr (assoc 11 l1))) 
       (setq p5 (cdr (assoc 10 l2))) 
       (setq p6 (cdr (assoc 11 l2))) 
       (if (> (abs (- (nth 1 p1) (nth 1 p3)))
              (abs (- (nth 1 p3) (nth 1 p4))) ) (setq check 0))
       (if (> (abs (- (nth 1 p1) (nth 1 p4)))
              (abs (- (nth 1 p3) (nth 1 p4))) ) (setq check 0))
       (if (> (abs (- (nth 1 p2) (nth 1 p5)))
              (abs (- (nth 1 p5) (nth 1 p6))) ) (setq check 0))
       (if (> (abs (- (nth 1 p2) (nth 1 p6)))
              (abs (- (nth 1 p5) (nth 1 p6))) ) (setq check 0))
       (if (= 0 check) (princ "\ninvalid data") (progn
           (setq ls1 (arlst (list (nth 1 p1) (nth 1 p2) (nth 1 p3) (nth 1 p4) )))
    ;        (princ ls1)
           (setq p7 (list (nth 0 p3) (nth 0 ls1) 0))
           (setq p8 (list (nth 0 p3) (nth 1 ls1) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 0 p3) (nth 2 ls1) 0))
           (setq p8 (list (nth 0 p3) (nth 3 ls1) 0))
           (mkline p7 p8 l1)
    
           (setq ls1 (arlst (list (nth 1 p1) (nth 1 p2) (nth 1 p5) (nth 1 p6) )))
    ;        (princ ls1)
           (setq p7 (list (nth 0 p5) (nth 0 ls1) 0))
           (setq p8 (list (nth 0 p5) (nth 1 ls1) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 0 p5) (nth 2 ls1) 0))
           (setq p8 (list (nth 0 p5) (nth 3 ls1) 0))
           (mkline p7 p8 l1)
    
           (setq p7 (list (nth 0 p3) (nth 1 ls1) 0))
           (setq p8 (list (nth 0 p5) (nth 1 ls1) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 0 p3) (nth 2 ls1) 0))
           (setq p8 (list (nth 0 p5) (nth 2 ls1) 0))
           (mkline p7 p8 l1)
    
           (setq getom (getvar "osmode"))
           (setvar "osmode" 0)
    
           (setq ls2 (arlst (list (nth 0 p3) (nth 0 p5))))
           (setq p7 (list (nth 0 ls2) (nth 1 ls1) 0))
           (setq p8 (list (nth 1 ls2) (nth 2 ls1) 0))
    
           (setq ll1 (list
               (cons 0 "line")
               (cons 8 (getvar "clayer"))
           ))
    
           (drawrt2 p7 p8 ll1)
    
           (setvar "osmode" getom)
           (command "erase" data_m "")
    
       ))
       (princ)
    )
    
    (defun mkh(/ p3 p4 p5 p6 p7 p8 p9 ls1 ls2 getom ll1)
    
       (setq p3 (cdr (assoc 10 l1))) 
       (setq p4 (cdr (assoc 11 l1))) 
       (setq p5 (cdr (assoc 10 l2))) 
       (setq p6 (cdr (assoc 11 l2))) 
    
       (if (> (abs (- (nth 0 p1) (nth 0 p3)))
              (abs (- (nth 0 p3) (nth 0 p4))) ) (setq check 0))
       (if (> (abs (- (nth 0 p1) (nth 0 p4)))
              (abs (- (nth 0 p3) (nth 0 p4))) ) (setq check 0))
       (if (> (abs (- (nth 0 p2) (nth 0 p5)))
              (abs (- (nth 0 p5) (nth 0 p6))) ) (setq check 0))
       (if (> (abs (- (nth 0 p2) (nth 0 p6)))
              (abs (- (nth 0 p5) (nth 0 p6))) ) (setq check 0))
    
       (if (= 0 check) (princ "\ninvalid data") (progn
    
           (setq ls1 (arlst (list (nth 0 p1) (nth 0 p2) (nth 0 p3) (nth 0 p4) )))
    ;        (princ ls1)
           (setq p7 (list (nth 0 ls1) (nth 1 p3) 0))
           (setq p8 (list (nth 1 ls1) (nth 1 p3) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 2 ls1) (nth 1 p3) 0))
           (setq p8 (list (nth 3 ls1) (nth 1 p3) 0))
           (mkline p7 p8 l1)
    
           (setq ls1 (arlst (list (nth 0 p1) (nth 0 p2) (nth 0 p5) (nth 0 p6) )))
    ;        (princ ls1)
           (setq p7 (list (nth 0 ls1) (nth 1 p5) 0))
           (setq p8 (list (nth 1 ls1) (nth 1 p5) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 2 ls1) (nth 1 p5) 0))
           (setq p8 (list (nth 3 ls1) (nth 1 p5) 0))
           (mkline p7 p8 l1)
    
           (setq p7 (list (nth 1 ls1) (nth 1 p3) 0))
           (setq p8 (list (nth 1 ls1) (nth 1 p5) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 2 ls1) (nth 1 p3) 0))
           (setq p8 (list (nth 2 ls1) (nth 1 p5) 0))
           (mkline p7 p8 l1)
    
           (setq getom (getvar "osmode"))
           (setvar "osmode" 0)
    
           (setq ls2 (arlst (list (nth 1 p3) (nth 1 p5))))
           (setq p7 (list (nth 1 ls1) (nth 0 ls2) 0))
           (setq p8 (list (nth 2 ls1) (nth 1 ls2) 0))
    
           (setq ll1 (list
               (cons 0 "line")
               (cons 8 (getvar "clayer"))
           ))
    
           (drawrt3 p7 p8 ll1)
    
           (setvar "osmode" getom)
           (command "erase" data_m "")
    
    
       ))
       (princ)
    )
    
       (setvar "cmdecho" 0) (command "undo" "mark") (setvar "cmdecho" 1)
       (if (= 0 check) (princ "\ninvalid data") (progn
           (if (< (abs (- (nth 0 (cdr (assoc 10 l1)))
                          (nth 0 (cdr (assoc 11 l1))) )) 0.00001) (mkv))
           (if (< (abs (- (nth 1 (cdr (assoc 10 l1)))
                          (nth 1 (cdr (assoc 11 l1))) )) 0.00001) (mkh))
    
    
       ))
    
       (princ)
    
    )
       (wd_import)
     	(ai_undo_push)
       (wd_procced)
     	(ai_undo_pop)	
    )
    
    
    (defun c:w2(/ data_m l1 l2 p1 p2 check)
    
    (defun wd_import(/ p3 p4 p5 p6)
       (setq data_m (ssget))
       (setq p1 (getpoint "\nfirst point :") p2 (getpoint "\nsecond point :"))
       (setq l1 nil l2 nil check 1)
       (if (not (= nil data_m)) (progn
           (setq l1 (entget (ssname data_m 0)))
           (setq l2 (entget (ssname data_m 1)))
           (if (or (= nil l1) (not (= "LINE" (cdr (assoc 0 l1))))) (setq check 0))
           (if (or (= nil l2) (not (= "LINE" (cdr (assoc 0 l2))))) (setq check 0))
           (if (not (= 0 (-(sslength data_m) 2))) (setq check 0))
           (if (= 1 check) (progn
               (setq p3 (cdr (assoc 10 l1))) (setq p3 (list (nth 0 p3) (nth 1 p3)))
               (setq p4 (cdr (assoc 11 l1))) (setq p4 (list (nth 0 p4) (nth 1 p4)))
               (setq p5 (cdr (assoc 10 l2))) (setq p5 (list (nth 0 p5) (nth 1 p5)))
               (setq p6 (cdr (assoc 11 l2))) (setq p6 (list (nth 0 p6) (nth 1 p6)))
               (if (not (= nil (inters p3 p4 p5 p6 nil))) (setq check 0))
           ))
       ) (setq check 0))
       (princ)
    )
    
    (defun wd_procced()
    
    (defun mkv(/ p3 p4 p5 p6 p7 p8 p9 ls1 ls2 getom ll1)
    
       (setq p3 (cdr (assoc 10 l1))) 
       (setq p4 (cdr (assoc 11 l1))) 
       (setq p5 (cdr (assoc 10 l2))) 
       (setq p6 (cdr (assoc 11 l2))) 
       (if (> (abs (- (nth 1 p1) (nth 1 p3)))
              (abs (- (nth 1 p3) (nth 1 p4))) ) (setq check 0))
       (if (> (abs (- (nth 1 p1) (nth 1 p4)))
              (abs (- (nth 1 p3) (nth 1 p4))) ) (setq check 0))
       (if (> (abs (- (nth 1 p2) (nth 1 p5)))
              (abs (- (nth 1 p5) (nth 1 p6))) ) (setq check 0))
       (if (> (abs (- (nth 1 p2) (nth 1 p6)))
              (abs (- (nth 1 p5) (nth 1 p6))) ) (setq check 0))
       (if (= 0 check) (princ "\ninvalid data") (progn
           (setq ls1 (arlst (list (nth 1 p1) (nth 1 p2) (nth 1 p3) (nth 1 p4) )))
    ;        (princ ls1)
           (setq p7 (list (nth 0 p3) (nth 0 ls1) 0))
           (setq p8 (list (nth 0 p3) (nth 1 ls1) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 0 p3) (nth 2 ls1) 0))
           (setq p8 (list (nth 0 p3) (nth 3 ls1) 0))
           (mkline p7 p8 l1)
    
           (setq ls1 (arlst (list (nth 1 p1) (nth 1 p2) (nth 1 p5) (nth 1 p6) )))
    ;        (princ ls1)
           (setq p7 (list (nth 0 p5) (nth 0 ls1) 0))
           (setq p8 (list (nth 0 p5) (nth 1 ls1) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 0 p5) (nth 2 ls1) 0))
           (setq p8 (list (nth 0 p5) (nth 3 ls1) 0))
           (mkline p7 p8 l1)
    
           (setq p7 (list (nth 0 p3) (nth 1 ls1) 0))
           (setq p8 (list (nth 0 p5) (nth 1 ls1) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 0 p3) (nth 2 ls1) 0))
           (setq p8 (list (nth 0 p5) (nth 2 ls1) 0))
           (mkline p7 p8 l1)
    
           (setq ls2 (arlst (list (nth 0 p3) (nth 0 p5))))
    
           (setq ll1 (list
               (cons 0 "line")
               (cons 8 (getvar "clayer"))
           ))
    
    	(if (< (nth 0 p1) (nth 0 ls2)) (progn
           	(setq p7 (list (nth 0 ls2) (nth 1 ls1) 0))
    		(setq p8 (list (nth 1 ls2) (nth 2 ls1) 0))
    		(setq p7 (list (* (+ (nth 0 p7) (nth 0 p8)) 0.5) (nth 1 p7) 0))
           	(drawrt2 p7 p8 ll1)
    
    		(setq p7 (list (- (nth 0 ls2) 70) (- (nth 1 ls1) 100) 0))
    		(setq p8 (list (- (nth 0 ls2) 70) (+ (nth 2 ls1) 100) 0))
    		(mkline p7 p8 ll1)
    
    		(setq p9 (list (+ (nth 0 p7) 70) (nth 1 p7) 0))
    		(mkline p7 p9 ll1)
    
    		(setq p9 (list (+ (nth 0 p8) 70) (nth 1 p8) 0))
    		(mkline p8 p9 ll1)
        )(progn
    	   	(setq p7 (list (nth 0 ls2) (nth 1 ls1) 0))
    		(setq p8 (list (nth 1 ls2) (nth 2 ls1) 0))
    		(setq p8 (list (* (+ (nth 0 p7) (nth 0 p8)) 0.5) (nth 1 p8) 0))
           	(drawrt2 p7 p8 ll1)
    
    		(setq p7 (list (+ (nth 1 ls2) 70) (- (nth 1 ls1) 100) 0))
    		(setq p8 (list (+ (nth 1 ls2) 70) (+ (nth 2 ls1) 100) 0))
    		(mkline p7 p8 ll1)
    
    		(setq p9 (list (- (nth 0 p7) 70) (nth 1 p7) 0))
    		(mkline p7 p9 ll1)
    
    		(setq p9 (list (- (nth 0 p8) 70) (nth 1 p8) 0))
    		(mkline p8 p9 ll1)
    	))
    
    
           (command "erase" data_m "")
    
       ))
       (princ)
    )
    
    (defun mkh(/ p3 p4 p5 p6 p7 p8 p9 ls1 ls2 getom ll1)
    
       (setq p3 (cdr (assoc 10 l1))) 
       (setq p4 (cdr (assoc 11 l1))) 
       (setq p5 (cdr (assoc 10 l2))) 
       (setq p6 (cdr (assoc 11 l2))) 
    
       (if (> (abs (- (nth 0 p1) (nth 0 p3)))
              (abs (- (nth 0 p3) (nth 0 p4))) ) (setq check 0))
       (if (> (abs (- (nth 0 p1) (nth 0 p4)))
              (abs (- (nth 0 p3) (nth 0 p4))) ) (setq check 0))
       (if (> (abs (- (nth 0 p2) (nth 0 p5)))
              (abs (- (nth 0 p5) (nth 0 p6))) ) (setq check 0))
       (if (> (abs (- (nth 0 p2) (nth 0 p6)))
              (abs (- (nth 0 p5) (nth 0 p6))) ) (setq check 0))
    
       (if (= 0 check) (princ "\ninvalid data") (progn
    
           (setq ls1 (arlst (list (nth 0 p1) (nth 0 p2) (nth 0 p3) (nth 0 p4) )))
    ;        (princ ls1)
           (setq p7 (list (nth 0 ls1) (nth 1 p3) 0))
           (setq p8 (list (nth 1 ls1) (nth 1 p3) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 2 ls1) (nth 1 p3) 0))
           (setq p8 (list (nth 3 ls1) (nth 1 p3) 0))
           (mkline p7 p8 l1)
    
           (setq ls1 (arlst (list (nth 0 p1) (nth 0 p2) (nth 0 p5) (nth 0 p6) )))
    ;        (princ ls1)
           (setq p7 (list (nth 0 ls1) (nth 1 p5) 0))
           (setq p8 (list (nth 1 ls1) (nth 1 p5) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 2 ls1) (nth 1 p5) 0))
           (setq p8 (list (nth 3 ls1) (nth 1 p5) 0))
           (mkline p7 p8 l1)
    
           (setq p7 (list (nth 1 ls1) (nth 1 p3) 0))
           (setq p8 (list (nth 1 ls1) (nth 1 p5) 0))
           (mkline p7 p8 l1)
           (setq p7 (list (nth 2 ls1) (nth 1 p3) 0))
           (setq p8 (list (nth 2 ls1) (nth 1 p5) 0))
           (mkline p7 p8 l1)
    
    	(setq getom (getvar "osmode"))
           (setvar "osmode" 0)
    
    	(setq ll1 (list
                (cons 0 "line")
                (cons 8 (getvar "clayer"))
            ))
    	(setq ls2 (arlst (list (nth 1 p3) (nth 1 p5))))
    	;(princ ls2)
    
    	(if (> (nth 1 p1) (nth 1 ls2)) (progn
    
           	(setq p7 (list (nth 1 ls1) (nth 0 ls2) 0))
           	(setq p8 (list (nth 2 ls1) (nth 1 ls2) 0))
    		(setq p8 (list (nth 2 ls1) (* (+ (nth 1 p7) (nth 1 p8)) 0.5) 0))
    
           	(drawrt3 p7 p8 ll1)
    
    		(setq p7 (list (- (nth 1 ls1) 100) (+ (nth 1 ls2) 70) 0))
    		(setq p8 (list (+ (nth 2 ls1) 100) (+ (nth 1 ls2) 70) 0))
    		(mkline p7 p8 ll1)
    
    		(setq p9 (list (nth 0 p7) (- (nth 1 p7) 70) 0))
    		(mkline p7 p9 ll1)
    
    		(setq p9 (list (nth 0 p8) (- (nth 1 p8) 70) 0))
    		(mkline p8 p9 ll1)
    	)(progn
    	  	(setq p7 (list (nth 1 ls1) (nth 0 ls2) 0))
           	(setq p8 (list (nth 2 ls1) (nth 1 ls2) 0))
    		(setq p7 (list (nth 1 ls1) (* (+ (nth 1 p7) (nth 1 p8)) 0.5) 0))
    
    		(drawrt3 p7 p8 ll1)
    
    
    		(setq p7 (list (- (nth 1 ls1) 100) (- (nth 0 ls2) 70) 0))
    		(setq p8 (list (+ (nth 2 ls1) 100) (- (nth 0 ls2) 70) 0))
    		(mkline p7 p8 ll1)
    
    		(setq p9 (list (nth 0 p7) (+ (nth 1 p7) 70) 0))
    		(mkline p7 p9 ll1)
    
    		(setq p9 (list (nth 0 p8) (+ (nth 1 p8) 70) 0))
    		(mkline p8 p9 ll1)
    
    
    	))
    
    	(setvar "osmode" getom)
    
           (command "erase" data_m "")
    
    
       ))
       (princ)
    )
    
       (setvar "cmdecho" 0) (command "undo" "mark") (setvar "cmdecho" 1)
       (if (= 0 check) (princ "\ninvalid data") (progn
           (if (< (abs (- (nth 0 (cdr (assoc 10 l1)))
                          (nth 0 (cdr (assoc 11 l1))) )) 0.00001) (mkv))
           (if (< (abs (- (nth 1 (cdr (assoc 10 l1)))
                          (nth 1 (cdr (assoc 11 l1))) )) 0.00001) (mkh))
    
    
       ))
    
       (princ)
    
    )
       (wd_import)
       (wd_procced)
    )
    

     

    Có 2 lệnh trong lisp này.

    w1: vẽ cửa sổ kiểu 1

    w2: vẽ cửa sổ kiểu 2


  2. Chắc ai làm về chuyên ngành thiết kế xây dựng cũng đã nghe hoặc biết về Revit, là một phần mềm mới khá lý thú và hữu ích. Bản thân Hoành cũng đang tự học Revit Architecture, chưa thuần thục lắm. Hoành muốn tổ chức một lớp học trực tuyến trên này, để mọi người cùng nhau tự học môn Revit. Mô hình của lớp chúng ta sẽ không có thầy giáo, học phí: 0$/tháng. Chúng ta học, thảo luận dựa trên các hệ thống tài liệu đã có trên diễn đàn.

     

    Cách học:

    - Dựa theo bộ tutorial của DG CAD đã upload trên diễn đàn, bộ tut này theo đánh giá của mình khá chuẩn mực, dễ hiểu.

    - Mỗi tuần chúng ta học một bài tutorial. Nếu sau này trình độ cao rồi thì có thể 2 bài/tuần.

    - Trước buổi học mỗi người trong chúng ta sẽ phải xem tutorial thật kỹ trước. Sau đó tham gia buổi online (qua Yahoo Messenger) và những người có khả năng tiếng Anh sẽ dịch lại bài tutorial trực tuyến cho những người khác theo cùng dõi.

    - Sau buổi online chúng ta sẽ cùng thảo luận các vấn đề liên quan đến bài học trong chủ đề này.

     

    Đồ dùng học tập:

    - một nick yahoo

    - một headphone cùng mic

    - download sẵn bài tutorial vào máy

     

    Ai hứng thú với lớp học thì đăng ký luôn, để mình sẽ ghi danh sách và invite vào room khi online. Nếu ngại công khai nick thì có thể gửi tin nhắn tên nick cho mình. Mình mong muốn ai hứng thú thì tham gia luôn, vì sau lớp đã học rồi mới tham gia thì sẽ khó nắm bắt được cơ bản. Ai có khả năng tiếng Anh và tốt bụng thì xin cho Hoành biết để cùng chia sẻ gánh nặng dịch online cho mọi người. Hoành nghe thì hiểu, nhưng dịch online thì không tốt lắm.


  3. bạn hỏi vậy là sao?

    mình tự học thôi , mua sách về tự học nhưng phần làm ino x cho lan can thì không thấy họ chỉ nên mình mới hỏi bạn biết thì giúp mình với. mình o Đà lạt nơi hẻo lánh không có chổ nào dạy hết. cad mình cũng tự học, shop cung vậy, nên mình cũng gặp nhiều khó khăn lắm. bạn thông cảm nghe


  4. Chắc ai làm về chuyên ngành thiết kế xây dựng cũng đã nghe hoặc biết về Revit, là một phần mềm mới khá lý thú và hữu ích. Bản thân Hoành cũng đang tự học Revit Architecture, chưa thuần thục lắm. Hoành muốn tổ chức một lớp học trực tuyến trên này, để mọi người cùng nhau tự học môn Revit. Mô hình của lớp chúng ta sẽ không có thầy giáo, học phí: 0$/tháng. Chúng ta học, thảo luận dựa trên các hệ thống tài liệu đã có trên diễn đàn.

     

    Cách học:

    - Dựa theo bộ tutorial của DG CAD đã upload trên diễn đàn, bộ tut này theo đánh giá của mình khá chuẩn mực, dễ hiểu.

    - Mỗi tuần chúng ta học một bài tutorial. Nếu sau này trình độ cao rồi thì có thể 2 bài/tuần.

    - Trước buổi học mỗi người trong chúng ta sẽ phải xem tutorial thật kỹ trước. Sau đó tham gia buổi online (qua Yahoo Messenger) và những người có khả năng tiếng Anh sẽ dịch lại bài tutorial trực tuyến cho những người khác theo cùng dõi.

    - Sau buổi online chúng ta sẽ cùng thảo luận các vấn đề liên quan đến bài học trong chủ đề này.

     

    Đồ dùng học tập:

    - một nick yahoo

    - một headphone cùng mic

    - download sẵn bài tutorial vào máy

     

    Ai hứng thú với lớp học thì đăng ký luôn, để mình sẽ ghi danh sách và invite vào room khi online. Nếu ngại công khai nick thì có thể gửi tin nhắn tên nick cho mình. Mình mong muốn ai hứng thú thì tham gia luôn, vì sau lớp đã học rồi mới tham gia thì sẽ khó nắm bắt được cơ bản. Ai có khả năng tiếng Anh và tốt bụng thì xin cho Hoành biết để cùng chia sẻ gánh nặng dịch online cho mọi người. Hoành nghe thì hiểu, nhưng dịch online thì không tốt lắm.


  5. Tốt nhất là Khánh hãy tập cho mình thói quen " Dùng lệnh từ bàn phím " . Vì các lệnh trong CAD đều dễ nhớ mà.

    Thắc mắc của Khánh theo mình cứ làm theo mấy lời chỉ dẫn của mấy anh, chị trả lời là cũng được.

     

    cảm ơn các bạn nhiều. nhhưng có một vài lệnh it khi sử dụng nên không nhớ. với lại nếu không có thanh công cụ nếu muốn đổi tỉ lệ hoặc layer thì sao? nên cũng cần phải có một thanh công cụ như thanh dimension


  6. Tôi không hiểu vì sao ai người Việt nam của mình lúc nào cũng tính " sinh lão bệnh tử" mà họ không tính là " phước lộc thọ khan" không chỉ họ tính thang không đâu có ngưòi còn tính những cái hột trên cái vỏng cổ hay là lắc đeo tay nữa. không biết các bạn nghĩ sao. theo toi thì cái đó không có khoa học , hay triết gia nào xác định đâu là đúng , đâu là sai hết, vì nếu đó là điều đúng thì phải có chung một kết quả cho toàn nhân loại, nếu như nới điều đó đúng cho người ở Việt nam thôi, nếu vậy ở các nước Châu âu họ không phải là con người à? vì ở nước ngoài họ đâu có tính như chung ta. tại sao chúng ta phải nặng lòng về vấn đề vậy nhỉ. các bạn nghĩ sao


  7. 1./ trong cad 2007 khi tôi lỡ đóng hết các thanh công cụ, bây giờ muốn lấy nó ra thì phải làm sao?

    2./ trong cad 2006 trở xuống muốn bỏ bớt các thanh công cụ thì chỉ cần kéo nó ra khỏi thì nó mất nhưng ở 2007 ( 2008 trở lên thì tôi chưa sử dụng nên chưa biết làm có được không)thì làm không dược? ví du tôi mở thanh Dimenion toi chỉ cân 1 hoặc 2 biễu tượng trong thanh Dimenion đó thôi còn lại thì bỏ hết. ai biết xin chỉ giùm tôi với. Vì nếu mở nhiều thanh công cụ thì nó chiếm chổ màn hình

×