Author Topic: Select a 3dface with entsel  (Read 1046 times)

0 Members and 1 Guest are viewing this topic.

LogicTools

  • Newt
  • Posts: 36
Select a 3dface with entsel
« on: December 04, 2021, 12:06:08 PM »
Is there a way to select a 3dface with entsel?
Tested on any face of an extruded rectangle this code returns nil.

Code - Auto/Visual Lisp: [Select]
  1. (defun c:select3dface ( / subobjselectionmode 3dface)
  2.  (setq
  3.   subobjselectionmode (getvar "subobjselectionmode")
  4.   )
  5.  (setvar "subobjselectionmode" 3) ; To select a face
  6.  (setq
  7.   3dface (car (entsel "\nSelect 3dface: "))
  8.   )
  9.  (setvar "subobjselectionmode" subobjselectionmode)
  10.  3dface
  11.  )
  12.  

LogicTools

  • Newt
  • Posts: 36
Re: Select a 3dface with entsel
« Reply #1 on: December 04, 2021, 04:32:40 PM »
I tried different ways, but I guess it is not possible to select a face on a solid unless the solid somehow is decomposed into faces.

GP

  • Newt
  • Posts: 83
  • Vercelli, Italy
Re: Select a 3dface with entsel
« Reply #2 on: January 01, 2022, 11:30:23 AM »

Try changing the selection mode

Code: [Select]
(defun c:test ( / col p_sel)
    (setq col "1")
    (princ "\nSelect 3dface: ")
    (ssget "_+.:S:E:V" '((0 . "3dsolid")))
    (setq p_sel (cadr (grread T)))
    (command "_solidedit" "_F" "_L" p_sel "" col "" "")
)