CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
Cesky English Deutsch
 Visitors: 5741 
Plex.Earth connects AutoCAD and Google Earth

CAD tip CAD tip # 9063:

Question CAD 
 %  platform  category 
Q - question

Flip 3D faces (front/back) in AutoCAD.

A - answer For simple flipping of faces in AutoCAD (changing back and front sides, with no change in geometry) you can use the free AutoLISP utility CADstudio FlipFace. This LISP application supports both 3-vertex and 4-vertex 3D faces (3DFACE entities).

Download FlipFace from z, load its LSP file with APPLOAD and type the command FLIPFACE. Select the (3DFACE) to flip - their orientation (normals) will change. Face normals - i.e. the direction where the face "faces" - can be checked using the add-on utility Normals (see the tip 8903).

Front faces and unified normals of faces in 3D mesh objects may be important in many scenarios for processing 3D CAD data.

Here is the FlipFace utility as an AutoLISP code:

;FLIPFACE - flip selected 3DFaces (reverse normals) ;(C)2013 - CAD Studio - - ; (defun C:FlipFace( / ss ssl p1 p2 p3 p4 e edata ndata) (prompt "\nSelect 3DFaces to reverse normals: ") (setq ss (ssget '((0 . "3DFACE")))) (if ss (progn (setq ssl (sslength ss)) (setvar "CMDECHO" 0) (command "_UNDO" "_BE") (while (> ssl 0) (setq edata (entget (setq e (ssname ss (setq ssl (1- ssl)))))) (setq p1 (cdr (assoc 10 edata))) (setq p2 (cdr (assoc 11 edata))) (setq p3 (cdr (assoc 12 edata))) (setq p4 (cdr (assoc 13 edata))) (if (or (equal p1 p4) (equal p3 p4)) ; 3 or 4 point 3DFACE? (setq ndata (subst (cons 10 p2)(assoc 10 edata) edata) ndata (subst (cons 11 p1)(assoc 11 edata) ndata) ); else (setq ndata (subst (cons 10 p4)(assoc 10 edata) edata) ndata (subst (cons 13 p1)(assoc 13 edata) ndata) ndata (subst (cons 11 p3)(assoc 11 edata) ndata) ndata (subst (cons 12 p2)(assoc 12 edata) ndata) ) );if (entmod ndata) (entupd e) );while (command "_UNDO" "_E") (setvar "CMDECHO" 1) (princ "\nDone. Use _U to revert back (undo).") ));if (princ) )
100% *  CAD 
30.1.2013    7821×  
Comments   Tell a friend
applies to: AutoCAD ·

See also:
Tip 11726:Loading 3D models in the OBJ file format to AutoCAD.
Tip 11252:Applying STRETCH to 3D objects in AutoCAD.
Tip 11054:Difference volume (3D solid) between two TIN surfaces (sets of coordinates)
Tip 9512:How to convert a point cloud to an editable 3D CAD model (mesh)?
Tip 9345:How to include hydrostatic pressure to my FEM simulations?

Back   All CAD Tips All CAD tips&tricks

Table embedded into an Inventor drawing is not visible in DWF. « | » How to transfer frame structures from Plant 3D to Revit Structure?

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Publish interactive 3D PDF models from AutoCAD, Inventor or Revit with Share3D More info

Please use these tips at your own risk.
CAD Studio (Xanadu) is not responsible for possible problems that may occur as a result of using any of these tips.