Hi. I have a couple of shapefiles, based on diffrent floors shapes. I need to extrude one by one, starting from the top of last floor. How to do that using rule ?
This is easy if all the floor heights are the same, because the floors can be lifted to the right height without any awareness of the other floor plans. This is because a CGA rule only runs on one shape at a time. In this case the shapes only need to know their floor number (what button you push in the elevator). BUT, if each floor has a different height (floor-to-floor height), then we would add an attribute for that, but then rather than relying on the floor number for setting the elevation, we would need the actual elevation of each floor, which makes for a bit more manual calculation. Here is the rule for using only a floor number with a constant floor height:
# Using a constant floor height to keep things simple.
const floorHeight = 3.75
# Set to correct floor number for this shape. Floor #0 is ground level.
attr floorNumber = 0
t(0, floorNumber * floorHeight, 0)
Shapes start on same plane, and you set the floorNumber on each shape:
Models generated will translate the shape upwards to correct floor elevation, and extrude upwards by floorHeight amount.
Can you explain these shapes and their attributes further and/or provide screen shots?
Of course. This is one buliding, I have a shapefiles made by floors plans and I need to create this building whith this shapes one floor by one, but I need to save details, every cut and heights basing on building plans. Extrusion in CGA file starts extrude from 0 to specific elevation, I'm trying extrude shapefiles from specific elevation (for e.g 5m or top of previous floor ) to specific elevation.
Are the shapes all resting on the same XZ plane (ground level)? Or do they rest at correct elevations already?
Do you need the floors to have specific floor heights, which differ?
All shapes are resting on the same ground level, no Z coordinate.
Heights of floors should be driffrent, but if be 3,75m for each one, would be good.
Thank you very much! Works excellent!
Retrieving data ...