비밀번호를 잊으셨나요?

비밀번호를 잊으셨나요? 비밀번호를 재설정하려면 이메일 주소를 입력해주세요.

계정이 있나요? 로그인

You must login to ask a question.

비밀번호를 잊으셨나요?

아직 계정이 없으신가요? 회원가입 하기

해당 질문을 신고하는 이유를 간단히 입력해주세요.

해당 답변을 신고하는 이유를 간단히 입력해주세요.

해당 유저를 신고하는 이유를 간단히 입력해주세요.

로그인회원가입

고캐드 – 캐드(CAD) 정보의 중심

고캐드 – 캐드(CAD) 정보의 중심 Logo 고캐드 – 캐드(CAD) 정보의 중심 Logo

고캐드 – 캐드(CAD) 정보의 중심 Navigation

  • Q&A
    • AutoCAD & CADian
    • Inventor & Solidworks
    • Revit & ArchiCAD
    • 자유질문
    • 기타
  • 커뮤니티
    • 오늘의이슈
    • 자유게시판
    • 익명게시판
    • 건의게시판
  • 자료실
    • 자료요청
    • 일반파일
    • 도면샘플
    • 유틸리티
    • 기타
  • 작품 갤러리
    • 그래픽
    • 캐드도면
    • 3D모델
    • 기타
  • 뉴스&이벤트
    • 공지사항
    • 뉴스
    • 전시/행사
    • 이벤트
    • 기타
검색
질문하기

Mobile menu

닫기
질문하기
  • 홈
  • 카테고리
    • AutoCAD & CADian
    • Inventor & Solidworks
    • Revit & ArchiCAD
    • 자유질문
    • 기타
  • 투표
  • 커뮤니티 그룹
  • Q&A
    • AutoCAD & CADian
    • Inventor & Solidworks
    • Revit & ArchiCAD
    • 자유질문
    • 기타
  • 커뮤니티
    • 오늘의이슈
    • 자유게시판
    • 익명게시판
    • 건의게시판
  • 자료실
    • 자료요청
    • 일반파일
    • 도면샘플
    • 유틸리티
    • 기타
  • 작품 갤러리
    • 그래픽
    • 캐드도면
    • 3D모델
    • 기타
  • 뉴스&이벤트
    • 공지사항
    • 뉴스
    • 전시/행사
    • 이벤트
    • 기타
홈/ 질문/Q 23847
다음
Lv.0
등록일: 2006-08-102006-08-10T11:23:39+09:00 2006-08-10T11:23:39+09:00카테고리: AutoCAD & CADian

리습 수정요청요…

전에 리습 고수분께서 작성해주신 리습입니다.
제가 측량 회사에 종사하다보니 현황도 그릴때 유용하게 쓰이는 리습인데요. 조금더 보충해서 사용하기위해 예제 화일과 함께 올립니다.
무리한 요구가 될수도 있는데요, 고수님들 수정 가능하다면 부탁 드리겠습니다. 일단 리습과 실행 도면(설명)을 올리겠습니다.
잘 부탁 드리겠습니다

(defun c:bd (/ old1 sp ep);;;담장그리기
(setq old1 nil)
(setq sp (getpoint “n 시작점 : “))
(if sp
(progn
(if (tblsearch “layer” “담장”)
(command “layer” “s” “담장” “color” 33 “담장” “”)
(command “layer” “m” “담장” “color” 33 “담장” “”)
)
(while (setq ep (getpoint sp “n 끝점 : “))
(setq old1 (addwallmain sp ep 0.2 “solid” old1))
(setq sp ep)
)
)
)
(princ)
)

(defun c:ob (/ old1 sp ep);;;옹벽그리기
(setq old1 nil)
(setq sp (getpoint “n 시작점 : “))
(if sp
(progn
(if (tblsearch “layer” “옹벽”)
(command “layer” “s” “옹벽” “color” 7 “옹벽” “”)
(command “layer” “m” “옹벽” “color” 7 “옹벽” “”)
)
(while (setq ep (getpoint sp “n 끝점 : “))
(setq old1 (addwallmain sp ep 0.3 “donut” old1))
(setq sp ep)
)
)
)
(princ)
)

