Add3DFace Method

Back to Methods Reference

Creates a 3DFace object given four vertices.

Signature

VBA : RetVal = object.Add3DFace(Point1, Point2, Point3[, Point4])

VL : Retval = (vla-add3DFace object point1 point2 point3 point4)

(vla-add3dface mspace pt1 pt2 pt3 pt4)

  • Object : ModelSpace Collection, PaperSpace Collection, Block
    The object or objects this method applies to.

  • Point1 : Variant (three-element array of doubles); input-only
    The 3D WCS coordinates specifying a point on the 3DFace object.

  • Point2 : Variant (three-element array of doubles); input-only
    The 3D WCS coordinates specifying a point on the 3DFace object.

  • Point3 : Variant (three-element array of doubles); input-only
    The 3D WCS coordinates specifying a point on the 3DFace object.

  • Point4 : Variant (three-element array of doubles); input-only; optional
    The 3D WCS coordinates specifying a point on the 3DFace object. If omitted, this point will default to the coordinates of Point3 in order to create a three-sided face.

  • RetVal : 3DFace object
    The newly created 3DFace object.

Remarks

To create a three-sided face, omit the last point. Use the SetInvisibleEdge method to set the visibility of an edge.

Points must be entered in a clockwise or counterclockwise order to create a 3DFace object. You can create multiple adjacent faces by specifying the first two points of an additional face exactly as the last two points of the previous face.

Example :


;Get the ModelSpace collection of the active document,
;select 4 point and add the 3Dface: 

(setq thisdrawing (vla-get-activedocument (vlax-get-acad-object)))

(setq mspace (vla-get-modelspace thisdrawing))

(setq pt1 (vlax-3d-point (getpoint "First point: ")))

(setq pt2 (vlax-3d-point (getpoint "Second point: ")))

(setq pt3 (vlax-3d-point (getpoint "Third point: ")))

(setq pt4 (vlax-3d-point (getpoint "Fourth point: ")))

(vla-add3dface mspace pt1 pt2 pt3 pt4)

 
The AutoLisp/Visual Lisp/VBA Resource Website
Google
Search the WWW Search AfraLisp

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website