Author Topic: According to the color formation boundary  (Read 2481 times)

0 Members and 1 Guest are viewing this topic.

Q1241274614

  • Guest
According to the color formation boundary
« on: February 26, 2014, 04:25:00 AM »
According to the color formation boundary。

Bhull1985

  • Guest
Re: According to the color formation boundary
« Reply #1 on: February 27, 2014, 08:46:21 AM »
According to the color formation boundary, WHAT?

Usually when someone starts a sentence with the word ACCORDING, there is information following the COMMA that the ACCORDING lends itself to, typically.

jvillarreal

  • Bull Frog
  • Posts: 332
Re: According to the color formation boundary
« Reply #2 on: February 27, 2014, 09:04:46 AM »
Q1241274614 is using a translator to post in English (from Chinese).
Perhaps he intended to say:

Boundaries based on color formation

Q1241274614

  • Guest
Re: According to the color formation boundary
« Reply #3 on: March 01, 2014, 11:40:50 AM »
Sorry? English is not good!

According to the same as the color of the 3dface formation boundary.


Thank you.

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: According to the color formation boundary
« Reply #4 on: March 01, 2014, 02:09:50 PM »
Sorry? English is not good!

Can't be any worse then my Mandarin ....

DEVITG

  • Bull Frog
  • Posts: 481
Re: According to the color formation boundary
« Reply #5 on: March 02, 2014, 08:35:30 PM »
According to the color formation boundary。


You can not create a boundary in  a not planar entity
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

Q1241274614

  • Guest
Re: According to the color formation boundary
« Reply #6 on: March 04, 2014, 10:34:56 PM »
Code: [Select]
(defun c:zz( / a b e1 lst lst1 mid12 mid13 mid32 pt1 pt2 pt3 ss t1)
  (vla-startundomark (vla-get-ActiveDocument (vlax-get-acad-object)))
  (setq ss (ssget(list (cons 0 "3DFACE"))))
  (setq t1 (getvar "TDUSRTIMER"))
  (while (setq e1 (ssname ss 0))
         (setq ss (ssdel e1 ss)  lst (list e1))
         (foreach a (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
                 (if (= (cdr (assoc 62 (entget e1)))(cdr (assoc 62 (entget a))))
           (progn (setq  lst (cons a lst))  (ssdel a ss)))
         )
        (if lst (setq  lst1 (cons lst lst1)))
   )
  (foreach b lst1
    (foreach a b
    (setq e1  (entget a)
     pt1 (cdr (assoc 10 e1))
          pt2 (cdr (assoc 11 e1))
          pt3 (cdr (assoc 12 e1))
        mid12 (mapcar (function (lambda ( a b ) (/ (+ a b) 2.0))) pt1 pt2)
        mid32 (mapcar (function (lambda ( a b ) (/ (+ a b) 2.0))) pt3 pt2)
        mid13 (mapcar (function (lambda ( a b ) (/ (+ a b) 2.0))) pt1 pt3)
     )
     (if (= 1 (sslength(setq ss (ssget "C" mid12 mid12 '((0 . "3DFACE"))))))
           (entmakex  (list (cons 0 "LINE")(cons 10 pt1)(cons 11 pt2)(cons 8 "boundary")))
           (if (/= (cdr (assoc 62 (entget (ssname ss 0))))(cdr (assoc 62 (entget (ssname ss 1)))))
                  (entmakex  (list (cons 0 "LINE")(cons 10 pt1)(cons 11 pt2)(cons 8 "boundary")))
        )
     )
    (if (= 1 (sslength(setq ss(ssget "C" mid32 mid32 '((0 . "3DFACE"))))))
           (entmakex  (list (cons 0 "LINE")(cons 10 pt3)(cons 11 pt2)(cons 8 "boundary")))
      (if (/= (cdr (assoc 62 (entget (ssname ss 0))))(cdr (assoc 62 (entget (ssname ss 1)))))
                  (entmakex  (list (cons 0 "LINE")(cons 10 pt3)(cons 11 pt2)(cons 8 "boundary")))
        ))
    (if (= 1 (sslength(setq ss(ssget "C" mid13 mid13 '((0 . "3DFACE"))))))
           (entmakex  (list (cons 0 "LINE")(cons 10 pt1)(cons 11 pt3)(cons 8 "boundary")))
      (if (/= (cdr (assoc 62 (entget (ssname ss 0))))(cdr (assoc 62 (entget (ssname ss 1)))))
                  (entmakex  (list (cons 0 "LINE")(cons 10 pt1)(cons 11 pt3)(cons 8 "boundary")))
        )
      )
    )
 )
  (princ (strcat "\n""耗时:" (rtos (* 86400(-(getvar "TDUSRTIMER")t1)) 2 0) "秒"))
  (vla-endundomark (vla-get-ActiveDocument (vlax-get-acad-object)))
  (princ))


Shortcomings:
1. if many objects, the speed is very slow.
2.Only entmake line
3.help


<edit CAB: code tags added>
« Last Edit: March 05, 2014, 10:43:30 AM by CAB »