Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
timmcginley committed May 17, 2022
1 parent 841e0ca commit a3ffb19
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
8 changes: 6 additions & 2 deletions HTMLBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,19 @@ def writeCustomHTML(model):
for floor in floors:
# check if floor is lower than elevation...
type = "floor_upper"
if (site_elev == floor.Elevation):
if ( site_elev-.1 <= floor.Elevation <= site_elev+.1):
type = "floor_ground"

elif (site_elev < floor.Elevation):
type = "floor_upper"
else:
type = "floor_lower"

custom+=5*"\t"+"<floor- class=\""+type+"\" elev=\"{}\" >{}<span class=\"floor_stats\">{}</span> </floor->\n".format(floor.Elevation,floor.Name, round(float(floor.Elevation),3))


if (type == "floor_ground"):
custom+="<ground-></ground->"

# ---- CLOSE IT ALL
custom+=4*"\t"+"</building->\n"
custom+=3*"\t"+"</site->\n"
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

import HTMLBuild as hb

hb.modelLoader("22_05_01")
hb.modelLoader("22_03_01")
20 changes: 10 additions & 10 deletions output/css/html-build.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ building- {
border-color: #000;
width:270px;
color:#1b1b1b;
border-top: 4px solid black;
/*border-top: 4px solid black;*/
min-height: 20px;
overflow: hidden;
}
Expand Down Expand Up @@ -79,8 +79,8 @@ floor- {
position:relative;
padding:2px;
padding-left:10px;
width:254px;
left:-102px;
width:230px;
margin:auto;
margin-top:2px;
color:#1b1b1b;
border-bottom: 4px solid black;
Expand All @@ -101,19 +101,18 @@ mep- {
border-top: 2px dashed cyan;
}

/* IfcFoundation */

foundation- {

ground-{
display:block;
background-color:#C4A484;
margin: auto;
overflow: auto;
padding-top:0px;
padding:2px;
padding-left:10px;
width:450px;
height:20px;
color:#1b1b1b;
border-top: 4px solid brown;
border-top: 6px solid black;

}

/* floor styling */
Expand All @@ -133,12 +132,13 @@ foundation- {
background-color: #eee;
border-left: 2px dashed gray;
border-right: 2px dashed gray;
border-bottom: 4px solid brown;
border-bottom: none;
}
.floor_lower {
background-color: #ddd;
border-left: 2px solid brown;
border-right: 2px solid brown;

}

.floor_stats {
Expand Down
6 changes: 3 additions & 3 deletions output/duplex/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<building->
<floor- class="floor_upper" elev="6.00000000000039" >Roof<span class="floor_stats">6.0</span> </floor->
<floor- class="floor_upper" elev="3.100000000000378" >Level 2<span class="floor_stats">3.1</span> </floor->
<floor- class="floor_ground" elev="0.0" >Level 1<span class="floor_stats">0.0</span> </floor->
<floor- class="floor_lower" elev="-1.25" >T/FDN<span class="floor_stats">-1.25</span> </floor->
</building->
<floor- class="floor_lower" elev="0.0" >Level 1<span class="floor_stats">0.0</span> </floor->
<floor- class="floor_ground" elev="-1.25" >T/FDN<span class="floor_stats">-1.25</span> </floor->
<ground-></ground-> </building->
</site->
</project->
</body>
Expand Down

0 comments on commit a3ffb19

Please sign in to comment.