PSC Code Manual

util/object.lsp [src]

VLA Object-handling functions

Functions

Function signature Description
(add-calcd-objs container extrude-p defs) Processes calculated objects for 2D and 3D blocks
(add-calcd-pipe container extrude-p def) Adds a calculated pipe to CONTAINER
(add-calcd-poly container extrude-p def) Adds a calculated polyline to CONTAINER
(add-cope vtx vec) Called from add-calcd-pipe when a cope definition is included in the points list.
(mirror&delete obj pt axis) Mirrors OBJ over AXIS at PT, deletes the original, and returns the copy
(vla-mirror-x obj) Mirrors VLA-object OBJ over x-axis using a transformation matrix
(vla-mirror-y obj) Mirrors VLA-object OBJ over Y-axis using a transformation matrix

(add-calcd-objs container extrude-p defs)

Processes calculated objects for 2D and 3D blocks

CONTAINER should be the target block definition or model space. If EXTRUDE-P is non-nil,
creates 3D solids. Otherwise, creates a 2D wireframe. Additionally, when EXTRUDE-P is
non-nil, the object will be translated into the perspective used in 3D drawings.

DEFS is a list of calculated objects. Each is a list whose car is a data list of object
properties and whose cdr is the particular object definition. The value of the type key in
the properties determines which handling function is called. The naming scheme for
handling functions is 'add-calcd-' followed by the type value which triggers it.

Available handling functions:
- add-calcd-poly
- add-calcd-pipe

Common properties:
- ins: insert point (all pts in definition displaced relative to ins)
- layer: layer to put obj on
- extrude: extrusion distance

VARS:
(CONTAINER VLA-OBJECT)
(DEFS nil (LISTP DEFS))

(add-calcd-pipe container extrude-p def)

Adds a calculated pipe to CONTAINER

Pipe objects represent bent pipe handrails. They are represented as open polylines. This
function fillets the points list and either offsets or extrudes the pipe.

Addition properties available to pipes:
- radius: fillet radius
- bulge: used as 4th argument to offset&close

(add-calcd-poly container extrude-p def)

Adds a calculated polyline to CONTAINER

CONTAINER should be the target block definition or model space. DEF should be a list whose
car is a data list of properties and whose cdr is a list of points representing a closed
polyline. If EXTRUDE-P is non-nil, the closed polyline is extruded by the value of the
"extrude" property.

(add-cope vtx vec)

Called from add-calcd-pipe when a cope definition is included in the points list.
A cope definition is a two item list containing a point on the open polyline where
the centerlines of a coped connection would intersect and a vector representing the
direction the coped piece would extend from the intersection point.

When extrude-p is non-nil a short 3d cylinder is unioned to
the 3dsolid at each passed point representing a coped intersection

When extrude-p is nil two vertices and a bulge are added to
a polyline at each passed point representing a coped intersection

(mirror&delete obj pt axis)

Mirrors OBJ over AXIS at PT, deletes the original, and returns the copy

OBJ should be a VLA-object. Axis should be one of the symbols 'x or 'y. PT should be a
point.

VARS:
(OBJ VLA-OBJECT)
(PT LIST (POINT-P PT))
(AXIS SYM (MEMBER AXIS '(X Y)))

(vla-mirror-x obj)

Mirrors VLA-object OBJ over x-axis using a transformation matrix

VARS:
(OBJ VLA-OBJECT)

(vla-mirror-y obj)

Mirrors VLA-object OBJ over Y-axis using a transformation matrix

VARS:
(OBJ VLA-OBJECT)