Extrude shapefile starting from specific elevation

2212
6
Jump to solution
12-06-2014 01:28 PM
deleted-user-VyP7GAnGbE7x
New Contributor II

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 ?

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

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:




version "2014.1"


# 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 


@StartRule
FloorPlanStack -->
  t(0, floorNumber * floorHeight, 0)
  extrude(floorHeight)










Shapes start on same plane, and you set the floorNumber on each shape:

FloorPlansOnLevelElevation.jpg

Models generated will translate the shape upwards to correct floor elevation, and extrude upwards by floorHeight amount.

FloorPlansOnLevelElevationModels.jpg

Chris

View solution in original post

6 Replies
by Anonymous User
Not applicable

Can you explain these shapes and their attributes further and/or provide screen shots?

0 Kudos
deleted-user-VyP7GAnGbE7x
New Contributor II

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.

Zrzut ekranu (83).png

Zrzut ekranu (84).png

Zrzut ekranu (85).png

Zrzut ekranu (86).png

0 Kudos
by Anonymous User
Not applicable

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?

0 Kudos
deleted-user-VyP7GAnGbE7x
New Contributor II

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.

0 Kudos
by Anonymous User
Not applicable

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:




version "2014.1"


# 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 


@StartRule
FloorPlanStack -->
  t(0, floorNumber * floorHeight, 0)
  extrude(floorHeight)










Shapes start on same plane, and you set the floorNumber on each shape:

FloorPlansOnLevelElevation.jpg

Models generated will translate the shape upwards to correct floor elevation, and extrude upwards by floorHeight amount.

FloorPlansOnLevelElevationModels.jpg

Chris

deleted-user-VyP7GAnGbE7x
New Contributor II

Thank you very much! Works excellent!

Zrzut ekranu (87).png

0 Kudos