Package Documentation

Object: TORUS (The :GEOM-BASE Package)
Mixins: IFS-OUTPUT-MIXIN, ARCOID-MIXIN, BASE-OBJECT

Description

A single-holed ``ring'' torus, also known as an ``anchor ring.'' This is basically a circular cylinder ``bent'' into a donut shape. Partial donuts (``elbows'') are supported. Partial ``bent'' cylinders are not currently supported.


Input Slots (required)

MAJOR-RADIUS number

Distance from center of donut hole to centerline of the torus.


MINOR-RADIUS number

Radius of the bent cylinder making up the torus.


RADIUS [from ARCOID-MIXIN] number

Distance from center to any point on the arc.



Input Slots (optional)

BOUNDING-BOX [from BASE-OBJECT] list of two 3d points

The left front bottom and right rear top corners, in global coordinates, of the rectangular volume bounding the tree of geometric objects rooted at this object.


DRAW-CENTERLINE-ARC? boolean

Indicates whether the bent cylinder's centerline arc should be rendered in some renderings.


END-ANGLE [from ARCOID-MIXIN] angle in radians

End angle of the arc. Defaults to twice pi.


END-CAPS? boolean

Indicates whether to include end caps for a partial torus in some renderings. Defaults to T.


HIDDEN? [from VANILLA-MIXIN*] boolean

Indicates whether the object should effectively be a hidden-object even if specified in :objects. Default is nil.


IMAGE-FILE [from BASE-OBJECT] pathname or string

Points to a pre-existing image file to be displayed instead of actual geometry for this object. Defaults to nil


INNER-MINOR-RADIUS number

Radius of the inner hollow part of the bent cylinder for a hollow torus. Defaults to NIL for a solid cylinder


LOCAL-BOX [from BASE-OBJECT] list of two 3d points

The left front bottom and right rear top corners, in global coordinates, of the rectangular volume bounding this geometric object.


NUMBER-OF-LONGITUDINAL-SECTIONS integer

Indicates the number of arcs to be drawn on along ``surface'' of the torus in some wireframe renderings.


NUMBER-OF-TRANSVERSE-SECTIONS integer

Indicates the number of circular cross-sections of the bent cylinder to show in some wireframe renderings.


OBLIQUENESS [from BASE-OBJECT] 3x3 orthonormal matrix of double-float numbers

This is synonymous with the orientation.


ONCLICK-FUNCTION [from BASE-OBJECT] lambda function of zero arguments, or nil

If non-nil, this function gets invoked when the user clicks the object in graphics front-ends which support this functionality, e.g. SVG/Raphael and X3DOM.


ROOT [from VANILLA-MIXIN*] gdl instance

The root-level node in this object's ``tree'' (instance hierarchy).


SAFE-CHILDREN [from VANILLA-MIXIN*] list of gdl instances

All objects from the :objects specification, including elements of sequences as flat lists. Any children which throw errors come back as a plist with error information


START-ANGLE [from ARCOID-MIXIN] angle in radians

Start angle of the arc. Defaults to zero.


STRINGS-FOR-DISPLAY [from VANILLA-MIXIN*] string or list of strings

Determines how the name of objects of this type will be printed in most places. This defaults to the name-for-display (generally the part's name as specified in its parent), followed by an index number if the part is an element of a sequence.


VISIBLE-CHILDREN [from VANILLA-MIXIN*] list of gdl instances

Additional objects to display in Tatu tree. Typically this would be a subset of hidden-children. Defaults to NIL.



Input Slots (optional, defaulting)

ARC angle in radians

Indicates the end angle for the donut. Defaults to twice pi for a full-circle donut.


CENTER [from BASE-OBJECT] 3d point

Indicates in global coordinates where the center of the reference box of this object should be located.


DISPLAY-CONTROLS [from BASE-OBJECT] plist

May contain keywords and values indicating display characteristics for this object. The following keywords are recognized currently:

:color
color keyword from the *color-table* parameter, or an HTML-style hexidecimal RGB string value, e.g. "#FFFFFF" for pure white. Defaults to :black.
:line-thickness
an integer, defaulting to 1, indicating relative line thickness for wireframe representations of this object.
:dash-pattern
(currently PDF/PNG/JPEG only). This is a list of two or three numbers which indicate the length, in pixels, of the dashes and blank spaces in a dashed line. The optional third number indicates how far into the line or curve to start the dash pattern.


ORIENTATION [from BASE-OBJECT] 3x3 matrix of double-float numbers

Indicates the absolute Rotation Matrix used to create the coordinate system of this object. This matrix is given in absolute terms (i.e. with respect to the root's orientation), and is generally created with the alignment function. It should be an orthonormal matrix, meaning each row is a vector with a magnitude of one (1.0).



Computed Slots

HEIGHT [from BASE-OBJECT] number

Z-axis dimension of the reference box. Defaults to zero.


LENGTH [from BASE-OBJECT] number

Y-axis dimension of the reference box. Defaults to zero.


WIDTH [from BASE-OBJECT] number

X-axis dimension of the reference box. Defaults to zero.


Examples

  
  (in-package :gdl-user)
  
  (define-object torus-sample (torus)
    :computed-slots
    ((major-radius 150)
     (minor-radius 42)
     (draw-centerline-arc? t)
     (number-of-longitudinal-sections 10)
     (number-of-transverse-sections 10)
     (display-controls (list :color :green-forest-medium)))

    :hidden-objects ((view :type 'base-view
                           :projection-vector (getf *standard-views* :trimetric)
                           :page-width (* 5 72) :page-length (* 5 72)
                           :objects (list self))))
  

  (generate-sample-drawing :objects (make-object 'torus-sample) 
                           :projection-direction :trimetric)
                  

Package Documentation