=begin
TIG (c) 2015  

All rights reserved.    

# Name:           Mirror
# Description:    Mirrors Selection at Point, Line or Plane
# Author[s]:      From an original idea by Frank Wiesner: 
#		              but from v2.6 onwards it's been fully TIG tweaked, 
#                 and completely updated and rewritten...###
# Usage:          1. Make Selection (Any type[s] of Entites are allowed)###
#                 2. Select 'Mirror Selection' from Plugins Menu 
#					           or from the equivalent on the Right-Click Context-Menu
#                    or using your favorite ShortCut Key [e.g.Shift+R] ###
#                    or from the 'Mirror' Toolbar [this toolbar will be  
#                    available for activation from the View>Toolbars 
#                    Menu IF the button icon image MI.png is in the 
#                    same folder as Mirror.rb file (usually Plugins)] ###v3.2
#                 3. If there's no Selection then dialog informs you ###
#                 4. Pick a Point and RETURN to Mirror at the Point
#                 5. OR Pick a Second Point and RETURN to Mirror at the Line
#                 6. OR Pick a Third Point to Mirror at the Plane [usual]
#                 7. Final Option is Erase Original ? Yes/No ###
#					           If Yes then Highlighting of Selection passes to Copies
=end
#
require('sketchup.rb')
require('extensions.rb')
#
module TIG
	module Mirror
		if defined?(Encoding)
			PLUGINS = File.dirname(__FILE__).force_encoding("UTF-8") ### >=v2014 lashup
		else
			PLUGINS = File.dirname(__FILE__)
		end
		FNAME = File.basename(__FILE__, ".*")
		FOLDER = File.join(PLUGINS, FNAME)
		DATA = File.join(FOLDER, "Data")
		### set Constants
		#eval(IO.read(File.join(DATA, "Data.txt")))
		VERSION = "6.0"
		NAME = "Mirror"
		CREATOR = "TIG"
		COPYRIGHT = "#{CREATOR} © #{Time.now.year}"
		DESC = "Mirror Selection: at Point [1pt], a Line [2pts] or a Plane [3pts]: Final Yes|No option to Erase/Keep original Selection."
		###
		EXT=SketchupExtension.new(NAME, File.join(FOLDER, "#{FNAME}_runner.rb"))
		EXT.name = NAME
		EXT.description = DESC
		EXT.version = VERSION
		EXT.creator = CREATOR
		EXT.copyright = COPYRIGHT
		ext = Sketchup.register_extension(EXT, true) # show on 1st install
		###
	end
end
###