(defun c:hs (/ old1 sp ep);;;휀스그리기
(setq old1 nil)
(setq sp (getpoint “n 시작점 : “))
(if sp
(progn
(if (tblsearch “layer” “휀스”)
(command “layer” “s” “휀스” “color” 6 “휀스” “”)
(command “layer” “m” “휀스” “color” 6 “휀스” “”)
)
(while (setq ep (getpoint sp “n 끝점 : “))
(setq old1 (addwallmain sp ep 0.0 “fance” old1))
(setq sp ep)
)
)
)
(princ)
)

(defun c:bd2 (/ old1 sp ep);;;보도그리기
(setq old1 nil)
(setq sp (getpoint “n 시작점 : “))
(if sp
(progn
(if (tblsearch “layer” “보도”)
(command “layer” “s” “보도” “color” 5 “보도” “”)
(command “layer” “m” “보도” “color” 5 “보도” “”)
)
(while (setq ep (getpoint sp “n 끝점 : “))
(setq old1 (addwallmain sp ep 1.7 “sidewalk” old1))
(setq sp ep)
)
)
)
(princ)
)

(defun c:hu (/ old1 sp ep sp2 ep2);;;석축그리기
(setq old1 nil)
(setq grlist nil)
(setq sp (getpoint “n 시작점 : “))
(if sp
(progn
(if (tblsearch “layer” “석축”)
(command “layer” “s” “석축” “color” 2 “석축” “”)
(command “layer” “m” “석축” “color” 2 “석축” “”)
)
(while (setq ep (getpoint sp “n 끝점 : “))
(grdraw sp ep 1 1)
(if old1
(setq sp2 (cdr (assoc 11 (entget old1))))
(setq sp2 (getpoint “n 시작점2 : “))
)
(if sp2
(progn
(setq ep2 (getpoint sp2 “n 끝점2 : “))
(if ep2
(progn
(grdraw sp2 ep2 1 1)
(setq old1 (addwallmain2 sp ep sp2 ep2 “stonewalk” old1))
(grdraw sp ep 0 0)
(grdraw sp2 ep2 0 0)
(setq sp ep)
)
)
)
)
)
)
)
(princ)
)

(defun addwallmain (sp ep width types old1 / l2 os dist ang sp2 ep2 typesnum space index tp1 tp2 tp3 tp4)
(cond;;;심볼사이의 거리
((= (strcase types) “SOLID”) (setq typelens 2.3))
((= (strcase types) “DONUT”) (setq typelens 2.0))
((= (strcase types) “FANCE”) (setq typelens 5.0))
((= (strcase types) “SIDEWALK”) (setq typelens 6.0))
)
(setq os (getvar “osmode”))
(setvar “osmode” 0)
(setq dist (distance sp ep))
(setq ang (angle sp ep))
(setq sp2 (polar sp (+ ang (dtr 90.0)) width))
(setq ep2 (polar ep (+ ang (dtr 90.0)) width))
(setq typesnum (fix (/ dist typelens)));;;심볼갯수 구하기
(command “line” sp ep “”)
(if (/= (strcase types) “FANCE”) (command “line” sp2 ep2 “”))
(setq l2 (entlast))
(setq index 0)
(cond
((= (strcase types) “SOLID”)
(setq space (/ (- dist (- (* typesnum typelens) 0.8)) 2.0));;;담장의 간격 0.8을 제외
(repeat typesnum
(setq tp1 (polar sp ang (+ space (* index typelens))))
(setq tp2 (polar tp1 (+ ang (dtr 90.0)) width))
(setq tp3 (polar sp ang (+ space (- (* (+ index 1) typelens) 0.8))))
(setq tp4 (polar tp3 (+ ang (dtr 90.0)) width))
(command “solid” tp1 tp2 tp3 tp4 “”)
(setq index (1+ index))
)
)
((= (strcase types) “DONUT”)
(setq space (/ (- dist (* (- typesnum 1) typelens)) 2.0));;;donut이므로 심볼 하나 추가
(repeat typesnum
(setq tp1 (polar sp ang (+ space (* index typelens))))
(setq tp2 (polar tp1 (+ ang (dtr 90.0)) (/ width 2.0)))
(command “donut” 0.0 width tp2 “”)
(setq index (1+ index))
)
)
((= (strcase types) “FANCE”)
(setq space (/ (- dist (* (- typesnum 1) typelens)) 2.0));;;마지막 심볼 하나 추가
(repeat typesnum
(setq tp2 (polar sp ang (+ space (* index typelens))))
(command “line” (polar tp2 (dtr 125.0) 0.5) (polar tp2 (dtr -45) 0.5) “”)
(command “line” (polar (polar tp2 (dtr 125.0) 0.1) (dtr 45.0) 0.5) (polar (polar tp2 (dtr 125.0) 0.1) (dtr 225.0) 0.5) “”)
(command “line” (polar (polar tp2 (dtr -45.0) 0.1) (dtr 45.0) 0.5) (polar (polar tp2 (dtr -45.0) 0.1) (dtr 225.0) 0.5) “”)
(setq index (1+ index))
)
)
((= (strcase types) “SIDEWALK”)
(setq space (/ (- dist (* (- typesnum 1) typelens)) 2.0));;;마지막 심볼 하나 추가
(repeat typesnum
(setq tp1 (polar sp ang (+ space (* index typelens))))
(setq tp2 (polar tp1 (+ ang (dtr 90.0)) (/ width 2.0)))
(command “insert” “bb” tp2 1.5 1.5 (rtd (angle sp ep)))
(setq index (1+ index))
)
)
)
(if old1
(if (/= (strcase types) “FANCE”) (command “fillet” old1 l2))
)
(setvar “osmode” os)
l2
)

