I want to make a 3D circular culvert in the city engine using the Rule package. I made a solid 3d circular culvert but I want a hollow 3D circular culvert. So someone please help me to complete this task. How can I do this?
Hello @bhusalshishir
Here is CGA code that creates a primitiveDisk and then uses the offset operation to hollow it out.Then the extrude operation gets applied on the annulus to form a culvert. Finally, the setNormals operation is used to set the normals of the inner and outer mantle to soft.
version "2024.1" @Description("Inner diameter") @Distance @Range(min=0.1, max=5) attr diameter = 1 @Description("Culvert length") @Distance @Range(min=0.1, max=20) attr length = 2 @Description("Wall thickness") @Distance @Range(min=0.1, max=1) attr thickness = 0.1 @Description("Number of subdivisions of the outer mantle") attr sides = min(128,max(16,floor(8*diameter)*4)) @StartRule Culvert --> Annulus Annulus --> primitiveDisk(sides, diameter+thickness) offset(-thickness) comp(f) { border = Extrude} Extrude --> extrude (length) comp(f) { side = setNormals(soft) Culvert. | all : Culvert. }
Thank you so @ThomasFuchs for your help, it means a lot to me. Thank you for your time and assistance.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.