|
POST
|
Hello @biaozeng Thank you for this interesting question! Here are some CGA helper functions that will give you the index of the face with the largest area: version "2024.1"
sizes = comp(f){ all : geometry.area() }
indices = sortIndices(sizes)
largestIndex = indices[size(indices)-1]
@StartRule // Apply on a shape with multiple front faces
Generate -->
comp(f) { front = comp(f) { largestIndex : color(1,0,1) fa. } }
... View more
02-19-2025
07:33 AM
|
2
|
3
|
900
|
|
POST
|
Thanks @desert for providing more help.
At this point it also needs to be mentioned, that those "unexpected token" errors generally occur when using a wrong syntax in a previous code statement. It is always a good idea to consult the online help. Usually there are also code snippets provided that show common usage.
Also the code completion feature (hit <ctrl + space> while typing) can help finding the right syntax.
setback operation—ArcGIS CityEngine Resources | Documentation
... View more
11-18-2024
07:29 AM
|
0
|
0
|
1785
|
|
IDEA
|
11-18-2024
07:06 AM
|
0
|
0
|
293
|
|
POST
|
Hello @Kayleigh_T
Thanks for your interesting question! As you described, a rule package (*.rpk) has assets bundled into a file. Those assets are the ones referenced in the compiled rule (*.cgb). Optionally, the source rule files (*.cga) can also be included.
However, the references in the rule are relative to the CityEngine workspace. To resolve those asset file references to the bundled ones, a file named .resolvemap.xml is included in every RPK. So if you are re-using CGA code from an RPK, make sure that all assets are correctly referenced relative to your workspace first. Then create a new RPK.
To facilitate the task it makes sense to create a new project in the workspace and copy the content of the RPK into the folder structure of this projects. This should correctly reference rules and assets that were residing in the original project. Files from other projects are collected in the ".ws" folder. Those file references still need to be updated.
I hope this lets you successfully customize the rule package.
... View more
11-18-2024
01:45 AM
|
2
|
1
|
695
|
|
POST
|
Hello @Yu_Tung_Lin0
Thank you for your question. I looked into the CGA code you provided and found several issues:
Setting attributes needs the set operation—ArcGIS CityEngine Resources | Documentation
When addressing elements in an array, this is how to use the index operator—ArcGIS CityEngine Resources | Documentation
The rand function returns floats, for addressing first convert to integer using rint function—ArcGIS CityEngine Resources | Documentation
The unexpected token errors are resolved in this version of the setAttributes(index) rule above:
// Set attributes
setAttributes(i) -->
set(Buildingoffset, float(data[rint(i),0]))
set(Height, float(data[rint(i),1]))
set(ArcadeSetback, float(data[rint(i),2]))
set(Streetoffset, float(data[rint(i),3]))
set(GreenCoverPercentage, float(data[rint(i),4]))
generateBuilding()
I hope this helps you completing your project successfully 😊
... View more
11-15-2024
02:48 AM
|
0
|
3
|
1843
|
|
POST
|
Hello @corintho
Thank you for your question. Unfortunately only the inner curb radius can be changed to be a corner. However, there is a "creative" way to get your desired result. You can can turn the road bend into a T-crossing by adding a tiny segment. Then assign "Sidewalk" as a start rule to the street segment.
... View more
10-30-2024
05:22 AM
|
1
|
0
|
556
|
|
IDEA
|
Thanks for providing this use case. The CityEngine team is considering to offer this functionality.
... View more
10-29-2024
08:01 AM
|
0
|
0
|
742
|
|
DOC
|
Good news 😀 @nicolaisteino , @REDSUN , @pinlv Thank you so much @LionelHenry_EsriFrance for confirming CityEngine 2023 works on Mac with Parallels Desktop. I found this Parallels KB article that also explicitly mentions ArcGIS CityEngine 2023 (and later) can be used: OpenGL versions supported in Parallels Desktop
... View more
08-12-2024
06:01 AM
|
0
|
0
|
7651
|
|
POST
|
Hello, I have an important update for all users of AMD Graphics: If you encounter a black viewport, open the driver settings and ensure the global graphics settings for Anti-Aliasing are set to "Override application settings".
... View more
08-08-2024
05:54 AM
|
0
|
0
|
1113
|
|
POST
|
Hello @Farhan Thanks for your question. When creating the RPK please make sure the asset is included in the package. If not, it is possible to manually add the OBJ and its dependencies (.mtl) in the dialog:
... View more
08-07-2024
03:53 AM
|
0
|
0
|
556
|
|
POST
|
Hello @jabrett Thanks for submitting this question. When defining setbacks, it is not necessary to use shapeO(). Please use the setback operation—ArcGIS CityEngine Resources | Documentation instead. To create the T-shape you also want to use the t operation—ArcGIS CityEngine Resources | Documentation to translate the scope after adjusting it's size.
... View more
08-07-2024
03:43 AM
|
0
|
0
|
509
|
|
POST
|
Here is where you will find the beta version download on Esri Early Adopter
... View more
06-14-2024
05:51 AM
|
0
|
0
|
1060
|
|
POST
|
Hello @aogino here is the documentation on importing basemaps: Get Map Data—ArcGIS CityEngine Resources | Documentation Currently only Esri tile services are supported.
... View more
06-12-2024
04:00 AM
|
0
|
0
|
755
|
|
POST
|
Hello @aogino Your CGA code compiles without error. When applying it to a shape, the resulting model is the shape extruded by 10m.
... View more
06-12-2024
03:57 AM
|
0
|
0
|
895
|
|
POST
|
Hello @ChanningWang Thank you for bringing up the OSM boundary information. The OSM importer in CityEngine doesn't need this information. Could you please tell me more about the "subsequent calculations" you want to perform?
... View more
04-23-2024
04:25 AM
|
0
|
1
|
940
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-15-2025 08:03 AM | |
| 1 | 10-16-2025 03:16 AM | |
| 3 | 10-20-2025 06:11 AM | |
| 1 | 04-19-2023 12:30 AM | |
| 1 | 02-27-2025 05:19 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|