Permalink
Browse files

Added basic panel labels to the SVG output.

  • Loading branch information...
1 parent 61b6c47 commit c6bced8aadc0c7455cbc1e1b718a9a8b1ac01f4d @tav committed Sep 29, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 wikihouse.rb
View
@@ -386,7 +386,7 @@ def generate
base_x += scale * margin
base_y += scale * margin
- sheet.each do |loops, circles|
+ sheet.each do |loops, circles, outer_mapped, centroid, label|
Sketchup.set_status_text WIKIHOUSE_SVG_STATUS[(loop_count/5) % 5]
loop_count += 1
@@ -419,6 +419,12 @@ def generate
end
end
+ if label and label != ""
+ svg << <<-LABEL.gsub(/^ {12}/, '')
+ <text x="#{(scale * centroid.x) + base_x}" y="#{(scale * centroid.y) + base_y}" style="font-size: 5mm; stroke: rgb(255, 0, 0); fill: rgb(255, 0, 0); text-family: monospace">#{label}</text>
+ LABEL
+ end
+
svg << '</g>'
end
@@ -558,7 +564,7 @@ def initialize(panels, root, dimensions)
while available_area > 0
- Sketchup.set_status_text WIKIHOUSE_LAYOUT_STATUS[(loop_count/10) % 5]
+ Sketchup.set_status_text WIKIHOUSE_LAYOUT_STATUS[(loop_count/20) % 5]
loop_count += 1
panel_data = panels[idx]

0 comments on commit c6bced8

Please sign in to comment.