CGA Shape Grammar Reference
| Operations | Shape Attributes | Builtin Functions | Other Keywords | CGA Utilities | Misc Information |
This page provides an overview of the operations and functions available in CGA. Visit the CGA Modeling Essentials to learn the foundations of the CGA Shape Grammar.
Operations
Geometry Creation
envelope
extrude
footprint
i (insert)
insertAlongUV
offset
primitiveCone
primitiveCube
primitiveCylinder
primitiveDisk
primitiveQuad
primitiveSphere
roofGable
roofHip
roofPyramid
roofRidge
roofShed
taper
Geometry Subdivision
comp
scatter
setback
setbackPerEdge
setbackToArea
shapeL
shapeO
shapeU
split
splitAndSetbackPerimeter
splitArea
Geometry Manipulation
cleanupGeometry
convexify
deleteHoles
mirror
modify
rectify
reduceGeometry
resetGeometry
reverseNormals
setNormals
softenNormals
trim
Geometry Tagging
Rule Inlining and Boolean 3D
Texturing
Transformations
Scope
Flow Control
Context
Attributes
Shape Attributes
Shape attributes are properties of the current shape. They can always be read like functions, and some of them can be set with the set operation.
Builtin Functions
Functions always return a value and do not alter the current shape, with the exception of probability functions, which change the state of the shape's random number generator.
Math Functions
Probability Functions
Conversion Functions
String Functions
Geometry Functions
geometry.area
geometry.angle
geometry.boundaryLength
geometry.{du|dv}
geometry.groups
geometry.hasTags
geometry.hasUVs
geometry.height
geometry.isClosedSurface
geometry.isConcave
geometry.isInstanced
geometry.isOriented
geometry.isPlanar
geometry.isRectangular
geometry.materials
geometry.nEdges
geometry.nFaces
geometry.nHoles
geometry.nVertices
geometry.tags
geometry.{uMin|uMax|vMin|vMax}
geometry.volume
Material Functions
File Functions
Asset and Image Functions
assetInfo
assetMetadata
assetNamingInfo / assetNamingInfos
assetsSortRatio
assetsSortSize
imageInfo
imagesSortRatio
Occlusion Functions
Context Functions
Array Functions
array initialization
colon operator
comp
findFirst
index operator
nColumns
nRows
setElems
size
sortIndices
sortRowIndices
sum
transpose
Edge Attribute Functions
Miscellaneous Functions
Other Keywords
CGA Utility Functions Library
String Utility Functions
String List Utility Functions
String lists are a series of strings stored inside one string. The elements are separated by a semicolon (;). The data type is string, thus it is not a real array type as used in other scripting languages.
listAdd
listClean
listCount
listFirst
listFromArray
listIndex
listItem
listLast
listRandom
listRange
listRemove
listRemoveAll
listRetainAll
listSize
listTerminate
listToArray
File, Asset and Image Utility Functions
assetApproxRatio
assetApproxSize
assetBestRatio
assetBestSize
assetFitSize
fileBasename
fileDirectory
fileExtension
fileName
fileRandom
imageApproxRatio
imageBestRatio
deleteTags
setTagsFromEdgeAttrs
tag
inline
intersect
subtract
union
copyUV
deleteUV
normalizeUV
projectUV
rotateUV
scaleUV
setupProjection
texture
tileUV
translateUV
center
r (scope rotate)
s (scope size)
t (scope translate)
alignScopeToAxes
alignScopeToGeometry
alignScopeToGeometryBBox
mirrorScope
rotateScope
setPivot
NIL
pop
push
label
color
print
report
resetMaterial
set
setMaterial