If all that is required is that the Z axis value of the face normal must be 0 in order to be vertical :Worked like a champ! Thanks!! Much appreciated!!
Then this should work :
(entmake (list (cons 0 "3DFACE")(cons 8 "0")(cons 62 5)(cons 10 (list 6 3 18))(cons 11 (list 3 3 14))(cons 12 (list 6 3 14))(cons 13 (list 6 3 22))))
(entmake (list (cons 0 "3DFACE")(cons 8 "0")(cons 62 1)(cons 10 (list 13 3 23))(cons 11 (list 13 3 18))(cons 12 (list 13 3 14))(cons 13 (list 8 3 14))))
I'm sure there scenarios where faces will crash the normalIn those two 'entmake' cases the method I have proposed will work. :-)Code: [Select](entmake (list (cons 0 "3DFACE")(cons 8 "0")(cons 62 5)(cons 10 (list 6 3 18))(cons 11 (list 3 3 14))(cons 12 (list 6 3 14))(cons 13 (list 6 3 22))))
(entmake (list (cons 0 "3DFACE")(cons 8 "0")(cons 62 1)(cons 10 (list 13 3 23))(cons 11 (list 13 3 18))(cons 12 (list 13 3 14))(cons 13 (list 8 3 14))))
points that are colinear : not coplaner etc.
(entmake (list (cons 0 "3DFACE")(cons 8 "0")(cons 10 (list 0 0 0))(cons 11 (list 12 0 6))(cons 12 (list 0 0 12))(cons 13 (list 0 12 6))))
Code - Auto/Visual Lisp: [Select]
Code - Auto/Visual Lisp: [Select]
There is no error in BricsCAD. So in AutoCAD you have to use (vla-get-coordinate obj idx) and then translate the return. Needless to say I prefer the BricsCAD implementation.Code - Auto/Visual Lisp: [Select]
As far as I am aware vlax-get/vlax-get-property can only accept two arguments in AutoCAD - I get a 'too many arguments' error for the above.
As David hinted, it depends what you consider vertical. The 3D face in David's last contribution has a vertical crease. Therefore the surfaces on both sides of the crease are vertical. But it is a strange face.Code - Auto/Visual Lisp: [Select]
Wouldn't this incorrectly report David's example as being vertical?
Wouldn't this incorrectly report David's example as being vertical?The 3D face in David's last contribution has a vertical crease. Therefore the surfaces on both sides of the crease are vertical.
Hello. Sorry that the question is off topic
How to change the height of all the vertices of a set of 3d faces on the value entered by the user?
(defun c:3df-zaxs (/ z ss i en ed)
(initget 1)
(setq z (getdist "\nNew Z Value: "))
(while (setq ss (ssget (list (cons 0 "3DFACE"))))
(setq i 0)
(while (setq en (ssname ss i))
(setq ed (entget en))
(foreach p '(10 11 12 13)
(setq ed (subst (list p (cadr (assoc p ed))
(caddr (assoc p ed))
z)
(assoc p ed) ed)))
(entmod ed)
(setq i (1+ i))))
(prin1))
If you are trying change the Z axis only :Hello David.Code: [Select](defun c:3df-zaxs (/ z ss i en ed)
(initget 1)
(setq z (getdist "\nNew Z Value: "))
(while (setq ss (ssget (list (cons 0 "3DFACE"))))
(setq i 0)
(while (setq en (ssname ss i))
(setq ed (entget en))
(foreach p '(10 11 12 13)
(setq ed (subst (list p (cadr (assoc p ed))
(caddr (assoc p ed))
z)
(assoc p ed) ed)))
(entmod ed)
(setq i (1+ i))))
(prin1))
Note that all 3dface values are WCS
-David
If you are trying change the Z axis only :Hello David.Code: [Select](defun c:3df-zaxs (/ z ss i en ed)
(initget 1)
(setq z (getdist "\nNew Z Value: "))
(while (setq ss (ssget (list (cons 0 "3DFACE"))))
(setq i 0)
(while (setq en (ssname ss i))
(setq ed (entget en))
(foreach p '(10 11 12 13)
(setq ed (subst (list p (cadr (assoc p ed))
(caddr (assoc p ed))
z)
(assoc p ed) ed)))
(entmod ed)
(setq i (1+ i))))
(prin1))
Note that all 3dface values are WCS
-David
This is not exactly what I need. Your program replaces the height of the vertices of 3D faces. I need to change the height of the vertices of 3d faces.
For example, add to all vertices +5.000, or -15.000
z)
(+ (cadddr (assoc p ed)) z))
(setq z (getdist "\nZ value adjustment: "))
How to change the height of all the vertices of a set of 3d faces on the value entered by the user?
How to change the height of all the vertices of a set of 3d faces on the value entered by the user?
I interpreted the OP as needing then face edited to the value specified, not by the value specified. Oh well. -David
thank you LeeIf you are trying change the Z axis only :Hello David.Code: [Select](defun c:3df-zaxs (/ z ss i en ed)
(initget 1)
(setq z (getdist "\nNew Z Value: "))
(while (setq ss (ssget (list (cons 0 "3DFACE"))))
(setq i 0)
(while (setq en (ssname ss i))
(setq ed (entget en))
(foreach p '(10 11 12 13)
(setq ed (subst (list p (cadr (assoc p ed))
(caddr (assoc p ed))
z)
(assoc p ed) ed)))
(entmod ed)
(setq i (1+ i))))
(prin1))
Note that all 3dface values are WCS
-David
This is not exactly what I need. Your program replaces the height of the vertices of 3D faces. I need to change the height of the vertices of 3d faces.
For example, add to all vertices +5.000, or -15.000
In David's code, change:Code: [Select]z)
to:Code: [Select](+ (cadddr (assoc p ed)) z))
And perhaps change the prompt to:Code: [Select](setq z (getdist "\nZ value adjustment: "))