📚 CGA.js 函数库

按 CityEngine 官方文档分类排列
--
函数总数
--
✅ 已完成
--
🟡 部分完成
--
❌ 未完成
94
🔵 扩展/新增

🏗️ Geometry Creation 23/23

extrude已实现
primitiveCube已实现
primitiveCone已实现
primitiveDisk已实现
primitiveQuad已实现
insert已实现
i已实现
insertAlongUV已实现
taper已实现
roofHip已实现
roofGable已实现
roofPyramid已实现
roofRidge已实现
roofShed已实现
envelope已实现
offset已实现
scatter已实现
primitivePyramid已实现扩展
repeat已实现扩展
copy已实现扩展
instance已实现扩展

✂️ Geometry Subdivision 19/19

split部分
comp部分
setback已实现
setbackToArea已实现
shapeL已实现
shapeU已实现
shapeO已实现
splitArea已实现
f已实现扩展
e已实现扩展
v已实现扩展
fe已实现扩展
fv已实现扩展
g已实现扩展
h已实现扩展
m已实现扩展

🔧 Geometry Manipulation 15/15

mirror已实现
mirrorScope已实现
setNormals已实现
softenNormals已实现
modify已实现
deleteHoles已实现
convexify已实现
resetGeometry已实现
rectify已实现
footprint已实现
deleteTags已实现扩展
normalize已实现扩展

🔗 Rule Inlining and Boolean 9/9

union已实现
subtract已实现
intersect已实现
inline已实现
conditional已实现扩展
stochastic已实现扩展
extension已实现扩展
start已实现扩展
with-params已实现扩展

🎨 3D Texturing 13/13

color已实现
texture已实现
projectUV已实现
translateUV已实现
scaleUV已实现
rotateUV已实现
tileUV已实现
normalizeUV已实现
deleteUV已实现
copyUV已实现
setMaterial已实现
resetMaterial已实现

🔃 Transformations 7/7

t已实现
translate已实现
r已实现
rotate已实现
s已实现
scale已实现
rotateScope已实现

📐 Scope 5/5

setPivot已实现
center已实现

📊 Shape Attributes 11/11

scope.sx已实现
scope.sy已实现
scope.sz已实现
scope.tx已实现
scope.ty已实现
scope.tz已实现
scope.rx已实现
scope.ry已实现
scope.rz已实现
PI已实现扩展
E已实现扩展

🔢 Math Functions 30/30

abs已实现
acos已实现
asin已实现
atan已实现
atan2已实现
ceil已实现
clamp已实现
cos已实现
exp已实现
floor已实现
isinf已实现
isnan已实现
ln已实现
log10已实现
max已实现
min已实现
pow已实现
rint已实现
sign已实现
sin已实现
sqrt已实现
sum已实现
tan已实现
frac已实现
trunc已实现
log已实现扩展
round已实现扩展
hypot已实现扩展
cross已实现扩展
dot已实现扩展

🎲 Probability Functions 4/4

p已实现
rand已实现
rand.int已实现
rand.gaussian已实现

🔄 Conversion Functions 12/12

bool已实现
float已实现
int已实现
str已实现
isNull已实现
sel已实现
convert已实现
array已实现扩展
boolArray已实现扩展
floatArray已实现扩展
stringArray已实现扩展
string已实现扩展

🔤 String Functions 21/21

count已实现
find已实现
splitString已实现
substring已实现
strreplace已实现
replace已实现
toupper已实现
tolower已实现
findLast已实现
getPrefix已实现
getSuffix已实现
getRange已实现
trim已实现
endsWith已实现
includes已实现
format已实现
strlen已实现扩展
search已实现扩展
strcasecmp已实现扩展
strfind已实现扩展
startsWith已实现扩展

📋 Array Functions 15/15

size已实现
nRows已实现
nColumns已实现
transpose已实现
findFirst已实现
findAll已实现
setElems已实现
sortIndices已实现
reverse已实现
append已实现
pop已实现
slice已实现
push已实现
sort已实现

📜 List Functions 16/16

listAdd已实现
listClean已实现
listCount已实现
listFirst已实现
listFromArray已实现
listIndex已实现
listItem已实现
listLast已实现
listRandom已实现
listRange已实现
listRemove已实现
listRemoveAll已实现
listRetainAll已实现
listSize已实现
listTerminate已实现
listToArray已实现

📐 Geometry Functions 27/27

geometry.area已实现
geometry.angle已实现扩展
geometry.bbArea已实现扩展
geometry.bbHeight已实现扩展
geometry.bbWidth已实现扩展
geometry.bottom已实现扩展
geometry.isClosed已实现扩展
geometry.length已实现扩展
geometry.nHoles已实现扩展
geometry.width已实现扩展
top部分扩展
topology.averageNormal已实现扩展

🎨 Material Functions 15/15

colorRamp已实现扩展
colorConvert已实现扩展
hsb已实现扩展
rgb已实现扩展
colorHSVOToHex已实现扩展
colorHSVToHex已实现扩展
colorHexToB已实现扩展
colorHexToG已实现扩展
colorHexToH已实现扩展
colorHexToO已实现扩展
colorHexToR已实现扩展
colorHexToS已实现扩展
colorHexToV已实现扩展
colorRGBOToHex已实现扩展
colorRGBToHex已实现扩展

📁 File Functions 13/13

fileBasename已实现
fileDirectory已实现
fileExtension已实现
fileName已实现
fileExists已实现
fileSearch已实现
filesSearch已实现
readTextFile已实现
filePath已实现扩展
fileRandom部分扩展
readMaterial已实现扩展

🖼️ Asset and Image Functions 20/20

assetInfo已实现
assetMetadata已实现
imageInfo已实现
assetApproxRatio部分扩展
assetApproxSize部分扩展
assetBestRatio部分扩展
assetBestSize部分扩展
assetDepth已实现扩展
assetExt已实现扩展
assetFitSize部分扩展
assetHeight已实现扩展
assetNamingInfo已实现扩展
assetNamingInfos已实现扩展
assetType已实现扩展
assetWidth已实现扩展
assetsSortRatio部分扩展
assetsSortSize部分扩展
imageApproxRatio部分扩展
imageBestRatio部分扩展
imagesSortRatio已实现扩展

👁️ Occlusion Functions 5/5

inside已实现
overlaps已实现
touches已实现
getGeoCoord部分扩展

🌐 Context Functions 3/3

contextCount已实现
getTreeKey部分扩展

📏 Edge Attribute Functions 6/6

setTagsFromEdgeAttrs已实现扩展
label已实现扩展
tag已实现扩展

🔧 Miscellaneous Functions 4/4

print已实现
report已实现
NIL已实现
set已实现

📝 CGA Language Keywords 7/7

attr已实现
const已实现
import已实现
style已实现
case已实现
else已实现
version已实现

🏷️ Annotations 9/9

@Range已实现
@Enum已实现
@Group已实现
@Hidden已实现
@Color已实现扩展
@Deprecated已实现扩展
@Description已实现扩展
@Locked已实现扩展
@Order已实现扩展