When a viaduct is set up in cityengine, The automatically generated pier belongs to an almost same distance pier. What should I do for an unequal pier? In addition, there are many problems with the Equi-distance pier. For example, the pier will be placed on the lower side of the road.
Solution: Obtain the point data of the pier, and then use the model replacement method to replace the point data with the pier.
Solution:
1. First, prepare the model. You can use 3dmax or other modeling software to create a three-dimensional model of the pier. Copy the model file (OBJ) to the assets folder in the project folder.
2. The model replacement method is mainly to insert the pier model at the point position using the I method, but after the model is inserted, the model must be rotated, because the model and the road surface may not be vertical, calculate the Rotation Angle of a pier. Use this angle to rotate the pier so that its section is perpendicular to the road direction. This angle is obtained using the near tool in arctoolbox.
Input Feature: Pier point data
Near freature: road center line data
Angle: calculation result inclusion Angle
After calculation, a field near_angle is added to the vertex layer to record the angle.
When using the near calculation angle, we should note that the point cannot be placed online, and there should be a slight deviation; otherwise, it cannot be calculated.
3. Join the calculated angle data to the original point Data Attribute Table, and re-export and save the original point data, generate the final point layer file with rotation angle data
4. Load vertices and Pavement Data to cityengine
5. Generate rules as follows:
ATTR Height= 0 // obtain the value from the Attribute Table
ATTR Near_angle= 0 // obtain the value from the Attribute Table
Lot-->I("Bridge_pire.obj")
R(0,Near_angle+ 90,0)
S(5,Height, 20)
T(0 ,-Scope. Sy-0.5, 0)
Center(Xz)
Mirrors.pdf(False,True,False)
Result