Action:
|
Creates a right circular cone.
|
|
Filename:
|
cstr/cstr_scm/sld_scm.cxx
|
|
APIs:
|
api_solid_cylinder_cone
|
|
Syntax:
|
(solid:cone {{start-axis end-axis} | {start-axis-x
|
|
|
start-axis-y start-axis-z end-axis-x end-axis-y
|
|
|
end-axis-z}} base-radius top-radius
|
|
|
[ratio=1 [position3 | {x3 y3 z3}]])
|
|
Arg Types:
|
start-axis
|
position
|
|
end-axis
|
position
|
|
start-axis-x
|
real
|
|
start-axis-y
|
real
|
|
start-axis-z
|
real
|
|
end-axis-x
|
real
|
|
end-axis-y
|
real
|
|
end-axis-z
|
real
|
|
base-radius
|
real
|
|
top-radius
|
real
|
|
ratio
|
real
|
|
position3
|
position
|
|
x3
|
real
|
|
y3
|
real
|
|
z3
|
real
|
|
Returns:
|
entity
|
|
Description:
|
The argument
start-axis specifies the start axis position or base of the cone. The argument
end-axis specifies the end axis position or top of the cone. As you can see, there are two syntax formats available for defining these positional arguments. The first (original) syntax format defines all positional arguments by placing them in 'position' statements enclosed in parenthesis (as shown in the example below with creating cone1). However, the second syntax format defines positional arguments without using the 'position' statement or the additional set of parenthesis (as shown in the example below with defining cone2 and cone3). The two formats are otherwise identical and accomplish the same. The format you choose must be used for all three of the positional arguments.
|
|
|
The argument
base-radius specifies the radius at
start-axis (must be greater than zero). The argument
top-radius specifies the radius at
end-axis (which can be zero).
|
|
|
If the optional arguments
ratio and
position3 are specified, an elliptical cone is created. If
ratio is specified, the ratio between the major and minor axis of the ellipse is used. If
position3 (or
x3,
y3, and
z3) is specified, the vector from the projection of
position3 (or
x3,
y3, and
z3) onto the axis of the cone to
position3 (or
x3,
y3, and
z3) specifies the major axis. If
position3 (or
x3,
y3, and
z3) is not specified, the major axis is defined by the projection of the
x-axis of the active work coordinate system onto the plane that is defined by
start-axis and the vector from
start-axis to
end-axis.
|
|
|
Note
|
position3 cannot lie on the axis of the cone or an error occurs.
|
|
|
start-axis specifies the start axis position or base of the cone.
|
|
|
end-axis specifies the end axis position or top of the cone.
|
|
|
start-axis-x,
start-axis-y,
start-axis-z are syntax formats available for defining
start-axis positional arguments.
|
|
|
end-axis-x,
end-axis-y,
end-axis-z are syntax formats available for defining
end-axis positional arguments.
|
|
|
base-radius specifies the radius at
start-axis (must be greater than zero).
|
|
|
top-radius specifies the radius at
end-axis (which can be zero).
|
|
|
ratio is the ratio between the major and minor axis of the ellipse.
|
|
|
position3 (or
x3,
y3, and
z3) is the vector from the projection of
position3 (or
x3,
y3, and
z3) onto the axis of the cone to
position3 (or
x3,
y3, and
z3).
|
|
|
x3,
y3,
z3 are syntax formats available for defining
position3 positional arguments.
|
|
Limitations:
|
Positional arguments format must be consistent. Refer to Description.
|
|
Example:
|
; solid:cone
|
|
; Create first cone. Use 'position' syntax format
|
|
; for defining the starting and ending axis
|
|
; positions.
|
|
(define cone1
|
|
|
(solid:cone (position -20 -5 -9)
|
|
|
(position 15 20 10) 10 2))
|
|
;; cone1
|
|
; OUTPUT Definition
|
|
|
; Set a color for cone1
|
|
(entity:set-color cone1 2)
|
|
;; ()
|
|
; Create second cone. Use alternate position argument
|
|
; format. Define radius of base and top.
|
|
(define cone2
|
|
|
(solid:cone -20 -5 -9 5 15 7.5 10 2 3))
|
|
;; cone2
|
|
; Set a color for cone2
|
|
(entity:set-color cone2 3)
|
|
;; ()
|
|
; Create 3rd cone using alternate position argument
|
|
; format. Define radius of base and top. Add ratio
|
|
; and 3rd position.
|
|
(define cone3
|
|
|
(solid:cone -2 -5 -9 15 20 10 10 2 3 17 22 12))
|
|
;; cone3
|
|
; Set a color for cone3
|
|
(entity:set-color cone3 4)
|
|
;; ()
|
|
; OUTPUT Examples
|
|
|
|
|
Figure 3-2. solid:cone
|