lib/floorplanner/design.rb in floorplanner-fml-0.2 vs lib/floorplanner/design.rb in floorplanner-fml-0.2.1
- old
+ new
@@ -66,11 +66,11 @@
end
min_height = 10
@walls = WallBuilder.new do |b|
@xml.find(LINES_QUERY % @design_id).each do |line|
floats = line.find('points').first.get_floats
-
+
thickness = line.find('thickness').first.content.to_f
height = line.find('height').first.content.to_f
# TODO: fix this in Flash app
floats[1] *= -1.0; floats[4] *= -1.0
@@ -93,10 +93,10 @@
pos_floats[1] *= -1
size_floats = opening.find('size').first.get_floats
position = Geom::Number3D.new(*pos_floats)
size = Geom::Number3D.new(*size_floats)
-
+
asset_id = opening.find('asset').first.attributes['refid']
asset = @xml.find(ASSET_QUERY % [@design_id,asset_id]).first
type = asset.find('url2d').first.content.match(/door/i) ? Opening3D::TYPE_DOOR : Opening3D::TYPE_WINDOW
@walls.opening(position,size,type)
end