POST
|
The FrontSeg1 code is repeated for each left face because your building has 3 faces classified as left, and the comp in Building separates each left face individually as a different shape and applies the LeftFacade rule to each of the three faces. This means that each of the three left faces will start with FrontSeg1. I think you wanted all the left faces to be processed together as a single shape. This can be achieved by using the = operator instead of the : operator. Building -->
comp(f){ front: FrontFacade | right: RightFacade | left= LeftFacade| back: BackFacade | top: Roof } Additionally, instead of using a split to separate the three parts, you might be able to use a comp and use indices as the selectors to identify the 3 parts. Building -->
comp(f){ front: FrontFacade | right: RightFacade | left= LeftFacade| back: BackFacade | top: Roof }
GroundfloorleftSide -->
comp(f) { 0: FrontSeg1 | 1: FrontSeg2 | 2: FrontSeg3 }
FloorLeftside -->
comp(f) { 0: FrontSeg4 | 1: FrontSeg5 | 2: FrontSeg6 }
... View more
07-03-2023
03:37 AM
|
1
|
1
|
794
|
POST
|
After assigning the subdivision rule to the parcels, you would have to generate it and convert the models to shapes. Then, each lot will be a separate shape which has its own attributes and can report its own values.
... View more
06-22-2023
08:01 AM
|
0
|
0
|
890
|
POST
|
This post discusses corner balconies that go inwards into the building: https://community.esri.com/t5/arcgis-cityengine-questions/balcony-design-for-the-corner-of-the-building/m-p/694323 Corner balconies that extrude outwards from the building mass are slightly different. I tried to find a solution based on the inner corner balcony discussion from the post above, but the solution I found is a little different. I made the side railings and the outer railings separately. This code works for rectangular and non-rectangular quads, but it does not work for non-quads because it assumes that the footprint has 4 vertices. attr Height = 21
attr Floor_Height = 3
attr Balcony_Width = 10
attr Balcony_Depth = 3
attr Balcony_Slab_Thickness = 0.3
attr Balcony_Railing_Height = 1
attr Balcony_Railing_Depth = 0.1
const m = 2 // multiply by some factor to make sure balcony is long enough for acute angled corners
Lot -->
extrude(Height)
comp(f) { side: Facade(comp.index) | all: X. }
Facade(facadeInd) -->
split(y) { Floor_Height: Floor(facadeInd, split.index) }*
Floor(facadeInd, floorInd) -->
case floorInd%2==facadeInd%2:
split(x) { Balcony_Width-Balcony_Depth: BalconyTile(true) | ~1: X. }
else:
split(x) { ~1: X. | Balcony_Width-Balcony_Depth: BalconyTile(false) }
BalconyTile(isFirst) -->
Wall.
OuterBalconyRailings(isFirst)
SideBalconyRailings(isFirst)
s(scope.sx+m*Balcony_Depth, Balcony_Slab_Thickness, Balcony_Depth)
t(-m*Balcony_Depth*float(isFirst), 0, 0)
primitiveCube
BalconySlab.
OuterBalconyRailings(isFirst) -->
s(scope.sx+m*Balcony_Depth, Balcony_Railing_Height, Balcony_Railing_Depth)
t(-m*Balcony_Depth*float(isFirst), Balcony_Slab_Thickness, Balcony_Depth-Balcony_Railing_Depth)
primitiveCube
SideBalconyRailings(isFirst) -->
s('1, Balcony_Railing_Height, 0)
t(0, Balcony_Slab_Thickness, 0)
split(x) { ~float(isFirst): NIL | Balcony_Railing_Depth: extrude(Balcony_Depth-Balcony_Railing_Depth) X. }
... View more
06-08-2023
03:28 PM
|
0
|
0
|
617
|
POST
|
I'm not sure. Could it be that shapes are shown? You can show/hide shapes using F11 or through the visibility settings menu in the viewport here:
... View more
06-08-2023
04:31 AM
|
0
|
0
|
252
|
POST
|
Sorry, moving a single edge of a mesh is currently not possible. Once a comp is done, you have independent pieces of geometry. In your code above, the first comp separates the top from the extruded shape. The rest of the faces are discarded. The second comp separates the left edge of the top face from the rest of the face, and only the left edge remains. The edge is translated, but it is no longer connected to the rest of the mesh, and this probably isn't what you want. I'm guessing you want to move the edge but keep the connectivity to the rest of the mesh as it was after the extrude. The only way to achieve something similar would be to figure out a different series of operations to make several independent pieces of geometry that when viewed as a whole resemble your original goal. For example, perhaps you could use roofShed() on your topbar face to get close to the end shape that you wanted.
... View more
06-08-2023
04:22 AM
|
0
|
0
|
405
|
POST
|
You could use the horizontal and vertical selectors in a comp split to select the bottom face of the roof (which is hidden inside the building, so I NIL it) and the vertical roof pediment sides (which I made a Wall). The remaining faces (all) go to RoofFace which sets up the projection for the roof texture so that it aligns with the roof eave edges (by choosing scope.xy in this case). Roof -->
roofGable(20, 1, 1)
comp(f) { horizontal: NIL
| vertical: Wall
| all: RoofFace }
Wall -->
setupProjection(0, scope.xy, 5, 5)
texture(back_tex)
projectUV(0)
RoofFace -->
setupProjection(0, scope.xy, 8, 8)
texture(roof_tex)
projectUV(0) Note that this solution will not work for all gable roofs. If the roof slope is too steep, the slanted faces will get categorized as vertical. Similarly, if the roof slope is too flat, the slanted faces will get categorized as horizontal. Unfortunately, I don't have a solution that would work all the time.
... View more
06-07-2023
08:38 AM
|
0
|
0
|
696
|
POST
|
Shapes can be deleted in a python script using ce.delete().
... View more
06-07-2023
07:57 AM
|
0
|
0
|
845
|
POST
|
No, sorry, there is currently no official way to import/export data between CityEngine and Indoors. That is an interesting use case though, so thanks for sharing. Indoors stores information as feature service layers. CityEngine has the ability to import feature service layers. Technically, it would be possible to import some data into CityEngine. However, it is highly unlikely that a model could be created in CityEngine using the data from the Indoors feature service layer because each product has different requirements.
... View more
06-07-2023
07:51 AM
|
0
|
0
|
518
|
POST
|
No, sorry, it is not possible to convert a shape to a street shape. Street shapes are special. Street shapes are dynamic shapes that are only created from graph networks. This means street shapes (and all other dynamic shapes) change as you change the graph network.
... View more
06-07-2023
07:39 AM
|
0
|
0
|
474
|
POST
|
You could apply the rule /ESRI.lib/rules/Plants/Plant_Loader.cga to all your imported tree points (which have been imported as tiny squares).
... View more
06-07-2023
07:34 AM
|
0
|
0
|
301
|
POST
|
Sorry, there's no way to delete an imported shape (object) with cga. In addition to being able to delete them manually (as you point out), you can also delete them in a python script with ce.delete(). The keyword NIL in cga is applied to a shape in the derivation shape tree, which is created when cga code is run. This is a different meaning of "shape" than what you describe above. The keyword NIL will delete the geometry of a shape in the derivation shape tree.
... View more
06-07-2023
07:24 AM
|
0
|
0
|
489
|
POST
|
One way to get the floorplates with the slanted part in the middle would be to split the footprint into three pieces, translate the horizontal pieces as desired, then rotate and resize the middle piece recalculating the length using trigonometry according to the desired angle.
... View more
06-07-2023
05:26 AM
|
1
|
2
|
1522
|
POST
|
For a simple pipe network with no vertical pipes, you could make a street network and apply a rule to the street shapes that does an extrude(), which would result in square/box shaped pipes. Vertical pipes are difficult because you can't make the street network vertical. Other pipe shapes are difficult to handle at street network intersections. However, depending on your requirements, there could be creative solutions that work in your specific case.
... View more
06-07-2023
03:09 AM
|
0
|
0
|
574
|
POST
|
You could use assetInfo() to get the size of an obj or assetsSortSize() to sort a list of obj files according to how well they match your current scope. assetsSortRatio() also exists which sorts files by how well they match the reference ratio, but this may or may not be helpful in your case. https://doc.arcgis.com/en/cityengine/latest/cga/cga-asset-info-function.htm https://doc.arcgis.com/en/cityengine/latest/cga/cga-assets-sort-size-function.htm
... View more
06-07-2023
02:23 AM
|
0
|
0
|
695
|
POST
|
Adding to what Jonas suggested, for option 2, I'd also recommend putting the setupProjection in HangarFront before the facade is split, as shown below. To get the texture alignment so the bricks are horizontal, you could use alignScopeToGeometry to align the scope to the lowest edge (which happens to be horizontal in your case) before using setupProjection. I added a rotateScope after the extrude in HangarDoorStorage just to make it more intuitive to select the appropriate faces in the subsequent comp, but this is optional. Here is what I changed in your code above. const facadeTexWidth = 15
const facadeTexHeight = 15
HangarFront -->
setupProjection(0, scope.xy, facadeTexWidth, facadeTexHeight)
split(x) { 4: X
| ~3: split(y) { ~10: Door | 5: X }
| 4: X }
HangarDoorStorage -->
extrude(10)
rotateScope(-90, 0, 0)
comp(f) { top: setupProjection(0, scope.xy, facadeTexWidth, facadeTexHeight) X
| side: Wall_AlignToLowestAndTexture }
RoundedRoofComp -->
comp(f) { object.back: X
| object.front: Wall_AlignToLowestAndTexture
| object.top: Y }
Wall_AlignToLowestAndTexture -->
alignScopeToGeometry(zUp, any, world.lowest)
setupProjection(0, scope.xy, facadeTexWidth, facadeTexHeight)
X
X -->
texture("builtin:uvtest.png")
projectUV(0)
... View more
06-06-2023
03:56 AM
|
0
|
0
|
524
|
Title | Kudos | Posted |
---|---|---|
1 | 12-14-2022 07:18 AM | |
1 | 06-22-2020 04:54 AM | |
1 | 02-17-2020 03:10 AM | |
1 | 07-03-2023 03:37 AM | |
1 | 06-07-2023 05:26 AM |
Online Status |
Offline
|
Date Last Visited |
10-19-2023
12:40 PM
|