Jump to content

label 3d face with elevation


motee-z

Recommended Posts

Hello friends

i have a lot of triangles every triangle is a 3d face 

i need help to automatic label the head of a 3d face with its elevation

any help will be appreciated

 

sample.dwg

Edited by motee-z
attached sample
  • Like 1
Link to comment
Share on other sites

4 minutes ago, motee-z said:

Hello friends

i have a lot of triangles every triangle is a 3d face 

i need help to automatic label the head of a 3d face with its elevation

any help will be appreciated

 

Please upload your sample.dwg  with a before and after

 

Edited by devitg
need to change
Link to comment
Share on other sites

Something like this ? :)

 

(defun c:Test (/ int sel ent get pts ins )
  ;;----------------------------------------------------;;
  ;;	Author : Tharwat Al Choufi			;;
  ;; website: https://autolispprograms.wordpress.com	;;
  ;;----------------------------------------------------;;
  (and (princ "\nSelect 3DFACE objects to label : ")
       (setq int -1 sel (ssget '((0 . "3DFACE"))))
       (while (setq int (1+ int) ent (ssname sel int))
         (setq get (entget ent))
         (foreach ass '(10 11 12)
           (setq ins (cdr (assoc ass get)))
           (or (vl-some '(lambda (u) (equal u ins 1e-4)) pts)
               (and (setq pts (cons ins pts))
                    (entmake (list '(0 . "TEXT") '(8 . "Elevation") '(62 . 1) (cons 10 ins) '(40 . 1.0) (cons 1 (rtos (caddr ins) 2 2))
                                   '(50 . 0.0) '(41 . 1.0) '(51 . 0.3) '(7 . "Standard") (cons 11 (list 0.0 0.0 (caddr ins)))
                                   )
                             )
                    )
               )
           )
         )
       )
  (princ)
  )

 

  • Like 1
Link to comment
Share on other sites

thank you tharwat your code working well but i am looking for faster result if can be

also thanks to mr devitg for his lisp i think there is something missing in the code

it gave


Command: 3DF$
; error: bad argument type: lselsetp nil
Command:
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...