POST
|
Hello all. I'm trying to model a street layout, where the sidewalk on each side has a different width. Is there any way that the rulefile can determine the width of the sidewalk? An example could be that if the sidewalk is wider than 3 meters do one thing, and if it less than 3 meters do something else. The streets are bending so the the scope.sz is not doing the job for me. kind regards Kristian
... View more
11-30-2018
11:52 PM
|
0
|
0
|
387
|
POST
|
Hello Lorin. If I understand you correctly you want to create a building that "steps back", the best way I have found to do that is to create the bottom floor shape, and then move that one up with the "t" function so the code would look something like this: attr siy = 0 // floor counter attr sty = 3 //Number of floors attr floorHeight = 3 //Floor height attr setbackDist = 1 //setback distance @startrule A01 --> //This code creates a loop that adds new floors until the "sty" is reached. case siy < sty : A02(siy,sty) set(siy,siy+1) t(0,floorHeight,0) A01 else: A02(siy,sty) A02(siy,sty) --> //This code takes the top floor and makes it the roof case siy == sty : setback(setbackDist*siy-1) {front : NIL | remainder : Roof00} else: A03(siy,sty) A03(siy,sty) --> //This code creates the setbact of each floor, siy is the floor number where siy = 0 is the bottom floor, and siy = sty is the roof setback(setbackDist*siy) {front : Balcony(siy,sty) | remainder : A04(siy,sty)} A04(siy,sty) --> // here is each floor extruded to create a volume. extrude(floorHeight) comp(f) {side: Facade | bottom : Floor00} Balcony(siy,sty) --> //this is the balcony area setback(setbackDist*siy-1) {front :NIL | remainder: color(1,0,0)Balcony01} This is maybe not the best code for doing it, but it will get the job done, you can always play around with it to see if you can make it better
... View more
10-22-2018
04:44 AM
|
2
|
0
|
353
|
POST
|
Hello David. That could work, at least for the front. but not for the sides as the angle which is used to create the roofshed is not the same all along the edge of the site, do to the upward slope of the startshape. I think the envelope would be a very nice way to do it, but as mentioned all the edges are named the same which is a problem. But I'm probably going to use a combination of the "Extrude(world.up.flatTop)", and the roofshed. But if you have any other ideas they will be highly appreciated btw David, you streets rules are very very nice! Like the level of detail and effort you put into it
... View more
10-27-2017
02:08 AM
|
0
|
0
|
562
|
POST
|
Hello. I'm trying to create a plateau on a sloped shape, and for that, I was thinking about using the "Envelope" operation, it would be nice if the top of the plateau was horizontal and the edges were sloped inward. First I tried the extrude(world.up.flatTop) but the problem is that the sides of the plateau is vertical and not sloped, after that, I looked at the envelope operation, and this works as long as the startshape is not generated from streets. I think this is because all the edges are facing a street and therefore is "street.front". So I want to know if anybody has any idea of creating the plateau with sloped sites, Below is an image of my try with envelope, and the image to the right is exactly what I want, but unfortunately, it does not work when the shape is created from streets. ´´´ @Range(0,90) attr slopeAngleFront = 45 @Range(0,90) attr slopeAngleSide = 45 @Startrule Lot --> envelope(world.up, 10, 0, slopeAngleFront, 0, 0, 0, slopeAngleSide, 0, slopeAngleSide) Terrain ´´´ Kristian Mortensen
... View more
10-26-2017
04:45 AM
|
0
|
3
|
698
|
POST
|
Thanks for the answer and your solutions would work in the specific case, but it is not directly what I'm looking for, the problem is I don't want to have any "leftover" space at the edges but have it divided into equal sizes with a minimum distance of 2, everything above 2 is fine.
... View more
09-20-2017
04:18 AM
|
0
|
1
|
367
|
POST
|
Unfortunately, it doesn't work on curved streets, and I can't seem to find a workaround. Further is there a problem if a street is divided into multiple segments, then the segments which are not ending in a junction is generated with the "buffer zone", but the scope is not extending beyond the sidewalk leading to problems, of course, this can be fixed with and of/off function. To me, the street functions have lots of potentials, but it is difficult to create a specific design, and as far as I can see in the "complete street" example the CE guys are mainly using clever texturing to create their design. Have you found a way to evade the scope problem?
... View more
09-19-2017
12:06 PM
|
0
|
1
|
972
|
POST
|
Hello I'm trying to split a surface into as many parts as possible without any leftover space, so I figured that the floating split would be perfect. Unfortunately, I encounter a problem where the split distance is shorter than the floating number, is there a way to make the floating number the minimum distance? An excample could be that you have an 11 meters long surface you need to split into smaller surfaces with the floating distance of 2. I would then write: Surface --> split(x) {~2 : Surface01 }* in this case, the split can produce either 5 splits that each is 2.2 meters or 6 splits that are 1.83 meters, I guess that CE would create 6 splits as that creates the width that is closest to 2, but what would if I wanted it to do five splits?. Is there a way to ensure that 2 is a minimum distance? Kind regards Kristian
... View more
09-19-2017
05:28 AM
|
0
|
3
|
488
|
POST
|
Hello Devin I know this is an old question, but in case of other people experience the problem I think I found why it happens. Your split is right, and so is what CE is doing, the problem occurs in the way CE is creating the junction between two roads. If you look at the picture below you can see that CE automatically joins the too sidewalks, when this is done the "street" is merged in a rounded corner. This looks pretty nice but creates a problem when splitting along the street because the scope of the street starts approximately 0.95 meters within the sidewalks. So to work around it can I see two possible methods, either you increase the split closest to the sidewalk by 0.95 meters, or you start by splitting the street across in both ends. Both of these methods are not perfect, but they will get the job done. In relation to using the uv split, I find it easier to use the xyz split, and then the first create a alignScopeToGeometry and then afterwards use a rotateScope in case that the "longest" is across the road. Street --> alignScopeToGeometry(yUp, any, longest) rotateScope(0,rotateStreet,0) Street01 Kind regards Kristian
... View more
09-19-2017
05:17 AM
|
2
|
3
|
972
|
POST
|
So there is no way to do it without having to export the report out of CE?
... View more
09-12-2017
10:01 AM
|
0
|
1
|
587
|
POST
|
Hello I have been wondering if there is a way to make python update an attribute from a report in CE. I have declared a start value to an attribute, which is used throughout the script, I then want to change this attribute to a number that is reported when the whole script has run, and instead of doing this for a 100 startshapes it would be easier to run a script. Kind regards Kristian
... View more
09-11-2017
06:06 AM
|
0
|
4
|
817
|
POST
|
Hello I have seen that the new CE gives the possibility to use labels, as a way of communicating between different start shapes. I'm trying to write a script which lets me color the white squares according to the color of the shapes that is next to the it. this is the rule so fare: attr elevationNumber = 0 @range (0.0,1.0) attr minElevation = 0.2 @range (0.0,1.0) attr maxElevation = 0.6 @Startrule lot --> case elevationNumber <= minElevation: color(0,0,0) case elevationNumber >= maxElevation: color(0,0,0) else: color(1,1,1) My idear is to label the each shape and then make the rule check the color of the adjacent tiles. Hope that somebody has experiences with using labels and can point me in the right direction.
... View more
07-13-2017
02:44 AM
|
0
|
1
|
544
|
POST
|
Hello I'm trying to figure out how big a percent an area of a surface is compared to the area of multiple surfaces. Hope somebody has any idea of how this can be achieved, basically, I want to know how big a percent each of the A3 is compared to the sum of all the A3's. This is the code I have been writing. attr rotateLot = 0 attr b1 = 40 attr r1 = 10 attr s1 = 40 attr r2 = 20 attr a0Dist =50 attr dist01 = 10 lot --> alignScopeToGeometry(yUp, 1) rotateScope (0,rotateLot,0) split(x) { b1 : A01 | r1 : B01 | ~1 : A01 | r2: C01 | s1 : D01} A01 --> split(z) {a0Dist : A02 | a0Dist : A02 | ~1 : Grass} A02 --> innerRectangle(edge) {shape : A03(geometry.area) | remainder = Grass} A03(area)--> print(area) when running the script the console prints the area for the four A03 shapes, is there any way to get the sum of that "list"? If I find the sum the goal is to take the sum and then divide that by the area of each individual shape in order to figure out how large a percent each shape is compared to the whole. I hope somebody knows how this can be done, or at least an idea of where to look.
... View more
06-28-2017
08:42 AM
|
0
|
1
|
510
|
POST
|
Hi Is there a way to set an attribute permanently to a number that is generated as a report?. The number in the report is calculated in a main CGA file, and the attributed that needs to have to same number is in a CGA file further down the stream.
... View more
12-13-2016
01:19 AM
|
0
|
2
|
1193
|
POST
|
Hi I have a problem, I want to insert an obj file into my CE scene, I have created an Oshape but when I use the import function, it inserts the object into the area, but it has been moved a bit, the obj file is just a flat surface created in rhino with lower left corner in (0,0). as you can see there is a small cap between the white area and the read along the straight edge. Here is the code attr detentionVolume = 100 attr z1 = 10 attr x1 = 10 attr D1 = 1 attr x = 0 attr z = 0 attr waterPond_Z = 10 @Hidden attr waterPond_X = 10 @startrule WaterPondN0101 --> // Creates an Oshape with the front width and right width of the wing set (x, scope.sx) // and the width and lenght of the center shape. set (z, scope.sz) set (detentionVolume, detentionVolume * 1.42713) set (waterPond_X, detentionVolume/(waterPond_Z*D1)) report ("Vol",detentionVolume) shapeO (z1,x1,(z-z1-waterPond_Z),(x-x1-waterPond_X )) {shape : BldgFootprint | remainder : WaterPondN0102 WaterPondEdge01} WaterPondN0102 --> i ("Pond/Pond_02.obj") (This insert is wrong) extrude(world.up.flatTop,-(scope.sy+D1)) WaterPondEdge01 --> s ('1,'1,'1) center(xz) i ("Pond/Pond_02_scope.obj") (This insert is wrong) color(1,0,0)
... View more
12-12-2016
12:52 AM
|
0
|
1
|
608
|
POST
|
Hello I'm trying to combine some data from an excel ark with an AutoCAD map, then import it into city engine to create a 3D map of the area. Each dataset is referenced with a set of coordinates from google maps, and I have been able to merge the data to the AutoCAD map in QGIS, but as the data is referenced as google coordinates it has a CRS [ESPG:4326 WGS84]. After I have merged the data and the map I want to import it into CE, but I can't find that CRS in CE, I have tried to convert to different CRS in Qgis but it then ruins the proportions. Any idea of how I the CRS [ESPG:4326 WGS84] into CE?. I have CE 2015, and no access to ArcGIS.
... View more
11-23-2016
03:34 AM
|
0
|
0
|
727
|
Title | Kudos | Posted |
---|---|---|
2 | 10-22-2018 04:44 AM | |
2 | 09-19-2017 05:17 AM | |
1 | 10-06-2016 01:40 AM | |
1 | 10-07-2016 09:44 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|