Action:
|
Creates a solid torus.
|
|
Filename:
|
cstr/cstr_scm/sld_scm.cxx
|
|
APIs:
|
api_solid_torus
|
|
Syntax:
|
(solid:torus {center-position | {center-x center-y
|
|
|
center-z}} major-radius minor-radius)
|
|
Arg Types:
|
center-position
|
position
|
|
center-x
|
real
|
|
center-y
|
real
|
|
center-z
|
real
|
|
major-radius
|
real
|
|
minor-radius
|
real
|
|
Returns:
|
entity
|
|
Description:
|
This extension creates a solid torus of given radii centered at the origin. The torus is defined in the
xy plane of the active coordinate system and oriented using the active coordinate system's normal gvector.
|
|
|
The argument
center-position specifies the center location of the torus. There are two syntax formats available for this argument. The first (original) syntax format defines the
center-position by placing it in a 'position' statement enclosed in parenthesis (as shown in the example below with creating torus1). However, the second format defines the
xyz coordinates of the center position without using the 'position' statement or the additional set of parenthesis (as shown in the example below with defining torus2 and torus3). The two formats are otherwise identical.
|
|
|
The argument
major-radius specifies the distance from the center to the spine curve lying in this plane. It is specified around a circle having the minor axis. It is swept to define the torus.
|
|
|
Three shapes of tori may be specified: donut, apple, or lemon depending on the relative magnitudes of the major and minor radii. If the
major-radius is greater than the
minor-radius, the torus is a donut. If the
major-radius is positive but smaller than the
minor-radius, the torus is an apple. If the
major-radius is negative, the torus is a lemon.
|
|
|
center-position specifies the center position of the torus.
|
|
|
center-x,
center-y,
center-z is the syntax for the positional argument
center-position..
|
|
|
major-radius specifies the distance from the center to the spine curve lying in this plane.
|
|
|
minor-radius is the minor radius of the torus.
|
|
Example:
|
; solid:torus
|
|
; Create solid torus 1.
|
|
(define torus1
|
|
|
(solid:torus (position -10 -5 -10) 7 3))
|
|
;; torus1
|
|
; Create solid torus 2.
|
|
(define torus2
|
|
|
(solid:torus 10 15 20 10 5))
|
|
;; torus2
|
|
; OUTPUT Example
|
|
|
|
Figure 3-7. solid:torus
|