In cityengine, there are two options for road export:
Use File Size Limit: export the selected path as an OBJ file
Create one: route the selected road to a network node. Each line segment is exported as an obj.
Neither of the preceding two export methods can export a complete path as an OBJ file, that is, the path cannot be exported as an independent model file according to feature.
To export the path by feature, you need to use the Python script in cityengine for custom export.
1. Export a single Road Based on the road name
1. Add the name field to the Road Layer attribute data. The type is text.
2. assign a value to the name field (non-Chinese)
3. Generate a road model
4. Create a script file and edit it as follows:
Parameter description:
The Union in CE. withname ("'Union '") is the name of the road.
Name is the name of the exported model file.
D:/tmp is the export path
5. Select a model, file ---- export models of selected shapes (allmodels are generated), select script based Export (Python), and finally select a script in MISC options.
6. Click Finish to export the model.
2. Export all data based on the road name
The actual data processing method is as follows:
1. Assign the name field added to the road GIS data to its FID, reload the network data, and generate a model.
2. Modify the Python script:
28 in the range parameter is the number of roads + 1 (currently, the circular model is exported based on the number of roads)
3. Execute the preceding script to obtain the result.
Note:
1. The sample data used in this document is data ---- streets. SHP In the Pasadena project in the Tutorial:
2. The file name issue is not well resolved during batch export at the full graph layer in the second part. We need to continue to study more intelligent export scripts.
3. Some errors may occur in some situations.
This problem is temporarily analyzed as a data or script problem, but is not found in the 50 rows of the actual data test.