(defun addwallmain2 (sp ep sp2 ep2 types old1 / os dist ang typesnum l2 index space count tp1 tp2)
(cond;;;심볼사이의 거리
((= (strcase types) “STONEWALK”) (setq typelens 10.0))
)
(setq os (getvar “osmode”))
(setvar “osmode” 0)
(setq dist (distance sp ep))
(setq ang (angle sp ep))
(setq typesnum (fix (/ dist typelens)));;;심볼갯수 구하기
(command “line” sp ep “”)
(command “line” sp2 ep2 “”)
(setq l2 (entlast))
(setq index 0)
(cond
((= (strcase types) “STONEWALK”)
(setq space (/ (- dist (- (* typesnum typelens) 5.0)) 2.0));;;마지막 심볼 하나 추가
(repeat typesnum
(setq count 0)
(repeat 11
(if (= (rem count 2) 0)
(setq tp2 (polar sp ang (+ space (* index typelens) (* count 0.5))))
(progn
(setq tp2 (polar sp ang (+ space (* index typelens) (* count 0.5))))
(setq tp2 (inters tp2 (polar tp2 (+ ang (dtr 90.0)) 1.0) sp2 ep2 nil))
)
)
(if tp1 (command “line” tp1 tp2 “”))
(setq tp1 tp2)
(setq count (1+ count))
)
(setq tp1 nil)
(setq index (1+ index))
)
)
)
(if old1
(if (/= (strcase types) “FANCE”) (command “fillet” old1 l2))
)
(setvar “osmode” os)
l2
)

(defun dtr (a) (* pi (/ a 180.0)))
(defun rtd (a) (/ (* a 180.0) pi))

  • 0
  • 95 조회
공유
  • Facebook

    관련 있는 질문들

    • 블럭깰때 가시성으로 가려진 블럭들 처리
    • PDF 출력
    • 한영전환키 문제
    • 도면 복사로 가져올때 치수, 품목list가 변해요

    Sidebar

    질문하기
    공지사항

    • AI CAD의 미래! 캐디안 2025 1+1 프로모션 안내 2025-05-14

    Adv 234x60

    aalan

    Adv 234x60

    aalan

    Adv 120x600

    aalan

    Explore

    • 홈
    • 카테고리
      • AutoCAD & CADian
      • Inventor & Solidworks
      • Revit & ArchiCAD
      • 자유질문
      • 기타
    • 투표
    • 커뮤니티 그룹
    aalan

    Footer

    Support

    • 회사 및 서비스 소개
    • 자주 묻는 질문
    • 문의하기

    Guide

    • 제휴/협업 안내
    • 광고 서비스 안내

    Policy

    • 서비스 이용약관
    • 개인정보 처리방침
    • 광고성 정보 수신 동의

    Contents

    • 고밍스토리
    • 리습 시리즈

    정소프트 | 사업자등록번호 : 677-40-00198 | 대표 : 정은숙 | 이메일 : gocad.manager@gmail.com
    주소 : 서울특별시 강서구 양천로 400-12, 6층 614,615,617호(등촌동, 더리브골드타워)
    Copyright. 2012-2024 GOCAD All rights reserved