[saga] 02/04: Imported Upstream version 2.2.7+dfsg

Johan Van de Wauw johanvdw-guest at moszumanska.debian.org
Wed Apr 13 21:33:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

johanvdw-guest pushed a commit to branch master
in repository saga.

commit 33f31b99614618d548996e4f3063bc689a0ccf52
Author: Johan Van de Wauw <johan at vandewauw.be>
Date:   Wed Apr 13 23:26:37 2016 +0200

    Imported Upstream version 2.2.7+dfsg
---
 README                                             |    2 +-
 configure                                          |   20 +-
 configure.ac                                       |    4 +-
 src/modules/climate/climate_tools/milankovic.cpp   |    4 +-
 src/modules/db/db_pgsql/get_connection.cpp         |    2 +-
 src/modules/grid/grid_analysis/Grid_IMCORR.cpp     |    4 +-
 src/modules/grid/grid_tools/CreateGridSystem.cpp   |  547 +--
 src/modules/grid/grid_tools/CreateGridSystem.h     |   10 +-
 src/modules/grid/grid_tools/Grid_Completion.cpp    |    4 +-
 src/modules/grid/grid_tools/Grid_Orientation.cpp   |    7 +-
 src/modules/grid/grid_tools/Grid_Shrink_Expand.cpp |    4 +-
 .../imagery_classification/cluster_isodata.cpp     |    7 +-
 src/modules/imagery/imagery_opencv/opencv_nnet.cpp |    2 +-
 src/modules/io/io_grid/import_clip_resample.cpp    |  146 +-
 src/modules/io/io_grid/import_clip_resample.h      |    6 +-
 .../io/io_shapes_dxf/dxflib/dl_attributes.h        |  185 -
 src/modules/io/io_shapes_dxf/dxflib/dl_codes.h     |  545 ---
 .../io/io_shapes_dxf/dxflib/dl_creationadapter.h   |  105 -
 .../io/io_shapes_dxf/dxflib/dl_creationinterface.h |  269 --
 src/modules/io/io_shapes_dxf/dxflib/dl_dxf.cpp     | 5073 --------------------
 src/modules/io/io_shapes_dxf/dxflib/dl_dxf.h       |  433 --
 src/modules/io/io_shapes_dxf/dxflib/dl_entities.h  | 1454 ------
 src/modules/io/io_shapes_dxf/dxflib/dl_exception.h |   58 -
 src/modules/io/io_shapes_dxf/dxflib/dl_extrusion.h |  147 -
 src/modules/io/io_shapes_dxf/dxflib/dl_writer.h    |  621 ---
 .../io/io_shapes_dxf/dxflib/dl_writer_ascii.cpp    |  157 -
 .../io/io_shapes_dxf/dxflib/dl_writer_ascii.h      |   78 -
 .../pointcloud_tools/pc_drop_attribute.cpp         |  124 +-
 .../pointcloud_tools/pc_drop_attribute.h           |   13 +-
 src/modules/projection/pj_proj4/crs_base.cpp       |    4 +-
 .../ta_hydrology/Flow_Parallel.cpp                 |    2 +-
 .../ta_hydrology/Flow_RecursiveUp.cpp              |    2 +-
 .../ta_hydrology/flow_massflux.cpp                 |    2 +-
 src/saga_core/saga_api/grid_operation.cpp          |    4 +-
 src/saga_core/saga_api/mat_formula.cpp             |    6 +-
 src/saga_core/saga_api/module_chain.cpp            |    3 +
 src/saga_core/saga_api/saga_api.h                  |    4 +-
 src/saga_core/saga_cmd/module_library.cpp          |   26 +-
 src/saga_core/saga_gui/dlg_about.cpp               |   10 +-
 src/saga_core/saga_gui/helper.cpp                  |    4 +-
 src/saga_core/saga_gui/res/saga.bra.txt            |   53 +-
 src/saga_core/saga_gui/res/saga.ger.txt            |   53 +-
 src/saga_core/saga_gui/res/saga.lng.txt            |   53 +-
 src/saga_core/saga_gui/res_commands.cpp            |    4 +-
 src/saga_core/saga_gui/saga_frame.cpp              |    4 +-
 src/saga_core/saga_gui/wksp_module.cpp             |   13 +-
 src/scripting/helper/make_saga_release.bat         |    2 +-
 src/scripting/toolchains/imagery_lczc.xml          |    4 +-
 src/scripting/toolchains/twi.xml                   |    4 +-
 49 files changed, 549 insertions(+), 9739 deletions(-)

diff --git a/README b/README
index dd2cbf9..0022899 100755
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 _______________________________________________________________________________
 
-         SAGA 2.2.6 - System for Automated Geoscientific Analyses
+         SAGA 2.2.7 - System for Automated Geoscientific Analyses
 _______________________________________________________________________________
 
 * Introduction
diff --git a/configure b/configure
index f6baa08..d4c07b8 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for saga 2.2.6.
+# Generated by GNU Autoconf 2.69 for saga 2.2.7.
 #
 # Report bugs to <BUG-REPORT-ADDRESS>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='saga'
 PACKAGE_TARNAME='saga'
-PACKAGE_VERSION='2.2.6'
-PACKAGE_STRING='saga 2.2.6'
+PACKAGE_VERSION='2.2.7'
+PACKAGE_STRING='saga 2.2.7'
 PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
 PACKAGE_URL=''
 
@@ -1384,7 +1384,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures saga 2.2.6 to adapt to many kinds of systems.
+\`configure' configures saga 2.2.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1454,7 +1454,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of saga 2.2.6:";;
+     short | recursive ) echo "Configuration of saga 2.2.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1580,7 +1580,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-saga configure 2.2.6
+saga configure 2.2.7
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2124,7 +2124,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by saga $as_me 2.2.6, which was
+It was created by saga $as_me 2.2.7, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2991,7 +2991,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='saga'
- VERSION='2.2.6'
+ VERSION='2.2.7'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -18665,7 +18665,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by saga $as_me 2.2.6, which was
+This file was extended by saga $as_me 2.2.7, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18731,7 +18731,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-saga config.status 2.2.6
+saga config.status 2.2.7
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 83010d9..1809589 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1,9 +1,9 @@
-# $Id: configure.ac 2852 2016-03-23 08:44:46Z reklov_w $
+# $Id: configure.ac 2878 2016-03-31 13:28:31Z oconrad $
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT(saga, 2.2.6, BUG-REPORT-ADDRESS)
+AC_INIT(saga, 2.2.7, BUG-REPORT-ADDRESS)
 AC_CONFIG_SRCDIR([src/saga_core/saga_gui/wksp_data_menu_files.cpp])
 AC_CONFIG_HEADER([config.h])
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/src/modules/climate/climate_tools/milankovic.cpp b/src/modules/climate/climate_tools/milankovic.cpp
index d2e9a4a..14b25e9 100755
--- a/src/modules/climate/climate_tools/milankovic.cpp
+++ b/src/modules/climate/climate_tools/milankovic.cpp
@@ -624,7 +624,7 @@ bool CSG_Solar_Position::Get_CosZenith(double RLAT, double SIND, double COSD, do
 
 	if( SJSD+CJCD <= 0.0 )
 	{
-		// Constant nightime at this latitude
+		// Constant nighttime at this latitude
 	//	DAWN	= 999999;
 	//	DUSK	= 999999;
 		COSZT	= 0.0;
@@ -653,7 +653,7 @@ bool CSG_Solar_Position::Get_CosZenith(double RLAT, double SIND, double COSD, do
 	//	SDAWN	= -SDUSK;
 	//	S2DAWN	= -S2DUSK;
 
-		// Nightime at initial and final times with daylight in between
+		// Nighttime at initial and final times with daylight in between
 		double	ECOSZ, QCOSZ;
 		ECOSZ	= SJSD*(2*DUSK) + CJCD*(2*SDUSK);
 		QCOSZ	= SJSD*ECOSZ + CJCD*(SJSD*(2*SDUSK)
diff --git a/src/modules/db/db_pgsql/get_connection.cpp b/src/modules/db/db_pgsql/get_connection.cpp
index 86d2c4d..b58e05f 100755
--- a/src/modules/db/db_pgsql/get_connection.cpp
+++ b/src/modules/db/db_pgsql/get_connection.cpp
@@ -465,7 +465,7 @@ CExecute_SQL::CExecute_SQL(void)
 	));
 
 	Parameters.Add_String(
-		NULL	, "SQL"			, _TL("SQL Statment"),
+		NULL	, "SQL"			, _TL("SQL Statement"),
 		_TL(""),
 		SG_T("CREATE TABLE myTable1 (Col1 VARCHAR(255) PRIMARY KEY, Col2 INTEGER);\n")
 		SG_T("INSERT INTO myTable1 (Col1, Col2) VALUES(\'First Value\', 1);\n")
diff --git a/src/modules/grid/grid_analysis/Grid_IMCORR.cpp b/src/modules/grid/grid_analysis/Grid_IMCORR.cpp
index 3a48d38..212368d 100755
--- a/src/modules/grid/grid_analysis/Grid_IMCORR.cpp
+++ b/src/modules/grid/grid_analysis/Grid_IMCORR.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: Grid_IMCORR.cpp 2130 2014-05-27 13:29:21Z reklov_w $
+ * Version $Id: Grid_IMCORR.cpp 2881 2016-04-01 20:24:07Z johanvdw $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -1419,7 +1419,7 @@ void CGrid_IMCORR::cross(std::vector<double>& UNORMC , std::vector<std::vector<d
 	// take inverse fft of cser
 	fft2(cser,nsnew,-1); // real signal format (house) again
 
-	//Extract usefull valid correlation
+	//Extract useful valid correlation
 	int ncol = nsnew[0] - nrnew[0] +1;
 	int nrow = nsnew[1] - nrnew[1] +1;
 	int denom = (int)(ChipSearch[0].size() * ChipSearch.size());
diff --git a/src/modules/grid/grid_tools/CreateGridSystem.cpp b/src/modules/grid/grid_tools/CreateGridSystem.cpp
index dce86df..19fdc96 100755
--- a/src/modules/grid/grid_tools/CreateGridSystem.cpp
+++ b/src/modules/grid/grid_tools/CreateGridSystem.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: CreateGridSystem.cpp 1921 2014-01-09 10:24:11Z oconrad $
+ * Version $Id: CreateGridSystem.cpp 2885 2016-04-08 15:19:51Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -64,15 +64,14 @@
 //														 //
 ///////////////////////////////////////////////////////////
 
+//---------------------------------------------------------
 CCreateGridSystem::CCreateGridSystem(void)
 {
-	CSG_Parameter	*pNode_0, *pNode_1;
-
-	Parameters.Set_Name(_TL("Create Grid System"));
+	Set_Name		(_TL("Create Grid System"));
 
-	Set_Author(_TL("Copyrights (c) 2007 by Volker Wichmann"));
+	Set_Author		("Volker Wichmann (c) 2007");
 	
-	Parameters.Set_Description(_TW(
+	Set_Description(_TW(
 		"This module creates a new user specified Grid System for use with other modules.\n\n"
 		"First of all, please consider the following issues before using the module:\n"
 		"(a) all calculations of the module refer to the lower left corner of the grid system, i.e. "
@@ -85,412 +84,306 @@ CCreateGridSystem::CCreateGridSystem(void)
 		"(3) by the extent of the shape(s) provided in the Data Objects section\n"
 		"(4) by the extent of the grid(s) provided in the Data Objects section\n\n"
 		"After selecting the appropriate method to determine the extent, the next step is to specify the "
-		"cellsize of the new grid system.\n"
+		"Cellsize of the new grid system.\n"
 		"For all methods supplied to determine the extent but number (1), three possibilities are provided to "
-		"adjust cellsize and grid system extent (please remember, the lower left corner is fixed!):\n"
-		"(I) adjust the extent to match the cellsize\n"
-		"(II) adjust the cellsize to match the extent in E-W direction\n"
-		"(III) adjust the cellsize to match the extent in S-N direction\n\n"
+		"adjust Cellsize and grid system extent (please remember, the lower left corner is fixed!):\n"
+		"(I) adjust the extent to match the Cellsize\n"
+		"(II) adjust the Cellsize to match the extent in E-W direction\n"
+		"(III) adjust the Cellsize to match the extent in S-N direction\n\n"
 		"Finally it is possible to apply an offset to the lower left corner of the grid system. "
 		"In this case check the Use Offset option and specify the offset in W-E and S-N direction. Positive values "
 		"result in a shift in E/N, negative in W/S direction.\n"
-		"In order to create the grid system the module needs to create a dummy grid.")
-	);
-
+		"In order to create the grid system the module needs to create a dummy grid."
+	));
 
+	//-----------------------------------------------------
 	Parameters.Add_Grid_Output(
 		NULL	, "GRID"		, _TL("Dummy Grid"),
 		_TL("")
 	);
 
-	pNode_0 = Parameters.Add_Choice(
-		NULL, "M_EXTENT", _TL("Set extent by"),
-		_TL("Please choose a method of module operation."),
-		CSG_String::Format(SG_T("%s|%s|%s|%s|"),
-			_TL("xMin, yMin, NX, NY"),
-			_TL("xMin, yMin, xMax, yMax"),
-			_TL("Shape(s)"),
-			_TL("Grid(s)")
-		), 0
-	);
-
-	pNode_1 = Parameters.Add_Value(
-		pNode_0, "XMIN", _TL("xMin"),
-		_TL("minimum x value"),
-		PARAMETER_TYPE_Double, 0.0
-	);
-
-	pNode_1 = Parameters.Add_Value(
-		pNode_0, "YMIN", _TL("yMin"),
-		_TL("minimum y value"),
-		PARAMETER_TYPE_Double, 0.0
+	Parameters.Add_Double(
+		NULL	, "INIT"		, _TL("Initialization Value"),
+		_TL("Value which is assigned to the dummy grid.")
 	);
 
-	pNode_1 = Parameters.Add_Value(
-		pNode_0, "XMAX", _TL("xMax"),
-		_TL("maximum x value"),
-		PARAMETER_TYPE_Double, 100.0
+	Parameters.Add_Double(
+		NULL	, "CELLSIZE"	, _TL("Cellsize"),
+		_TL(""),
+		10.0, 0.0, true
 	);
 
-	pNode_1 = Parameters.Add_Value(
-		pNode_0, "YMAX", _TL("yMax"),
-		_TL("maximum y value"),
-		PARAMETER_TYPE_Double, 100.0
-	);
-
-	pNode_1 = Parameters.Add_Value(
-		pNode_0, "NX", _TL("NX"),
-		_TL("number of cells in W-E direction"),
-		PARAMETER_TYPE_Int, 10, 1, true
-	);
-
-	pNode_1 = Parameters.Add_Value(
-		pNode_0, "NY", _TL("NY"),
-		_TL("number of cells in S-N direction"),
-		PARAMETER_TYPE_Int, 10, 1, true
-	);
-
-	pNode_0 = Parameters.Add_Value(
-		NULL, "CELLSIZE", _TL("Cellsize"),
-		_TL("Cellsize"),
-		PARAMETER_TYPE_Double, 10.0, 0.0, true
+	Parameters.Add_Choice(
+		NULL	, "M_EXTENT"	, _TL("Extent Definition"),
+		_TL(""),
+		CSG_String::Format("%s|%s|%s|%s|",
+			_TL("lower left coordinate and number of rows and columns"),
+			_TL("lower left and upper right coordinates"),
+			_TL("one or more shapes layers"),
+			_TL("one or more grids")
+		), 0
 	);
 
-	pNode_0 = Parameters.Add_Choice(
-		NULL, "ADJUST", _TL("Adjust"),
-		_TL("Choose method how to adjust input values."),
-		CSG_String::Format(SG_T("%s|%s|%s|"),
-			_TL("Extent to CellSize"),
-			_TL("CellSize to W-E Extent"),
-			_TL("CellSize to S-N Extent")
+	Parameters.Add_Choice(
+		NULL	, "ADJUST"		, _TL("Adjust"),
+		_TL(""),
+		CSG_String::Format("%s|%s|%s|",
+			_TL("extent to cell size"),
+			_TL("cell size to left-right extent"),
+			_TL("cell size to bottom-top extent")
 		), 0
 	);
 
-	pNode_0	= Parameters.Add_Value(
-		NULL, "USEOFF", _TL("Use Offset"),
-		_TL("Apply offset?"),
-		PARAMETER_TYPE_Bool, false
-	);
+	//-----------------------------------------------------
+	CSG_Parameter	*pNode;
 
-	pNode_1 = Parameters.Add_Value(
-		pNode_0, "XOFFSET", _TL("X offset"),
-		_TL("Positive values result in a shift in E direction."),
-		PARAMETER_TYPE_Double, 0.0
-	);
+	pNode	= Parameters.Add_Node(NULL, "X_NODE", _TL("Left-Right"), _TL(""));
+	Parameters.Add_Double(pNode, "XMIN", _TL("Left"   ), _TL(""),   0.0);
+	Parameters.Add_Double(pNode, "XMAX", _TL("Right"  ), _TL(""), 100.0);
+	Parameters.Add_Int   (pNode, "NX"  , _TL("Columns"), _TL(""), 10, 1, true);
 
-	pNode_1 = Parameters.Add_Value(
-		pNode_0, "YOFFSET", _TL("Y offset"),
-		_TL("Positive values result in a shift in N direction."),
-		PARAMETER_TYPE_Double, 0.0
-	);
-
-    pNode_0 = Parameters.Add_Value(
-		NULL, "INIT", _TL("Initialization Value"),
-		_TL("Value which is assigned to the dummy grid."),
-		PARAMETER_TYPE_Double, 1.0
-	);
+	pNode	= Parameters.Add_Node(NULL, "Y_NODE", _TL("Bottom-Top"), _TL(""));
+	Parameters.Add_Double(pNode, "YMIN", _TL("Bottom" ), _TL(""),   0.0);
+	Parameters.Add_Double(pNode, "YMAX", _TL("Top"    ), _TL(""), 100.0);
+	Parameters.Add_Int   (pNode, "NY"  , _TL("Rows"   ), _TL(""), 10, 1, true);
 
+	//-----------------------------------------------------
 	Parameters.Add_Shapes_List(
-		NULL, "SHAPESLIST", _TL("Shape(s)"),
-		_TL("Shape(s) to fit extent to"),
-		PARAMETER_INPUT_OPTIONAL
+		NULL	, "SHAPESLIST"	, _TL("Shapes Layers"),
+		_TL(""),
+		PARAMETER_INPUT
 	);
 
 	Parameters.Add_Grid_List(
-		NULL, "GRIDLIST", _TL("Grid(s)"),
-		_TL("Grid(s) to fit extent to"),
-		PARAMETER_INPUT_OPTIONAL
+		NULL	, "GRIDLIST"	, _TL("Grids"),
+		_TL(""),
+		PARAMETER_INPUT
 	);
 
-}
+	//-----------------------------------------------------
+	pNode	= Parameters.Add_Bool(
+		NULL	, "USEOFF"		, _TL("Use Offset"),
+		_TL(""),
+		false
+	);
 
-//---------------------------------------------------------
-CCreateGridSystem::~CCreateGridSystem(void)
-{}
+	Parameters.Add_Double(pNode, "XOFFSET", _TL("X Offset"), _TL("Positive values result in a shift in E direction."));
+	Parameters.Add_Double(pNode, "YOFFSET", _TL("Y Offset"), _TL("Positive values result in a shift in N direction."));
+}
 
 
 ///////////////////////////////////////////////////////////
 //														 //
-//														 //
-//														 //
 ///////////////////////////////////////////////////////////
 
-bool CCreateGridSystem::On_Execute(void)		
+//---------------------------------------------------------
+int CCreateGridSystem::On_Parameter_Changed(CSG_Parameters *pParameters, CSG_Parameter *pParameter)
+{
+	return( CSG_Module::On_Parameter_Changed(pParameters, pParameter) );
+}
+
+//---------------------------------------------------------
+int CCreateGridSystem::On_Parameters_Enable(CSG_Parameters *pParameters, CSG_Parameter *pParameter)
 {
-	CSG_Grid					*pDummy;
-	CSG_Shapes					*pShapes;
-	CSG_Rect					extent;
-	CSG_Parameter_Shapes_List	*pShapesList;
-	CSG_Parameter_Grid_List		*pGridList;
-	CSG_Grid_System				System;
-
-	double		xMin, xMax, yMin, yMax, cellsize, offset_x, offset_y, xRange, yRange, n, initVal;
-	int			NX, NY, m_extent, m_adjust, i;
-	bool		useoff;
-
-
-	xMin		= Parameters("XMIN")->asDouble();
-	yMin		= Parameters("YMIN")->asDouble();
-	xMax		= Parameters("XMAX")->asDouble();
-	yMax		= Parameters("YMAX")->asDouble();
-	NX			= Parameters("NX")->asInt();
-	NY			= Parameters("NY")->asInt();
-	cellsize	= Parameters("CELLSIZE")->asDouble();
-	offset_x	= Parameters("XOFFSET")->asDouble();
-	offset_y	= Parameters("YOFFSET")->asDouble();
-	useoff		= Parameters("USEOFF")->asBool();
-	m_extent	= Parameters("M_EXTENT")->asInt();
-	m_adjust	= Parameters("ADJUST")->asInt();
-    initVal     = Parameters("INIT")->asDouble();
-	pShapesList	= Parameters("SHAPESLIST")->asShapesList();
-	pGridList	= Parameters("GRIDLIST")->asGridList();
-
-
-	if( useoff )
+	if( !SG_STR_CMP(pParameter->Get_Identifier(), "M_EXTENT") )
 	{
-		xMin += offset_x;
-		yMin += offset_y;
-		xMax += offset_x;
-		yMax += offset_y;
+		pParameters->Set_Enabled("NX"        , pParameter->asInt() == 0);
+		pParameters->Set_Enabled("NY"        , pParameter->asInt() == 0);
+		pParameters->Set_Enabled("XMAX"      , pParameter->asInt() == 1);
+		pParameters->Set_Enabled("YMAX"      , pParameter->asInt() == 1);
+		pParameters->Set_Enabled("XMIN"      , pParameter->asInt() <= 1);
+		pParameters->Set_Enabled("YMIN"      , pParameter->asInt() <= 1);
+		pParameters->Set_Enabled("X_NODE"    , pParameter->asInt() <= 1);
+		pParameters->Set_Enabled("Y_NODE"    , pParameter->asInt() <= 1);
+		pParameters->Set_Enabled("ADJUST"    , pParameter->asInt() >= 1);
+		pParameters->Set_Enabled("SHAPESLIST", pParameter->asInt() == 2);
+		pParameters->Set_Enabled("GRIDLIST"  , pParameter->asInt() == 3);
 	}
 
-	switch( m_extent )
+	if( !SG_STR_CMP(pParameter->Get_Identifier(), "USEOFF") )
 	{
-	case 0:					// xMin, yMin, NX, NY
+		pParameters->Set_Enabled("XOFFSET", pParameter->asBool());
+		pParameters->Set_Enabled("YOFFSET", pParameter->asBool());
+	}
 
-		System.Assign(cellsize, xMin, yMin, NX, NY);
-		break;
+	return( CSG_Module::On_Parameters_Enable(pParameters, pParameter) );
+}
 
-	case 1:					// xMin, yMin, xMax, yMax
 
-		if( xMin > xMax || yMin > yMax )
-		{
-			Message_Add(CSG_String::Format(_TL("\nError: Please verify your xMin, yMin, xMax, yMax settings!\n")));
-			return false;
-		}
+///////////////////////////////////////////////////////////
+//														 //
+///////////////////////////////////////////////////////////
 
-		xRange = xMax - xMin;
-		yRange = yMax - yMin;
+//---------------------------------------------------------
+bool CCreateGridSystem::On_Execute(void)
+{
+	CSG_Grid_System		System;
 
-		if( m_adjust == 0 )			// extent to cellsize
-		{
-			if( modf((xRange/cellsize), &n) != 0.0 )
-			{
-				NX = (int) floor(xRange / cellsize + 0.5);
-				xMax = xMin + NX * cellsize;
-			}
-			
-			if( modf((yRange/cellsize), &n) != 0.0 )
-			{
-				NY = (int) floor(yRange / cellsize + 0.5);
-				yMax = yMin + NY * cellsize;
-			}
-		}
-		else if( m_adjust == 1)		// cellsize to W-E extent
-		{
-			if( modf((xRange/cellsize), &n) != 0.0 )
-			{
-				NX = (int) (xRange/cellsize);
-				cellsize = xRange/NX;
-			}			
-			if( modf((yRange/cellsize), &n) != 0.0 )
-			{
-				NY = (int) floor(yRange / cellsize + 0.5);
-				yMax = yMin + NY * cellsize;
-			}
-		}
-		else						// cellsize to S-N extent
+	switch( Parameters("M_EXTENT")->asInt() )
+	{
+	//-----------------------------------------------------
+	default:	// lower left coordinate and number of rows and columns
 		{
-			if( modf((yRange/cellsize), &n) != 0.0 )
-			{
-				NY = (int) (yRange/cellsize);
-				cellsize = yRange/NY;
-			}	
-			if( modf((xRange/cellsize), &n) != 0.0 )
-			{
-				NX = (int) floor(xRange / cellsize + 0.5);
-				xMax = xMin + NX * cellsize;
-			}
+			System.Assign(Parameters("CELLSIZE")->asDouble(),
+				Parameters("XMIN")->asDouble(), Parameters("YMIN")->asDouble(),
+				Parameters("NX"  )->asInt   (), Parameters("NY"  )->asInt   ()
+			);
 		}
-
-		System.Assign(cellsize, xMin, yMin, xMax, yMax);
 		break;
 
-	case 2:			// Shape(s)
-
-		if( pShapesList == NULL || pShapesList->Get_Count() == 0)
+	//-----------------------------------------------------
+	case  1:	// lower left and upper right coordinates
 		{
-			Message_Add(CSG_String::Format(_TL("\nError: the method Extent by Shape(s) requires shape(s) as input!\n")));
-			return false;
+			CSG_Rect	Extent(
+				Parameters("XMIN")->asDouble(), Parameters("YMIN")->asDouble(),
+				Parameters("XMAX")->asDouble(), Parameters("YMAX")->asDouble()
+			);
+
+			System	= Get_Adjusted(Parameters("CELLSIZE")->asDouble(), Extent);
 		}
+		break;
 
-		for (i=0; i<pShapesList->Get_Count(); i++)
+	//-----------------------------------------------------
+	case  2:	// one or more shapes layers
 		{
-			pShapes = pShapesList->asShapes(i);
-			extent = pShapes->Get_Extent();
+			CSG_Parameter_Shapes_List	*pList	= Parameters("SHAPESLIST")->asShapesList();
 
-			if (i==0)
-			{
-				xMin = extent.Get_XMin();
-				yMin = extent.Get_YMin();
-				xMax = extent.Get_XMax();
-				yMax = extent.Get_YMax();
-			}
-			else
+			if( pList->Get_Count() > 0 )
 			{
-				xMin = (extent.Get_XMin() < xMin) ? extent.Get_XMin() : xMin;
-				yMin = (extent.Get_YMin() < yMin) ? extent.Get_YMin() : yMin;
-				xMax = (extent.Get_XMax() > xMax) ? extent.Get_XMax() : xMax;
-				yMax = (extent.Get_YMax() > yMax) ? extent.Get_YMax() : yMax;
-			}		
-		}
+				CSG_Rect	Extent(pList->asShapes(0)->Get_Extent());
 
-		if( useoff )
-		{
-			xMin += offset_x;
-			xMax += offset_x;
-			yMin += offset_y;
-			yMax += offset_y;
-		}
+				for(int i=1; i<pList->Get_Count(); i++)
+				{
+					Extent.Union(pList->asShapes(i)->Get_Extent());
+				}
 
-		xRange = xMax - xMin;
-		yRange = yMax - yMin;
-
-		if( m_adjust == 0 )			// extent to cellsize
-		{
-			if( modf((xRange/cellsize), &n) != 0.0 )
-			{
-				NX = (int) floor(xRange / cellsize + 0.5);
-				xMax = xMin + NX * cellsize;
-			}
-			
-			if( modf((yRange/cellsize), &n) != 0.0 )
-			{
-				NY = (int) floor(yRange / cellsize + 0.5);
-				yMax = yMin + NY * cellsize;
-			}
-		}
-		else if( m_adjust == 1)		// cellsize to W-E extent
-		{
-			if( modf((xRange/cellsize), &n) != 0.0 )
-			{
-				NX = (int) (xRange/cellsize);
-				cellsize = xRange/NX;
-			}	
-			if( modf((yRange/cellsize), &n) != 0.0 )
-			{
-				NY = (int) floor(yRange / cellsize + 0.5);
-				yMax = yMin + NY * cellsize;
+				System	= Get_Adjusted(Parameters("CELLSIZE")->asDouble(), Extent);
 			}
 		}
-		else						// cellsize to S-N extent
+		break;
+
+	//-----------------------------------------------------
+	case  3:	// one or more grids
 		{
-			if( modf((yRange/cellsize), &n) != 0.0 )
-			{
-				NY = (int) (yRange/cellsize);
-				cellsize = yRange/NY;
-			}
-			if( modf((xRange/cellsize), &n) != 0.0 )
+			CSG_Parameter_Grid_List	*pList	= Parameters("GRIDLIST")->asGridList();
+
+			if( pList->Get_Count() > 0 )
 			{
-				NX = (int) floor(xRange / cellsize + 0.5);
-				xMax = xMin + NX * cellsize;
+				CSG_Rect	Extent(pList->asGrid(0)->Get_Extent());
+
+				for(int i=1; i<pList->Get_Count(); i++)
+				{
+					Extent.Union(pList->asGrid(i)->Get_Extent());
+				}
+
+				System	= Get_Adjusted(Parameters("CELLSIZE")->asDouble(), Extent);
 			}
 		}
+		break;
+	}
 
-		System.Assign(cellsize, xMin, yMin, xMax, yMax);
-		break;	
+	//-----------------------------------------------------
+	if( !System.is_Valid() )
+	{
+		Error_Set(_TL("invalid grid system"));
 
-	case 3:				// Grid(s)
+		return( false );
+	}
 
-		if( pGridList == NULL || pGridList->Get_Count() == 0)
-		{
-			Message_Add(CSG_String::Format(_TL("\nError: the method Extent by Grid(s) requires grid(s) as input!\n")));
-			return false;
-		}
-				
-		for (i=0; i<pGridList->Get_Count(); i++)
-		{
-			pDummy = pGridList->asGrid(i);
-			extent = pDummy->Get_Extent();
+	//-----------------------------------------------------
+	if( Parameters("USEOFF")->asBool() )
+	{
+		CSG_Rect	Extent	= System.Get_Extent();
 
-			if (i==0)
-			{
-				xMin = extent.Get_XMin();
-				yMin = extent.Get_YMin();
-				xMax = extent.Get_XMax();
-				yMax = extent.Get_YMax();
-			}
-			else
-			{
-				xMin = (extent.Get_XMin() < xMin) ? extent.Get_XMin() : xMin;
-				yMin = (extent.Get_YMin() < yMin) ? extent.Get_YMin() : yMin;
-				xMax = (extent.Get_XMax() > xMax) ? extent.Get_XMax() : xMax;
-				yMax = (extent.Get_YMax() > yMax) ? extent.Get_YMax() : yMax;
-			}		
-		}
+		Extent.Move(
+			Parameters("XOFFSET")->asDouble(),
+			Parameters("YOFFSET")->asDouble()
+		);
 
-		if( useoff )
-		{
-			xMin += offset_x;
-			xMax += offset_x;
-			yMin += offset_y;
-			yMax += offset_y;
-		}
+		System.Assign(System.Get_Cellsize(), Extent);
+	}
+		
+	//-----------------------------------------------------
+	CSG_Grid	*pGrid	= SG_Create_Grid(System);
+
+	if( pGrid )
+	{
+		pGrid->Set_Name(_TL("Dummy Grid"));
+		pGrid->Assign(Parameters("INIT")->asDouble());
+		Parameters("GRID")->Set_Value(pGrid);
 
-		xRange = xMax - xMin;
-		yRange = yMax - yMin;
+		return( true );
+	}
+
+	return( false );
+}
 
-		if( m_adjust == 0 )			// extent to cellsize
+
+///////////////////////////////////////////////////////////
+//														 //
+///////////////////////////////////////////////////////////
+
+//---------------------------------------------------------
+CSG_Grid_System CCreateGridSystem::Get_Adjusted(double Cellsize, TSG_Rect Extent)
+{
+	CSG_Grid_System	System;
+
+	if( Cellsize > 0.0 )
+	{
+		double	xRange	= Extent.xMax - Extent.xMin;
+		double	yRange	= Extent.yMax - Extent.yMin;
+		double	n;
+
+		switch( Parameters("ADJUST")->asInt() )
 		{
-			if( modf((xRange/cellsize), &n) != 0.0 )
+		case 0:	// extent to cell size
+			if( modf(xRange / Cellsize, &n) != 0.0 )
 			{
-				NX = (int) floor(xRange / cellsize + 0.5);
-				xMax = xMin + NX * cellsize;
+				Extent.xMax	= Extent.xMin + Cellsize * floor(0.5 + xRange / Cellsize);
 			}
 			
-			if( modf((yRange/cellsize), &n) != 0.0 )
+			if( modf(yRange / Cellsize, &n) != 0.0 )
 			{
-				NY = (int) floor(yRange / cellsize + 0.5);
-				yMax = yMin + NY * cellsize;
+				Extent.yMax = Extent.yMin + Cellsize * floor(0.5 + yRange / Cellsize);
 			}
-		}
-		else if( m_adjust == 1)		// cellsize to W-E extent
-		{
-			if( modf((xRange/cellsize), &n) != 0.0 )
+			break;
+
+		case 1:	// cell size to left-right extent
+			if( modf(xRange / Cellsize, &n) != 0.0 )
 			{
-				NX = (int) (xRange/cellsize);
-				cellsize = xRange/NX;
-			}			
-			if( modf((yRange/cellsize), &n) != 0.0 )
+				Cellsize	= xRange / floor(xRange / Cellsize);
+			}
+
+			if( modf(yRange / Cellsize, &n) != 0.0 )
 			{
-				NY = (int) floor(yRange / cellsize + 0.5);
-				yMax = yMin + NY * cellsize;
+				Extent.yMax = Extent.yMin + Cellsize * floor(0.5 + yRange / Cellsize);
 			}
-		}
-		else						// cellsize to S-N extent
-		{
-			if( modf((yRange/cellsize), &n) != 0.0 )
+			break;
+
+		case 2:	// cell size to bottom-top extent
+			if( modf(yRange / Cellsize, &n) != 0.0 )
 			{
-				NY = (int) (yRange/cellsize);
-				cellsize = yRange/NY;
-			}			
-			if( modf((xRange/cellsize), &n) != 0.0 )
+				Cellsize	= yRange / floor(yRange / Cellsize);
+			}
+
+			if( modf(xRange / Cellsize, &n) != 0.0 )
 			{
-				NX = (int) floor(xRange / cellsize + 0.5);
-				xMax = xMin + NX * cellsize;
+				Extent.xMax = Extent.xMin + Cellsize * floor(0.5 + xRange / Cellsize);
 			}
+			break;
 		}
 
-		System.Assign(cellsize, xMin, yMin, xMax, yMax);
-		break;
+		System.Assign(Cellsize, Extent);
 	}
-		
-	pDummy = SG_Create_Grid(System, SG_DATATYPE_Double);
-	pDummy->Assign(initVal);
-	pDummy->Set_Name(_TL("Dummy Grid"));
-	Parameters("GRID")->Set_Value(pDummy);
-
-	return (true);
 
+	return( System );
 }
 
+
+///////////////////////////////////////////////////////////
+//														 //
+//														 //
+//														 //
+///////////////////////////////////////////////////////////
+
+//---------------------------------------------------------
diff --git a/src/modules/grid/grid_tools/CreateGridSystem.h b/src/modules/grid/grid_tools/CreateGridSystem.h
index eeefdeb..0eedb8f 100755
--- a/src/modules/grid/grid_tools/CreateGridSystem.h
+++ b/src/modules/grid/grid_tools/CreateGridSystem.h
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: CreateGridSystem.h 1921 2014-01-09 10:24:11Z oconrad $
+ * Version $Id: CreateGridSystem.h 2885 2016-04-08 15:19:51Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -75,22 +75,26 @@
 
 
 //---------------------------------------------------------
-class grid_tools_EXPORT CCreateGridSystem : public CSG_Module
+class CCreateGridSystem : public CSG_Module
 {
 public:
 	CCreateGridSystem(void);
-	virtual ~CCreateGridSystem(void);
 
 	virtual CSG_String			Get_MenuPath			(void)	{	return( _TL("A:Grid|Grid System") );	}
 
 
 protected:
 
+	virtual int					On_Parameter_Changed	(CSG_Parameters *pParameters, CSG_Parameter *pParameter);
+	virtual int					On_Parameters_Enable	(CSG_Parameters *pParameters, CSG_Parameter *pParameter);
+
 	virtual bool				On_Execute				(void);
 
 
 private:
 
+	CSG_Grid_System				Get_Adjusted			(double Cellsize, TSG_Rect Extent);
+
 };
 
 
diff --git a/src/modules/grid/grid_tools/Grid_Completion.cpp b/src/modules/grid/grid_tools/Grid_Completion.cpp
index f1fb332..438c115 100755
--- a/src/modules/grid/grid_tools/Grid_Completion.cpp
+++ b/src/modules/grid/grid_tools/Grid_Completion.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: Grid_Completion.cpp 2752 2016-01-15 15:26:55Z oconrad $
+ * Version $Id: Grid_Completion.cpp 2881 2016-04-01 20:24:07Z johanvdw $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -135,7 +135,7 @@ bool CGrid_Completion::On_Execute(void)
 
 	if( !pGrid->is_Intersecting(pPatch->Get_Extent()) )
 	{
-		Error_Set(_TL("Nothing to do: there is no intersection with additonal grid."));
+		Error_Set(_TL("Nothing to do: there is no intersection with additional grid."));
 
 		return( false );
 	}
diff --git a/src/modules/grid/grid_tools/Grid_Orientation.cpp b/src/modules/grid/grid_tools/Grid_Orientation.cpp
index fc8df56..b1b8a59 100755
--- a/src/modules/grid/grid_tools/Grid_Orientation.cpp
+++ b/src/modules/grid/grid_tools/Grid_Orientation.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: Grid_Orientation.cpp 2835 2016-02-29 08:25:54Z oconrad $
+ * Version $Id: Grid_Orientation.cpp 2884 2016-04-08 15:18:50Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -293,11 +293,8 @@ bool CGrid_Mirror::On_Execute(void)
 		{
 			for(int ya=0, yb=Get_NY()-1; ya<=yb && SG_UI_Process_Set_Progress(ya, Get_NY()/2); ya++, yb--)
 			{
-				#pragma omp parallel for
-				for(int xa=0; xa<=Get_NX()/2; xa++)
+				for(int xa=0, xb=Get_NX()-1; xa<=xb; xa++, xb--)
 				{
-					int	xb	= Get_NX() - xa - 1;
-
 					if( ya < yb && xa < xb )
 					{
 						double	d              = pGrid->asDouble(xa, ya);
diff --git a/src/modules/grid/grid_tools/Grid_Shrink_Expand.cpp b/src/modules/grid/grid_tools/Grid_Shrink_Expand.cpp
index 5999e1f..7a75136 100755
--- a/src/modules/grid/grid_tools/Grid_Shrink_Expand.cpp
+++ b/src/modules/grid/grid_tools/Grid_Shrink_Expand.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: Grid_Shrink_Expand.cpp 1992 2014-02-13 12:30:26Z oconrad $
+ * Version $Id: Grid_Shrink_Expand.cpp 2881 2016-04-01 20:24:07Z johanvdw $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -94,7 +94,7 @@ CGrid_Shrink_Expand::CGrid_Shrink_Expand(void)
 	Set_Author		("V.Wichmann & O.Conrad (c) 2011");
 
 	Set_Description	(_TW(
-		"Regions with valid data in the input grid can be shrinked or expanded by a certain amount (radius). "
+		"Regions with valid data in the input grid can be shrunk or expanded by a certain amount (radius). "
 		"Shrinking just sets the border of regions with valid data to NoData, expanding sets NoData "
 		"cells along the border of regions with valid data to a new valid value, computed by the method "
 		"selected (min, max, mean, majority).\n\n"
diff --git a/src/modules/imagery/imagery_classification/cluster_isodata.cpp b/src/modules/imagery/imagery_classification/cluster_isodata.cpp
index dbbddb3..9cdce0f 100755
--- a/src/modules/imagery/imagery_classification/cluster_isodata.cpp
+++ b/src/modules/imagery/imagery_classification/cluster_isodata.cpp
@@ -21,7 +21,8 @@
 // Geoscientific Analyses'. SAGA is free software; you   //
 // can redistribute it and/or modify it under the terms  //
 // of the GNU General Public License as published by the //
-// Free Software Foundation; version 2 of the License.   //
+// Free Software Foundation, either version 3 of the     // 
+// License, or (at your option) any later version.       //
 //                                                       //
 // SAGA is distributed in the hope that it will be       //
 // useful, but WITHOUT ANY WARRANTY; without even the    //
@@ -31,9 +32,7 @@
 //                                                       //
 // You should have received a copy of the GNU General    //
 // Public License along with this program; if not,       //
-// write to the Free Software Foundation, Inc.,          //
-// 59 Temple Place - Suite 330, Boston, MA 02111-1307,   //
-// USA.                                                  //
+// see <http://www.gnu.org/licenses/>.                   //
 //                                                       //
 //-------------------------------------------------------//
 //                                                       //
diff --git a/src/modules/imagery/imagery_opencv/opencv_nnet.cpp b/src/modules/imagery/imagery_opencv/opencv_nnet.cpp
index f5cbf3c..96b283a 100755
--- a/src/modules/imagery/imagery_opencv/opencv_nnet.cpp
+++ b/src/modules/imagery/imagery_opencv/opencv_nnet.cpp
@@ -463,7 +463,7 @@ bool COpenCV_NNet::On_Execute(void)
 	//-------------------------------------------------
 	// Now train the network
 
-	// TODO: Integrate init weights and indicies for record selection
+	// TODO: Integrate init weights and indices for record selection
 	// mat_Weights  = GetMatrix(t_Weights, i_matType);
 	// mat_Indices = GetMatrix(t_Indices, i_matType);
 	
diff --git a/src/modules/io/io_grid/import_clip_resample.cpp b/src/modules/io/io_grid/import_clip_resample.cpp
index 3eaa9ba..3cab261 100755
--- a/src/modules/io/io_grid/import_clip_resample.cpp
+++ b/src/modules/io/io_grid/import_clip_resample.cpp
@@ -81,6 +81,14 @@ CImport_Clip_Resample::CImport_Clip_Resample(void)
 	));
 
 	//-----------------------------------------------------
+	CSG_Parameter	*pNode;
+
+	Parameters.Add_Grid_List(
+		NULL	, "GRIDS"		, _TL("Grids"),
+		_TL(""),
+		PARAMETER_OUTPUT
+	);
+
 	Parameters.Add_FilePath(
 		NULL	, "FILES"		, _TL("Image Files"),
 		_TL(""),
@@ -90,22 +98,42 @@ CImport_Clip_Resample::CImport_Clip_Resample(void)
 		), NULL, false, false, true
 	);
 
-	Parameters.Add_Grid_List(
-		NULL	, "GRIDS"		, _TL("Grids"),
+	//-----------------------------------------------------
+	Parameters.Add_Bool(
+		NULL	, "KEEP_TYPE"	, _TL("Preserve Data Type"),
 		_TL(""),
-		PARAMETER_OUTPUT
+		false
+	);
+
+	pNode	= Parameters.Add_Bool(
+		NULL	, "NODATA"		, _TL("User Defined No-Data Value"),
+		_TL(""),
+		false
+	);
+
+	Parameters.Add_Double(
+		pNode	, "NODATA_VAL"	, _TL("No-Data Value"),
+		_TL("")
 	);
 
+	//-----------------------------------------------------
 	Parameters.Add_Shapes(
 		NULL	, "CLIP"		, _TL("Region of Interest"),
+		_TL("bounding box for clipping"),
+		PARAMETER_INPUT_OPTIONAL
+	);
+
+	//-----------------------------------------------------
+	pNode	= Parameters.Add_Bool(
+		NULL	, "RESAMPLE"	, _TL("Resample"),
 		_TL(""),
-		PARAMETER_INPUT, SHAPE_TYPE_Polygon
+		true
 	);
 
-	Parameters.Add_Value(
-		NULL	, "CELLSIZE"	, _TL("Target Cell Size"),
+	Parameters.Add_Double(
+		pNode	, "CELLSIZE"	, _TL("Cell Size"),
 		_TL(""),
-		PARAMETER_TYPE_Double, 100.0, 0.0, true
+		100.0, 0.0, true
 	);
 }
 
@@ -115,6 +143,33 @@ CImport_Clip_Resample::CImport_Clip_Resample(void)
 ///////////////////////////////////////////////////////////
 
 //---------------------------------------------------------
+int CImport_Clip_Resample::On_Parameter_Changed(CSG_Parameters *pParameters, CSG_Parameter *pParameter)
+{
+	return( CSG_Module::On_Parameter_Changed(pParameters, pParameter) );
+}
+
+//---------------------------------------------------------
+int CImport_Clip_Resample::On_Parameters_Enable(CSG_Parameters *pParameters, CSG_Parameter *pParameter)
+{
+	if( !SG_STR_CMP(pParameter->Get_Identifier(), "NODATA") )
+	{
+		pParameters->Set_Enabled("NODATA_VAL", pParameter->asBool());
+	}
+
+	if( !SG_STR_CMP(pParameter->Get_Identifier(), "RESAMPLE") )
+	{
+		pParameters->Set_Enabled("CELLSIZE"  , pParameter->asBool());
+	}
+
+	return( CSG_Module::On_Parameters_Enable(pParameters, pParameter) );
+}
+
+
+///////////////////////////////////////////////////////////
+//														 //
+///////////////////////////////////////////////////////////
+
+//---------------------------------------------------------
 bool CImport_Clip_Resample::On_Execute(void)
 {
 	//-----------------------------------------------------
@@ -126,15 +181,11 @@ bool CImport_Clip_Resample::On_Execute(void)
 	}
 
 	//-----------------------------------------------------
-	CSG_Shapes	*pClip	= Parameters("CLIP")->asShapes();
-
-	m_System.Assign(Parameters("CELLSIZE")->asDouble(), pClip->Get_Extent());
-
-	//-----------------------------------------------------
 	m_pGrids	= Parameters("GRIDS")->asGridList();
 
 	m_pGrids->Del_Items();
 
+	//-----------------------------------------------------
 	for(int i=0; i<Files.Get_Count() && Process_Get_Okay(); i++)
 	{
 		Load_File(Files[i]);
@@ -161,7 +212,7 @@ bool CImport_Clip_Resample::Load_File(const CSG_String &File)
 
 	if( !Grids.Add(File) || !Grids.Get_Grid_System(0) || !Grids.Get_Grid_System(0)->Get(0) )
 	{
-		Error_Set(CSG_String::Format(SG_T("%s: %s"), _TL("could not load file"), File.c_str()));
+		Error_Set(CSG_String::Format("%s: %s", _TL("could not load file"), File.c_str()));
 
 		return( false );
 	}
@@ -172,17 +223,8 @@ bool CImport_Clip_Resample::Load_File(const CSG_String &File)
 	{
 		for(size_t iGrid=0; iGrid<Grids.Get_Grid_System(iSystem)->Count(); iGrid++)
 		{
-			CSG_Grid	*pImport	= (CSG_Grid *)Grids.Get_Grid_System(iSystem)->Get(iGrid);
-
-			if( m_System.Get_Extent().Intersects(pImport->Get_Extent()) )
+			if( Load_Grid((CSG_Grid *)Grids.Get_Grid_System(iSystem)->Get(iGrid)) )
 			{
-				CSG_Grid	*pGrid	= SG_Create_Grid(m_System, SG_DATATYPE_Float);
-
-				pGrid->Assign  (pImport);
-				pGrid->Set_Name(pImport->Get_Name());
-
-				m_pGrids->Add_Item(pGrid);
-
 				n++;
 			}
 		}
@@ -190,6 +232,64 @@ bool CImport_Clip_Resample::Load_File(const CSG_String &File)
 
 	return( n > 0 );
 }
+
+//---------------------------------------------------------
+bool CImport_Clip_Resample::Load_Grid(CSG_Grid *pImport)
+{
+	CSG_Grid_System	System	= pImport->Get_System();
+
+	//-----------------------------------------------------
+	const CSG_Rect	*pClip	= Parameters("CLIP")->asShapes() ? &Parameters("CLIP")->asShapes()->Get_Extent() : NULL;
+
+	if( pClip )
+	{
+		if( !pClip->Intersects(System.Get_Extent()) )
+		{
+			return( false );
+		}
+
+		TSG_Rect	Extent	= System.Get_Extent();
+
+		if( pClip->Get_XMin() > System.Get_XMin() )	Extent.xMin	= System.Fit_xto_Grid_System(pClip->Get_XMin());
+		if( pClip->Get_XMax() < System.Get_XMax() )	Extent.xMax	= System.Fit_xto_Grid_System(pClip->Get_XMax());
+		if( pClip->Get_YMin() > System.Get_YMin() )	Extent.yMin	= System.Fit_yto_Grid_System(pClip->Get_YMin());
+		if( pClip->Get_YMax() < System.Get_YMax() )	Extent.yMax	= System.Fit_yto_Grid_System(pClip->Get_YMax());
+
+		System.Assign(System.Get_Cellsize(), Extent);
+	}
+
+	//-----------------------------------------------------
+	if( Parameters("RESAMPLE")->asBool() )
+	{
+		double	Cellsize	= Parameters("CELLSIZE")->asDouble();
+
+		if( Cellsize > 0.0 && Cellsize != System.Get_Cellsize() )
+		{
+			System.Assign(Cellsize, System.Get_Extent());
+		}
+	}
+
+	//-----------------------------------------------------
+	if( Parameters("NODATA")->asBool() )
+	{
+		pImport->Set_NoData_Value(Parameters("NODATA_VAL")->asDouble());
+	}
+
+	//-----------------------------------------------------
+	CSG_Grid	*pGrid	= SG_Create_Grid(System, Parameters("KEEP_TYPE")->asBool() ? pImport->Get_Type() : SG_DATATYPE_Float);
+
+	if( pGrid )
+	{
+		pGrid->Assign  (pImport);
+		pGrid->Set_Name(pImport->Get_Name());
+
+		m_pGrids->Add_Item(pGrid);
+
+		return( true );
+	}
+
+	return( false );
+}
 
 
 ///////////////////////////////////////////////////////////
diff --git a/src/modules/io/io_grid/import_clip_resample.h b/src/modules/io/io_grid/import_clip_resample.h
index d84ae3b..610d66e 100755
--- a/src/modules/io/io_grid/import_clip_resample.h
+++ b/src/modules/io/io_grid/import_clip_resample.h
@@ -83,17 +83,19 @@ public:
 
 protected:
 
+	virtual int					On_Parameter_Changed	(CSG_Parameters *pParameters, CSG_Parameter *pParameter);
+	virtual int					On_Parameters_Enable	(CSG_Parameters *pParameters, CSG_Parameter *pParameter);
+
 	virtual bool				On_Execute				(void);
 
 
 private:
 
-	CSG_Grid_System				m_System;
-
 	CSG_Parameter_Grid_List		*m_pGrids;
 
 
 	bool						Load_File				(const CSG_String &File);
+	bool						Load_Grid				(CSG_Grid *pImport);
 
 };
 
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_attributes.h b/src/modules/io/io_shapes_dxf/dxflib/dl_attributes.h
deleted file mode 100755
index fd8f6fe..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_attributes.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/**********************************************************
- * Version $Id: dl_attributes.h 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_attributes.h 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef DL_ATTRIBUTES_H
-#define DL_ATTRIBUTES_H
-
-#include <string>
-using std::string;
-
-#include "dl_codes.h"
-
-/**
- * Storing and passing around attributes. Attributes
- * are the layer name, color, width and line type.
- *
- * @author Andrew Mustun
- */
-class DL_Attributes {
-
-public:
-
-    /**
-     * Default constructor.
-     */
-    DL_Attributes() {
-        setLayer("");
-        setColor(0);
-        setWidth(0);
-        setLineType("BYLAYER");
-    }
-
-
-
-    /**
-     * Constructor for DXF attributes.
-     *
-     * @param layer Layer name for this entity or NULL for no layer
-     *              (every entity should be on a named layer!).
-     * @param color Color number (0..256). 0 = BYBLOCK, 256 = BYLAYER.
-     * @param width Line thickness. Defaults to zero. -1 = BYLAYER, 
-     *               -2 = BYBLOCK, -3 = default width
-     * @param lineType Line type name or "BYLAYER" or "BYBLOCK". Defaults
-     *              to "BYLAYER"
-     */
-    DL_Attributes(const string& layer,
-                  int color, int width,
-                  const string& lineType) {
-        setLayer(layer);
-        setColor(color);
-        setWidth(width);
-        setLineType(lineType);
-    }
-
-
-
-    /**
-     * Sets the layer. If the given pointer points to NULL, the
-     *  new layer name will be an empty but valid string.
-     */
-    void setLayer(const string& layer) {
-        this->layer = layer;
-    }
-
-
-
-    /**
-     * @return Layer name.
-     */
-    string getLayer() const {
-        return layer;
-    }
-
-
-
-    /**
-     * Sets the color.
-     *
-     * @see DL_Codes, dxfColors
-     */
-    void setColor(int color) {
-        this->color = color;
-    }
-
-
-
-    /**
-     * @return Color.
-     *
-     * @see DL_Codes, dxfColors
-     */
-    int getColor() const {
-        return color;
-    }
-
-
-
-    /**
-     * Sets the width.
-     */
-    void setWidth(int width) {
-        this->width = width;
-    }
-
-
-
-    /**
-     * @return Width.
-     */
-    int getWidth() const {
-        return width;
-    }
-
-
-
-    /**
-     * Sets the line type. This can be any string and is not
-     *  checked to be a valid line type. 
-     */
-    void setLineType(const string& lineType) {
-        this->lineType = lineType;
-    }
-
-
-
-    /**
-     * @return Line type.
-     */
-    string getLineType() const {
-        if (lineType.length()==0) {
-            return "BYLAYER";
-        } else {
-            return lineType;
-        }
-    }
-
-
-
-    /**
-     * Copies attributes (deep copies) from another attribute object.
-     */
-    DL_Attributes operator = (const DL_Attributes& attrib) {
-        setLayer(attrib.layer);
-        setColor(attrib.color);
-        setWidth(attrib.width);
-        setLineType(attrib.lineType);
-
-        return *this;
-    }
-
-private:
-    string layer;
-    int color;
-    int width;
-    string lineType;
-};
-
-#endif
-
-// EOF
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_codes.h b/src/modules/io/io_shapes_dxf/dxflib/dl_codes.h
deleted file mode 100755
index dbdc39f..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_codes.h
+++ /dev/null
@@ -1,545 +0,0 @@
-/**********************************************************
- * Version $Id: dl_codes.h 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_codes.h 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-** Copyright (C) 2001 Robert J. Campbell Jr.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/**
- * Defines common DXF codes and constants.
- */
-
-#ifndef DXF_CODES_H
-#define DXF_CODES_H
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#if defined(__OS2__)||defined(__EMX__)
-#define strcasecmp(s,t) stricmp(s,t)
-#endif
-
-#if defined(_WIN32)
-#define strcasecmp(s,t) _stricmp(s,t)
-#endif
-
-
-#ifdef _WIN32
-#undef M_PI
-#define M_PI   3.14159265358979323846
-#pragma warning(disable : 4800)
-#endif
-
-#ifndef M_PI
-#define M_PI 3.1415926535897932384626433832795
-#endif
-
-#define DL_DXF_MAXLINE 1024
-#define DL_DXF_MAXGROUPCODE 1100
-
-// used to mark invalid vectors:
-//#define DL_DXF_MAXDOUBLE 1.0E+10
-
-/**
- * Codes for colors and DXF versions.
- */
-class DL_Codes {
-public:
-    /**
-     * Standard DXF colors.
-     */
-    enum color {
-        black = 250,
-        green = 3,
-        red = 1,
-        brown = 15,
-        yellow = 2,
-        cyan = 4,
-        magenta = 6,
-        gray = 8,
-        blue = 5,
-        l_blue = 163,
-        l_green = 121,
-        l_cyan = 131,
-        l_red = 23,
-        l_magenta = 221,
-        l_gray = 252,
-        white = 7,
-        bylayer = 256,
-        byblock = 0
-    };
-
-    /**
-     * Version numbers for the DXF Format.
-     */
-    enum version {
-        AC1009, AC1012, AC1014, AC1015
-    };
-};
-
-
-// Extended color palette:
-// The first entry is only for direct indexing starting with [1]
-// Color 1 is red (1,0,0)
-const double dxfColors[][3] = {
-                                  {0,0,0},                // unused
-                                  {1,0,0},                // 1
-                                  {1,1,0},
-                                  {0,1,0},
-                                  {0,1,1},
-                                  {0,0,1},
-                                  {1,0,1},
-                                  {1,1,1},                // black or white
-                                  {0.5,0.5,0.5},
-                                  {0.75,0.75,0.75},
-                                  {1,0,0},                // 10
-                                  {1,0.5,0.5},
-                                  {0.65,0,0},
-                                  {0.65,0.325,0.325},
-                                  {0.5,0,0},
-                                  {0.5,0.25,0.25},
-                                  {0.3,0,0},
-                                  {0.3,0.15,0.15},
-                                  {0.15,0,0},
-                                  {0.15,0.075,0.075},
-                                  {1,0.25,0},             // 20
-                                  {1,0.625,0.5},
-                                  {0.65,0.1625,0},
-                                  {0.65,0.4063,0.325},
-                                  {0.5,0.125,0},
-                                  {0.5,0.3125,0.25},
-                                  {0.3,0.075,0},
-                                  {0.3,0.1875,0.15},
-                                  {0.15,0.0375,0},
-                                  {0.15,0.0938,0.075},
-                                  {1,0.5,0},              // 30
-                                  {1,0.75,0.5},
-                                  {0.65,0.325,0},
-                                  {0.65,0.4875,0.325},
-                                  {0.5,0.25,0},
-                                  {0.5,0.375,0.25},
-                                  {0.3,0.15,0},
-                                  {0.3,0.225,0.15},
-                                  {0.15,0.075,0},
-                                  {0.15,0.1125,0.075},
-                                  {1,0.75,0},             // 40
-                                  {1,0.875,0.5},
-                                  {0.65,0.4875,0},
-                                  {0.65,0.5688,0.325},
-                                  {0.5,0.375,0},
-                                  {0.5,0.4375,0.25},
-                                  {0.3,0.225,0},
-                                  {0.3,0.2625,0.15},
-                                  {0.15,0.1125,0},
-                                  {0.15,0.1313,0.075},
-                                  {1,1,0},                // 50
-                                  {1,1,0.5},
-                                  {0.65,0.65,0},
-                                  {0.65,0.65,0.325},
-                                  {0.5,0.5,0},
-                                  {0.5,0.5,0.25},
-                                  {0.3,0.3,0},
-                                  {0.3,0.3,0.15},
-                                  {0.15,0.15,0},
-                                  {0.15,0.15,0.075},
-                                  {0.75,1,0},             // 60
-                                  {0.875,1,0.5},
-                                  {0.4875,0.65,0},
-                                  {0.5688,0.65,0.325},
-                                  {0.375,0.5,0},
-                                  {0.4375,0.5,0.25},
-                                  {0.225,0.3,0},
-                                  {0.2625,0.3,0.15},
-                                  {0.1125,0.15,0},
-                                  {0.1313,0.15,0.075},
-                                  {0.5,1,0},              // 70
-                                  {0.75,1,0.5},
-                                  {0.325,0.65,0},
-                                  {0.4875,0.65,0.325},
-                                  {0.25,0.5,0},
-                                  {0.375,0.5,0.25},
-                                  {0.15,0.3,0},
-                                  {0.225,0.3,0.15},
-                                  {0.075,0.15,0},
-                                  {0.1125,0.15,0.075},
-                                  {0.25,1,0},             // 80
-                                  {0.625,1,0.5},
-                                  {0.1625,0.65,0},
-                                  {0.4063,0.65,0.325},
-                                  {0.125,0.5,0},
-                                  {0.3125,0.5,0.25},
-                                  {0.075,0.3,0},
-                                  {0.1875,0.3,0.15},
-                                  {0.0375,0.15,0},
-                                  {0.0938,0.15,0.075},
-                                  {0,1,0},                // 90
-                                  {0.5,1,0.5},
-                                  {0,0.65,0},
-                                  {0.325,0.65,0.325},
-                                  {0,0.5,0},
-                                  {0.25,0.5,0.25},
-                                  {0,0.3,0},
-                                  {0.15,0.3,0.15},
-                                  {0,0.15,0},
-                                  {0.075,0.15,0.075},
-                                  {0,1,0.25},             // 100
-                                  {0.5,1,0.625},
-                                  {0,0.65,0.1625},
-                                  {0.325,0.65,0.4063},
-                                  {0,0.5,0.125},
-                                  {0.25,0.5,0.3125},
-                                  {0,0.3,0.075},
-                                  {0.15,0.3,0.1875},
-                                  {0,0.15,0.0375},
-                                  {0.075,0.15,0.0938},
-                                  {0,1,0.5},              // 110
-                                  {0.5,1,0.75},
-                                  {0,0.65,0.325},
-                                  {0.325,0.65,0.4875},
-                                  {0,0.5,0.25},
-                                  {0.25,0.5,0.375},
-                                  {0,0.3,0.15},
-                                  {0.15,0.3,0.225},
-                                  {0,0.15,0.075},
-                                  {0.075,0.15,0.1125},
-                                  {0,1,0.75},             // 120
-                                  {0.5,1,0.875},
-                                  {0,0.65,0.4875},
-                                  {0.325,0.65,0.5688},
-                                  {0,0.5,0.375},
-                                  {0.25,0.5,0.4375},
-                                  {0,0.3,0.225},
-                                  {0.15,0.3,0.2625},
-                                  {0,0.15,0.1125},
-                                  {0.075,0.15,0.1313},
-                                  {0,1,1},                // 130
-                                  {0.5,1,1},
-                                  {0,0.65,0.65},
-                                  {0.325,0.65,0.65},
-                                  {0,0.5,0.5},
-                                  {0.25,0.5,0.5},
-                                  {0,0.3,0.3},
-                                  {0.15,0.3,0.3},
-                                  {0,0.15,0.15},
-                                  {0.075,0.15,0.15},
-                                  {0,0.75,1},             // 140
-                                  {0.5,0.875,1},
-                                  {0,0.4875,0.65},
-                                  {0.325,0.5688,0.65},
-                                  {0,0.375,0.5},
-                                  {0.25,0.4375,0.5},
-                                  {0,0.225,0.3},
-                                  {0.15,0.2625,0.3},
-                                  {0,0.1125,0.15},
-                                  {0.075,0.1313,0.15},
-                                  {0,0.5,1},              // 150
-                                  {0.5,0.75,1},
-                                  {0,0.325,0.65},
-                                  {0.325,0.4875,0.65},
-                                  {0,0.25,0.5},
-                                  {0.25,0.375,0.5},
-                                  {0,0.15,0.3},
-                                  {0.15,0.225,0.3},
-                                  {0,0.075,0.15},
-                                  {0.075,0.1125,0.15},
-                                  {0,0.25,1},             // 160
-                                  {0.5,0.625,1},
-                                  {0,0.1625,0.65},
-                                  {0.325,0.4063,0.65},
-                                  {0,0.125,0.5},
-                                  {0.25,0.3125,0.5},
-                                  {0,0.075,0.3},
-                                  {0.15,0.1875,0.3},
-                                  {0,0.0375,0.15},
-                                  {0.075,0.0938,0.15},
-                                  {0,0,1},                // 170
-                                  {0.5,0.5,1},
-                                  {0,0,0.65},
-                                  {0.325,0.325,0.65},
-                                  {0,0,0.5},
-                                  {0.25,0.25,0.5},
-                                  {0,0,0.3},
-                                  {0.15,0.15,0.3},
-                                  {0,0,0.15},
-                                  {0.075,0.075,0.15},
-                                  {0.25,0,1},             // 180
-                                  {0.625,0.5,1},
-                                  {0.1625,0,0.65},
-                                  {0.4063,0.325,0.65},
-                                  {0.125,0,0.5},
-                                  {0.3125,0.25,0.5},
-                                  {0.075,0,0.3},
-                                  {0.1875,0.15,0.3},
-                                  {0.0375,0,0.15},
-                                  {0.0938,0.075,0.15},
-                                  {0.5,0,1},              // 190
-                                  {0.75,0.5,1},
-                                  {0.325,0,0.65},
-                                  {0.4875,0.325,0.65},
-                                  {0.25,0,0.5},
-                                  {0.375,0.25,0.5},
-                                  {0.15,0,0.3},
-                                  {0.225,0.15,0.3},
-                                  {0.075,0,0.15},
-                                  {0.1125,0.075,0.15},
-                                  {0.75,0,1},             // 200
-                                  {0.875,0.5,1},
-                                  {0.4875,0,0.65},
-                                  {0.5688,0.325,0.65},
-                                  {0.375,0,0.5},
-                                  {0.4375,0.25,0.5},
-                                  {0.225,0,0.3},
-                                  {0.2625,0.15,0.3},
-                                  {0.1125,0,0.15},
-                                  {0.1313,0.075,0.15},
-                                  {1,0,1},                // 210
-                                  {1,0.5,1},
-                                  {0.65,0,0.65},
-                                  {0.65,0.325,0.65},
-                                  {0.5,0,0.5},
-                                  {0.5,0.25,0.5},
-                                  {0.3,0,0.3},
-                                  {0.3,0.15,0.3},
-                                  {0.15,0,0.15},
-                                  {0.15,0.075,0.15},
-                                  {1,0,0.75},             // 220
-                                  {1,0.5,0.875},
-                                  {0.65,0,0.4875},
-                                  {0.65,0.325,0.5688},
-                                  {0.5,0,0.375},
-                                  {0.5,0.25,0.4375},
-                                  {0.3,0,0.225},
-                                  {0.3,0.15,0.2625},
-                                  {0.15,0,0.1125},
-                                  {0.15,0.075,0.1313},
-                                  {1,0,0.5},              // 230
-                                  {1,0.5,0.75},
-                                  {0.65,0,0.325},
-                                  {0.65,0.325,0.4875},
-                                  {0.5,0,0.25},
-                                  {0.5,0.25,0.375},
-                                  {0.3,0,0.15},
-                                  {0.3,0.15,0.225},
-                                  {0.15,0,0.075},
-                                  {0.15,0.075,0.1125},
-                                  {1,0,0.25},             // 240
-                                  {1,0.5,0.625},
-                                  {0.65,0,0.1625},
-                                  {0.65,0.325,0.4063},
-                                  {0.5,0,0.125},
-                                  {0.5,0.25,0.3125},
-                                  {0.3,0,0.075},
-                                  {0.3,0.15,0.1875},
-                                  {0.15,0,0.0375},
-                                  {0.15,0.075,0.0938},
-                                  {0.33,0.33,0.33},       // 250
-                                  {0.464,0.464,0.464},
-                                  {0.598,0.598,0.598},
-                                  {0.732,0.732,0.732},
-                                  {0.866,0.866,0.866},
-                                  {1,1,1}                 // 255
-                              }
-                              ;
-
-
-// AutoCAD VERSION aliases
-#define VER_R12    DL_Codes::AC1009
-#define VER_LT2    DL_Codes::AC1009
-#define VER_R13    DL_Codes::AC1012   // not supported yet
-#define VER_LT95   DL_Codes::AC1012   // not supported yet
-#define VER_R14    DL_Codes::AC1014   // not supported yet
-#define VER_LT97   DL_Codes::AC1014   // not supported yet
-#define VER_LT98   DL_Codes::AC1014   // not supported yet
-#define VER_2000   DL_Codes::AC1015
-#define VER_2002   DL_Codes::AC1015
-
-
-// DXF Group Codes:
-
-// Strings
-#define STRGRP_START      0
-#define STRGRP_END        9
-
-// Coordinates
-#define CRDGRP_START     10
-#define CRDGRP_END       19
-
-// Real values
-#define RLGRP_START      38
-#define RLGRP_END        59
-
-// Short integer values
-#define SHOGRP_START     60
-#define SHOGRP_END       79
-
-// New in Release 13,
-#define SUBCLASS        100
-
-// More coordinates
-#define CRD2GRP_START   210
-#define CRD2GRP_END     239
-
-// Extended data strings
-#define ESTRGRP_START  1000
-#define ESTRGRP_END    1009
-
-// Extended data reals
-#define ERLGRP_START   1010
-#define ERLGRP_END     1059
-
-
-#define Y8_COORD_CODE       28
-#define Z0_COORD_CODE       30
-#define Z8_COORD_CODE       38
-
-#define POINT_COORD_CODE    10
-#define INSERT_COORD_CODE   10
-
-#define CRD2GRP_START      210
-#define CRD2GRP_END        239
-
-#define THICKNESS            39
-#define FIRST_REAL_CODE      THICKNESS
-#define LAST_REAL_CODE       59
-#define FIRST_INT_CODE       60
-#define ATTFLAGS_CODE        70
-#define PLINE_FLAGS_CODE     70
-#define LAYER_FLAGS_CODE     70
-#define FLD_LEN_CODE         73 // Inside ATTRIB resbuf
-#define LAST_INT_CODE        79
-#define X_EXTRU_CODE        210
-#define Y_EXTRU_CODE        220
-#define Z_EXTRU_CODE        230
-#define COMMENT_CODE        999
-
-// Start and endpoints of a line
-#define LINE_START_CODE      10  // Followed by x coord
-#define LINE_END_CODE        11  // Followed by x coord
-
-// Some codes used by blocks
-#define BLOCK_FLAGS_CODE     70  // An int containing flags
-#define BLOCK_BASE_CODE      10  // Origin of block definition
-#define XREF_DEPENDENT       16  // If a block contains an XREF
-#define XREF_RESOLVED        32  // If a XREF resolved ok
-#define REFERENCED           64  // If a block is ref'd in DWG
-
-#define XSCALE_CODE          41
-#define YSCALE_CODE          42
-#define ANGLE_CODE           50
-#define INS_POINT_CODE       10  // Followed by x of ins pnt
-#define NAME2_CODE            3  // Second appearance of name
-
-// Some codes used by circle entities
-#define CENTER_CODE          10  // Followed by x of center
-#define RADIUS_CODE          40  // Followd by radius of circle
-
-#define COND_OP_CODE         -4  // Conditional op,ads_ssget
-
-// When using ads_buildlist you MUST use RTDXF0 instead of these
-#define ENTITY_TYPE_CODE      0  // Then there is LINE, 3DFACE..
-#define SES_CODE              0  // Start End String Code
-#define FILE_SEP_CODE         0  // File separator
-#define SOT_CODE              0  // Start Of Table
-#define TEXTVAL_CODE          1
-#define NAME_CODE             2
-#define BLOCK_NAME_CODE       2
-#define SECTION_NAME_CODE     2
-#define ENT_HAND_CODE         5  // What follows is hexa string
-#define TXT_STYLE_CODE        7  // Inside attributes
-#define LAYER_NAME_CODE       8  // What follows is layer name
-#define FIRST_XCOORD_CODE    10  // Group code x of 1st coord
-#define FIRST_YCOORD_CODE    20  // Group code y of 1st coord
-#define FIRST_ZCOORD_CODE    30  // Group code z of 1st coord
-#define L_START_CODE         10
-#define L_END_CODE           11
-#define TXTHI_CODE           40
-#define SCALE_X_CODE         41
-#define SCALE_Y_CODE         42
-#define SCALE_Z_CODE         43
-#define BULGE_CODE           42  // Used in PLINE verts for arcs
-#define ROTATION_CODE        50
-#define COLOUR_CODE          62  // What follows is a color int
-#define LTYPE_CODE            6  // What follows is a linetype
-
-
-// Attribute flags
-#define ATTS_FOLLOW_CODE     66
-#define ATT_TAG_CODE          2
-#define ATT_VAL_CODE          1
-#define ATT_FLAGS_CODE       70  // 4 1 bit flags as follows...
-#define ATT_INVIS_FLAG        1
-#define ATT_CONST_FLAG        2
-#define ATT_VERIFY_FLAG       4 // Prompt and verify
-#define ATT_PRESET_FLAG       8 // No prompt and no verify
-
-// PLINE defines
-// Flags
-#define OPEN_PLINE       0x00
-#define CLOSED_PLINE     0x01
-#define POLYLINE3D       0x80
-#define PFACE_MESH       0x40
-#define PGON_MESH        0x10
-// Vertices follow entity, required in POLYLINES
-#define VERTS_FOLLOW_CODE   66 // Value should always be 1
-#define VERTEX_COORD_CODE   10
-
-
-// LAYER flags
-#define FROZEN           1
-#define FROZEN_BY_DEF    2
-#define LOCKED           4
-#define OBJECT_USED     64   // Object is ref'd in the dwg
-
-#define BLOCK_EN_CODE   -2   // Block entity definition
-#define E_NAME          -1   // Entity name
-
-// Extended data codes
-#define EXTD_SENTINEL    (-3)
-#define EXTD_STR         1000
-#define EXTD_APP_NAME    1001
-#define EXTD_CTL_STR     1002
-#define EXTD_LYR_STR     1003
-#define EXTD_CHUNK       1004
-#define EXTD_HANDLE      1005
-#define EXTD_POINT       1010
-#define EXTD_POS         1011
-#define EXTD_DISP        1012
-#define EXTD_DIR         1013
-#define EXTD_FLOAT       1040
-#define EXTD_DIST        1041
-#define EXTD_SCALE       1042
-#define EXTD_INT16       1070
-#define EXTD_INT32       1071
-
-// UCS codes for use in ads_trans
-#define WCS_TRANS_CODE      0
-#define UCS_TRANS_CODE      1
-#define DCS_TRANS_CODE      2
-#define PCS_TRANS_CODE      3
-
-#endif
-
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_creationadapter.h b/src/modules/io/io_shapes_dxf/dxflib/dl_creationadapter.h
deleted file mode 100755
index 36a1e80..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_creationadapter.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/**********************************************************
- * Version $Id: dl_creationadapter.h 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_creationadapter.h 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef DL_CREATIONADAPTER_H
-#define DL_CREATIONADAPTER_H
-
-#include "dl_creationinterface.h"
-
-/**
- * An abstract adapter class for receiving DXF events when a DXF file is being read. 
- * The methods in this class are empty. This class exists as convenience for creating 
- * listener objects.
- *
- * @author Andrew Mustun
- */
-class DL_CreationAdapter : public DL_CreationInterface {
-public:
-    DL_CreationAdapter() {}
-    virtual ~DL_CreationAdapter() {}
-    virtual void addLayer(const DL_LayerData&) {}
-    virtual void addBlock(const DL_BlockData&) {}
-    virtual void endBlock() {}
-    virtual void addPoint(const DL_PointData&) {}
-    virtual void addLine(const DL_LineData&) {}
-    virtual void addArc(const DL_ArcData&) {}
-    virtual void addCircle(const DL_CircleData&) {}
-    virtual void addEllipse(const DL_EllipseData&) {}
-	
-    virtual void addPolyline(const DL_PolylineData&) {}
-    virtual void addVertex(const DL_VertexData&) {}
-	
-    virtual void addSpline(const DL_SplineData&) {}
-    virtual void addControlPoint(const DL_ControlPointData&) {}
-    virtual void addKnot(const DL_KnotData&) {}
-	
-    virtual void addInsert(const DL_InsertData&) {}
-	
-    virtual void addMText(const DL_MTextData&) {}
-    virtual void addMTextChunk(const char*) {}
-    virtual void addText(const DL_TextData&) {}
-	
-    virtual void addDimAlign(const DL_DimensionData&,
-                             const DL_DimAlignedData&) {}
-    virtual void addDimLinear(const DL_DimensionData&,
-                              const DL_DimLinearData&) {}
-    virtual void addDimRadial(const DL_DimensionData&,
-                              const DL_DimRadialData&) {}
-    virtual void addDimDiametric(const DL_DimensionData&,
-                              const DL_DimDiametricData&) {}
-    virtual void addDimAngular(const DL_DimensionData&,
-                              const DL_DimAngularData&) {}
-    virtual void addDimAngular3P(const DL_DimensionData&,
-                              const DL_DimAngular3PData&) {}
-    virtual void addDimOrdinate(const DL_DimensionData&,
-                             const DL_DimOrdinateData&) {}
-    virtual void addLeader(const DL_LeaderData&) {}
-    virtual void addLeaderVertex(const DL_LeaderVertexData&) {}
-	
-    virtual void addHatch(const DL_HatchData&) {}
-
-    virtual void addTrace(const DL_TraceData&) {}
-    virtual void add3dFace(const DL_3dFaceData&) {}
-    virtual void addSolid(const DL_SolidData&) {}
-	
-    virtual void addImage(const DL_ImageData&) {}
-	virtual void linkImage(const DL_ImageDefData&) {}
-    virtual void addHatchLoop(const DL_HatchLoopData&) {}
-    virtual void addHatchEdge(const DL_HatchEdgeData&) {}
-    virtual void endEntity() {}
-    virtual void addComment(const char* comment) {}
-    virtual void setVariableVector(const char*, 
-	               double, double, double, int) {}
-    virtual void setVariableString(const char*, const char*, int) {}
-    virtual void setVariableInt(const char*, int, int) {}
-    virtual void setVariableDouble(const char*, double, int) {}
-    virtual void endSequence() {}
-};
-
-#endif
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_creationinterface.h b/src/modules/io/io_shapes_dxf/dxflib/dl_creationinterface.h
deleted file mode 100755
index 2ccc180..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_creationinterface.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/**********************************************************
- * Version $Id: dl_creationinterface.h 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_creationinterface.h 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef DL_CREATIONINTERFACE_H
-#define DL_CREATIONINTERFACE_H
-
-#include <string.h>
-
-#include "dl_attributes.h"
-#include "dl_codes.h"
-#include "dl_entities.h"
-#include "dl_extrusion.h"
-
-/**
- * Abstract class (interface) for the creation of new entities.
- * Inherit your class which takes care of the entities in the 
- * processed DXF file from this interface. 
- *
- * Double arrays passed to your implementation contain 3 double 
- * values for x, y, z coordinates unless stated differently.
- *
- * @author Andrew Mustun
- */
-class DL_CreationInterface {
-public:
-    DL_CreationInterface() {
-        extrusion = new DL_Extrusion;
-    }
-    virtual ~DL_CreationInterface() {
-        delete extrusion;
-    }
-
-    /**
-     * Called for every layer.
-     */
-    virtual void addLayer(const DL_LayerData& data) = 0;
-
-    /**
-     * Called for every block. Note: all entities added after this
-     * command go into this block until endBlock() is called.
-    *
-     * @see endBlock()
-     */
-    virtual void addBlock(const DL_BlockData& data) = 0;
-
-    /** Called to end the current block */
-    virtual void endBlock() = 0;
-
-    /** Called for every point */
-    virtual void addPoint(const DL_PointData& data) = 0;
-
-    /** Called for every line */
-    virtual void addLine(const DL_LineData& data) = 0;
-
-    /** Called for every arc */
-    virtual void addArc(const DL_ArcData& data) = 0;
-
-    /** Called for every circle */
-    virtual void addCircle(const DL_CircleData& data) = 0;
-
-    /** Called for every ellipse */
-    virtual void addEllipse(const DL_EllipseData& data) = 0;
-
-    /** Called for every polyline start */
-    virtual void addPolyline(const DL_PolylineData& data) = 0;
-
-    /** Called for every polyline vertex */
-    virtual void addVertex(const DL_VertexData& data) = 0;
-	
-	/** Called for every spline */
-    virtual void addSpline(const DL_SplineData& data) = 0;
-	
-	/** Called for every spline control point */
-    virtual void addControlPoint(const DL_ControlPointData& data) = 0;
-	
-	/** Called for every spline knot value */
-    virtual void addKnot(const DL_KnotData& data) = 0;
-
-    /** Called for every insert. */
-    virtual void addInsert(const DL_InsertData& data) = 0;
-    
-    /** Called for every trace start */
-    virtual void addTrace(const DL_TraceData& data) = 0;
-    
-    /** Called for every 3dface start */
-    virtual void add3dFace(const DL_3dFaceData& data) = 0;
-
-    /** Called for every solid start */
-    virtual void addSolid(const DL_SolidData& data) = 0;
-
-
-    /** Called for every Multi Text entity. */
-    virtual void addMText(const DL_MTextData& data) = 0;
-
-    /**
-     * Called for additional text chunks for MTEXT entities.
-     * The chunks come at 250 character in size each. Note that 
-     * those chunks come <b>before</b> the actual MTEXT entity.
-     */
-    virtual void addMTextChunk(const char* text) = 0;
-
-    /** Called for every Text entity. */
-    virtual void addText(const DL_TextData& data) = 0;
-
-    /**
-     * Called for every aligned dimension entity. 
-     */
-    virtual void addDimAlign(const DL_DimensionData& data,
-                             const DL_DimAlignedData& edata) = 0;
-    /**
-     * Called for every linear or rotated dimension entity. 
-     */
-    virtual void addDimLinear(const DL_DimensionData& data,
-                              const DL_DimLinearData& edata) = 0;
-
-	/**
-     * Called for every radial dimension entity. 
-     */
-    virtual void addDimRadial(const DL_DimensionData& data,
-                              const DL_DimRadialData& edata) = 0;
-
-	/**
-     * Called for every diametric dimension entity. 
-     */
-    virtual void addDimDiametric(const DL_DimensionData& data,
-                              const DL_DimDiametricData& edata) = 0;
-
-	/**
-     * Called for every angular dimension (2 lines version) entity. 
-     */
-    virtual void addDimAngular(const DL_DimensionData& data,
-                              const DL_DimAngularData& edata) = 0;
-
-	/**
-     * Called for every angular dimension (3 points version) entity. 
-     */
-    virtual void addDimAngular3P(const DL_DimensionData& data,
-                              const DL_DimAngular3PData& edata) = 0;
-	
-    /**
-     * Called for every ordinate dimension entity. 
-     */
-    virtual void addDimOrdinate(const DL_DimensionData& data,
-                             const DL_DimOrdinateData& edata) = 0;
-    
-    /** 
-	 * Called for every leader start. 
-	 */
-    virtual void addLeader(const DL_LeaderData& data) = 0;
-	
-	/** 
-	 * Called for every leader vertex 
-	 */
-    virtual void addLeaderVertex(const DL_LeaderVertexData& data) = 0;
-	
-	/** 
-	 * Called for every hatch entity. 
-	 */
-    virtual void addHatch(const DL_HatchData& data) = 0;
-	
-	/** 
-	 * Called for every image entity. 
-	 */
-    virtual void addImage(const DL_ImageData& data) = 0;
-
-	/**
-	 * Called for every image definition.
-	 */
-	virtual void linkImage(const DL_ImageDefData& data) = 0;
-
-	/** 
-	 * Called for every hatch loop. 
-	 */
-    virtual void addHatchLoop(const DL_HatchLoopData& data) = 0;
-
-	/** 
-	 * Called for every hatch edge entity. 
-	 */
-    virtual void addHatchEdge(const DL_HatchEdgeData& data) = 0;
-	
-	/** 
-	 * Called after an entity has been completed.  
-	 */
-    virtual void endEntity() = 0;
-    
-    /**
-     * Called for every comment in the DXF file (code 999).
-     */
-    virtual void addComment(const char* comment) = 0;
-
-    /**
-     * Called for every vector variable in the DXF file (e.g. "$EXTMIN").
-     */
-    virtual void setVariableVector(const char* key, 
-	               double v1, double v2, double v3, int code) = 0;
-	
-    /**
-     * Called for every string variable in the DXF file (e.g. "$ACADVER").
-     */
-    virtual void setVariableString(const char* key, const char* value, int code) = 0;
-	
-    /**
-     * Called for every int variable in the DXF file (e.g. "$ACADMAINTVER").
-     */
-    virtual void setVariableInt(const char* key, int value, int code) = 0;
-	
-    /**
-     * Called for every double variable in the DXF file (e.g. "$DIMEXO").
-     */
-    virtual void setVariableDouble(const char* key, double value, int code) = 0;
-	
-     /**
-      * Called when a SEQEND occurs (when a POLYLINE or ATTRIB is done)
-      */
-     virtual void endSequence() = 0;
-
-    /** Sets the current attributes for entities. */
-    void setAttributes(const DL_Attributes& attrib) {
-        attributes = attrib;
-    }
-
-    /** @return the current attributes used for new entities. */
-    DL_Attributes getAttributes() {
-        return attributes;
-    }
-
-    /** Sets the current attributes for entities. */
-    void setExtrusion(double dx, double dy, double dz, double elevation) {
-        extrusion->setDirection(dx, dy, dz);
-		extrusion->setElevation(elevation);
-    }
-
-    /** @return the current attributes used for new entities. */
-    DL_Extrusion* getExtrusion() {
-        return extrusion;
-    }
-
-protected:
-    DL_Attributes attributes;
-    DL_Extrusion *extrusion;
-};
-
-#endif
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_dxf.cpp b/src/modules/io/io_shapes_dxf/dxflib/dl_dxf.cpp
deleted file mode 100755
index a13e9a4..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_dxf.cpp
+++ /dev/null
@@ -1,5073 +0,0 @@
-/**********************************************************
- * Version $Id: dl_dxf.cpp 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_dxf.cpp 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "dl_dxf.h"
-
-#include <algorithm>
-#include <string>
-#include <cstdio>
-#include <cassert>
-#include <cmath>
-
-#include "dl_attributes.h"
-#include "dl_codes.h"
-#include "dl_creationinterface.h"
-#include "dl_writer_ascii.h"
-
-
-/**
- * Default constructor.
- */
-DL_Dxf::DL_Dxf() {
-    styleHandleStd = 0;
-    version = VER_2000;
-
-    vertices = NULL;
-    maxVertices = 0;
-    vertexIndex = 0;
-
-    knots = NULL;
-    maxKnots = 0;
-    knotIndex = 0;
-
-    controlPoints = NULL;
-    maxControlPoints = 0;
-    controlPointIndex = 0;
-
-    leaderVertices = NULL;
-    maxLeaderVertices = 0;
-    leaderVertexIndex = 0;
-
-    hatchLoops = NULL;
-    maxHatchLoops = 0;
-    hatchLoopIndex = -1;
-    hatchEdges = NULL;
-    maxHatchEdges = NULL;
-    hatchEdgeIndex = NULL;
-    dropEdges = false;
-}
-
-
-
-/**
- * Destructor.
- */
-DL_Dxf::~DL_Dxf() {
-    if (vertices!=NULL) {
-        delete[] vertices;
-    }
-    if (knots!=NULL) {
-        delete[] knots;
-    }
-    if (controlPoints!=NULL) {
-        delete[] controlPoints;
-    }
-    if (leaderVertices!=NULL) {
-        delete[] leaderVertices;
-    }
-    if (hatchLoops!=NULL) {
-        delete[] hatchLoops;
-    }
-    if (hatchEdges!=NULL) {
-        for (int i=0; i<maxHatchLoops; ++i) {
-            if (hatchEdges[i]!=NULL) {
-                delete[] hatchEdges[i];
-            }
-        }
-        delete[] hatchEdges;
-    }
-    if (maxHatchEdges!=NULL) {
-        delete[] maxHatchEdges;
-    }
-    if (hatchEdgeIndex!=NULL) {
-        delete[] hatchEdgeIndex;
-    }
-}
-
-
-
-/**
- * @brief Reads the given file and calls the appropriate functions in
- * the given creation interface for every entity found in the file.
- *
- * @param file Input
- *		Path and name of file to read
- * @param creationInterface
- *		Pointer to the class which takes care of the entities in the file.
- *
- * @retval true If \p file could be opened.
- * @retval false If \p file could not be opened.
- */
-bool DL_Dxf::in(const string& file, DL_CreationInterface* creationInterface) {
-    FILE *fp;
-    firstCall = true;
-    currentEntity = DL_UNKNOWN;
-    int errorCounter = 0;
-
-    fp = fopen(file.c_str(), "rt");
-    if (fp) {
-        while (readDxfGroups(fp, creationInterface, &errorCounter)) {}
-        fclose(fp);
-        if (errorCounter>0) {
-            std::cerr << "DXF Filter: There have been " << errorCounter <<
-            " errors. The drawing might be incomplete / incorrect.\n";
-        }
-        return true;
-    }
-
-    return false;
-}
-
-
-
-/**
- * Reads a DXF file from an existing stream.
- *
- * @param stream The string stream.
- * @param creationInterface
- *		Pointer to the class which takes care of the entities in the file.
- *
- * @retval true If \p file could be opened.
- * @retval false If \p file could not be opened.
- */
-#ifndef __GCC2x__
-bool DL_Dxf::in(std::stringstream& stream,
-                DL_CreationInterface* creationInterface) {
-    
-    int errorCounter = 0;
-
-    if (stream.good()) {
-        firstCall=true;
-        currentEntity = DL_UNKNOWN;
-        while (readDxfGroups(stream, creationInterface, &errorCounter)) {}
-        if (errorCounter>0) {
-            std::cerr << "DXF Filter: There have been " << errorCounter <<
-            " errors. The drawing might be incomplete / incorrect.\n";
-        }
-        return true;
-    }
-    return false;
-}
-#endif
-
-
-
-/**
- * @brief Reads a group couplet from a DXF file.  Calls another function
- * to process it.
- *
- * A group couplet consists of two lines that represent a single
- * piece of data.  An integer constant on the first line indicates
- * the type of data.  The value is on the next line.\n
- *
- * This function reads a couplet, determines the type of data, and
- * passes the value to the the appropriate handler function of
- * \p creationInterface.\n
- * 
- * \p fp is advanced so that the next call to \p readDXFGroups() reads
- * the next couplet in the file.
- *
- * @param fp Handle of input file
- * @param creationInterface Handle of class which processes entities
- *		in the file
- *
- * @retval true If EOF not reached.
- * @retval false If EOF reached.
- */
-bool DL_Dxf::readDxfGroups(FILE *fp, DL_CreationInterface* creationInterface,
-                           int* errorCounter) {
-
-    bool ok = true;
-    static int line = 1;
-
-    // Read one group of the DXF file and chop the lines:
-    if (DL_Dxf::getChoppedLine(groupCodeTmp, DL_DXF_MAXLINE, fp) &&
-            DL_Dxf::getChoppedLine(groupValue, DL_DXF_MAXLINE, fp) ) {
-
-        groupCode = (unsigned int)stringToInt(groupCodeTmp, &ok);
-
-        if (ok) {
-            //std::cerr << groupCode << "\n";
-            //std::cerr << groupValue << "\n";
-            line+=2;
-            processDXFGroup(creationInterface, groupCode, groupValue);
-        } else {
-            std::cerr << "DXF read error: Line: " << line << "\n";
-            if (errorCounter!=NULL) {
-                (*errorCounter)++;
-            }
-            // try to fix:
-            std::cerr << "DXF read error: trying to fix..\n";
-            // drop a line to sync:
-            DL_Dxf::getChoppedLine(groupCodeTmp, DL_DXF_MAXLINE, fp);
-        }
-    }
-
-    return !feof(fp);
-}
-
-
-
-/**
- * Same as above but for stringstreams.
- */
-#ifndef __GCC2x__
-bool DL_Dxf::readDxfGroups(std::stringstream& stream,
-                           DL_CreationInterface* creationInterface,
-                           int* errorCounter) {
-
-    bool ok = true;
-    static int line = 1;
-
-    // Read one group of the DXF file and chop the lines:
-    if (DL_Dxf::getChoppedLine(groupCodeTmp, DL_DXF_MAXLINE, stream) &&
-            DL_Dxf::getChoppedLine(groupValue, DL_DXF_MAXLINE, stream) ) {
-
-        groupCode = (unsigned int)stringToInt(groupCodeTmp, &ok);
-
-        if (ok) {
-            //std::cout << "group code: " << groupCode << "\n";
-            //std::cout << "group value: " << groupValue << "\n";
-            line+=2;
-            processDXFGroup(creationInterface, groupCode, groupValue);
-        } else {
-            std::cerr << "DXF read error: Line: " << line << "\n";
-            if (errorCounter!=NULL) {
-                (*errorCounter)++;
-            }
-            // try to fix:
-            //std::cerr << "DXF read error: trying to fix..\n";
-            // drop a line to sync:
-            //DL_Dxf::getChoppedLine(groupCodeTmp, DL_DXF_MAXLINE, stream);
-        }
-    }
-    return !stream.eof();
-}
-#endif
-
-
-
-/**
- * @brief Reads line from file & strips whitespace at start and newline 
- * at end.
- *
- * @param s Output\n
- *		Pointer to character array that chopped line will be returned in.
- * @param size Size of \p s.  (Including space for NULL.)
- * @param fp Input\n
- *		Handle of input file.
- *
- * @retval true if line could be read
- * @retval false if \p fp is already at end of file
- *
- * @todo Change function to use safer FreeBSD strl* functions
- * @todo Is it a problem if line is blank (i.e., newline only)?
- *		Then, when function returns, (s==NULL).
- */
-bool DL_Dxf::getChoppedLine(char *s, unsigned int size, FILE *fp) {
-    if (!feof(fp)) {
-        // The whole line in the file.  Includes space for NULL.
-        char* wholeLine = new char[size];
-        // Only the useful part of the line
-        char* line;
-
-        line = fgets(wholeLine, size, fp);
-
-        if (line!=NULL && line[0] != '\0') { // Evaluates to fgets() retval
-            // line == wholeLine at this point.
-            // Both guaranteed to be NULL terminated.
-
-            // Strip leading whitespace and trailing CR/LF.
-            stripWhiteSpace(&line);
-
-            strncpy(s, line, size);
-            s[size] = '\0';
-            // s should always be NULL terminated, because:
-            assert(size > strlen(line));
-        }
-
-        delete[] wholeLine; // Done with wholeLine
-
-        return true;
-    } else {
-        s[0] = '\0';
-        return false;
-    }
-}
-
-
-
-/**
- * Same as above but for stringstreams.
- */
-#ifndef __GCC2x__
-bool DL_Dxf::getChoppedLine(char *s, unsigned int size,
-                            std::stringstream& stream) {
-
-    if (!stream.eof()) {
-        // Only the useful part of the line
-        char* line = new char[size+1];
-        char* oriLine = line;
-        stream.getline(line, size);
-        stripWhiteSpace(&line);
-        strncpy(s, line, size);
-        s[size] = '\0';
-        assert(size > strlen(s));
-        delete[] oriLine;
-        return true;
-    } else {
-        s[0] = '\0';
-        return false;
-    }
-}
-#endif
-
-
-
-/**
- * @brief Strips leading whitespace and trailing Carriage Return (CR)
- * and Line Feed (LF) from NULL terminated string.
- *
- * @param s Input and output.
- *		NULL terminates string.
- *
- * @retval true if \p s is non-NULL
- * @retval false if \p s is NULL
- */
-bool DL_Dxf::stripWhiteSpace(char** s) {
-    // last non-NULL char:
-    int lastChar = strlen(*s) - 1;
-
-    // Is last character CR or LF?
-    while ( (lastChar >= 0) &&
-            (((*s)[lastChar] == 10) || ((*s)[lastChar] == 13) ||
-             ((*s)[lastChar] == ' ' || ((*s)[lastChar] == '\t'))) ) {
-        (*s)[lastChar] = '\0';
-        lastChar--;
-    }
-
-    // Skip whitespace, excluding \n, at beginning of line
-    while ((*s)[0]==' ' || (*s)[0]=='\t') {
-        ++(*s);
-    }
-    
-    return ((*s) ? true : false);
-}
-
-
-
-/**
- * Processes a group (pair of group code and value).
- *
- * @param creationInterface Handle to class that creates entities and
- * other CAD data from DXF group codes
- *
- * @param groupCode Constant indicating the data type of the group.
- * @param groupValue The data value.
- *
- * @retval true if done processing current entity and new entity begun
- * @retval false if not done processing current entity
-*/
-bool DL_Dxf::processDXFGroup(DL_CreationInterface* creationInterface,
-                             int groupCode, const char *groupValue) {
-
-    // Init on first call
-    if (firstCall) {
-        for (int i=0; i<DL_DXF_MAXGROUPCODE; ++i) {
-            values[i][0] = '\0';
-        }
-        settingValue[0] = '\0';
-        firstCall=false;
-    }
-
-    // Indicates comment or dxflib version:
-    if (groupCode==999) {
-        if (groupValue!=NULL) {
-            if (!strncmp(groupValue, "dxflib", 6)) {
-                libVersion = getLibVersion(&groupValue[7]);
-            }
-            
-            addComment(creationInterface, groupValue);
-        }
-    }
-
-    // Indicates start of new entity or var
-    else if (groupCode==0 || groupCode==9) {
-
-        // If new entity is encountered, the last one must be complete
-        // prepare attributes which can be used for most entities:
-        char name[DL_DXF_MAXLINE+1];
-        if ((values[8])[0]!='\0') {
-            strcpy(name, values[8]);
-        }
-        // defaults to layer '0':
-        else {
-            strcpy(name, "0");
-        }
-
-        int width;
-        // Compatibillity with qcad1:
-        if ((values[39])[0]!='\0' &&
-                (values[370])[0]=='\0') {
-            width = toInt(values[39], -1);
-        }
-        // since autocad 2002:
-        else if ((values[370])[0]!='\0') {
-            width = toInt(values[370], -1);
-        }
-        // default to BYLAYER:
-        else {
-            width = -1;
-        }
-
-        int color;
-        color = toInt(values[62], 256);
-
-        char linetype[DL_DXF_MAXLINE+1];
-        strcpy(linetype, toString(values[6], "BYLAYER"));
-
-        attrib = DL_Attributes(values[8],          // layer
-                               color,              // color
-                               width,              // width
-                               linetype);          // linetype
-        creationInterface->setAttributes(attrib);
-
-        creationInterface->setExtrusion(toReal(values[210], 0.0),
-                                        toReal(values[220], 0.0),
-                                        toReal(values[230], 1.0),
-                                        toReal(values[30], 0.0));
-
-        // Add the last entity via creationInterface
-        switch (currentEntity) {
-        case DL_SETTING:
-            addSetting(creationInterface);
-            break;
-
-        case DL_LAYER:
-            addLayer(creationInterface);
-            break;
-
-        case DL_BLOCK:
-            addBlock(creationInterface);
-            break;
-
-        case DL_ENDBLK:
-            endBlock(creationInterface);
-            break;
-
-        case DL_ENTITY_POINT:
-            addPoint(creationInterface);
-            break;
-
-        case DL_ENTITY_LINE:
-            addLine(creationInterface);
-            break;
-
-        case DL_ENTITY_POLYLINE:
-            //bulge = toReal(values[42]);
-            // fall through
-        case DL_ENTITY_LWPOLYLINE:
-            addPolyline(creationInterface);
-            break;
-
-        case DL_ENTITY_VERTEX:
-            addVertex(creationInterface);
-            break;
-
-        case DL_ENTITY_SPLINE:
-            addSpline(creationInterface);
-            break;
-
-        case DL_ENTITY_ARC:
-            addArc(creationInterface);
-            break;
-
-        case DL_ENTITY_CIRCLE:
-            addCircle(creationInterface);
-            break;
-
-        case DL_ENTITY_ELLIPSE:
-            addEllipse(creationInterface);
-            break;
-
-        case DL_ENTITY_INSERT:
-            addInsert(creationInterface);
-            break;
-
-        case DL_ENTITY_MTEXT:
-            addMText(creationInterface);
-            break;
-
-        case DL_ENTITY_TEXT:
-            addText(creationInterface);
-            break;
-
-        case DL_ENTITY_ATTRIB:
-            addAttrib(creationInterface);
-            break;
-
-        case DL_ENTITY_DIMENSION: {
-                int type = (toInt(values[70], 0)&0x07);
-
-                switch (type) {
-                case 0:
-                    addDimLinear(creationInterface);
-                    break;
-
-                case 1:
-                    addDimAligned(creationInterface);
-                    break;
-
-                case 2:
-                    addDimAngular(creationInterface);
-                    break;
-
-                case 3:
-                    addDimDiametric(creationInterface);
-                    break;
-
-                case 4:
-                    addDimRadial(creationInterface);
-                    break;
-
-                case 5:
-                    addDimAngular3P(creationInterface);
-                    break;
-                
-                case 6:
-                    addDimOrdinate(creationInterface);
-                    break;
-
-                default:
-                    break;
-                }
-            }
-            break;
-
-        case DL_ENTITY_LEADER:
-            addLeader(creationInterface);
-            break;
-
-        case DL_ENTITY_HATCH:
-            addHatch(creationInterface);
-            break;
-
-        case DL_ENTITY_IMAGE:
-            addImage(creationInterface);
-            break;
-
-        case DL_ENTITY_IMAGEDEF:
-            addImageDef(creationInterface);
-            break;
-
-        case DL_ENTITY_TRACE:
-            addTrace(creationInterface);
-            break;
-        
-        case DL_ENTITY_3DFACE:
-            add3dFace(creationInterface);
-            break;
-
-        case DL_ENTITY_SOLID:
-            addSolid(creationInterface);
-            break;
-
-        case DL_ENTITY_SEQEND:
-            endSequence(creationInterface);
-            break;
-        
-        default:
-            break;
-        }
-
-
-        // reset all values (they are not persistent and only this
-        //  way we can detect default values for unstored settings)
-        for (int i=0; i<DL_DXF_MAXGROUPCODE; ++i) {
-            values[i][0] = '\0';
-        }
-        settingValue[0] = '\0';
-        settingKey[0] = '\0';
-
-
-        // Last DXF entity or setting has been handled
-        // Now determine what the next entity or setting type is
-
-		int prevEntity = currentEntity;
-
-        // Read DXF settings:
-        if (groupValue[0]=='$') {
-            currentEntity = DL_SETTING;
-            strncpy(settingKey, groupValue, DL_DXF_MAXLINE);
-            settingKey[DL_DXF_MAXLINE] = '\0';
-        }
-        // Read Layers:
-        else if (!strcmp(groupValue, "LAYER")) {
-            currentEntity = DL_LAYER;
-
-        }
-        // Read Blocks:
-        else if (!strcmp(groupValue, "BLOCK")) {
-            currentEntity = DL_BLOCK;
-        } else if (!strcmp(groupValue, "ENDBLK")) {
-            currentEntity = DL_ENDBLK;
-
-        }
-        // Read entities:
-        else if (!strcmp(groupValue, "POINT")) {
-            currentEntity = DL_ENTITY_POINT;
-        } else if (!strcmp(groupValue, "LINE")) {
-            currentEntity = DL_ENTITY_LINE;
-        } else if (!strcmp(groupValue, "POLYLINE")) {
-            currentEntity = DL_ENTITY_POLYLINE;
-        } else if (!strcmp(groupValue, "LWPOLYLINE")) {
-            currentEntity = DL_ENTITY_LWPOLYLINE;
-        } else if (!strcmp(groupValue, "VERTEX")) {
-            currentEntity = DL_ENTITY_VERTEX;
-        } else if (!strcmp(groupValue, "SPLINE")) {
-            currentEntity = DL_ENTITY_SPLINE;
-        } else if (!strcmp(groupValue, "ARC")) {
-            currentEntity = DL_ENTITY_ARC;
-        } else if (!strcmp(groupValue, "ELLIPSE")) {
-            currentEntity = DL_ENTITY_ELLIPSE;
-        } else if (!strcmp(groupValue, "CIRCLE")) {
-            currentEntity = DL_ENTITY_CIRCLE;
-        } else if (!strcmp(groupValue, "INSERT")) {
-            currentEntity = DL_ENTITY_INSERT;
-        } else if (!strcmp(groupValue, "TEXT")) {
-            currentEntity = DL_ENTITY_TEXT;
-        } else if (!strcmp(groupValue, "MTEXT")) {
-            currentEntity = DL_ENTITY_MTEXT;
-        } else if (!strcmp(groupValue, "ATTRIB")) {
-            currentEntity = DL_ENTITY_ATTRIB;
-        } else if (!strcmp(groupValue, "DIMENSION")) {
-            currentEntity = DL_ENTITY_DIMENSION;
-        } else if (!strcmp(groupValue, "LEADER")) {
-            currentEntity = DL_ENTITY_LEADER;
-        } else if (!strcmp(groupValue, "HATCH")) {
-            currentEntity = DL_ENTITY_HATCH;
-        } else if (!strcmp(groupValue, "IMAGE")) {
-            currentEntity = DL_ENTITY_IMAGE;
-        } else if (!strcmp(groupValue, "IMAGEDEF")) {
-            currentEntity = DL_ENTITY_IMAGEDEF;
-        } else if (!strcmp(groupValue, "TRACE")) {
-           currentEntity = DL_ENTITY_TRACE;
-        } else if (!strcmp(groupValue, "SOLID")) {
-           currentEntity = DL_ENTITY_SOLID;
-        } else if (!strcmp(groupValue, "3DFACE")) {
-           currentEntity = DL_ENTITY_3DFACE;
-        } else if (!strcmp(groupValue, "SEQEND")) {
-            currentEntity = DL_ENTITY_SEQEND;
-        } else {
-            currentEntity = DL_UNKNOWN;
-        }
-
-		// end of old style POLYLINE entity
-		if (prevEntity==DL_ENTITY_VERTEX && currentEntity!=DL_ENTITY_VERTEX) {
-			endEntity(creationInterface);
-		}
-
-        return true;
-
-    } else {
-        // Group code does not indicate start of new entity or setting,
-        // so this group must be continuation of data for the current
-        // one.
-        if (groupCode<DL_DXF_MAXGROUPCODE) {
-
-            bool handled = false;
-
-            switch (currentEntity) {
-            case DL_ENTITY_MTEXT:
-                handled = handleMTextData(creationInterface);
-                break;
-
-            case DL_ENTITY_LWPOLYLINE:
-                handled = handleLWPolylineData(creationInterface);
-                break;
-
-            case DL_ENTITY_SPLINE:
-                handled = handleSplineData(creationInterface);
-                break;
-
-            case DL_ENTITY_LEADER:
-                handled = handleLeaderData(creationInterface);
-                break;
-
-            case DL_ENTITY_HATCH:
-                handled = handleHatchData(creationInterface);
-                break;
-
-            default:
-                break;
-            }
-
-            if (!handled) {
-                // Normal group / value pair:
-                strncpy(values[groupCode], groupValue, DL_DXF_MAXLINE);
-                values[groupCode][DL_DXF_MAXLINE] = '\0';
-            }
-        }
-
-        return false;
-    }
-    return false;
-}
-
-
-
-/**
- * Adds a comment from the DXF file.
- */
-void DL_Dxf::addComment(DL_CreationInterface* creationInterface, const char* comment) {
-    creationInterface->addComment(comment);
-}
-
-
-
-/**
- * Adds a variable from the DXF file.
- */
-void DL_Dxf::addSetting(DL_CreationInterface* creationInterface) {
-    int c = -1;
-    for (int i=0; i<=380; ++i) {
-        if (values[i][0]!='\0') {
-            c = i;
-            break;
-        }
-    }
-
-    // string
-    if (c>=0 && c<=9) {
-        creationInterface->setVariableString(settingKey,
-                                             values[c], c);
-    }
-    // vector
-    else if (c>=10 && c<=39) {
-        if (c==10) {
-            creationInterface->setVariableVector(
-                settingKey,
-                toReal(values[c]),
-                toReal(values[c+10]),
-                toReal(values[c+20]),
-                c);
-        }
-    }
-    // double
-    else if (c>=40 && c<=59) {
-        creationInterface->setVariableDouble(settingKey,
-                                             toReal(values[c]),
-                                             c);
-    }
-    // int
-    else if (c>=60 && c<=99) {
-        creationInterface->setVariableInt(settingKey,
-                                          toInt(values[c]),
-                                          c);
-    }
-    // misc
-    else if (c>=0) {
-        creationInterface->setVariableString(settingKey,
-                                             values[c],
-                                             c);
-    }
-}
-
-
-
-/**
- * Adds a layer that was read from the file via the creation interface.
- */
-void DL_Dxf::addLayer(DL_CreationInterface* creationInterface) {
-    // correct some impossible attributes for layers:
-    attrib = creationInterface->getAttributes();
-    if (attrib.getColor()==256 || attrib.getColor()==0) {
-        attrib.setColor(7);
-    }
-    if (attrib.getWidth()<0) {
-        attrib.setWidth(1);
-    }
-    if (!strcasecmp(attrib.getLineType().c_str(), "BYLAYER") ||
-            !strcasecmp(attrib.getLineType().c_str(), "BYBLOCK")) {
-        attrib.setLineType("CONTINUOUS");
-    }
-
-    // add layer
-    creationInterface->addLayer(DL_LayerData(values[2],
-                                toInt(values[70])));
-}
-
-
-
-/**
- * Adds a block that was read from the file via the creation interface.
- */
-void DL_Dxf::addBlock(DL_CreationInterface* creationInterface) {
-    DL_BlockData d(
-        // Name:
-        values[2],
-        // flags:
-        toInt(values[70]),
-        // base point:
-        toReal(values[10]),
-        toReal(values[20]),
-        toReal(values[30]));
-
-    creationInterface->addBlock(d);
-}
-
-
-
-/**
- * Ends a block that was read from the file via the creation interface.
- */
-void DL_Dxf::endBlock(DL_CreationInterface* creationInterface) {
-    creationInterface->endBlock();
-}
-
-
-
-/**
- * Adds a point entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addPoint(DL_CreationInterface* creationInterface) {
-    DL_PointData d(toReal(values[10]),
-                   toReal(values[20]),
-                   toReal(values[30]));
-    creationInterface->addPoint(d);
-}
-
-
-
-/**
- * Adds a line entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addLine(DL_CreationInterface* creationInterface) {
-    DL_LineData d(toReal(values[10]),
-                  toReal(values[20]),
-                  toReal(values[30]),
-                  toReal(values[11]),
-                  toReal(values[21]),
-                  toReal(values[31]));
-
-    creationInterface->addLine(d);
-}
-
-
-
-/**
- * Adds a polyline entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addPolyline(DL_CreationInterface* creationInterface) {
-    DL_PolylineData pd(maxVertices, toInt(values[71], 0), toInt(values[72], 0), toInt(values[70], 0));
-    creationInterface->addPolyline(pd);
-
-    if (currentEntity==DL_ENTITY_LWPOLYLINE) {
-        for (int i=0; i<maxVertices; i++) {
-            DL_VertexData d(vertices[i*4],
-                            vertices[i*4+1],
-                            vertices[i*4+2],
-                            vertices[i*4+3]);
-
-            creationInterface->addVertex(d);
-        }
-		creationInterface->endEntity();
-    }
-}
-
-
-
-/**
- * Adds a polyline vertex entity that was read from the file 
- * via the creation interface.
- */
-void DL_Dxf::addVertex(DL_CreationInterface* creationInterface) {
-    DL_VertexData d(toReal(values[10]),
-                    toReal(values[20]),
-                    toReal(values[30]),
-                    //bulge);
-                    toReal(values[42]));
-
-    //bulge = toReal(values[42]);
-
-    creationInterface->addVertex(d);
-}
-
-
-
-/**
- * Adds a spline entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addSpline(DL_CreationInterface* creationInterface) {
-    DL_SplineData sd(toInt(values[71], 3), 
-                     maxKnots, 
-                     maxControlPoints, 
-                     toInt(values[70], 4));
-    /*DL_SplineData sd(toInt(values[71], 3), toInt(values[72], 0),
-                     toInt(values[73], 0), toInt(values[70], 4));*/
-    creationInterface->addSpline(sd);
-
-    int i;
-    for (i=0; i<maxControlPoints; i++) {
-        DL_ControlPointData d(controlPoints[i*3],
-                              controlPoints[i*3+1],
-                              controlPoints[i*3+2]);
-
-        creationInterface->addControlPoint(d);
-    }
-    for (i=0; i<maxKnots; i++) {
-      DL_KnotData k(knots[i]);
-
-      creationInterface->addKnot(k);
-    }
-}
-
-
-
-/**
- * Adds an arc entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addArc(DL_CreationInterface* creationInterface) {
-    DL_ArcData d(toReal(values[10]),
-                 toReal(values[20]),
-                 toReal(values[30]),
-                 toReal(values[40]),
-                 toReal(values[50]),
-                 toReal(values[51]));
-
-    creationInterface->addArc(d);
-}
-
-
-
-/**
- * Adds a circle entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addCircle(DL_CreationInterface* creationInterface) {
-    DL_CircleData d(toReal(values[10]),
-                    toReal(values[20]),
-                    toReal(values[30]),
-                    toReal(values[40]));
-
-    creationInterface->addCircle(d);
-}
-
-
-
-/**
- * Adds an ellipse entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addEllipse(DL_CreationInterface* creationInterface) {
-    DL_EllipseData d(toReal(values[10]),
-                     toReal(values[20]),
-                     toReal(values[30]),
-                     toReal(values[11]),
-                     toReal(values[21]),
-                     toReal(values[31]),
-                     toReal(values[40], 1.0),
-                     toReal(values[41], 0.0),
-                     toReal(values[42], 2*M_PI));
-
-    creationInterface->addEllipse(d);
-}
-
-
-
-/**
- * Adds an insert entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addInsert(DL_CreationInterface* creationInterface) {
-    DL_InsertData d(values[2],
-                    // insertion point
-                    toReal(values[10], 0.0),
-                    toReal(values[20], 0.0),
-                    toReal(values[30], 0.0),
-                    // scale:
-                    toReal(values[41], 1.0),
-                    toReal(values[42], 1.0),
-                    toReal(values[43], 1.0),
-                    // angle:
-                    toReal(values[50], 0.0),
-                    // cols / rows:
-                    toInt(values[70], 1),
-                    toInt(values[71], 1),
-                    // spacing:
-                    toReal(values[44], 0.0),
-                    toReal(values[45], 0.0));
-
-    creationInterface->addInsert(d);
-}
-
-
-
-/**
- * Adds a trace entity (4 edge closed polyline) that was read from the file via the creation interface.
- *
- * @author AHM
- */
-void DL_Dxf::addTrace(DL_CreationInterface* creationInterface) {
-    DL_TraceData td;
-    
-    for (int k = 0; k < 4; k++) {
-       td.x[k] = toReal(values[10 + k]);
-       td.y[k] = toReal(values[20 + k]);
-       td.z[k] = toReal(values[30 + k]);
-    }
-    creationInterface->addTrace(td);
-}
-
-
-
-/**
- * Adds a 3dface entity that was read from the file via the creation interface.
- */
-void DL_Dxf::add3dFace(DL_CreationInterface* creationInterface) {
-    DL_3dFaceData td;
-    
-    for (int k = 0; k < 4; k++) {
-       td.x[k] = toReal(values[10 + k]);
-       td.y[k] = toReal(values[20 + k]);
-       td.z[k] = toReal(values[30 + k]);
-    }
-    creationInterface->add3dFace(td);
-}
-
-
-
-/**
- * Adds a solid entity (filled trace) that was read from the file via the creation interface.
- * 
- * @author AHM
- */
-void DL_Dxf::addSolid(DL_CreationInterface* creationInterface) {
-    DL_SolidData sd;
-    
-    for (int k = 0; k < 4; k++) {
-       sd.x[k] = toReal(values[10 + k]);
-       sd.y[k] = toReal(values[20 + k]);
-       sd.z[k] = toReal(values[30 + k]);
-    }
-    creationInterface->addSolid(sd);
-}
-
-
-/**
- * Adds an MText entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addMText(DL_CreationInterface* creationInterface) {
-    double angle = 0.0;
-
-    if (values[50][0]!='\0') {
-        if (libVersion<=0x02000200) {
-            // wrong but compatible with dxflib <=2.0.2.0:
-            angle = toReal(values[50], 0.0);
-        } else {
-            angle = (toReal(values[50], 0.0)*2*M_PI)/360.0;
-        }
-    } else if (values[11][0]!='\0' && values[21][0]!='\0') {
-        double x = toReal(values[11], 0.0);
-        double y = toReal(values[21], 0.0);
-
-        if (fabs(x)<1.0e-6) {
-            if (y>0.0) {
-                angle = M_PI/2.0;
-            } else {
-                angle = M_PI/2.0*3.0;
-            }
-        } else {
-            angle = atan(y/x);
-        }
-    }
-
-    DL_MTextData d(
-        // insertion point
-        toReal(values[10], 0.0),
-        toReal(values[20], 0.0),
-        toReal(values[30], 0.0),
-        // height
-        toReal(values[40], 2.5),
-        // width
-        toReal(values[41], 100.0),
-        // attachment point
-        toInt(values[71], 1),
-        // drawing direction
-        toInt(values[72], 1),
-        // line spacing style
-        toInt(values[73], 1),
-        // line spacing factor
-        toReal(values[44], 1.0),
-        // text
-        values[1],
-        // style
-        values[7],
-        // angle
-        angle);
-    creationInterface->addMText(d);
-}
-
-
-
-/**
- * Handles additional MText data.
- */
-bool DL_Dxf::handleMTextData(DL_CreationInterface* creationInterface) {
-    // Special handling of text chunks for MTEXT entities:
-    if (groupCode==3) {
-        creationInterface->addMTextChunk(groupValue);
-        return true;
-    }
-
-    return false;
-}
-
-
-
-/**
- * Handles additional polyline data.
- */
-bool DL_Dxf::handleLWPolylineData(DL_CreationInterface* /*creationInterface*/) {
-    // Allocate LWPolyline vertices (group code 90):
-    if (groupCode==90) {
-        maxVertices = toInt(groupValue);
-        if (maxVertices>0) {
-            if (vertices!=NULL) {
-                delete[] vertices;
-            }
-            vertices = new double[4*maxVertices];
-            for (int i=0; i<maxVertices; ++i) {
-                vertices[i*4] = 0.0;
-                vertices[i*4+1] = 0.0;
-                vertices[i*4+2] = 0.0;
-                vertices[i*4+3] = 0.0;
-            }
-        }
-        vertexIndex=-1;
-        return true;
-    }
-
-    // Compute LWPolylines vertices (group codes 10/20/30/42):
-    else if (groupCode==10 || groupCode==20 ||
-             groupCode==30 || groupCode==42) {
-
-        if (vertexIndex<maxVertices-1 && groupCode==10) {
-            vertexIndex++;
-        }
-
-        if (groupCode<=30) {
-            if (vertexIndex>=0 && vertexIndex<maxVertices) {
-                vertices[4*vertexIndex + (groupCode/10-1)]
-                = toReal(groupValue);
-            }
-        } else if (groupCode==42 && vertexIndex<maxVertices) {
-            vertices[4*vertexIndex + 3] = toReal(groupValue);
-        }
-        return true;
-    }
-    return false;
-}
-
-
-
-/**
- * Handles additional spline data.
- */
-bool DL_Dxf::handleSplineData(DL_CreationInterface* /*creationInterface*/) {
-    // Allocate Spline knots (group code 72):
-    if (groupCode==72) {
-        maxKnots = toInt(groupValue);
-        if (maxKnots>0) {
-            if (knots!=NULL) {
-                delete[] knots;
-            }
-            knots = new double[maxKnots];
-            for (int i=0; i<maxKnots; ++i) {
-                knots[i] = 0.0;
-            }
-        }
-        knotIndex=-1;
-        return true;
-    }
-
-    // Allocate Spline control points (group code 73):
-    else if (groupCode==73) {
-        maxControlPoints = toInt(groupValue);
-        if (maxControlPoints>0) {
-            if (controlPoints!=NULL) {
-                delete[] controlPoints;
-            }
-            controlPoints = new double[3*maxControlPoints];
-            for (int i=0; i<maxControlPoints; ++i) {
-                controlPoints[i*3] = 0.0;
-                controlPoints[i*3+1] = 0.0;
-                controlPoints[i*3+2] = 0.0;
-            }
-        }
-        controlPointIndex=-1;
-        return true;
-    }
-
-    // Compute spline knot vertices (group code 40):
-    else if (groupCode==40) {
-        if (knotIndex<maxKnots-1) {
-            knotIndex++;
-            knots[knotIndex] = toReal(groupValue);
-        }
-        return true;
-    }
-
-    // Compute spline control points (group codes 10/20/30):
-    else if (groupCode==10 || groupCode==20 ||
-             groupCode==30) {
-
-        if (controlPointIndex<maxControlPoints-1 && groupCode==10) {
-            controlPointIndex++;
-        }
-
-        if (controlPointIndex>=0 && controlPointIndex<maxControlPoints) {
-            controlPoints[3*controlPointIndex + (groupCode/10-1)]
-            = toReal(groupValue);
-        }
-        return true;
-    }
-    return false;
-}
-
-
-
-/**
- * Handles additional leader data.
- */
-bool DL_Dxf::handleLeaderData(DL_CreationInterface* /*creationInterface*/) {
-    // Allocate Leader vertices (group code 76):
-    if (groupCode==76) {
-        maxLeaderVertices = toInt(groupValue);
-        if (maxLeaderVertices>0) {
-            if (leaderVertices!=NULL) {
-                delete[] leaderVertices;
-            }
-            leaderVertices = new double[3*maxLeaderVertices];
-            for (int i=0; i<maxLeaderVertices; ++i) {
-                leaderVertices[i*3] = 0.0;
-                leaderVertices[i*3+1] = 0.0;
-                leaderVertices[i*3+2] = 0.0;
-            }
-        }
-        leaderVertexIndex=-1;
-        return true;
-    }
-
-    // Compute Leader vertices (group codes 10/20/30):
-    else if (groupCode==10 || groupCode==20 || groupCode==30) {
-
-        if (leaderVertexIndex<maxLeaderVertices-1 && groupCode==10) {
-            leaderVertexIndex++;
-        }
-
-        if (groupCode<=30) {
-            if (leaderVertexIndex>=0 &&
-                    leaderVertexIndex<maxLeaderVertices) {
-                leaderVertices[3*leaderVertexIndex + (groupCode/10-1)]
-                = toReal(groupValue);
-            }
-        }
-        return true;
-    }
-
-    return false;
-}
-
-
-
-/**
- * Handles additional hatch data.
- */
-bool DL_Dxf::handleHatchData(DL_CreationInterface* /*creationInterface*/) {
-
-    static int firstPolylineStatus = 0;
-
-    // Allocate hatch loops (group code 91):
-    if (groupCode==91 && toInt(groupValue)>0) {
-
-        if (hatchLoops!=NULL) {
-            delete[] hatchLoops;
-            hatchLoops = NULL;
-        }
-        if (maxHatchEdges!=NULL) {
-            delete[] maxHatchEdges;
-            maxHatchEdges = NULL;
-        }
-        if (hatchEdgeIndex!=NULL) {
-            delete[] hatchEdgeIndex;
-            hatchEdgeIndex = NULL;
-        }
-        if (hatchEdges!=NULL) {
-            for (int i=0; i<maxHatchLoops; ++i) {
-                delete[] hatchEdges[i];
-            }
-            delete[] hatchEdges;
-            hatchEdges = NULL;
-        }
-        maxHatchLoops = toInt(groupValue);
-
-        if (maxHatchLoops>0) {
-            hatchLoops = new DL_HatchLoopData[maxHatchLoops];
-            maxHatchEdges = new int[maxHatchLoops];
-            hatchEdgeIndex = new int[maxHatchLoops];
-            hatchEdges = new DL_HatchEdgeData*[maxHatchLoops];
-            for (int i=0; i<maxHatchLoops; ++i) {
-                hatchEdges[i] = NULL;
-                maxHatchEdges[i] = 0;
-            }
-            hatchLoopIndex = -1;
-            dropEdges = false;
-        }
-        return true;
-    }
-
-    // Allocate hatch edges, group code 93
-    if (groupCode==93 && toInt(groupValue)>0) {
-        if (hatchLoopIndex<maxHatchLoops-1 && hatchLoops!=NULL &&
-                maxHatchEdges!=NULL && hatchEdgeIndex!=NULL &&
-                hatchEdges!=NULL) {
-
-            dropEdges = false;
-
-            hatchLoopIndex++;
-            hatchLoops[hatchLoopIndex]
-            = DL_HatchLoopData(toInt(groupValue));
-
-            maxHatchEdges[hatchLoopIndex] = toInt(groupValue);
-            hatchEdgeIndex[hatchLoopIndex] = -1;
-            hatchEdges[hatchLoopIndex]
-                = new DL_HatchEdgeData[toInt(groupValue)];
-            firstPolylineStatus = 0;
-        } else {
-            dropEdges = true;
-        }
-        return true;
-    }
-
-    // Init hatch edge for non-polyline boundary (group code 72)
-    if (hatchEdges!=NULL &&
-            hatchEdgeIndex!=NULL &&
-            maxHatchEdges!=NULL &&
-            hatchLoopIndex>=0 &&
-            hatchLoopIndex<maxHatchLoops &&
-            hatchEdgeIndex[hatchLoopIndex] <
-            maxHatchEdges[hatchLoopIndex] &&
-            (atoi(values[92])&2)==0 &&   // not a polyline
-            groupCode==72 &&
-            !dropEdges) {
-
-        hatchEdgeIndex[hatchLoopIndex]++;
-
-        hatchEdges[hatchLoopIndex][hatchEdgeIndex[hatchLoopIndex]]
-        .type = toInt(groupValue);
-        hatchEdges[hatchLoopIndex][hatchEdgeIndex[hatchLoopIndex]]
-        .defined = false;
-
-        return true;
-    }
-
-    // Handle hatch edges for non-polyline boundaries
-    //   (group codes 10, 20, 11, 21, 40, 50, 51, 73)
-    if (!dropEdges &&
-            hatchEdges!=NULL &&
-            hatchEdgeIndex!=NULL &&
-            hatchLoopIndex>=0 &&
-            hatchLoopIndex<maxHatchLoops &&
-            hatchEdges[hatchLoopIndex]!=NULL &&
-            hatchEdgeIndex[hatchLoopIndex]>=0 &&
-            hatchEdgeIndex[hatchLoopIndex] <
-            maxHatchEdges[hatchLoopIndex] &&
-            ((atoi(values[92])&2)==0) &&        // not a polyline
-            (groupCode==10 || groupCode==20 ||
-             groupCode==11 || groupCode==21 ||
-             groupCode==40 || groupCode==50 ||
-             groupCode==51 || groupCode==73)) {
-
-        if (hatchEdges[hatchLoopIndex]
-                [hatchEdgeIndex[hatchLoopIndex]].defined==false) {
-            if (hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].type==1) {
-                switch (groupCode) {
-                case 10:
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].x1
-                    = toReal(groupValue);
-                    break;
-                case 20:
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].y1
-                    = toReal(groupValue);
-                    break;
-                case 11:
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].x2
-                    = toReal(groupValue);
-                    break;
-                case 21:
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].y2
-                    = toReal(groupValue);
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].defined = true;
-                    break;
-                default:
-                    break;
-                }
-            }
-
-            if (hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].type==2) {
-                switch (groupCode) {
-                case 10:
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].cx
-                    = toReal(groupValue);
-                    break;
-                case 20:
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].cy
-                    = toReal(groupValue);
-                    break;
-                case 40:
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].radius
-                    = toReal(groupValue);
-                    break;
-                case 50:
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].angle1
-                    = toReal(groupValue)/360.0*2*M_PI;
-                    break;
-                case 51:
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].angle2
-                    = toReal(groupValue)/360.0*2*M_PI;
-                    break;
-                case 73:
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].ccw
-                    = (bool)toInt(groupValue);
-                    hatchEdges[hatchLoopIndex]
-                    [hatchEdgeIndex[hatchLoopIndex]].defined = true;
-                    break;
-                default:
-                    break;
-                }
-            }
-        }
-        return true;
-    }
-
-    /*
-    // 2003/12/31: polyline hatches can be extremely slow and are rarely used
-    //
-       // Handle hatch edges for polyline boundaries
-       //  (group codes 10, 20, 42)
-       if (!dropEdges &&
-               hatchEdges!=NULL &&
-               hatchEdgeIndex!=NULL &&
-               hatchLoopIndex>=0 &&
-               hatchLoopIndex<maxHatchLoops &&
-               hatchEdges[hatchLoopIndex]!=NULL &&
-               //hatchEdgeIndex[hatchLoopIndex]>=0 &&
-               hatchEdgeIndex[hatchLoopIndex] <
-               maxHatchEdges[hatchLoopIndex] &&
-               ((atoi(values[92])&2)==2)) {        // a polyline
-
-           if (groupCode==10 || groupCode==20 ||
-                   groupCode==42) {
-
-               std::cout << "  found polyline edge data: " << groupCode << "\n";
-               std::cout << "     value: " << toReal(groupValue) << "\n";
-
-               static double lastX = 0.0;
-               static double lastY = 0.0;
-               static double lastB = 0.0;
-
-               if (firstPolylineStatus<2) {
-                   switch (groupCode) {
-                   case 10:
-                       firstPolylineStatus++;
-                       if (firstPolylineStatus==1) {
-                           lastX = toReal(groupValue);
-                           std::cout << "     firstX: " << lastX << "\n";
-                       }
-                       break;
-
-                   case 20:
-                       lastY = toReal(groupValue);
-                       std::cout << "     firstY: " << lastY << "\n";
-                       break;
-
-                   case 42:
-                       lastB = toReal(groupValue);
-                       break;
-
-                   default:
-                       break;
-                   }
-
-                   if (firstPolylineStatus!=2) {
-                       return true;
-                   }
-               }
-
-
-               switch (groupCode) {
-               case 10:
-                   hatchEdgeIndex[hatchLoopIndex]++;
-                   hatchEdges[hatchLoopIndex]
-                   [hatchEdgeIndex[hatchLoopIndex]].type = 1;
-                   hatchEdges[hatchLoopIndex]
-                   [hatchEdgeIndex[hatchLoopIndex]].x1
-                   = lastX;
-                   hatchEdges[hatchLoopIndex]
-                   [hatchEdgeIndex[hatchLoopIndex]].x2
-                   = lastX = toReal(groupValue);
-                   std::cout << "     X: " << lastX << "\n";
-                   break;
-               case 20:
-                   hatchEdges[hatchLoopIndex]
-                   [hatchEdgeIndex[hatchLoopIndex]].y1
-                   = lastY;
-                   hatchEdges[hatchLoopIndex]
-                   [hatchEdgeIndex[hatchLoopIndex]].y2
-                   = lastY = toReal(groupValue);
-                   std::cout << "     Y: " << lastY << "\n";
-                   break;
-                   / *
-                               case 42: {
-                   	// convert to arc:
-                   	double x1 = hatchEdges[hatchLoopIndex]
-                   		[hatchEdgeIndex[hatchLoopIndex]].x1;
-                   	double y1 = hatchEdges[hatchLoopIndex]
-                   		[hatchEdgeIndex[hatchLoopIndex]].y1;
-                   	double x2 = hatchEdges[hatchLoopIndex]
-                   		[hatchEdgeIndex[hatchLoopIndex]].x2;
-                   	double y2 = hatchEdges[hatchLoopIndex]
-                   		[hatchEdgeIndex[hatchLoopIndex]].y2;
-
-                   	double bulge = toReal(groupValue);
-
-                   	bool reversed = (bulge<0.0);
-                   	double alpha = atan(bulge)*4.0;
-                   	double radius;
-                             double cx;
-                             double cy;
-                   	double a1;
-                   	double a2;
-                             double mx = (x2+x1)/2.0;
-                             double my = (y2+y1)/2.0;
-                   	double dist = sqrt(pow(x2-x1,2) + pow(y2-y1,2)) / 2.0;
-
-                   	// alpha can't be 0.0 at this point
-                             radius = fabs(dist / sin(alpha/2.0));
-
-                             double wu = fabs(pow(radius, 2.0) - pow(dist, 2.0));
-                             double h = sqrt(wu);
-                   	double angle = acos((x2-x1) / dist);
-
-                             if (bulge>0.0) {
-                       		        angle+=M_PI/2.0;
-                             } else {
-                                 angle-=M_PI/2.0;
-                             }
-
-                             if (fabs(alpha)>M_PI) {
-                                 h*=-1.0;
-                             }
-
-                   	cx = mx + cos(angle) * h;
-                   	cy = my + sin(angle) * h;
-
-                   	a1 = hatchEdges[hatchLoopIndex]
-                                   	[hatchEdgeIndex[hatchLoopIndex]].type = 2;
-                                   hatchEdges[hatchLoopIndex]
-                                   	[hatchEdgeIndex[hatchLoopIndex]].ccw = (toReal(groupValue)>0.0);
-                                   hatchEdges[hatchLoopIndex]
-                                   	[hatchEdgeIndex[hatchLoopIndex]].cx = cx;
-                                   hatchEdges[hatchLoopIndex]
-                                   	[hatchEdgeIndex[hatchLoopIndex]].cy = cy;
-                                   hatchEdges[hatchLoopIndex]
-                                   	[hatchEdgeIndex[hatchLoopIndex]].radius = radius;
-                                   } break;
-                   	* /
-
-               default:
-                   break;
-               }
-           } else {
-               // end polyline boundary
-               dropEdges = true;
-           }
-
-           return true;
-       }
-    */
-
-    return false;
-}
-
-
-
-
-/**
- * Adds an text entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addText(DL_CreationInterface* creationInterface) {
-    DL_TextData d(
-        // insertion point
-        toReal(values[10], 0.0),
-        toReal(values[20], 0.0),
-        toReal(values[30], 0.0),
-        // alignment point
-        toReal(values[11], 0.0),
-        toReal(values[21], 0.0),
-        toReal(values[31], 0.0),
-        // height
-        toReal(values[40], 2.5),
-        // x scale
-        toReal(values[41], 1.0),
-        // generation flags
-        toInt(values[71], 0),
-        // h just
-        toInt(values[72], 0),
-        // v just
-        toInt(values[73], 0),
-        // text
-        values[1],
-        // style
-        values[7],
-        // angle
-        (toReal(values[50], 0.0)*2*M_PI)/360.0);
-
-    creationInterface->addText(d);
-}
-
-
-
-/**
- * Adds an attrib entity that was read from the file via the creation interface.
- * @todo add attrib instead of normal text
- */
-void DL_Dxf::addAttrib(DL_CreationInterface* creationInterface) {
-    DL_TextData d(
-        // insertion point
-        toReal(values[10], 0.0),
-        toReal(values[20], 0.0),
-        toReal(values[30], 0.0),
-        // alignment point
-        toReal(values[11], 0.0),
-        toReal(values[21], 0.0),
-        toReal(values[31], 0.0),
-        // height
-        toReal(values[40], 2.5),
-        // x scale
-        toReal(values[41], 1.0),
-        // generation flags
-        toInt(values[71], 0),
-        // h just
-        toInt(values[72], 0),
-        // v just
-        toInt(values[74], 0),
-        // text
-        values[1],
-        // style
-        values[7],
-        // angle
-        (toReal(values[50], 0.0)*2*M_PI)/360.0);
-
-    creationInterface->addText(d);
-}
-
-
-
-/**
- * @return dimension data from current values.
- */
-DL_DimensionData DL_Dxf::getDimData() {
-    // generic dimension data:
-    return DL_DimensionData(
-               // def point
-               toReal(values[10], 0.0),
-               toReal(values[20], 0.0),
-               toReal(values[30], 0.0),
-               // text middle point
-               toReal(values[11], 0.0),
-               toReal(values[21], 0.0),
-               toReal(values[31], 0.0),
-               // type
-               toInt(values[70], 0),
-               // attachment point
-               toInt(values[71], 5),
-               // line sp. style
-               toInt(values[72], 1),
-               // line sp. factor
-               toReal(values[41], 1.0),
-               // text
-               values[1],
-               // style
-               values[3],
-               // angle
-               toReal(values[53], 0.0));
-}
-
-
-
-/**
- * Adds a linear dimension entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addDimLinear(DL_CreationInterface* creationInterface) {
-    DL_DimensionData d = getDimData();
-
-    // horizontal / vertical / rotated dimension:
-    DL_DimLinearData dl(
-        // definition point 1
-        toReal(values[13], 0.0),
-        toReal(values[23], 0.0),
-        toReal(values[33], 0.0),
-        // definition point 2
-        toReal(values[14], 0.0),
-        toReal(values[24], 0.0),
-        toReal(values[34], 0.0),
-        // angle
-        toReal(values[50], 0.0),
-        // oblique
-        toReal(values[52], 0.0));
-    creationInterface->addDimLinear(d, dl);
-}
-
-
-
-/**
- * Adds an aligned dimension entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addDimAligned(DL_CreationInterface* creationInterface) {
-    DL_DimensionData d = getDimData();
-
-    // aligned dimension:
-    DL_DimAlignedData da(
-        // extension point 1
-        toReal(values[13], 0.0),
-        toReal(values[23], 0.0),
-        toReal(values[33], 0.0),
-        // extension point 2
-        toReal(values[14], 0.0),
-        toReal(values[24], 0.0),
-        toReal(values[34], 0.0));
-    creationInterface->addDimAlign(d, da);
-}
-
-
-
-/**
- * Adds a radial dimension entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addDimRadial(DL_CreationInterface* creationInterface) {
-    DL_DimensionData d = getDimData();
-
-    DL_DimRadialData dr(
-        // definition point
-        toReal(values[15], 0.0),
-        toReal(values[25], 0.0),
-        toReal(values[35], 0.0),
-        // leader length:
-        toReal(values[40], 0.0));
-    creationInterface->addDimRadial(d, dr);
-}
-
-
-
-/**
- * Adds a diametric dimension entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addDimDiametric(DL_CreationInterface* creationInterface) {
-    DL_DimensionData d = getDimData();
-
-    // diametric dimension:
-    DL_DimDiametricData dr(
-        // definition point
-        toReal(values[15], 0.0),
-        toReal(values[25], 0.0),
-        toReal(values[35], 0.0),
-        // leader length:
-        toReal(values[40], 0.0));
-    creationInterface->addDimDiametric(d, dr);
-}
-
-
-
-/**
- * Adds an angular dimension entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addDimAngular(DL_CreationInterface* creationInterface) {
-    DL_DimensionData d = getDimData();
-
-    // angular dimension:
-    DL_DimAngularData da(
-        // definition point 1
-        toReal(values[13], 0.0),
-        toReal(values[23], 0.0),
-        toReal(values[33], 0.0),
-        // definition point 2
-        toReal(values[14], 0.0),
-        toReal(values[24], 0.0),
-        toReal(values[34], 0.0),
-        // definition point 3
-        toReal(values[15], 0.0),
-        toReal(values[25], 0.0),
-        toReal(values[35], 0.0),
-        // definition point 4
-        toReal(values[16], 0.0),
-        toReal(values[26], 0.0),
-        toReal(values[36], 0.0));
-    creationInterface->addDimAngular(d, da);
-}
-
-
-/**
- * Adds an angular dimension entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addDimAngular3P(DL_CreationInterface* creationInterface) {
-    DL_DimensionData d = getDimData();
-
-    // angular dimension (3P):
-    DL_DimAngular3PData da(
-        // definition point 1
-        toReal(values[13], 0.0),
-        toReal(values[23], 0.0),
-        toReal(values[33], 0.0),
-        // definition point 2
-        toReal(values[14], 0.0),
-        toReal(values[24], 0.0),
-        toReal(values[34], 0.0),
-        // definition point 3
-        toReal(values[15], 0.0),
-        toReal(values[25], 0.0),
-        toReal(values[35], 0.0));
-    creationInterface->addDimAngular3P(d, da);
-}
-
-
-
-/**
- * Adds an ordinate dimension entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addDimOrdinate(DL_CreationInterface* creationInterface) {
-    DL_DimensionData d = getDimData();
-
-    // ordinate dimension:
-    DL_DimOrdinateData dl(
-        // definition point 1
-        toReal(values[13], 0.0),
-        toReal(values[23], 0.0),
-        toReal(values[33], 0.0),
-        // definition point 2
-        toReal(values[14], 0.0),
-        toReal(values[24], 0.0),
-        toReal(values[34], 0.0),
-        (toInt(values[70])&64)==64         // true: X-type, false: Y-type
-    );
-    creationInterface->addDimOrdinate(d, dl);
-}
-
-
-
-/**
- * Adds a leader entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addLeader(DL_CreationInterface* creationInterface) {
-    // leader (arrow)
-    DL_LeaderData le(
-        // arrow head flag
-        toInt(values[71], 1),
-        // leader path type
-        toInt(values[72], 0),
-        // Leader creation flag
-        toInt(values[73], 3),
-        // Hookline direction flag
-        toInt(values[74], 1),
-        // Hookline flag
-        toInt(values[75], 0),
-        // Text annotation height
-        toReal(values[40], 1.0),
-        // Text annotation width
-        toReal(values[41], 1.0),
-        // Number of vertices in leader
-        toInt(values[76], 0)
-    );
-    creationInterface->addLeader(le);
-
-    for (int i=0; i<maxLeaderVertices; i++) {
-        DL_LeaderVertexData d(leaderVertices[i*3],
-                              leaderVertices[i*3+1],
-                              leaderVertices[i*3+2]);
-
-        creationInterface->addLeaderVertex(d);
-    }
-}
-
-
-
-/**
- * Adds a hatch entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addHatch(DL_CreationInterface* creationInterface) {
-    DL_HatchData hd(toInt(values[91], 1),
-                    toInt(values[70], 0),
-                    toReal(values[41], 1.0),
-                    toReal(values[52], 0.0),
-                    values[2]);
-    creationInterface->addHatch(hd);
-
-    for (int l=0; l<maxHatchLoops; l++) {
-        DL_HatchLoopData ld(maxHatchEdges[l]);
-        creationInterface->addHatchLoop(ld);
-        for (int b=0; b<maxHatchEdges[l]; b++) {
-            creationInterface->addHatchEdge(hatchEdges[l][b]);
-        }
-    }
-    creationInterface->endEntity();
-    currentEntity = DL_UNKNOWN;
-}
-
-
-
-/**
- * Adds an image entity that was read from the file via the creation interface.
- */
-void DL_Dxf::addImage(DL_CreationInterface* creationInterface) {
-    DL_ImageData id(// pass ref insead of name we don't have yet
-        values[340],
-        // ins point:
-        toReal(values[10], 0.0),
-        toReal(values[20], 0.0),
-        toReal(values[30], 0.0),
-        // u vector:
-        toReal(values[11], 1.0),
-        toReal(values[21], 0.0),
-        toReal(values[31], 0.0),
-        // v vector:
-        toReal(values[12], 0.0),
-        toReal(values[22], 1.0),
-        toReal(values[32], 0.0),
-        // image size (pixel):
-        toInt(values[13], 1),
-        toInt(values[23], 1),
-        // brightness, contrast, fade
-        toInt(values[281], 50),
-        toInt(values[282], 50),
-        toInt(values[283], 0));
-
-    creationInterface->addImage(id);
-    creationInterface->endEntity();
-    currentEntity = DL_UNKNOWN;
-}
-
-
-
-/**
- * Adds an image definition that was read from the file via the creation interface.
- */
-void DL_Dxf::addImageDef(DL_CreationInterface* creationInterface) {
-    DL_ImageDefData id(// handle
-        values[5],
-        values[1]);
-
-    creationInterface->linkImage(id);
-    creationInterface->endEntity();
-    currentEntity = DL_UNKNOWN;
-}
-
-
-
-/**
- * Ends some special entities like hatches or old style polylines.
- */
-void DL_Dxf::endEntity(DL_CreationInterface* creationInterface) {
-	creationInterface->endEntity();
-}
-
-
-/**
- * Ends a sequence and notifies the creation interface.
- */
-void DL_Dxf::endSequence(DL_CreationInterface* creationInterface) {
-    creationInterface->endSequence();
-}
-
-
-/**
- * Converts the given string into an int.
- * ok is set to false if there was an error.
- */
-int DL_Dxf::stringToInt(const char* s, bool* ok) {
-    if (ok!=NULL) {
-        // check string:
-        *ok = true;
-        int i=0;
-        bool dot = false;
-        do {
-            if (s[i]=='\0') {
-                break;
-            } else if (s[i]=='.') {
-                if (dot==true) {
-                    //std::cerr << "two dots\n";
-                    *ok = false;
-                } else {
-                    dot = true;
-                }
-            } else if (s[i]<'0' || s[i]>'9') {
-                //std::cerr << "NaN: '" << s[i] << "'\n";
-                *ok = false;
-            }
-            i++;
-        } while(s[i]!='\0' && *ok==true);
-    }
-
-    return atoi(s);
-}
-
-
-/**
- * @brief Opens the given file for writing and returns a pointer
- * to the dxf writer. This pointer needs to be passed on to other
- * writing functions.
- *
- * @param file Full path of the file to open.
- *
- * @return Pointer to an ascii dxf writer object.
- */
-DL_WriterA* DL_Dxf::out(const char* file, DL_Codes::version version) {
-    char* f = new char[strlen(file)+1];
-    strcpy(f, file);
-    this->version = version;
-
-    DL_WriterA* dw = new DL_WriterA(f, version);
-    if (dw->openFailed()) {
-        delete dw;
-        delete[] f;
-        return NULL;
-    } else {
-        delete[] f;
-        return dw;
-    }
-}
-
-
-
-/**
- * @brief Writes a DXF header to the file currently opened 
- * by the given DXF writer object.
- */
-void DL_Dxf::writeHeader(DL_WriterA& dw) {
-    dw.comment("dxflib " DL_VERSION);
-    dw.sectionHeader();
-
-    dw.dxfString(9, "$ACADVER");
-    switch (version) {
-    case DL_Codes::AC1009:
-        dw.dxfString(1, "AC1009");
-        break;
-    case DL_Codes::AC1012:
-        dw.dxfString(1, "AC1012");
-        break;
-    case DL_Codes::AC1014:
-        dw.dxfString(1, "AC1014");
-        break;
-    case DL_Codes::AC1015:
-        dw.dxfString(1, "AC1015");
-        break;
-    }
-
-    // Newer version require that (otherwise a*cad crashes..)
-    if (version==VER_2000) {
-        dw.dxfString(9, "$HANDSEED");
-        dw.dxfHex(5, 0xFFFF);
-    }
-
-    //dw.sectionEnd();
-}
-
-
-
-
-/**
- * Writes a point entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writePoint(DL_WriterA& dw,
-                        const DL_PointData& data,
-                        const DL_Attributes& attrib) {
-    dw.entity("POINT");
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbPoint");
-    }
-    dw.entityAttributes(attrib);
-    dw.coord(POINT_COORD_CODE, data.x, data.y);
-}
-
-
-
-/**
- * Writes a line entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeLine(DL_WriterA& dw,
-                       const DL_LineData& data,
-                       const DL_Attributes& attrib) {
-    dw.entity("LINE");
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbLine");
-    }
-    dw.entityAttributes(attrib);
-    dw.coord(LINE_START_CODE, data.x1, data.y1);
-    dw.coord(LINE_END_CODE, data.x2, data.y2);
-}
-
-
-
-/**
- * Writes a polyline entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- * @see writeVertex
- */
-void DL_Dxf::writePolyline(DL_WriterA& dw,
-                           const DL_PolylineData& data,
-                           const DL_Attributes& attrib) {
-    if (version==VER_2000) {
-        dw.entity("LWPOLYLINE");
-        dw.entityAttributes(attrib);
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbPolyline");
-        dw.dxfInt(90, (int)data.number);
-        dw.dxfInt(70, data.flags);
-    } else {
-        dw.entity("POLYLINE");
-        dw.entityAttributes(attrib);
-		polylineLayer = attrib.getLayer();
-        dw.dxfInt(66, 1);
-        dw.dxfInt(70, data.flags);
-        dw.coord(VERTEX_COORD_CODE, 0.0, 0.0);
-    }
-}
-
-
-
-/**
- * Writes a single vertex of a polyline to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeVertex(DL_WriterA& dw,
-                         const DL_VertexData& data) {
-
-
-    if (version==VER_2000) {
-        dw.dxfReal(10, data.x);
-        dw.dxfReal(20, data.y);
-        if (fabs(data.bulge)>1.0e-10) {
-            dw.dxfReal(42, data.bulge);
-        }
-    } else {
-        dw.entity("VERTEX");
-        //dw.entityAttributes(attrib);
-    	dw.dxfString(8, polylineLayer);
-        dw.coord(VERTEX_COORD_CODE, data.x, data.y);
-        if (fabs(data.bulge)>1.0e-10) {
-            dw.dxfReal(42, data.bulge);
-        }
-    }
-}
-
-    
-	
-/**
- * Writes the polyline end. Only needed for DXF R12.
- */
-void DL_Dxf::writePolylineEnd(DL_WriterA& dw) {
-    if (version==VER_2000) {
-    } else {
-        dw.entity("SEQEND");
-    }
-}
-
-
-/**
- * Writes a spline entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- * @see writeControlPoint
- */
-void DL_Dxf::writeSpline(DL_WriterA& dw,
-                         const DL_SplineData& data,
-                         const DL_Attributes& attrib) {
-
-    dw.entity("SPLINE");
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbSpline");
-    }
-    dw.dxfInt(70, data.flags);
-    dw.dxfInt(71, data.degree);
-    dw.dxfInt(72, data.nKnots);            // number of knots
-    dw.dxfInt(73, data.nControl);          // number of control points
-    dw.dxfInt(74, 0);                      // number of fit points
-}
-
-
-
-/**
- * Writes a single control point of a spline to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeControlPoint(DL_WriterA& dw,
-                               const DL_ControlPointData& data) {
-
-    dw.dxfReal(10, data.x);
-    dw.dxfReal(20, data.y);
-    dw.dxfReal(30, data.z);
-}
-
-
-
-/**
- * Writes a single knot of a spline to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeKnot(DL_WriterA& dw,
-                       const DL_KnotData& data) {
-
-    dw.dxfReal(40, data.k);
-}
-
-
-
-/**
- * Writes a circle entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeCircle(DL_WriterA& dw,
-                         const DL_CircleData& data,
-                         const DL_Attributes& attrib) {
-    dw.entity("CIRCLE");
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbCircle");
-    }
-    dw.entityAttributes(attrib);
-    dw.coord(10, data.cx, data.cy);
-    dw.dxfReal(40, data.radius);
-}
-
-
-
-/**
- * Writes an arc entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeArc(DL_WriterA& dw,
-                      const DL_ArcData& data,
-                      const DL_Attributes& attrib) {
-    dw.entity("ARC");
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-    }
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbCircle");
-    }
-    dw.coord(10, data.cx, data.cy);
-    dw.dxfReal(40, data.radius);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbArc");
-    }
-    dw.dxfReal(50, data.angle1);
-    dw.dxfReal(51, data.angle2);
-}
-
-
-
-/**
- * Writes an ellipse entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeEllipse(DL_WriterA& dw,
-                          const DL_EllipseData& data,
-                          const DL_Attributes& attrib) {
-
-    if (version>VER_R12) {
-        dw.entity("ELLIPSE");
-        if (version==VER_2000) {
-            dw.dxfString(100, "AcDbEntity");
-            dw.dxfString(100, "AcDbEllipse");
-        }
-        dw.entityAttributes(attrib);
-        dw.coord(10, data.cx, data.cy);
-        dw.coord(11, data.mx, data.my);
-        dw.dxfReal(40, data.ratio);
-        dw.dxfReal(41, data.angle1);
-        dw.dxfReal(42, data.angle2);
-    }
-}
-    
-    
-
-/**
- * Writes a solid entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeSolid(DL_WriterA& dw,
-                   const DL_SolidData& data,
-                   const DL_Attributes& attrib) {
-    dw.entity("SOLID");
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbTrace");
-    }
-    dw.entityAttributes(attrib);
-    dw.coord(10, data.x[0], data.y[0], data.z[0]);
-    dw.coord(11, data.x[1], data.y[1], data.z[1]);
-    dw.coord(12, data.x[2], data.y[2], data.z[2]);
-    dw.coord(13, data.x[3], data.y[3], data.z[3]);
-    dw.dxfReal(39, data.thickness);
-}
-
-
-
-/**
- * Writes a 3d face entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::write3dFace(DL_WriterA& dw,
-                   const DL_3dFaceData& data,
-                   const DL_Attributes& attrib) {
-    dw.entity("3DFACE");
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbFace");
-    }
-    dw.entityAttributes(attrib);
-    dw.coord(10, data.x[0], data.y[0], data.z[0]);
-    dw.coord(11, data.x[1], data.y[1], data.z[1]);
-    dw.coord(12, data.x[2], data.y[2], data.z[2]);
-    dw.coord(13, data.x[3], data.y[3], data.z[3]);
-}
-
-
-
-/**
- * Writes an insert to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeInsert(DL_WriterA& dw,
-                         const DL_InsertData& data,
-                         const DL_Attributes& attrib) {
-
-    if (data.name.empty()) {
-        std::cerr << "DL_Dxf::writeInsert: "
-        << "Block name must not be empty\n";
-        return;
-    }
-
-    dw.entity("INSERT");
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbBlockReference");
-    }
-    dw.entityAttributes(attrib);
-    dw.dxfString(2, data.name);
-    dw.dxfReal(10, data.ipx);
-    dw.dxfReal(20, data.ipy);
-    dw.dxfReal(30, 0.0);
-    if (data.sx!=1.0 || data.sy!=1.0) {
-        dw.dxfReal(41, data.sx);
-        dw.dxfReal(42, data.sy);
-        dw.dxfReal(43, 1.0);
-    }
-    if (data.angle!=0.0) {
-        dw.dxfReal(50, data.angle);
-    }
-    if (data.cols!=1 || data.rows!=1) {
-        dw.dxfInt(70, data.cols);
-        dw.dxfInt(71, data.rows);
-    }
-    if (data.colSp!=0.0 || data.rowSp!=0.0) {
-        dw.dxfReal(44, data.colSp);
-        dw.dxfReal(45, data.rowSp);
-    }
-
-}
-
-
-
-/**
- * Writes a multi text entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeMText(DL_WriterA& dw,
-                        const DL_MTextData& data,
-                        const DL_Attributes& attrib) {
-
-    dw.entity("MTEXT");
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbMText");
-    }
-    dw.entityAttributes(attrib);
-    dw.dxfReal(10, data.ipx);
-    dw.dxfReal(20, data.ipy);
-    dw.dxfReal(30, 0.0);
-    dw.dxfReal(40, data.height);
-    dw.dxfReal(41, data.width);
-
-    dw.dxfInt(71, data.attachmentPoint);
-    dw.dxfInt(72, data.drawingDirection);
-
-    // Creare text chunks of 250 characters each:
-    int length = data.text.length();
-    char chunk[251];
-    int i;
-    for (i=250; i<length; i+=250) {
-        strncpy(chunk, &data.text.c_str()[i-250], 250);
-        chunk[250]='\0';
-        dw.dxfString(3, chunk);
-    }
-    strncpy(chunk, &data.text.c_str()[i-250], 250);
-    chunk[250]='\0';
-    dw.dxfString(1, chunk);
-
-    dw.dxfString(7, data.style);
-
-    // since dxflib 2.0.2.1: degrees not rad (error in autodesk dxf doc)
-    dw.dxfReal(50, data.angle/(2.0*M_PI)*360.0);
-
-    dw.dxfInt(73, data.lineSpacingStyle);
-    dw.dxfReal(44, data.lineSpacingFactor);
-}
-
-
-
-/**
- * Writes a text entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeText(DL_WriterA& dw,
-                       const DL_TextData& data,
-                       const DL_Attributes& attrib) {
-
-    dw.entity("TEXT");
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbText");
-    }
-    dw.entityAttributes(attrib);
-    dw.dxfReal(10, data.ipx);
-    dw.dxfReal(20, data.ipy);
-    dw.dxfReal(30, 0.0);
-    dw.dxfReal(40, data.height);
-    dw.dxfString(1, data.text);
-    dw.dxfReal(50, data.angle/(2*M_PI)*360.0);
-    dw.dxfReal(41, data.xScaleFactor);
-    dw.dxfString(7, data.style);
-
-    dw.dxfInt(71, data.textGenerationFlags);
-    dw.dxfInt(72, data.hJustification);
-
-    dw.dxfReal(11, data.apx);
-    dw.dxfReal(21, data.apy);
-    dw.dxfReal(31, 0.0);
-
-    dw.dxfInt(73, data.vJustification);
-}
-
-
-/**
- * Writes an aligned dimension entity to the file.
- *
- * @param dw DXF writer
- * @param data Generic dimension data for from the file
- * @param data Specific aligned dimension data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeDimAligned(DL_WriterA& dw,
-                             const DL_DimensionData& data,
-                             const DL_DimAlignedData& edata,
-                             const DL_Attributes& attrib) {
-
-    dw.entity("DIMENSION");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-    }
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbDimension");
-    }
-
-    dw.dxfReal(10, data.dpx);
-    dw.dxfReal(20, data.dpy);
-    dw.dxfReal(30, 0.0);
-
-    dw.dxfReal(11, data.mpx);
-    dw.dxfReal(21, data.mpy);
-    dw.dxfReal(31, 0.0);
-
-    dw.dxfInt(70, 1);
-    if (version>VER_R12) {
-        dw.dxfInt(71, data.attachmentPoint);
-        dw.dxfInt(72, data.lineSpacingStyle); // opt
-        dw.dxfReal(41, data.lineSpacingFactor); // opt
-    }
-
-    dw.dxfReal(42, data.angle);
-
-    dw.dxfString(1, data.text);   // opt
-    //dw.dxfString(3, data.style);
-    dw.dxfString(3, "Standard");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbAlignedDimension");
-    }
-
-    dw.dxfReal(13, edata.epx1);
-    dw.dxfReal(23, edata.epy1);
-    dw.dxfReal(33, 0.0);
-
-    dw.dxfReal(14, edata.epx2);
-    dw.dxfReal(24, edata.epy2);
-    dw.dxfReal(34, 0.0);
-}
-
-
-
-/**
- * Writes a linear dimension entity to the file.
- *
- * @param dw DXF writer
- * @param data Generic dimension data for from the file
- * @param data Specific linear dimension data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeDimLinear(DL_WriterA& dw,
-                            const DL_DimensionData& data,
-                            const DL_DimLinearData& edata,
-                            const DL_Attributes& attrib) {
-
-    dw.entity("DIMENSION");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-    }
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbDimension");
-    }
-
-    dw.dxfReal(10, data.dpx);
-    dw.dxfReal(20, data.dpy);
-    dw.dxfReal(30, 0.0);
-
-    dw.dxfReal(11, data.mpx);
-    dw.dxfReal(21, data.mpy);
-    dw.dxfReal(31, 0.0);
-
-    dw.dxfInt(70, 0);
-    if (version>VER_R12) {
-        dw.dxfInt(71, data.attachmentPoint);
-        dw.dxfInt(72, data.lineSpacingStyle); // opt
-        dw.dxfReal(41, data.lineSpacingFactor); // opt
-    }
-
-    dw.dxfReal(42, data.angle);
-
-    dw.dxfString(1, data.text);   // opt
-    //dw.dxfString(3, data.style);
-    dw.dxfString(3, "Standard");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbAlignedDimension");
-    }
-
-    dw.dxfReal(13, edata.dpx1);
-    dw.dxfReal(23, edata.dpy1);
-    dw.dxfReal(33, 0.0);
-
-    dw.dxfReal(14, edata.dpx2);
-    dw.dxfReal(24, edata.dpy2);
-    dw.dxfReal(34, 0.0);
-
-    dw.dxfReal(50, edata.angle/(2.0*M_PI)*360.0);
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbRotatedDimension");
-        /*
-        dw.dxfString(1001, "ACAD");
-        dw.dxfString(1000, "DSTYLE");
-        dw.dxfString(1002, "{");
-        dw.dxfInt(1070, 340);
-        dw.dxfInt(1005, 11);
-        dw.dxfString(1002, "}");
-        */
-    }
-}
-
-
-
-/**
- * Writes a radial dimension entity to the file.
- *
- * @param dw DXF writer
- * @param data Generic dimension data for from the file
- * @param data Specific radial dimension data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeDimRadial(DL_WriterA& dw,
-                            const DL_DimensionData& data,
-                            const DL_DimRadialData& edata,
-                            const DL_Attributes& attrib) {
-
-    dw.entity("DIMENSION");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-    }
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbDimension");
-    }
-
-    dw.dxfReal(10, data.dpx);
-    dw.dxfReal(20, data.dpy);
-    dw.dxfReal(30, 0.0);
-
-    dw.dxfReal(11, data.mpx);
-    dw.dxfReal(21, data.mpy);
-    dw.dxfReal(31, 0.0);
-
-    dw.dxfInt(70, 4);
-    if (version>VER_R12) {
-        dw.dxfInt(71, data.attachmentPoint);
-        dw.dxfInt(72, data.lineSpacingStyle); // opt
-        dw.dxfReal(41, data.lineSpacingFactor); // opt
-    }
-
-    dw.dxfReal(42, data.angle);
-
-    dw.dxfString(1, data.text);   // opt
-    //dw.dxfString(3, data.style);
-    dw.dxfString(3, "Standard");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbRadialDimension");
-    }
-
-    dw.dxfReal(15, edata.dpx);
-    dw.dxfReal(25, edata.dpy);
-    dw.dxfReal(35, 0.0);
-
-    dw.dxfReal(40, edata.leader);
-}
-
-
-
-/**
- * Writes a diametric dimension entity to the file.
- *
- * @param dw DXF writer
- * @param data Generic dimension data for from the file
- * @param data Specific diametric dimension data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeDimDiametric(DL_WriterA& dw,
-                               const DL_DimensionData& data,
-                               const DL_DimDiametricData& edata,
-                               const DL_Attributes& attrib) {
-
-    dw.entity("DIMENSION");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-    }
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbDimension");
-    }
-
-    dw.dxfReal(10, data.dpx);
-    dw.dxfReal(20, data.dpy);
-    dw.dxfReal(30, 0.0);
-
-    dw.dxfReal(11, data.mpx);
-    dw.dxfReal(21, data.mpy);
-    dw.dxfReal(31, 0.0);
-
-    dw.dxfInt(70, 3);
-    if (version>VER_R12) {
-        dw.dxfInt(71, data.attachmentPoint);
-        dw.dxfInt(72, data.lineSpacingStyle); // opt
-        dw.dxfReal(41, data.lineSpacingFactor); // opt
-    }
-
-    dw.dxfReal(42, data.angle);
-
-    dw.dxfString(1, data.text);   // opt
-    //dw.dxfString(3, data.style);
-    dw.dxfString(3, "Standard");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbDiametricDimension");
-    }
-
-    dw.dxfReal(15, edata.dpx);
-    dw.dxfReal(25, edata.dpy);
-    dw.dxfReal(35, 0.0);
-
-    dw.dxfReal(40, edata.leader);
-}
-
-
-
-/**
- * Writes an angular dimension entity to the file.
- *
- * @param dw DXF writer
- * @param data Generic dimension data for from the file
- * @param data Specific angular dimension data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeDimAngular(DL_WriterA& dw,
-                             const DL_DimensionData& data,
-                             const DL_DimAngularData& edata,
-                             const DL_Attributes& attrib) {
-
-    dw.entity("DIMENSION");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-    }
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbDimension");
-    }
-
-    dw.dxfReal(10, data.dpx);
-    dw.dxfReal(20, data.dpy);
-    dw.dxfReal(30, 0.0);
-
-    dw.dxfReal(11, data.mpx);
-    dw.dxfReal(21, data.mpy);
-    dw.dxfReal(31, 0.0);
-
-    dw.dxfInt(70, 2);
-    if (version>VER_R12) {
-        dw.dxfInt(71, data.attachmentPoint);
-        dw.dxfInt(72, data.lineSpacingStyle); // opt
-        dw.dxfReal(41, data.lineSpacingFactor); // opt
-    }
-
-    dw.dxfReal(42, data.angle);
-
-    dw.dxfString(1, data.text);   // opt
-    //dw.dxfString(3, data.style);
-    dw.dxfString(3, "Standard");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDb2LineAngularDimension");
-    }
-
-    dw.dxfReal(13, edata.dpx1);
-    dw.dxfReal(23, edata.dpy1);
-    dw.dxfReal(33, 0.0);
-
-    dw.dxfReal(14, edata.dpx2);
-    dw.dxfReal(24, edata.dpy2);
-    dw.dxfReal(34, 0.0);
-
-    dw.dxfReal(15, edata.dpx3);
-    dw.dxfReal(25, edata.dpy3);
-    dw.dxfReal(35, 0.0);
-
-    dw.dxfReal(16, edata.dpx4);
-    dw.dxfReal(26, edata.dpy4);
-    dw.dxfReal(36, 0.0);
-}
-
-
-
-/**
- * Writes an angular dimension entity (3 points version) to the file.
- *
- * @param dw DXF writer
- * @param data Generic dimension data for from the file
- * @param data Specific angular dimension data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeDimAngular3P(DL_WriterA& dw,
-                               const DL_DimensionData& data,
-                               const DL_DimAngular3PData& edata,
-                               const DL_Attributes& attrib) {
-
-    dw.entity("DIMENSION");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-    }
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbDimension");
-    }
-
-    dw.dxfReal(10, data.dpx);
-    dw.dxfReal(20, data.dpy);
-    dw.dxfReal(30, 0.0);
-
-    dw.dxfReal(11, data.mpx);
-    dw.dxfReal(21, data.mpy);
-    dw.dxfReal(31, 0.0);
-
-    dw.dxfInt(70, 5);
-    if (version>VER_R12) {
-        dw.dxfInt(71, data.attachmentPoint);
-        dw.dxfInt(72, data.lineSpacingStyle); // opt
-        dw.dxfReal(41, data.lineSpacingFactor); // opt
-    }
-
-    dw.dxfReal(42, data.angle);
-
-    dw.dxfString(1, data.text);   // opt
-    //dw.dxfString(3, data.style);
-    dw.dxfString(3, "Standard");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDb3PointAngularDimension");
-    }
-
-    dw.dxfReal(13, edata.dpx1);
-    dw.dxfReal(23, edata.dpy1);
-    dw.dxfReal(33, 0.0);
-
-    dw.dxfReal(14, edata.dpx2);
-    dw.dxfReal(24, edata.dpy2);
-    dw.dxfReal(34, 0.0);
-
-    dw.dxfReal(15, edata.dpx3);
-    dw.dxfReal(25, edata.dpy3);
-    dw.dxfReal(35, 0.0);
-}
-
-
-
-
-/**
- * Writes an ordinate dimension entity to the file.
- *
- * @param dw DXF writer
- * @param data Generic dimension data for from the file
- * @param data Specific ordinate dimension data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeDimOrdinate(DL_WriterA& dw,
-                             const DL_DimensionData& data,
-                             const DL_DimOrdinateData& edata,
-                             const DL_Attributes& attrib) {
-
-    dw.entity("DIMENSION");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-    }
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbDimension");
-    }
-
-    dw.dxfReal(10, data.dpx);
-    dw.dxfReal(20, data.dpy);
-    dw.dxfReal(30, 0.0);
-
-    dw.dxfReal(11, data.mpx);
-    dw.dxfReal(21, data.mpy);
-    dw.dxfReal(31, 0.0);
-
-    int type = 6;
-    if (edata.xtype) {
-        type+=64;
-    }
-
-    dw.dxfInt(70, type);
-    if (version>VER_R12) {
-        dw.dxfInt(71, data.attachmentPoint);
-        dw.dxfInt(72, data.lineSpacingStyle); // opt
-        dw.dxfReal(41, data.lineSpacingFactor); // opt
-    }
-
-    dw.dxfString(1, data.text);   // opt
-    //dw.dxfString(3, data.style);
-    dw.dxfString(3, "Standard");
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbOrdinateDimension");
-    }
-
-    dw.dxfReal(13, edata.dpx1);
-    dw.dxfReal(23, edata.dpy1);
-    dw.dxfReal(33, 0.0);
-
-    dw.dxfReal(14, edata.dpx2);
-    dw.dxfReal(24, edata.dpy2);
-    dw.dxfReal(34, 0.0);
-}
-
-
-
-/**
- * Writes a leader entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- * @see writeVertex
- */
-void DL_Dxf::writeLeader(DL_WriterA& dw,
-                         const DL_LeaderData& data,
-                         const DL_Attributes& attrib) {
-    if (version>VER_R12) {
-        dw.entity("LEADER");
-        dw.entityAttributes(attrib);
-        if (version==VER_2000) {
-            dw.dxfString(100, "AcDbEntity");
-            dw.dxfString(100, "AcDbLeader");
-        }
-        dw.dxfString(3, "Standard");
-        dw.dxfInt(71, data.arrowHeadFlag);
-        dw.dxfInt(72, data.leaderPathType);
-        dw.dxfInt(73, data.leaderCreationFlag);
-        dw.dxfInt(74, data.hooklineDirectionFlag);
-        dw.dxfInt(75, data.hooklineFlag);
-        dw.dxfReal(40, data.textAnnotationHeight);
-        dw.dxfReal(41, data.textAnnotationWidth);
-        dw.dxfInt(76, data.number);
-    }
-}
-
-
-
-/**
- * Writes a single vertex of a leader to the file.
- *
- * @param dw DXF writer
- * @param data Entity data
- */
-void DL_Dxf::writeLeaderVertex(DL_WriterA& dw,
-                               const DL_LeaderVertexData& data) {
-    if (version>VER_R12) {
-        dw.dxfReal(10, data.x);
-        dw.dxfReal(20, data.y);
-    }
-}
-
-
-
-/**
- * Writes the beginning of a hatch entity to the file.
- * This must be followed by one or more writeHatchLoop()
- * calls and a writeHatch2() call.
- *
- * @param dw DXF writer
- * @param data Entity data.
- * @param attrib Attributes
- */
-void DL_Dxf::writeHatch1(DL_WriterA& dw,
-                         const DL_HatchData& data,
-                         const DL_Attributes& attrib) {
-
-    dw.entity("HATCH");
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbHatch");
-    }
-    dw.dxfReal(10, 0.0);             // elevation
-    dw.dxfReal(20, 0.0);
-    dw.dxfReal(30, 0.0);
-    dw.dxfReal(210, 0.0);             // extrusion dir.
-    dw.dxfReal(220, 0.0);
-    dw.dxfReal(230, 1.0);
-    if (data.solid==false) {
-        dw.dxfString(2, data.pattern);
-    } else {
-        dw.dxfString(2, "SOLID");
-    }
-    dw.dxfInt(70, (int)data.solid);
-    dw.dxfInt(71, 0);                // associative
-    dw.dxfInt(91, data.numLoops);
-}
-
-
-
-/**
- * Writes the end of a hatch entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data.
- * @param attrib Attributes
- */
-void DL_Dxf::writeHatch2(DL_WriterA& dw,
-                         const DL_HatchData& data,
-                         const DL_Attributes& /*attrib*/) {
-
-    dw.dxfInt(75, 0);                // odd parity
-    dw.dxfInt(76, 1);                // pattern type
-    if (data.solid==false) {
-        dw.dxfReal(52, data.angle);
-        dw.dxfReal(41, data.scale);
-        dw.dxfInt(77, 0);            // not double
-        //dw.dxfInt(78, 0);
-        dw.dxfInt(78, 1);
-        dw.dxfReal(53, 45.0);
-        dw.dxfReal(43, 0.0);
-        dw.dxfReal(44, 0.0);
-        dw.dxfReal(45, -0.0883883476483184);
-        dw.dxfReal(46, 0.0883883476483185);
-        dw.dxfInt(79, 0);
-    }
-    dw.dxfInt(98, 0);
-}
-
-
-
-/**
- * Writes the beginning of a hatch loop to the file. This
- * must happen after writing the beginning of a hatch entity.
- *
- * @param dw DXF writer
- * @param data Entity data.
- * @param attrib Attributes
- */
-void DL_Dxf::writeHatchLoop1(DL_WriterA& dw,
-                             const DL_HatchLoopData& data) {
-
-    dw.dxfInt(92, 1);
-    dw.dxfInt(93, data.numEdges);
-    //dw.dxfInt(97, 0);
-}
-
-
-
-/**
- * Writes the end of a hatch loop to the file.
- *
- * @param dw DXF writer
- * @param data Entity data.
- * @param attrib Attributes
- */
-void DL_Dxf::writeHatchLoop2(DL_WriterA& dw,
-                             const DL_HatchLoopData& /*data*/) {
-
-    dw.dxfInt(97, 0);
-}
-
-
-/**
- * Writes the beginning of a hatch entity to the file.
- *
- * @param dw DXF writer
- * @param data Entity data.
- * @param attrib Attributes
- */
-void DL_Dxf::writeHatchEdge(DL_WriterA& dw,
-                            const DL_HatchEdgeData& data) {
-
-    dw.dxfInt(72, data.type);
-
-    switch (data.type) {
-    case 1:
-        dw.dxfReal(10, data.x1);
-        dw.dxfReal(20, data.y1);
-        dw.dxfReal(11, data.x2);
-        dw.dxfReal(21, data.y2);
-        break;
-    case 2:
-        dw.dxfReal(10, data.cx);
-        dw.dxfReal(20, data.cy);
-        dw.dxfReal(40, data.radius);
-        dw.dxfReal(50, data.angle1/(2*M_PI)*360.0);
-        dw.dxfReal(51, data.angle2/(2*M_PI)*360.0);
-        dw.dxfInt(73, (int)(data.ccw));
-        break;
-    default:
-        break;
-    }
-}
-
-
-
-/**
- * Writes an image entity.
- *
- * @return IMAGEDEF handle. Needed for the IMAGEDEF counterpart.
- */
-int DL_Dxf::writeImage(DL_WriterA& dw,
-                       const DL_ImageData& data,
-                       const DL_Attributes& attrib) {
-
-    /*if (data.file.empty()) {
-        std::cerr << "DL_Dxf::writeImage: "
-        << "Image file must not be empty\n";
-        return;
-}*/
-
-    dw.entity("IMAGE");
-
-    dw.entityAttributes(attrib);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbEntity");
-        dw.dxfString(100, "AcDbRasterImage");
-        dw.dxfInt(90, 0);
-    }
-    // insertion point
-    dw.dxfReal(10, data.ipx);
-    dw.dxfReal(20, data.ipy);
-    dw.dxfReal(30, 0.0);
-
-    // vector along bottom side (1 pixel long)
-    dw.dxfReal(11, data.ux);
-    dw.dxfReal(21, data.uy);
-    dw.dxfReal(31, 0.0);
-
-    // vector along left side (1 pixel long)
-    dw.dxfReal(12, data.vx);
-    dw.dxfReal(22, data.vy);
-    dw.dxfReal(32, 0.0);
-
-    // image size in pixel
-    dw.dxfReal(13, data.width);
-    dw.dxfReal(23, data.height);
-
-    // handle of IMAGEDEF object
-    int handle = dw.incHandle();
-    dw.dxfHex(340, handle);
-
-    // flags
-    dw.dxfInt(70, 15);
-
-    // clipping:
-    dw.dxfInt(280, 0);
-
-    // brightness, contrast, fade
-    dw.dxfInt(281, data.brightness);
-    dw.dxfInt(282, data.contrast);
-    dw.dxfInt(283, data.fade);
-
-    return handle;
-}
-
-
-
-/**
- * Writes an image definiition entity.
- */
-void DL_Dxf::writeImageDef(DL_WriterA& dw,
-                           int handle,
-                           const DL_ImageData& data) {
-
-    /*if (data.file.empty()) {
-        std::cerr << "DL_Dxf::writeImage: "
-        << "Image file must not be empty\n";
-        return;
-}*/
-
-    dw.dxfString(0, "IMAGEDEF");
-    if (version==VER_2000) {
-    	dw.dxfHex(5, handle);
-	}
-
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbRasterImageDef");
-        dw.dxfInt(90, 0);
-    }
-    // file name:
-    dw.dxfString(1, data.ref);
-
-    // image size in pixel
-    dw.dxfReal(10, data.width);
-    dw.dxfReal(20, data.height);
-
-    dw.dxfReal(11, 1.0);
-    dw.dxfReal(21, 1.0);
-
-    // loaded:
-    dw.dxfInt(280, 1);
-    // units:
-    dw.dxfInt(281, 0);
-}
-
-
-/**
- * Writes a layer to the file. Layers are stored in the 
- * tables section of a DXF file.
- *
- * @param dw DXF writer
- * @param data Entity data from the file
- * @param attrib Attributes
- */
-void DL_Dxf::writeLayer(DL_WriterA& dw,
-                        const DL_LayerData& data,
-                        const DL_Attributes& attrib) {
-
-    if (data.name.empty()) {
-        std::cerr << "DL_Dxf::writeLayer: "
-        << "Layer name must not be empty\n";
-        return;
-    }
-
-    int color = attrib.getColor();
-    if (color>=256) {
-        std::cerr << "Layer color cannot be " << color << ". Changed to 7.\n";
-        color = 7;
-    }
-
-    if (data.name == "0") {
-        dw.tableLayerEntry(0x10);
-    } else {
-        dw.tableLayerEntry();
-    }
-
-    dw.dxfString(2, data.name);
-    dw.dxfInt(70, data.flags);
-    dw.dxfInt(62, color);
-
-    dw.dxfString(6, (attrib.getLineType().length()==0 ?
-                     string("CONTINUOUS") : attrib.getLineType()));
-
-    if (version>=VER_2000) {
-        // layer defpoints cannot be plotted
-        std::string lstr = data.name;
-        std::transform(lstr.begin(), lstr.end(), lstr.begin(), tolower);
-        if (lstr=="defpoints") {
-            dw.dxfInt(290, 0);
-        }
-    }
-    if (version>=VER_2000 && attrib.getWidth()!=-1) {
-        dw.dxfInt(370, attrib.getWidth());
-    }
-    if (version>=VER_2000) {
-        dw.dxfHex(390, 0xF);
-    }
-}
-
-
-
-/**
- * Writes a line type to the file. Line types are stored in the 
- * tables section of a DXF file.
- */
-void DL_Dxf::writeLineType(DL_WriterA& dw,
-                           const DL_LineTypeData& data) {
-    //const char* description,
-    //int elements,
-    //double patternLength) {
-
-    if (data.name.empty()) {
-        std::cerr << "DL_Dxf::writeLineType: "
-        << "Line type name must not be empty\n";
-        return;
-    }
-
-	// ignore BYLAYER, BYBLOCK for R12
-	if (version<VER_2000) {
-		if (!strcasecmp(data.name.c_str(), "BYBLOCK") ||
-		    !strcasecmp(data.name.c_str(), "BYLAYER")) {
-			return;
-		}
-	}
-
-	// write id (not for R12)
-    if (!strcasecmp(data.name.c_str(), "BYBLOCK")) {
-        dw.tableLineTypeEntry(0x14);
-    } else if (!strcasecmp(data.name.c_str(), "BYLAYER")) {
-        dw.tableLineTypeEntry(0x15);
-    } else if (!strcasecmp(data.name.c_str(), "CONTINUOUS")) {
-        dw.tableLineTypeEntry(0x16);
-    } else {
-        dw.tableLineTypeEntry();
-    }
-
-    dw.dxfString(2, data.name);
-	//if (version>=VER_2000) {
-    	dw.dxfInt(70, data.flags);
-	//}
-
-    if (!strcasecmp(data.name.c_str(), "BYBLOCK")) {
-        dw.dxfString(3, "");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 0);
-        dw.dxfReal(40, 0.0);
-    } else if (!strcasecmp(data.name.c_str(), "BYLAYER")) {
-        dw.dxfString(3, "");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 0);
-        dw.dxfReal(40, 0.0);
-    } else if (!strcasecmp(data.name.c_str(), "CONTINUOUS")) {
-        dw.dxfString(3, "Solid line");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 0);
-        dw.dxfReal(40, 0.0);
-    } else if (!strcasecmp(data.name.c_str(), "ACAD_ISO02W100")) {
-        dw.dxfString(3, "ISO Dashed __ __ __ __ __ __ __ __ __ __ _");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 2);
-        dw.dxfReal(40, 15.0);
-        dw.dxfReal(49, 12.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "ACAD_ISO03W100")) {
-        dw.dxfString(3, "ISO Dashed with Distance __    __    __    _");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 2);
-        dw.dxfReal(40, 30.0);
-        dw.dxfReal(49, 12.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -18.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "ACAD_ISO04W100")) {
-        dw.dxfString(3, "ISO Long Dashed Dotted ____ . ____ . __");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 4);
-        dw.dxfReal(40, 30.0);
-        dw.dxfReal(49, 24.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "ACAD_ISO05W100")) {
-        dw.dxfString(3, "ISO Long Dashed Double Dotted ____ .. __");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 6);
-        dw.dxfReal(40, 33.0);
-        dw.dxfReal(49, 24.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "BORDER")) {
-        dw.dxfString(3, "Border __ __ . __ __ . __ __ . __ __ . __ __ .");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 6);
-        dw.dxfReal(40, 44.45);
-        dw.dxfReal(49, 12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "BORDER2")) {
-        dw.dxfString(3, "Border (.5x) __.__.__.__.__.__.__.__.__.__.__.");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 6);
-        dw.dxfReal(40, 22.225);
-        dw.dxfReal(49, 6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "BORDERX2")) {
-        dw.dxfString(3, "Border (2x) ____  ____  .  ____  ____  .  ___");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 6);
-        dw.dxfReal(40, 88.9);
-        dw.dxfReal(49, 25.4);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 25.4);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "CENTER")) {
-        dw.dxfString(3, "Center ____ _ ____ _ ____ _ ____ _ ____ _ ____");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 4);
-        dw.dxfReal(40, 50.8);
-        dw.dxfReal(49, 31.75);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "CENTER2")) {
-        dw.dxfString(3, "Center (.5x) ___ _ ___ _ ___ _ ___ _ ___ _ ___");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 4);
-        dw.dxfReal(40, 28.575);
-        dw.dxfReal(49, 19.05);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "CENTERX2")) {
-        dw.dxfString(3, "Center (2x) ________  __  ________  __  _____");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 4);
-        dw.dxfReal(40, 101.6);
-        dw.dxfReal(49, 63.5);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DASHDOT")) {
-        dw.dxfString(3, "Dash dot __ . __ . __ . __ . __ . __ . __ . __");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 4);
-        dw.dxfReal(40, 25.4);
-        dw.dxfReal(49, 12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DASHDOT2")) {
-        dw.dxfString(3, "Dash dot (.5x) _._._._._._._._._._._._._._._.");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 4);
-        dw.dxfReal(40, 12.7);
-        dw.dxfReal(49, 6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DASHDOTX2")) {
-        dw.dxfString(3, "Dash dot (2x) ____  .  ____  .  ____  .  ___");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 4);
-        dw.dxfReal(40, 50.8);
-        dw.dxfReal(49, 25.4);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DASHED")) {
-        dw.dxfString(3, "Dashed __ __ __ __ __ __ __ __ __ __ __ __ __ _");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 2);
-        dw.dxfReal(40, 19.05);
-        dw.dxfReal(49, 12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DASHED2")) {
-        dw.dxfString(3, "Dashed (.5x) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 2);
-        dw.dxfReal(40, 9.525);
-        dw.dxfReal(49, 6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DASHEDX2")) {
-        dw.dxfString(3, "Dashed (2x) ____  ____  ____  ____  ____  ___");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 2);
-        dw.dxfReal(40, 38.1);
-        dw.dxfReal(49, 25.4);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DIVIDE")) {
-        dw.dxfString(3, "Divide ____ . . ____ . . ____ . . ____ . . ____");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 6);
-        dw.dxfReal(40, 31.75);
-        dw.dxfReal(49, 12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DIVIDE2")) {
-        dw.dxfString(3, "Divide (.5x) __..__..__..__..__..__..__..__.._");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 6);
-        dw.dxfReal(40, 15.875);
-        dw.dxfReal(49, 6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DIVIDEX2")) {
-        dw.dxfString(3, "Divide (2x) ________  .  .  ________  .  .  _");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 6);
-        dw.dxfReal(40, 63.5);
-        dw.dxfReal(49, 25.4);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DOT")) {
-        dw.dxfString(3, "Dot . . . . . . . . . . . . . . . . . . . . . .");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 2);
-        dw.dxfReal(40, 6.35);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -6.35);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DOT2")) {
-        dw.dxfString(3, "Dot (.5x) .....................................");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 2);
-        dw.dxfReal(40, 3.175);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -3.175);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else if (!strcasecmp(data.name.c_str(), "DOTX2")) {
-        dw.dxfString(3, "Dot (2x) .  .  .  .  .  .  .  .  .  .  .  .  .");
-        dw.dxfInt(72, 65);
-        dw.dxfInt(73, 2);
-        dw.dxfReal(40, 12.7);
-        dw.dxfReal(49, 0.0);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-        dw.dxfReal(49, -12.7);
-        if (version>=VER_R13)
-            dw.dxfInt(74, 0);
-    } else {
-        std::cerr << "dxflib warning: DL_Dxf::writeLineType: Unknown Line Type\n";
-    }
-}
-
-
-
-/**
- * Writes the APPID section to the DXF file.
- *
- * @param name Application name
- */
-void DL_Dxf::writeAppid(DL_WriterA& dw, const string& name) {
-    if (name.empty()) {
-        std::cerr << "DL_Dxf::writeAppid: "
-        << "Application  name must not be empty\n";
-        return;
-    }
-
-    if (!strcasecmp(name.c_str(), "ACAD")) {
-        dw.tableAppidEntry(0x12);
-    } else {
-        dw.tableAppidEntry();
-    }
-    dw.dxfString(2, name);
-    dw.dxfInt(70, 0);
-}
-
-
-
-/**
- * Writes a block's definition (no entities) to the DXF file.
- */
-void DL_Dxf::writeBlock(DL_WriterA& dw, const DL_BlockData& data) {
-    if (data.name.empty()) {
-        std::cerr << "DL_Dxf::writeBlock: "
-        << "Block name must not be empty\n";
-        return;
-    }
-
-    //bool paperSpace = !strcasecmp(name, "*paper_space");
-    //!strcasecmp(name, "*paper_space0");
-
-    if (!strcasecmp(data.name.c_str(), "*paper_space")) {
-        dw.sectionBlockEntry(0x1C);
-    } else if (!strcasecmp(data.name.c_str(), "*model_space")) {
-        dw.sectionBlockEntry(0x20);
-    } else if (!strcasecmp(data.name.c_str(), "*paper_space0")) {
-        dw.sectionBlockEntry(0x24);
-    } else {
-        dw.sectionBlockEntry();
-    }
-    dw.dxfString(2, data.name);
-    dw.dxfInt(70, 0);
-    dw.coord(10, data.bpx, data.bpy);
-    dw.dxfString(3, data.name);
-    dw.dxfString(1, "");
-}
-
-
-
-/**
- * Writes a block end.
- *
- * @param name Block name
- */
-void DL_Dxf::writeEndBlock(DL_WriterA& dw, const string& name) {
-    if (!strcasecmp(name.c_str(), "*paper_space")) {
-        dw.sectionBlockEntryEnd(0x1D);
-    } else if (!strcasecmp(name.c_str(), "*model_space")) {
-        dw.sectionBlockEntryEnd(0x21);
-    } else if (!strcasecmp(name.c_str(), "*paper_space0")) {
-        dw.sectionBlockEntryEnd(0x25);
-    } else {
-        dw.sectionBlockEntryEnd();
-    }
-}
-
-
-
-/**
- * Writes a viewport section. This section is needed in VER_R13.
- * Note that this method currently only writes a faked VPORT section
- * to make the file readable by Aut*cad.
- */
-void DL_Dxf::writeVPort(DL_WriterA& dw) {
-    dw.dxfString(0, "TABLE");
-    dw.dxfString(2, "VPORT");
-    if (version==VER_2000) {
-        dw.dxfHex(5, 0x8);
-    }
-    //dw.dxfHex(330, 0);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTable");
-    }
-    dw.dxfInt(70, 1);
-    dw.dxfString(0, "VPORT");
-    //dw.dxfHex(5, 0x2F);
-    if (version==VER_2000) {
-        dw.handle();
-    }
-    //dw.dxfHex(330, 8);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTableRecord");
-        dw.dxfString(100, "AcDbViewportTableRecord");
-    }
-    dw.dxfString(  2, "*Active");
-    dw.dxfInt( 70, 0);
-    dw.dxfReal( 10, 0.0);
-    dw.dxfReal( 20, 0.0);
-    dw.dxfReal( 11, 1.0);
-    dw.dxfReal( 21, 1.0);
-    dw.dxfReal( 12, 286.3055555555555);
-    dw.dxfReal( 22, 148.5);
-    dw.dxfReal( 13, 0.0);
-    dw.dxfReal( 23, 0.0);
-    dw.dxfReal( 14, 10.0);
-    dw.dxfReal( 24, 10.0);
-    dw.dxfReal( 15, 10.0);
-    dw.dxfReal( 25, 10.0);
-    dw.dxfReal( 16, 0.0);
-    dw.dxfReal( 26, 0.0);
-    dw.dxfReal( 36, 1.0);
-    dw.dxfReal( 17, 0.0);
-    dw.dxfReal( 27, 0.0);
-    dw.dxfReal( 37, 0.0);
-    dw.dxfReal( 40, 297.0);
-    dw.dxfReal( 41, 1.92798353909465);
-    dw.dxfReal( 42, 50.0);
-    dw.dxfReal( 43, 0.0);
-    dw.dxfReal( 44, 0.0);
-    dw.dxfReal( 50, 0.0);
-    dw.dxfReal( 51, 0.0);
-    dw.dxfInt( 71, 0);
-    dw.dxfInt( 72, 100);
-    dw.dxfInt( 73, 1);
-    dw.dxfInt( 74, 3);
-    dw.dxfInt( 75, 1);
-    dw.dxfInt( 76, 1);
-    dw.dxfInt( 77, 0);
-    dw.dxfInt( 78, 0);
-
-    if (version==VER_2000) {
-        dw.dxfInt(281, 0);
-        dw.dxfInt( 65, 1);
-        dw.dxfReal(110, 0.0);
-        dw.dxfReal(120, 0.0);
-        dw.dxfReal(130, 0.0);
-        dw.dxfReal(111, 1.0);
-        dw.dxfReal(121, 0.0);
-        dw.dxfReal(131, 0.0);
-        dw.dxfReal(112, 0.0);
-        dw.dxfReal(122, 1.0);
-        dw.dxfReal(132, 0.0);
-        dw.dxfInt( 79, 0);
-        dw.dxfReal(146, 0.0);
-    }
-    dw.dxfString(  0, "ENDTAB");
-}
-
-
-
-/**
- * Writes a style section. This section is needed in VER_R13.
- * Note that this method currently only writes a faked STYLE section
- * to make the file readable by Aut*cad.
- */
-void DL_Dxf::writeStyle(DL_WriterA& dw) {
-    dw.dxfString(  0, "TABLE");
-    dw.dxfString(  2, "STYLE");
-    if (version==VER_2000) {
-    	dw.dxfHex(5, 3);
-	}
-    //dw.dxfHex(330, 0);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTable");
-    }
-    dw.dxfInt( 70, 1);
-    dw.dxfString(  0, "STYLE");
-    if (version==VER_2000) {
-    	dw.dxfHex(5, 0x11);
-	}
-    //styleHandleStd = dw.handle();
-    //dw.dxfHex(330, 3);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTableRecord");
-        dw.dxfString(100, "AcDbTextStyleTableRecord");
-    }
-    dw.dxfString(  2, "Standard");
-    dw.dxfInt( 70, 0);
-    dw.dxfReal( 40, 0.0);
-    dw.dxfReal( 41, 0.75);
-    dw.dxfReal( 50, 0.0);
-    dw.dxfInt( 71, 0);
-    dw.dxfReal( 42, 2.5);
-    dw.dxfString(  3, "txt");
-    dw.dxfString(  4, "");
-    dw.dxfString(  0, "ENDTAB");
-}
-
-
-
-/**
- * Writes a view section. This section is needed in VER_R13.
- * Note that this method currently only writes a faked VIEW section
- * to make the file readable by Aut*cad.
- */
-void DL_Dxf::writeView(DL_WriterA& dw) {
-    dw.dxfString(  0, "TABLE");
-    dw.dxfString(  2, "VIEW");
-    if (version==VER_2000) {
-    	dw.dxfHex(5, 6);
-	}
-    //dw.dxfHex(330, 0);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTable");
-    }
-    dw.dxfInt( 70, 0);
-    dw.dxfString(  0, "ENDTAB");
-}
-
-
-
-/**
- * Writes a ucs section. This section is needed in VER_R13.
- * Note that this method currently only writes a faked UCS section
- * to make the file readable by Aut*cad.
- */
-void DL_Dxf::writeUcs(DL_WriterA& dw) {
-    dw.dxfString(  0, "TABLE");
-    dw.dxfString(  2, "UCS");
-    if (version==VER_2000) {
-    	dw.dxfHex(5, 7);
-	}
-    //dw.dxfHex(330, 0);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTable");
-    }
-    dw.dxfInt( 70, 0);
-    dw.dxfString(  0, "ENDTAB");
-}
-
-
-
-/**
- * Writes a dimstyle section. This section is needed in VER_R13.
- * Note that this method currently only writes a faked DIMSTYLE section
- * to make the file readable by Aut*cad.
- */
-void DL_Dxf::writeDimStyle(DL_WriterA& dw, 
-					double dimasz, double dimexe, double dimexo,
-                       double dimgap, double dimtxt) {
-
-    dw.dxfString(  0, "TABLE");
-    dw.dxfString(  2, "DIMSTYLE");
-    if (version==VER_2000) {
-        dw.dxfHex(5, 0xA);
-        dw.dxfString(100, "AcDbSymbolTable");
-    }
-    dw.dxfInt( 70, 1);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbDimStyleTable");
-        dw.dxfInt( 71, 0);
-    }
-
-
-    dw.dxfString(  0, "DIMSTYLE");
-    if (version==VER_2000) {
-        dw.dxfHex(105, 0x27);
-    }
-    //dw.handle(105);
-    //dw.dxfHex(330, 0xA);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTableRecord");
-        dw.dxfString(100, "AcDbDimStyleTableRecord");
-    }
-    dw.dxfString(  2, "Standard");
-    if (version==VER_R12) {
-        dw.dxfString(  3, "");
-        dw.dxfString(  4, "");
-        dw.dxfString(  5, "");
-        dw.dxfString(  6, "");
-        dw.dxfString(  7, "");
-        dw.dxfReal( 40, 1.0);
-    }
-
-    dw.dxfReal( 41, dimasz);
-    dw.dxfReal( 42, dimexo);
-    dw.dxfReal( 43, 3.75);
-    dw.dxfReal( 44, dimexe);
-    if (version==VER_R12) {
-        dw.dxfReal( 45, 0.0);
-        dw.dxfReal( 46, 0.0);
-        dw.dxfReal( 47, 0.0);
-        dw.dxfReal( 48, 0.0);
-    }
-    dw.dxfInt( 70, 0);
-    if (version==VER_R12) {
-        dw.dxfInt( 71, 0);
-        dw.dxfInt( 72, 0);
-    }
-    dw.dxfInt( 73, 0);
-    dw.dxfInt( 74, 0);
-    if (version==VER_R12) {
-        dw.dxfInt( 75, 0);
-        dw.dxfInt( 76, 0);
-    }
-    dw.dxfInt( 77, 1);
-    dw.dxfInt( 78, 8);
-    dw.dxfReal(140, dimtxt);
-    dw.dxfReal(141, 2.5);
-    if (version==VER_R12) {
-        dw.dxfReal(142, 0.0);
-    }
-    dw.dxfReal(143, 0.03937007874016);
-    if (version==VER_R12) {
-        dw.dxfReal(144, 1.0);
-        dw.dxfReal(145, 0.0);
-        dw.dxfReal(146, 1.0);
-    }
-    dw.dxfReal(147, dimgap);
-    if (version==VER_R12) {
-        dw.dxfInt(170, 0);
-    }
-    dw.dxfInt(171, 3);
-    dw.dxfInt(172, 1);
-    if (version==VER_R12) {
-        dw.dxfInt(173, 0);
-        dw.dxfInt(174, 0);
-        dw.dxfInt(175, 0);
-        dw.dxfInt(176, 0);
-        dw.dxfInt(177, 0);
-        dw.dxfInt(178, 0);
-    }
-    if (version==VER_2000) {
-        dw.dxfInt(271, 2);
-        dw.dxfInt(272, 2);
-        dw.dxfInt(274, 3);
-        dw.dxfInt(278, 44);
-        dw.dxfInt(283, 0);
-        dw.dxfInt(284, 8);
-        //dw.dxfHex(340, styleHandleStd);
-        dw.dxfHex(340, 0x11);
-    }
-    // * /
-    dw.dxfString(  0, "ENDTAB");
-}
-
-
-
-/**
- * Writes a blockrecord section. This section is needed in VER_R13.
- * Note that this method currently only writes a faked BLOCKRECORD section
- * to make the file readable by Aut*cad.
- */
-void DL_Dxf::writeBlockRecord(DL_WriterA& dw) {
-    dw.dxfString(  0, "TABLE");
-    dw.dxfString(  2, "BLOCK_RECORD");
-    if (version==VER_2000) {
-    	dw.dxfHex(5, 1);
-	}
-    //dw.dxfHex(330, 0);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTable");
-    }
-    dw.dxfInt( 70, 1);
-
-    dw.dxfString(  0, "BLOCK_RECORD");
-    if (version==VER_2000) {
-    	dw.dxfHex(5, 0x1F);
-	}
-    //int msh = dw.handle();
-    //dw.setModelSpaceHandle(msh);
-    //dw.dxfHex(330, 1);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTableRecord");
-        dw.dxfString(100, "AcDbBlockTableRecord");
-    }
-    dw.dxfString(  2, "*Model_Space");
-    dw.dxfHex(340, 0x22);
-
-    dw.dxfString(  0, "BLOCK_RECORD");
-    if (version==VER_2000) {
-    	dw.dxfHex(5, 0x1B);
-	}
-    //int psh = dw.handle();
-    //dw.setPaperSpaceHandle(psh);
-    //dw.dxfHex(330, 1);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTableRecord");
-        dw.dxfString(100, "AcDbBlockTableRecord");
-    }
-    dw.dxfString(  2, "*Paper_Space");
-    dw.dxfHex(340, 0x1E);
-
-    dw.dxfString(  0, "BLOCK_RECORD");
-    if (version==VER_2000) {
-    	dw.dxfHex(5, 0x23);
-	}
-    //int ps0h = dw.handle();
-    //dw.setPaperSpace0Handle(ps0h);
-    //dw.dxfHex(330, 1);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTableRecord");
-        dw.dxfString(100, "AcDbBlockTableRecord");
-    }
-    dw.dxfString(  2, "*Paper_Space0");
-    dw.dxfHex(340, 0x26);
-
-    //dw.dxfString(  0, "ENDTAB");
-}
-
-
-
-/**
- * Writes a single block record with the given name.
- */
-void DL_Dxf::writeBlockRecord(DL_WriterA& dw, const string& name) {
-    dw.dxfString(  0, "BLOCK_RECORD");
-    if (version==VER_2000) {
-    	dw.handle();
-	}
-    //dw->dxfHex(330, 1);
-    if (version==VER_2000) {
-        dw.dxfString(100, "AcDbSymbolTableRecord");
-        dw.dxfString(100, "AcDbBlockTableRecord");
-    }
-    dw.dxfString(  2, name);
-    dw.dxfHex(340, 0);
-}
-
-
-
-/**
- * Writes a objects section. This section is needed in VER_R13.
- * Note that this method currently only writes a faked OBJECTS section
- * to make the file readable by Aut*cad.
- */
-void DL_Dxf::writeObjects(DL_WriterA& dw) {
-    //int dicId, dicId2, dicId3, dicId4, dicId5;
-    //int dicId5;
-
-    dw.dxfString(  0, "SECTION");
-    dw.dxfString(  2, "OBJECTS");
-    dw.dxfString(  0, "DICTIONARY");
-    dw.dxfHex(5, 0xC);                            // C
-    //dw.dxfHex(330, 0);
-    dw.dxfString(100, "AcDbDictionary");
-    dw.dxfInt(280, 0);
-    dw.dxfInt(281, 1);
-    dw.dxfString(  3, "ACAD_GROUP");
-    //dw.dxfHex(350, dw.getNextHandle());          // D
-    dw.dxfHex(350, 0xD);          // D
-    dw.dxfString(  3, "ACAD_LAYOUT");
-    dw.dxfHex(350, 0x1A);
-    //dw.dxfHex(350, dw.getNextHandle()+0);        // 1A
-    dw.dxfString(  3, "ACAD_MLINESTYLE");
-    dw.dxfHex(350, 0x17);
-    //dw.dxfHex(350, dw.getNextHandle()+1);        // 17
-    dw.dxfString(  3, "ACAD_PLOTSETTINGS");
-    dw.dxfHex(350, 0x19);
-    //dw.dxfHex(350, dw.getNextHandle()+2);        // 19
-    dw.dxfString(  3, "ACAD_PLOTSTYLENAME");
-    dw.dxfHex(350, 0xE);
-    //dw.dxfHex(350, dw.getNextHandle()+3);        // E
-    dw.dxfString(  3, "AcDbVariableDictionary");
-    dw.dxfHex(350, dw.getNextHandle());        // 2C
-    dw.dxfString(  0, "DICTIONARY");
-    dw.dxfHex(5, 0xD);
-    //dw.handle();                                    // D
-    //dw.dxfHex(330, 0xC);
-    dw.dxfString(100, "AcDbDictionary");
-    dw.dxfInt(280, 0);
-    dw.dxfInt(281, 1);
-    dw.dxfString(  0, "ACDBDICTIONARYWDFLT");
-    dw.dxfHex(5, 0xE);
-    //dicId4 = dw.handle();                           // E
-    //dw.dxfHex(330, 0xC);                       // C
-    dw.dxfString(100, "AcDbDictionary");
-    dw.dxfInt(281, 1);
-    dw.dxfString(  3, "Normal");
-    dw.dxfHex(350, 0xF);
-    //dw.dxfHex(350, dw.getNextHandle()+5);        // F
-    dw.dxfString(100, "AcDbDictionaryWithDefault");
-    dw.dxfHex(340, 0xF);
-    //dw.dxfHex(340, dw.getNextHandle()+5);        // F
-    dw.dxfString(  0, "ACDBPLACEHOLDER");
-    dw.dxfHex(5, 0xF);
-    //dw.handle();                                    // F
-    //dw.dxfHex(330, dicId4);                      // E
-    dw.dxfString(  0, "DICTIONARY");
-    //dicId3 = dw.handle();                           // 17
-    dw.dxfHex(5, 0x17);
-    //dw.dxfHex(330, 0xC);                       // C
-    dw.dxfString(100, "AcDbDictionary");
-    dw.dxfInt(280, 0);
-    dw.dxfInt(281, 1);
-    dw.dxfString(  3, "Standard");
-    dw.dxfHex(350, 0x18);
-    //dw.dxfHex(350, dw.getNextHandle()+5);        // 18
-    dw.dxfString(  0, "MLINESTYLE");
-    dw.dxfHex(5, 0x18);
-    //dw.handle();                                    // 18
-    //dw.dxfHex(330, dicId3);                      // 17
-    dw.dxfString(100, "AcDbMlineStyle");
-    dw.dxfString(  2, "STANDARD");
-    dw.dxfInt( 70, 0);
-    dw.dxfString(  3, "");
-    dw.dxfInt( 62, 256);
-    dw.dxfReal( 51, 90.0);
-    dw.dxfReal( 52, 90.0);
-    dw.dxfInt( 71, 2);
-    dw.dxfReal( 49, 0.5);
-    dw.dxfInt( 62, 256);
-    dw.dxfString(  6, "BYLAYER");
-    dw.dxfReal( 49, -0.5);
-    dw.dxfInt( 62, 256);
-    dw.dxfString(  6, "BYLAYER");
-    dw.dxfString(  0, "DICTIONARY");
-    dw.dxfHex(5, 0x19);
-    //dw.handle();                           // 17
-    //dw.dxfHex(330, 0xC);                       // C
-    dw.dxfString(100, "AcDbDictionary");
-    dw.dxfInt(280, 0);
-    dw.dxfInt(281, 1);
-    dw.dxfString(  0, "DICTIONARY");
-    //dicId2 = dw.handle();                           // 1A
-    dw.dxfHex(5, 0x1A);
-    //dw.dxfHex(330, 0xC);
-    dw.dxfString(100, "AcDbDictionary");
-    dw.dxfInt(281, 1);
-    dw.dxfString(  3, "Layout1");
-    dw.dxfHex(350, 0x1E);
-    //dw.dxfHex(350, dw.getNextHandle()+2);        // 1E
-    dw.dxfString(  3, "Layout2");
-    dw.dxfHex(350, 0x26);
-    //dw.dxfHex(350, dw.getNextHandle()+4);        // 26
-    dw.dxfString(  3, "Model");
-    dw.dxfHex(350, 0x22);
-    //dw.dxfHex(350, dw.getNextHandle()+5);        // 22
-
-    dw.dxfString(  0, "LAYOUT");
-    dw.dxfHex(5, 0x1E);
-    //dw.handle();                                    // 1E
-    //dw.dxfHex(330, dicId2);                      // 1A
-    dw.dxfString(100, "AcDbPlotSettings");
-    dw.dxfString(  1, "");
-    dw.dxfString(  2, "C:\\Program Files\\AutoCAD 2002\\plotters\\DWF ePlot (optimized for plotting).pc3");
-    dw.dxfString(  4, "");
-    dw.dxfString(  6, "");
-    dw.dxfReal( 40, 0.0);
-    dw.dxfReal( 41, 0.0);
-    dw.dxfReal( 42, 0.0);
-    dw.dxfReal( 43, 0.0);
-    dw.dxfReal( 44, 0.0);
-    dw.dxfReal( 45, 0.0);
-    dw.dxfReal( 46, 0.0);
-    dw.dxfReal( 47, 0.0);
-    dw.dxfReal( 48, 0.0);
-    dw.dxfReal( 49, 0.0);
-    dw.dxfReal(140, 0.0);
-    dw.dxfReal(141, 0.0);
-    dw.dxfReal(142, 1.0);
-    dw.dxfReal(143, 1.0);
-    dw.dxfInt( 70, 688);
-    dw.dxfInt( 72, 0);
-    dw.dxfInt( 73, 0);
-    dw.dxfInt( 74, 5);
-    dw.dxfString(  7, "");
-    dw.dxfInt( 75, 16);
-    dw.dxfReal(147, 1.0);
-    dw.dxfReal(148, 0.0);
-    dw.dxfReal(149, 0.0);
-    dw.dxfString(100, "AcDbLayout");
-    dw.dxfString(  1, "Layout1");
-    dw.dxfInt( 70, 1);
-    dw.dxfInt( 71, 1);
-    dw.dxfReal( 10, 0.0);
-    dw.dxfReal( 20, 0.0);
-    dw.dxfReal( 11, 420.0);
-    dw.dxfReal( 21, 297.0);
-    dw.dxfReal( 12, 0.0);
-    dw.dxfReal( 22, 0.0);
-    dw.dxfReal( 32, 0.0);
-    dw.dxfReal( 14, 1.000000000000000E+20);
-    dw.dxfReal( 24, 1.000000000000000E+20);
-    dw.dxfReal( 34, 1.000000000000000E+20);
-    dw.dxfReal( 15, -1.000000000000000E+20);
-    dw.dxfReal( 25, -1.000000000000000E+20);
-    dw.dxfReal( 35, -1.000000000000000E+20);
-    dw.dxfReal(146, 0.0);
-    dw.dxfReal( 13, 0.0);
-    dw.dxfReal( 23, 0.0);
-    dw.dxfReal( 33, 0.0);
-    dw.dxfReal( 16, 1.0);
-    dw.dxfReal( 26, 0.0);
-    dw.dxfReal( 36, 0.0);
-    dw.dxfReal( 17, 0.0);
-    dw.dxfReal( 27, 1.0);
-    dw.dxfReal( 37, 0.0);
-    dw.dxfInt( 76, 0);
-    //dw.dxfHex(330, dw.getPaperSpaceHandle());    // 1B
-    dw.dxfHex(330, 0x1B);
-    dw.dxfString(  0, "LAYOUT");
-    dw.dxfHex(5, 0x22);
-    //dw.handle();                                    // 22
-    //dw.dxfHex(330, dicId2);                      // 1A
-    dw.dxfString(100, "AcDbPlotSettings");
-    dw.dxfString(  1, "");
-    dw.dxfString(  2, "C:\\Program Files\\AutoCAD 2002\\plotters\\DWF ePlot (optimized for plotting).pc3");
-    dw.dxfString(  4, "");
-    dw.dxfString(  6, "");
-    dw.dxfReal( 40, 0.0);
-    dw.dxfReal( 41, 0.0);
-    dw.dxfReal( 42, 0.0);
-    dw.dxfReal( 43, 0.0);
-    dw.dxfReal( 44, 0.0);
-    dw.dxfReal( 45, 0.0);
-    dw.dxfReal( 46, 0.0);
-    dw.dxfReal( 47, 0.0);
-    dw.dxfReal( 48, 0.0);
-    dw.dxfReal( 49, 0.0);
-    dw.dxfReal(140, 0.0);
-    dw.dxfReal(141, 0.0);
-    dw.dxfReal(142, 1.0);
-    dw.dxfReal(143, 1.0);
-    dw.dxfInt( 70, 1712);
-    dw.dxfInt( 72, 0);
-    dw.dxfInt( 73, 0);
-    dw.dxfInt( 74, 0);
-    dw.dxfString(  7, "");
-    dw.dxfInt( 75, 0);
-    dw.dxfReal(147, 1.0);
-    dw.dxfReal(148, 0.0);
-    dw.dxfReal(149, 0.0);
-    dw.dxfString(100, "AcDbLayout");
-    dw.dxfString(  1, "Model");
-    dw.dxfInt( 70, 1);
-    dw.dxfInt( 71, 0);
-    dw.dxfReal( 10, 0.0);
-    dw.dxfReal( 20, 0.0);
-    dw.dxfReal( 11, 12.0);
-    dw.dxfReal( 21, 9.0);
-    dw.dxfReal( 12, 0.0);
-    dw.dxfReal( 22, 0.0);
-    dw.dxfReal( 32, 0.0);
-    dw.dxfReal( 14, 0.0);
-    dw.dxfReal( 24, 0.0);
-    dw.dxfReal( 34, 0.0);
-    dw.dxfReal( 15, 0.0);
-    dw.dxfReal( 25, 0.0);
-    dw.dxfReal( 35, 0.0);
-    dw.dxfReal(146, 0.0);
-    dw.dxfReal( 13, 0.0);
-    dw.dxfReal( 23, 0.0);
-    dw.dxfReal( 33, 0.0);
-    dw.dxfReal( 16, 1.0);
-    dw.dxfReal( 26, 0.0);
-    dw.dxfReal( 36, 0.0);
-    dw.dxfReal( 17, 0.0);
-    dw.dxfReal( 27, 1.0);
-    dw.dxfReal( 37, 0.0);
-    dw.dxfInt( 76, 0);
-    //dw.dxfHex(330, dw.getModelSpaceHandle());    // 1F
-    dw.dxfHex(330, 0x1F);
-    dw.dxfString(  0, "LAYOUT");
-    //dw.handle();                                    // 26
-    dw.dxfHex(5, 0x26);
-    //dw.dxfHex(330, dicId2);                      // 1A
-    dw.dxfString(100, "AcDbPlotSettings");
-    dw.dxfString(  1, "");
-    dw.dxfString(  2, "C:\\Program Files\\AutoCAD 2002\\plotters\\DWF ePlot (optimized for plotting).pc3");
-    dw.dxfString(  4, "");
-    dw.dxfString(  6, "");
-    dw.dxfReal( 40, 0.0);
-    dw.dxfReal( 41, 0.0);
-    dw.dxfReal( 42, 0.0);
-    dw.dxfReal( 43, 0.0);
-    dw.dxfReal( 44, 0.0);
-    dw.dxfReal( 45, 0.0);
-    dw.dxfReal( 46, 0.0);
-    dw.dxfReal( 47, 0.0);
-    dw.dxfReal( 48, 0.0);
-    dw.dxfReal( 49, 0.0);
-    dw.dxfReal(140, 0.0);
-    dw.dxfReal(141, 0.0);
-    dw.dxfReal(142, 1.0);
-    dw.dxfReal(143, 1.0);
-    dw.dxfInt( 70, 688);
-    dw.dxfInt( 72, 0);
-    dw.dxfInt( 73, 0);
-    dw.dxfInt( 74, 5);
-    dw.dxfString(  7, "");
-    dw.dxfInt( 75, 16);
-    dw.dxfReal(147, 1.0);
-    dw.dxfReal(148, 0.0);
-    dw.dxfReal(149, 0.0);
-    dw.dxfString(100, "AcDbLayout");
-    dw.dxfString(  1, "Layout2");
-    dw.dxfInt( 70, 1);
-    dw.dxfInt( 71, 2);
-    dw.dxfReal( 10, 0.0);
-    dw.dxfReal( 20, 0.0);
-    dw.dxfReal( 11, 12.0);
-    dw.dxfReal( 21, 9.0);
-    dw.dxfReal( 12, 0.0);
-    dw.dxfReal( 22, 0.0);
-    dw.dxfReal( 32, 0.0);
-    dw.dxfReal( 14, 0.0);
-    dw.dxfReal( 24, 0.0);
-    dw.dxfReal( 34, 0.0);
-    dw.dxfReal( 15, 0.0);
-    dw.dxfReal( 25, 0.0);
-    dw.dxfReal( 35, 0.0);
-    dw.dxfReal(146, 0.0);
-    dw.dxfReal( 13, 0.0);
-    dw.dxfReal( 23, 0.0);
-    dw.dxfReal( 33, 0.0);
-    dw.dxfReal( 16, 1.0);
-    dw.dxfReal( 26, 0.0);
-    dw.dxfReal( 36, 0.0);
-    dw.dxfReal( 17, 0.0);
-    dw.dxfReal( 27, 1.0);
-    dw.dxfReal( 37, 0.0);
-    dw.dxfInt( 76, 0);
-    //dw.dxfHex(330, dw.getPaperSpace0Handle());   // 23
-    dw.dxfHex(330, 0x23);
-    dw.dxfString(  0, "DICTIONARY");
-    //dw.dxfHex(5, 0x2C);
-    //dicId5 =
-    dw.handle();                           // 2C
-    //dw.dxfHex(330, 0xC);                       // C
-    dw.dxfString(100, "AcDbDictionary");
-    dw.dxfInt(281, 1);
-    dw.dxfString(  3, "DIMASSOC");
-    //dw.dxfHex(350, 0x2F);
-    dw.dxfHex(350, dw.getNextHandle()+1);        // 2E
-    dw.dxfString(  3, "HIDETEXT");
-    //dw.dxfHex(350, 0x2E);
-    dw.dxfHex(350, dw.getNextHandle());        // 2D
-    dw.dxfString(  0, "DICTIONARYVAR");
-    //dw.dxfHex(5, 0x2E);
-    dw.handle();                                    // 2E
-    //dw.dxfHex(330, dicId5);                      // 2C
-    dw.dxfString(100, "DictionaryVariables");
-    dw.dxfInt(280, 0);
-    dw.dxfInt(  1, 2);
-    dw.dxfString(  0, "DICTIONARYVAR");
-    //dw.dxfHex(5, 0x2D);
-    dw.handle();                                    // 2D
-    //dw.dxfHex(330, dicId5);                      // 2C
-    dw.dxfString(100, "DictionaryVariables");
-    dw.dxfInt(280, 0);
-    dw.dxfInt(  1, 1);
-}
-
-
-/**
- * Writes the end of the objects section. This section is needed in VER_R13.
- * Note that this method currently only writes a faked OBJECTS section
- * to make the file readable by Aut*cad.
- */
-void DL_Dxf::writeObjectsEnd(DL_WriterA& dw) {
-    dw.dxfString(  0, "ENDSEC");
-}
-
-    
-
-/**
- * Writes a comment to the DXF file.
- */
-void DL_Dxf::writeComment(DL_WriterA& dw, const string& comment) {
-    dw.dxfString(999, comment);
-}
-
-
-/**
- * Checks if the given variable is known by the given DXF version.
- */
-bool DL_Dxf::checkVariable(const char* var, DL_Codes::version version) {
-    if (version>=VER_2000) {
-        return true;
-    } else if (version==VER_R12) {
-        // these are all the variables recognized by dxf r12:
-        if (!strcmp(var, "$ACADVER")) {
-            return true;
-        }
-        if (!strcmp(var, "$ACADVER")) {
-            return true;
-        }
-        if (!strcmp(var, "$ANGBASE")) {
-            return true;
-        }
-        if (!strcmp(var, "$ANGDIR")) {
-            return true;
-        }
-        if (!strcmp(var, "$ATTDIA")) {
-            return true;
-        }
-        if (!strcmp(var, "$ATTMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$ATTREQ")) {
-            return true;
-        }
-        if (!strcmp(var, "$AUNITS")) {
-            return true;
-        }
-        if (!strcmp(var, "$AUPREC")) {
-            return true;
-        }
-        if (!strcmp(var, "$AXISMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$AXISUNIT")) {
-            return true;
-        }
-        if (!strcmp(var, "$BLIPMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$CECOLOR")) {
-            return true;
-        }
-        if (!strcmp(var, "$CELTYPE")) {
-            return true;
-        }
-        if (!strcmp(var, "$CHAMFERA")) {
-            return true;
-        }
-        if (!strcmp(var, "$CHAMFERB")) {
-            return true;
-        }
-        if (!strcmp(var, "$CLAYER")) {
-            return true;
-        }
-        if (!strcmp(var, "$COORDS")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMALT")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMALTD")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMALTF")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMAPOST")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMASO")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMASZ")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMBLK")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMBLK1")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMBLK2")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMCEN")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMCLRD")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMCLRE")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMCLRT")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMDLE")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMDLI")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMEXE")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMEXO")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMGAP")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMLFAC")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMLIM")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMPOST")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMRND")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMSAH")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMSCALE")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMSE1")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMSE2")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMSHO")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMSOXD")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMSTYLE")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTAD")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTFAC")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTIH")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTIX")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTM")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTOFL")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTOH")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTOL")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTP")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTSZ")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTVP")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMTXT")) {
-            return true;
-        }
-        if (!strcmp(var, "$DIMZIN")) {
-            return true;
-        }
-        if (!strcmp(var, "$DWGCODEPAGE")) {
-            return true;
-        }
-        if (!strcmp(var, "$DRAGMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$ELEVATION")) {
-            return true;
-        }
-        if (!strcmp(var, "$EXTMAX")) {
-            return true;
-        }
-        if (!strcmp(var, "$EXTMIN")) {
-            return true;
-        }
-        if (!strcmp(var, "$FILLETRAD")) {
-            return true;
-        }
-        if (!strcmp(var, "$FILLMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$HANDLING")) {
-            return true;
-        }
-        if (!strcmp(var, "$HANDSEED")) {
-            return true;
-        }
-        if (!strcmp(var, "$INSBASE")) {
-            return true;
-        }
-        if (!strcmp(var, "$LIMCHECK")) {
-            return true;
-        }
-        if (!strcmp(var, "$LIMMAX")) {
-            return true;
-        }
-        if (!strcmp(var, "$LIMMIN")) {
-            return true;
-        }
-        if (!strcmp(var, "$LTSCALE")) {
-            return true;
-        }
-        if (!strcmp(var, "$LUNITS")) {
-            return true;
-        }
-        if (!strcmp(var, "$LUPREC")) {
-            return true;
-        }
-        if (!strcmp(var, "$MAXACTVP")) {
-            return true;
-        }
-        if (!strcmp(var, "$MENU")) {
-            return true;
-        }
-        if (!strcmp(var, "$MIRRTEXT")) {
-            return true;
-        }
-        if (!strcmp(var, "$ORTHOMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$OSMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$PDMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$PDSIZE")) {
-            return true;
-        }
-        if (!strcmp(var, "$PELEVATION")) {
-            return true;
-        }
-        if (!strcmp(var, "$PEXTMAX")) {
-            return true;
-        }
-        if (!strcmp(var, "$PEXTMIN")) {
-            return true;
-        }
-        if (!strcmp(var, "$PLIMCHECK")) {
-            return true;
-        }
-        if (!strcmp(var, "$PLIMMAX")) {
-            return true;
-        }
-        if (!strcmp(var, "$PLIMMIN")) {
-            return true;
-        }
-        if (!strcmp(var, "$PLINEGEN")) {
-            return true;
-        }
-        if (!strcmp(var, "$PLINEWID")) {
-            return true;
-        }
-        if (!strcmp(var, "$PSLTSCALE")) {
-            return true;
-        }
-        if (!strcmp(var, "$PUCSNAME")) {
-            return true;
-        }
-        if (!strcmp(var, "$PUCSORG")) {
-            return true;
-        }
-        if (!strcmp(var, "$PUCSXDIR")) {
-            return true;
-        }
-        if (!strcmp(var, "$PUCSYDIR")) {
-            return true;
-        }
-        if (!strcmp(var, "$QTEXTMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$REGENMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$SHADEDGE")) {
-            return true;
-        }
-        if (!strcmp(var, "$SHADEDIF")) {
-            return true;
-        }
-        if (!strcmp(var, "$SKETCHINC")) {
-            return true;
-        }
-        if (!strcmp(var, "$SKPOLY")) {
-            return true;
-        }
-        if (!strcmp(var, "$SPLFRAME")) {
-            return true;
-        }
-        if (!strcmp(var, "$SPLINESEGS")) {
-            return true;
-        }
-        if (!strcmp(var, "$SPLINETYPE")) {
-            return true;
-        }
-        if (!strcmp(var, "$SURFTAB1")) {
-            return true;
-        }
-        if (!strcmp(var, "$SURFTAB2")) {
-            return true;
-        }
-        if (!strcmp(var, "$SURFTYPE")) {
-            return true;
-        }
-        if (!strcmp(var, "$SURFU")) {
-            return true;
-        }
-        if (!strcmp(var, "$SURFV")) {
-            return true;
-        }
-        if (!strcmp(var, "$TDCREATE")) {
-            return true;
-        }
-        if (!strcmp(var, "$TDINDWG")) {
-            return true;
-        }
-        if (!strcmp(var, "$TDUPDATE")) {
-            return true;
-        }
-        if (!strcmp(var, "$TDUSRTIMER")) {
-            return true;
-        }
-        if (!strcmp(var, "$TEXTSIZE")) {
-            return true;
-        }
-        if (!strcmp(var, "$TEXTSTYLE")) {
-            return true;
-        }
-        if (!strcmp(var, "$THICKNESS")) {
-            return true;
-        }
-        if (!strcmp(var, "$TILEMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$TRACEWID")) {
-            return true;
-        }
-        if (!strcmp(var, "$UCSNAME")) {
-            return true;
-        }
-        if (!strcmp(var, "$UCSORG")) {
-            return true;
-        }
-        if (!strcmp(var, "$UCSXDIR")) {
-            return true;
-        }
-        if (!strcmp(var, "$UCSYDIR")) {
-            return true;
-        }
-        if (!strcmp(var, "$UNITMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$USERI1")) {
-            return true;
-        }
-        if (!strcmp(var, "$USERR1")) {
-            return true;
-        }
-        if (!strcmp(var, "$USRTIMER")) {
-            return true;
-        }
-        if (!strcmp(var, "$VISRETAIN")) {
-            return true;
-        }
-        if (!strcmp(var, "$WORLDVIEW")) {
-            return true;
-        }
-        if (!strcmp(var, "$FASTZOOM")) {
-            return true;
-        }
-        if (!strcmp(var, "$GRIDMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$GRIDUNIT")) {
-            return true;
-        }
-        if (!strcmp(var, "$SNAPANG")) {
-            return true;
-        }
-        if (!strcmp(var, "$SNAPBASE")) {
-            return true;
-        }
-        if (!strcmp(var, "$SNAPISOPAIR")) {
-            return true;
-        }
-        if (!strcmp(var, "$SNAPMODE")) {
-            return true;
-        }
-        if (!strcmp(var, "$SNAPSTYLE")) {
-            return true;
-        }
-        if (!strcmp(var, "$SNAPUNIT")) {
-            return true;
-        }
-        if (!strcmp(var, "$VIEWCTR")) {
-            return true;
-        }
-        if (!strcmp(var, "$VIEWDIR")) {
-            return true;
-        }
-        if (!strcmp(var, "$VIEWSIZE")) {
-            return true;
-        }
-        return false;
-    }
-
-    return false;
-}
-
-
-
-/**
- * @returns the library version as int (4 bytes, each byte one version number).
- * e.g. if str = "2.0.2.0" getLibVersion returns 0x02000200
- */
-int DL_Dxf::getLibVersion(const char* str) {
-    int d[4];
-    int idx = 0;
-    char v[4][5];
-    int ret = 0;
-
-    for (unsigned int i=0; i<strlen(str) && idx<3; ++i) {
-        if (str[i]=='.') {
-            d[idx] = i;
-            idx++;
-        }
-    }
-
-    if (idx==3) {
-        d[3] = strlen(str);
-
-        strncpy(v[0], str, d[0]);
-        v[0][d[0]] = '\0';
-
-        strncpy(v[1], &str[d[0]+1], d[1]-d[0]-1);
-        v[1][d[1]-d[0]-1] = '\0';
-
-        strncpy(v[2], &str[d[1]+1], d[2]-d[1]-1);
-        v[2][d[2]-d[1]-1] = '\0';
-
-        strncpy(v[3], &str[d[2]+1], d[3]-d[2]-1);
-        v[3][d[3]-d[2]-1] = '\0';
-
-        ret = (atoi(v[0])<<(3*8)) +
-              (atoi(v[1])<<(2*8)) +
-              (atoi(v[2])<<(1*8)) +
-              (atoi(v[3])<<(0*8));
-
-        return ret;
-    } else {
-        std::cerr << "DL_Dxf::getLibVersion: invalid version number: " << str << "\n";
-        return 0;
-    }
-}
-
-
-
-/**
- * Some test routines.
- */
-void DL_Dxf::test() {
-    char* buf1;
-    char* buf2;
-    char* buf3;
-    char* buf4;
-    char* buf5;
-    char* buf6;
-
-    buf1 = new char[10];
-    buf2 = new char[10];
-    buf3 = new char[10];
-    buf4 = new char[10];
-    buf5 = new char[10];
-    buf6 = new char[10];
-
-    strcpy(buf1, "  10\n");
-    strcpy(buf2, "10");
-    strcpy(buf3, "10\n");
-    strcpy(buf4, "  10 \n");
-    strcpy(buf5, "  10 \r");
-    strcpy(buf6, "\t10 \n");
-
-    std::cout << "1 buf1: '" << buf1 << "'\n";
-    stripWhiteSpace(&buf1);
-    std::cout << "2 buf1: '" << buf1 << "'\n";
-    //assert(!strcmp(buf1, "10"));
-
-    std::cout << "1 buf2: '" << buf2 << "'\n";
-    stripWhiteSpace(&buf2);
-    std::cout << "2 buf2: '" << buf2 << "'\n";
-
-    std::cout << "1 buf3: '" << buf3 << "'\n";
-    stripWhiteSpace(&buf3);
-    std::cout << "2 buf3: '" << buf3 << "'\n";
-
-    std::cout << "1 buf4: '" << buf4 << "'\n";
-    stripWhiteSpace(&buf4);
-    std::cout << "2 buf4: '" << buf4 << "'\n";
-
-    std::cout << "1 buf5: '" << buf5 << "'\n";
-    stripWhiteSpace(&buf5);
-    std::cout << "2 buf5: '" << buf5 << "'\n";
-
-    std::cout << "1 buf6: '" << buf6 << "'\n";
-    stripWhiteSpace(&buf6);
-    std::cout << "2 buf6: '" << buf6 << "'\n";
-
-}
-
-
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_dxf.h b/src/modules/io/io_shapes_dxf/dxflib/dl_dxf.h
deleted file mode 100755
index 6bfd18c..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_dxf.h
+++ /dev/null
@@ -1,433 +0,0 @@
-/**********************************************************
- * Version $Id: dl_dxf.h 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_dxf.h 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef DL_DXF_H
-#define DL_DXF_H
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifndef __GCC2x__
-#include <sstream>
-#endif
-
-#include "dl_attributes.h"
-#include "dl_codes.h"
-#include "dl_entities.h"
-#include "dl_writer_ascii.h"
-
-#ifdef _WIN32
-#undef M_PI
-#define M_PI   3.14159265358979323846
-#pragma warning(disable : 4800)
-#endif
-
-#ifndef M_PI
-#define M_PI 3.1415926535897932384626433832795
-#endif
-
-class DL_CreationInterface;
-class DL_WriterA;
-
-
-#define DL_VERSION     "2.2.0.0"
-
-#define DL_UNKNOWN               0
-#define DL_LAYER                10
-#define DL_BLOCK                11
-#define DL_ENDBLK               12
-#define DL_LINETYPE             13
-#define DL_SETTING              50
-#define DL_ENTITY_POINT        100
-#define DL_ENTITY_LINE         101
-#define DL_ENTITY_POLYLINE     102
-#define DL_ENTITY_LWPOLYLINE   103
-#define DL_ENTITY_VERTEX       104
-#define DL_ENTITY_SPLINE       105
-#define DL_ENTITY_KNOT         106
-#define DL_ENTITY_CONTROLPOINT 107
-#define DL_ENTITY_ARC          108
-#define DL_ENTITY_CIRCLE       109
-#define DL_ENTITY_ELLIPSE      110
-#define DL_ENTITY_INSERT       111
-#define DL_ENTITY_TEXT         112
-#define DL_ENTITY_MTEXT        113
-#define DL_ENTITY_DIMENSION    114
-#define DL_ENTITY_LEADER       115
-#define DL_ENTITY_HATCH        116
-#define DL_ENTITY_ATTRIB       117
-#define DL_ENTITY_IMAGE        118
-#define DL_ENTITY_IMAGEDEF     119
-#define DL_ENTITY_TRACE        120
-#define DL_ENTITY_SOLID        121
-#define DL_ENTITY_3DFACE       122
-#define DL_ENTITY_SEQEND       123
-
-
-/**
- * Reading and writing of DXF files.
- *
- * This class can read in a DXF file and calls methods from the 
- * interface DL_EntityContainer to add the entities to the
- * contianer provided by the user of the library.
- *
- * It can also be used to write DXF files to a certain extent.
- *
- * When saving entities, special values for colors and linetypes 
- * can be used:
- *
- * Special colors are 0 (=BYBLOCK) and 256 (=BYLAYER).
- * Special linetypes are "BYLAYER" and "BYBLOCK".
- *
- * @author Andrew Mustun
- */
-class DL_Dxf {
-public:
-    DL_Dxf();
-    ~DL_Dxf();
-
-    bool in(const string& file,
-            DL_CreationInterface* creationInterface);
-    bool readDxfGroups(FILE* fp,
-                       DL_CreationInterface* creationInterface,
-					   int* errorCounter = NULL);
-    static bool getChoppedLine(char* s, unsigned int size,
-                               FILE *stream);
-    
-#ifndef __GCC2x__
-    bool readDxfGroups(std::stringstream &stream,
-                       DL_CreationInterface* creationInterface,
-					   int* errorCounter = NULL);
-    bool in(std::stringstream &stream,
-            DL_CreationInterface* creationInterface);
-    static bool getChoppedLine(char *s, unsigned int size,
-                               std::stringstream &stream);
-#endif
-
-    static bool stripWhiteSpace(char** s);
-
-    bool processDXFGroup(DL_CreationInterface* creationInterface,
-                         int groupCode, const char* groupValue);
-    void addSetting(DL_CreationInterface* creationInterface);
-    void addLayer(DL_CreationInterface* creationInterface);
-    void addBlock(DL_CreationInterface* creationInterface);
-    void endBlock(DL_CreationInterface* creationInterface);
-
-    void addPoint(DL_CreationInterface* creationInterface);
-    void addLine(DL_CreationInterface* creationInterface);
-	
-    void addPolyline(DL_CreationInterface* creationInterface);
-    void addVertex(DL_CreationInterface* creationInterface);
-	
-    void addSpline(DL_CreationInterface* creationInterface);
-    //void addKnot(DL_CreationInterface* creationInterface);
-    //void addControlPoint(DL_CreationInterface* creationInterface);
-	
-    void addArc(DL_CreationInterface* creationInterface);
-    void addCircle(DL_CreationInterface* creationInterface);
-    void addEllipse(DL_CreationInterface* creationInterface);
-    void addInsert(DL_CreationInterface* creationInterface);
-    
-    void addTrace(DL_CreationInterface* creationInterface);
-    void add3dFace(DL_CreationInterface* creationInterface);
-    void addSolid(DL_CreationInterface* creationInterface);
-
-    void addMText(DL_CreationInterface* creationInterface);
-	bool handleMTextData(DL_CreationInterface* creationInterface);
-	bool handleLWPolylineData(DL_CreationInterface* creationInterface);
-	bool handleSplineData(DL_CreationInterface* creationInterface);
-	bool handleLeaderData(DL_CreationInterface* creationInterface);
-	bool handleHatchData(DL_CreationInterface* creationInterface);
-	
-    void addText(DL_CreationInterface* creationInterface);
-    void addAttrib(DL_CreationInterface* creationInterface);
-    DL_DimensionData getDimData();
-    void addDimLinear(DL_CreationInterface* creationInterface);
-    void addDimAligned(DL_CreationInterface* creationInterface);
-    void addDimRadial(DL_CreationInterface* creationInterface);
-    void addDimDiametric(DL_CreationInterface* creationInterface);
-    void addDimAngular(DL_CreationInterface* creationInterface);
-    void addDimAngular3P(DL_CreationInterface* creationInterface);
-    void addDimOrdinate(DL_CreationInterface* creationInterface);
-    void addLeader(DL_CreationInterface* creationInterface);
-    void addHatch(DL_CreationInterface* creationInterface);
-    void addImage(DL_CreationInterface* creationInterface);
-    void addImageDef(DL_CreationInterface* creationInterface);
-    
-    void addComment(DL_CreationInterface* creationInterface, const char* comment);
-
-	void endEntity(DL_CreationInterface* creationInterface);
-	
-    void endSequence(DL_CreationInterface* creationInterface);
-	
-	int  stringToInt(const char* s, bool* ok=NULL);	
-
-    DL_WriterA* out(const char* file,
-                    DL_Codes::version version=VER_2000);
-
-    void writeHeader(DL_WriterA& dw);
-
-    void writePoint(DL_WriterA& dw,
-                    const DL_PointData& data,
-                    const DL_Attributes& attrib);
-    void writeLine(DL_WriterA& dw,
-                   const DL_LineData& data,
-                   const DL_Attributes& attrib);
-    void writePolyline(DL_WriterA& dw,
-                       const DL_PolylineData& data,
-                       const DL_Attributes& attrib);
-    void writeVertex(DL_WriterA& dw,
-                     const DL_VertexData& data);
-    void writePolylineEnd(DL_WriterA& dw);
-    void writeSpline(DL_WriterA& dw,
-                       const DL_SplineData& data,
-                       const DL_Attributes& attrib);
-    void writeControlPoint(DL_WriterA& dw,
-                     const DL_ControlPointData& data);
-    void writeKnot(DL_WriterA& dw,
-                     const DL_KnotData& data);
-    void writeCircle(DL_WriterA& dw,
-                     const DL_CircleData& data,
-                     const DL_Attributes& attrib);
-    void writeArc(DL_WriterA& dw,
-                  const DL_ArcData& data,
-                  const DL_Attributes& attrib);
-    void writeEllipse(DL_WriterA& dw,
-                      const DL_EllipseData& data,
-                      const DL_Attributes& attrib);
-    void writeSolid(DL_WriterA& dw,
-                   const DL_SolidData& data,
-                   const DL_Attributes& attrib);
-    void write3dFace(DL_WriterA& dw,
-                   const DL_3dFaceData& data,
-                   const DL_Attributes& attrib);
-    void writeInsert(DL_WriterA& dw,
-                     const DL_InsertData& data,
-                     const DL_Attributes& attrib);
-    void writeMText(DL_WriterA& dw,
-                    const DL_MTextData& data,
-                    const DL_Attributes& attrib);
-    void writeText(DL_WriterA& dw,
-                    const DL_TextData& data,
-                    const DL_Attributes& attrib);
-    void writeDimAligned(DL_WriterA& dw,
-                         const DL_DimensionData& data,
-                         const DL_DimAlignedData& edata,
-                         const DL_Attributes& attrib);
-    void writeDimLinear(DL_WriterA& dw,
-                        const DL_DimensionData& data,
-                        const DL_DimLinearData& edata,
-                        const DL_Attributes& attrib);
-    void writeDimRadial(DL_WriterA& dw,
-                        const DL_DimensionData& data,
-                        const DL_DimRadialData& edata,
-                        const DL_Attributes& attrib);
-    void writeDimDiametric(DL_WriterA& dw,
-                           const DL_DimensionData& data,
-                           const DL_DimDiametricData& edata,
-                           const DL_Attributes& attrib);
-    void writeDimAngular(DL_WriterA& dw,
-                         const DL_DimensionData& data,
-                         const DL_DimAngularData& edata,
-                         const DL_Attributes& attrib);
-    void writeDimAngular3P(DL_WriterA& dw,
-                           const DL_DimensionData& data,
-                           const DL_DimAngular3PData& edata,
-                           const DL_Attributes& attrib);
-    void writeDimOrdinate(DL_WriterA& dw,
-                         const DL_DimensionData& data,
-                         const DL_DimOrdinateData& edata,
-                         const DL_Attributes& attrib);
-    void writeLeader(DL_WriterA& dw,
-                     const DL_LeaderData& data,
-                     const DL_Attributes& attrib);
-    void writeLeaderVertex(DL_WriterA& dw,
-                           const DL_LeaderVertexData& data);
-    void writeHatch1(DL_WriterA& dw,
-                     const DL_HatchData& data,
-                     const DL_Attributes& attrib);
-    void writeHatch2(DL_WriterA& dw,
-                     const DL_HatchData& data,
-                     const DL_Attributes& attrib);
-    void writeHatchLoop1(DL_WriterA& dw,
-                         const DL_HatchLoopData& data);
-    void writeHatchLoop2(DL_WriterA& dw,
-                         const DL_HatchLoopData& data);
-    void writeHatchEdge(DL_WriterA& dw,
-                        const DL_HatchEdgeData& data);
-
-    int writeImage(DL_WriterA& dw,
-                   const DL_ImageData& data,
-                   const DL_Attributes& attrib);
-
-    void writeImageDef(DL_WriterA& dw, int handle,
-                       const DL_ImageData& data);
-
-    void writeLayer(DL_WriterA& dw,
-                    const DL_LayerData& data,
-                    const DL_Attributes& attrib);
-
-    void writeLineType(DL_WriterA& dw,
-                       const DL_LineTypeData& data);
-
-    void writeAppid(DL_WriterA& dw, const string& name);
-
-    void writeBlock(DL_WriterA& dw,
-                    const DL_BlockData& data);
-    void writeEndBlock(DL_WriterA& dw, const string& name);
-
-    void writeVPort(DL_WriterA& dw);
-    void writeStyle(DL_WriterA& dw);
-    void writeView(DL_WriterA& dw);
-    void writeUcs(DL_WriterA& dw);
-    void writeDimStyle(DL_WriterA& dw, 
-	                   double dimasz, double dimexe, double dimexo,
-					   double dimgap, double dimtxt);
-    void writeBlockRecord(DL_WriterA& dw);
-    void writeBlockRecord(DL_WriterA& dw, const string& name);
-    void writeObjects(DL_WriterA& dw);
-    void writeObjectsEnd(DL_WriterA& dw);
-    
-    void writeComment(DL_WriterA& dw, const string& comment);
-
-    /**
-     * Converts the given string into a double or returns the given 
-     * default valud (def) if value is NULL or empty.
-     */
-    static double toReal(const char* value, double def=0.0) {
-       if (value!=NULL && value[0] != '\0') {
-            double ret;
-            if (strchr(value, ',') != NULL) {
-               char* tmp = new char[strlen(value)+1];
-               strcpy(tmp, value);
-               DL_WriterA::strReplace(tmp, ',', '.');
-               ret = atof(tmp);
-      		   delete[] tmp;
-            }
-            else {
-               ret = atof(value);
-            }
-			return ret;
-        } else {
-            return def;
-        }
-    }
-    /**
-     * Converts the given string into an int or returns the given 
-     * default valud (def) if value is NULL or empty.
-     */
-    static int toInt(const char* value, int def=0) {
-        if (value!=NULL && value[0] != '\0') {
-            return atoi(value);
-        } else {
-            return def;
-        }
-    }
-    /**
-     * Converts the given string into a string or returns the given 
-     * default valud (def) if value is NULL or empty.
-     */
-    static const char* toString(const char* value, const char* def="") {
-        if (value!=NULL && value[0] != '\0') {
-            return value;
-        } else {
-            return def;
-        }
-    }
-
-	static bool checkVariable(const char* var, DL_Codes::version version);
-
-	DL_Codes::version getVersion() {
-		return version;
-	}
-
-	int getLibVersion(const char* str);
-
-	static void test();
-
-private:
-    DL_Codes::version version;
-    unsigned long styleHandleStd;
-
-	string polylineLayer;
-    double* vertices;
-    int maxVertices;
-    int vertexIndex;
-	
-    double* knots;
-    int maxKnots;
-    int knotIndex;
-	
-    double* controlPoints;
-    int maxControlPoints;
-    int controlPointIndex;
-
-    double* leaderVertices;
-    int maxLeaderVertices;
-    int leaderVertexIndex;
-
-    // array of hatch loops
-    DL_HatchLoopData* hatchLoops;
-    int maxHatchLoops;
-    int hatchLoopIndex;
-    // array in format [loop#][edge#]
-    DL_HatchEdgeData** hatchEdges;
-    int* maxHatchEdges;
-    int* hatchEdgeIndex;
-    bool dropEdges;
-
-    // Bulge for the next vertex.
-    double bulge;
-
-    // Only the useful part of the group code
-    char groupCodeTmp[DL_DXF_MAXLINE+1];
-    // ...same as integer
-    unsigned int groupCode;
-    // Only the useful part of the group value
-    char groupValue[DL_DXF_MAXLINE+1];
-    // Current entity type
-    int currentEntity;
-    // Value of the current setting
-    char settingValue[DL_DXF_MAXLINE+1];
-    // Key of the current setting (e.g. "$ACADVER")
-    char settingKey[DL_DXF_MAXLINE+1];
-    // Stores the group codes
-    char values[DL_DXF_MAXGROUPCODE][DL_DXF_MAXLINE+1];
-    // First call of this method. We initialize all group values in
-    //  the first call.
-    bool firstCall;
-    // Attributes of the current entity (layer, color, width, line type)
-    DL_Attributes attrib;
-	// library version. hex: 0x20003001 = 2.0.3.1
-	int libVersion;
-};
-
-#endif
-
-// EOF
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_entities.h b/src/modules/io/io_shapes_dxf/dxflib/dl_entities.h
deleted file mode 100755
index 1ecabcb..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_entities.h
+++ /dev/null
@@ -1,1454 +0,0 @@
-/**********************************************************
- * Version $Id: dl_entities.h 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_entities.h 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef DL_ENTITIES_H
-#define DL_ENTITIES_H
-
-
-#include <string>
-using std::string;
-
-/**
- * Layer Data.
- *
- * @author Andrew Mustun
- */
-struct DL_LayerData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_LayerData(const string& lName,
-                 int lFlags) {
-        name = lName;
-        flags = lFlags;
-    }
-
-    /** Layer name. */
-    string name;
-    /** Layer flags. (1 = frozen, 2 = frozen by default, 4 = locked) */
-    int flags;
-};
-
-
-
-/**
- * Block Data.
- *
- * @author Andrew Mustun
- */
-struct DL_BlockData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_BlockData(const string& bName,
-                 int bFlags,
-                 double bbpx, double bbpy, double bbpz) {
-        name = bName;
-        flags = bFlags;
-        bpx = bbpx;
-        bpy = bbpy;
-        bpz = bbpz;
-    }
-
-    /** Block name. */
-    string name;
-    /** Block flags. (not used currently) */
-    int flags;
-    /** X Coordinate of base point. */
-    double bpx;
-    /** Y Coordinate of base point. */
-    double bpy;
-    /** Z Coordinate of base point. */
-    double bpz;
-};
-
-
-
-/**
- * Line Type Data.
- *
- * @author Andrew Mustun
- */
-struct DL_LineTypeData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_LineTypeData(const string& lName,
-                    int lFlags) {
-        name = lName;
-        flags = lFlags;
-    }
-
-    /** Line type name. */
-    string name;
-    /** Line type flags. */
-    int flags;
-};
-
-
-
-/**
- * Point Data.
- *
- * @author Andrew Mustun
- */
-struct DL_PointData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_PointData(double px=0.0, double py=0.0, double pz=0.0) {
-        x = px;
-        y = py;
-        z = pz;
-    }
-
-    /*! X Coordinate of the point. */
-    double x;
-    /*! Y Coordinate of the point. */
-    double y;
-    /*! Z Coordinate of the point. */
-    double z;
-};
-
-
-
-/**
- * Line Data.
- *
- * @author Andrew Mustun
- */
-struct DL_LineData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_LineData(double lx1, double ly1, double lz1,
-                double lx2, double ly2, double lz2) {
-        x1 = lx1;
-        y1 = ly1;
-        z1 = lz1;
-
-        x2 = lx2;
-        y2 = ly2;
-        z2 = lz2;
-    }
-
-    /*! X Start coordinate of the point. */
-    double x1;
-    /*! Y Start coordinate of the point. */
-    double y1;
-    /*! Z Start coordinate of the point. */
-    double z1;
-
-    /*! X End coordinate of the point. */
-    double x2;
-    /*! Y End coordinate of the point. */
-    double y2;
-    /*! Z End coordinate of the point. */
-    double z2;
-};
-
-
-
-/**
- * Arc Data.
- *
- * @author Andrew Mustun
- */
-struct DL_ArcData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_ArcData(double acx, double acy, double acz,
-               double aRadius,
-               double aAngle1, double aAngle2) {
-
-        cx = acx;
-        cy = acy;
-        cz = acz;
-        radius = aRadius;
-        angle1 = aAngle1;
-        angle2 = aAngle2;
-    }
-
-    /*! X Coordinate of center point. */
-    double cx;
-    /*! Y Coordinate of center point. */
-    double cy;
-    /*! Z Coordinate of center point. */
-    double cz;
-
-    /*! Radius of arc. */
-    double radius;
-    /*! Startangle of arc in degrees. */
-    double angle1;
-    /*! Endangle of arc in degrees. */
-    double angle2;
-};
-
-
-
-/**
- * Circle Data.
- *
- * @author Andrew Mustun
- */
-struct DL_CircleData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_CircleData(double acx, double acy, double acz,
-                  double aRadius) {
-
-        cx = acx;
-        cy = acy;
-        cz = acz;
-        radius = aRadius;
-    }
-
-    /*! X Coordinate of center point. */
-    double cx;
-    /*! Y Coordinate of center point. */
-    double cy;
-    /*! Z Coordinate of center point. */
-    double cz;
-
-    /*! Radius of arc. */
-    double radius;
-};
-
-
-
-/**
- * Polyline Data.
- *
- * @author Andrew Mustun
- */
-struct DL_PolylineData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_PolylineData(int pNumber, int pMVerteces, int pNVerteces, int pFlags) {
-        number = pNumber;
-        m = pMVerteces;
-        n = pNVerteces;
-        flags = pFlags;
-    }
-
-    /*! Number of vertices in this polyline. */
-    unsigned int number;
-
-    /*! Number of vertices in m direction if polyline is a polygon mesh. */
-    unsigned int m;
-
-    /*! Number of vertices in n direction if polyline is a polygon mesh. */
-    unsigned int n;
-
-    /*! Flags */
-    int flags;
-};
-
-
-
-/**
- * Vertex Data.
- *
- * @author Andrew Mustun
- */
-struct DL_VertexData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_VertexData(double px=0.0, double py=0.0, double pz=0.0,
-                  double pBulge=0.0) {
-        x = px;
-        y = py;
-        z = pz;
-        bulge = pBulge;
-    }
-
-    /*! X Coordinate of the vertex. */
-    double x;
-    /*! Y Coordinate of the vertex. */
-    double y;
-    /*! Z Coordinate of the vertex. */
-    double z;
-    /*! Bulge of vertex.
-     * (The tangent of 1/4 of the arc angle or 0 for lines) */
-    double bulge;
-};
-
-
-/**
- * Trace Data / solid data / 3d face data.
- *
- * @author Andrew Mustun
- */
-struct DL_TraceData {
-    DL_TraceData() {
-        thickness = 0.0;
-        for (int i=0; i<4; i++) {
-            x[i] = 0.0;
-            y[i] = 0.0;
-            z[i] = 0.0;
-        }
-    }
-    
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_TraceData(double sx1, double sy1, double sz1,
-                double sx2, double sy2, double sz2,
-                double sx3, double sy3, double sz3,
-                double sx4, double sy4, double sz4,
-                double sthickness=0.0) {
-
-        thickness = sthickness;
-
-        x[0] = sx1;
-        y[0] = sy1;
-        z[0] = sz1;
-
-        x[1] = sx2;
-        y[1] = sy2;
-        z[1] = sz2;
-        
-        x[2] = sx3;
-        y[2] = sy3;
-        z[2] = sz3;
-        
-        x[3] = sx4;
-        y[3] = sy4;
-        z[3] = sz4;
-    }
-
-    /*! Thickness */
-    double thickness;
-    
-    /*! Points */
-    double x[4];
-    double y[4];
-    double z[4];
-};
-
-
-
-
-
-/**
- * Solid Data.
- *
- * @author AHM
- */
-typedef DL_TraceData DL_SolidData;
-
-
-/**
- * 3dface Data.
- */
-typedef DL_TraceData DL_3dFaceData;
-
-
-/**
- * Spline Data.
- *
- * @author Andrew Mustun
- */
-struct DL_SplineData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_SplineData(int pDegree, int pNKnots, int pNControl, int pFlags) {
-		degree = pDegree;
-		nKnots = pNKnots;
-		nControl = pNControl;
-        flags = pFlags;
-    }
-
-    /*! Degree of the spline curve. */
-    unsigned int degree;
-
-    /*! Number of knots. */
-    unsigned int nKnots;
-
-    /*! Number of control points. */
-    unsigned int nControl;
-
-    /*! Flags */
-    int flags;
-};
-
-
-
-/**
- * Spline knot data.
- *
- * @author Andrew Mustun
- */
-struct DL_KnotData {
-    DL_KnotData() {}
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_KnotData(double pk) {
-        k = pk;
-    }
-
-    /*! Knot value. */
-    double k;
-};
-
-
-
-/**
- * Spline control point data.
- *
- * @author Andrew Mustun
- */
-struct DL_ControlPointData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_ControlPointData(double px, double py, double pz) {
-        x = px;
-        y = py;
-        z = pz;
-    }
-
-    /*! X coordinate of the control point. */
-    double x;
-    /*! Y coordinate of the control point. */
-    double y;
-    /*! Z coordinate of the control point. */
-    double z;
-};
-
-
-/**
- * Ellipse Data.
- *
- * @author Andrew Mustun
- */
-struct DL_EllipseData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_EllipseData(double ecx, double ecy, double ecz,
-                   double emx, double emy, double emz,
-                   double eRatio,
-                   double eAngle1, double eAngle2) {
-
-        cx = ecx;
-        cy = ecy;
-        cz = ecz;
-        mx = emx;
-        my = emy;
-        mz = emz;
-        ratio = eRatio;
-        angle1 = eAngle1;
-        angle2 = eAngle2;
-    }
-
-    /*! X Coordinate of center point. */
-    double cx;
-    /*! Y Coordinate of center point. */
-    double cy;
-    /*! Z Coordinate of center point. */
-    double cz;
-
-    /*! X coordinate of the endpoint of the major axis. */
-    double mx;
-    /*! Y coordinate of the endpoint of the major axis. */
-    double my;
-    /*! Z coordinate of the endpoint of the major axis. */
-    double mz;
-
-    /*! Ratio of minor axis to major axis.. */
-    double ratio;
-    /*! Startangle of ellipse in rad. */
-    double angle1;
-    /*! Endangle of ellipse in rad. */
-    double angle2;
-};
-
-
-
-/**
- * Insert Data.
- *
- * @author Andrew Mustun
- */
-struct DL_InsertData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_InsertData(const string& iName,
-                  double iipx, double iipy, double iipz,
-                  double isx, double isy, double isz,
-                  double iAngle,
-                  int iCols, int iRows,
-                  double iColSp, double iRowSp) {
-        name = iName;
-        ipx = iipx;
-        ipy = iipy;
-        ipz = iipz;
-        sx = isx;
-        sy = isy;
-        sz = isz;
-        angle = iAngle;
-        cols = iCols;
-        rows = iRows;
-        colSp = iColSp;
-        rowSp = iRowSp;
-    }
-
-    /*! Name of the referred block. */
-    string name;
-    /*! X Coordinate of insertion point. */
-    double ipx;
-    /*! Y Coordinate of insertion point. */
-    double ipy;
-    /*! Z Coordinate of insertion point. */
-    double ipz;
-    /*! X Scale factor. */
-    double sx;
-    /*! Y Scale factor. */
-    double sy;
-    /*! Z Scale factor. */
-    double sz;
-    /*! Rotation angle in rad. */
-    double angle;
-    /*! Number of colums if we insert an array of the block or 1. */
-    int cols;
-    /*! Number of rows if we insert an array of the block or 1. */
-    int rows;
-    /*! Values for the spacing between cols. */
-    double colSp;
-    /*! Values for the spacing between rows. */
-    double rowSp;
-};
-
-
-
-/**
- * MText Data.
- *
- * @author Andrew Mustun
- */
-struct DL_MTextData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_MTextData(double tipx, double tipy, double tipz,
-                 double tHeight, double tWidth,
-                 int tAttachmentPoint,
-                 int tDrawingDirection,
-                 int tLineSpacingStyle,
-                 double tLineSpacingFactor,
-                 const string& tText,
-                 const string& tStyle,
-                 double tAngle) {
-        ipx = tipx;
-        ipy = tipy;
-        ipz = tipz;
-
-        height = tHeight;
-        width = tWidth;
-        attachmentPoint = tAttachmentPoint;
-        drawingDirection = tDrawingDirection;
-        lineSpacingStyle = tLineSpacingStyle;
-        lineSpacingFactor = tLineSpacingFactor;
-        text = tText;
-        style = tStyle;
-        angle = tAngle;
-    }
-
-    /*! X Coordinate of insertion point. */
-    double ipx;
-    /*! Y Coordinate of insertion point. */
-    double ipy;
-    /*! Z Coordinate of insertion point. */
-    double ipz;
-    /*! Text height */
-    double height;
-    /*! Width of the text box. */
-    double width;
-    /**
-     * Attachment point.
-     *
-     * 1 = Top left, 2 = Top center, 3 = Top right,
-     * 4 = Middle left, 5 = Middle center, 6 = Middle right,
-     * 7 = Bottom left, 8 = Bottom center, 9 = Bottom right
-     */
-    int attachmentPoint;
-    /**
-     * Drawing direction.
-     *
-     * 1 = left to right, 3 = top to bottom, 5 = by style
-     */
-    int drawingDirection;
-    /**
-     * Line spacing style.
-     *
-     * 1 = at least, 2 = exact
-     */
-    int lineSpacingStyle;
-    /**
-     * Line spacing factor. 0.25 .. 4.0  
-     */
-    double lineSpacingFactor;
-    /*! Text string. */
-    string text;
-    /*! Style string. */
-    string style;
-    /*! Rotation angle. */
-    double angle;
-};
-
-
-
-/**
- * Text Data.
- *
- * @author Andrew Mustun
- */
-struct DL_TextData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_TextData(double tipx, double tipy, double tipz,
-                double tapx, double tapy, double tapz,
-                double tHeight, double tXScaleFactor,
-                int tTextGenerationFlags,
-                int tHJustification,
-                int tVJustification,
-                const string& tText,
-                const string& tStyle,
-                double tAngle) {
-        ipx = tipx;
-        ipy = tipy;
-        ipz = tipz;
-
-        apx = tapx;
-        apy = tapy;
-        apz = tapz;
-
-        height = tHeight;
-        xScaleFactor = tXScaleFactor;
-        textGenerationFlags = tTextGenerationFlags;
-        hJustification = tHJustification;
-        vJustification = tVJustification;
-        text = tText;
-        style = tStyle;
-        angle = tAngle;
-    }
-
-    /*! X Coordinate of insertion point. */
-    double ipx;
-    /*! Y Coordinate of insertion point. */
-    double ipy;
-    /*! Z Coordinate of insertion point. */
-    double ipz;
-
-    /*! X Coordinate of alignment point. */
-    double apx;
-    /*! Y Coordinate of alignment point. */
-    double apy;
-    /*! Z Coordinate of alignment point. */
-    double apz;
-
-    /*! Text height */
-    double height;
-    /*! Relative X scale factor. */
-    double xScaleFactor;
-    /*! 0 = default, 2 = Backwards, 4 = Upside down */
-    int textGenerationFlags;
-    /**
-     * Horizontal justification.
-     * 
-     * 0 = Left (default), 1 = Center, 2 = Right,
-     * 3 = Aligned, 4 = Middle, 5 = Fit
-     * For 3, 4, 5 the vertical alignment has to be 0.
-     */
-    int hJustification;
-    /**
-     * Vertical justification. 
-     *
-     * 0 = Baseline (default), 1 = Bottom, 2 = Middle, 3= Top
-     */
-    int vJustification;
-    /*! Text string. */
-    string text;
-    /*! Style (font). */
-    string style;
-    /*! Rotation angle of dimension text away from default orientation. */
-    double angle;
-};
-
-
-
-/**
- * Generic Dimension Data.
- *
- * @author Andrew Mustun
- */
-struct DL_DimensionData {
-    /**
-    * Constructor.
-    * Parameters: see member variables.
-    */
-    DL_DimensionData(double ddpx, double ddpy, double ddpz,
-                     double dmpx, double dmpy, double dmpz,
-                     int dType,
-                     int dAttachmentPoint,
-                     int dLineSpacingStyle,
-                     double dLineSpacingFactor,
-                     const string& dText,
-                     const string& dStyle,
-                     double dAngle) {
-
-        dpx = ddpx;
-        dpy = ddpy;
-        dpz = ddpz;
-
-        mpx = dmpx;
-        mpy = dmpy;
-        mpz = dmpz;
-
-        type = dType;
-
-        attachmentPoint = dAttachmentPoint;
-        lineSpacingStyle = dLineSpacingStyle;
-        lineSpacingFactor = dLineSpacingFactor;
-        text = dText;
-        style = dStyle;
-        angle = dAngle;
-    }
-
-    /*! X Coordinate of definition point. */
-    double dpx;
-    /*! Y Coordinate of definition point. */
-    double dpy;
-    /*! Z Coordinate of definition point. */
-    double dpz;
-    /*! X Coordinate of middle point of the text. */
-    double mpx;
-    /*! Y Coordinate of middle point of the text. */
-    double mpy;
-    /*! Z Coordinate of middle point of the text. */
-    double mpz;
-    /**
-     * Dimension type.
-     *
-     * 0   Rotated, horizontal, or vertical            
-     * 1   Aligned                                     
-     * 2   Angular                                     
-     * 3   Diametric                                    
-     * 4   Radius                                      
-     * 5   Angular 3-point                             
-     * 6   Ordinate                                    
-     * 64  Ordinate type. This is a bit value (bit 7)  
-     *     used only with integer value 6. If set,     
-     *     ordinate is X-type; if not set, ordinate is 
-     *     Y-type                                      
-     * 128 This is a bit value (bit 8) added to the    
-     *     other group 70 values if the dimension text 
-     *     has been positioned at a user-defined       
-     *    location rather than at the default location
-     */
-    int type;
-    /**
-     * Attachment point.
-     *
-     * 1 = Top left, 2 = Top center, 3 = Top right,
-     * 4 = Middle left, 5 = Middle center, 6 = Middle right,
-     * 7 = Bottom left, 8 = Bottom center, 9 = Bottom right,
-     */
-    int attachmentPoint;
-    /**
-     * Line spacing style.
-     *
-     * 1 = at least, 2 = exact
-     */
-    int lineSpacingStyle;
-    /**
-     * Line spacing factor. 0.25 .. 4.0  
-     */
-    double lineSpacingFactor;
-    /**
-     * Text string. 
-     *
-     * Text string entered explicitly by user or null
-     * or "<>" for the actual measurement or " " (one blank space).
-     * for supressing the text.
-     */
-    string text;
-    /*! Dimension style (font name). */
-    string style;
-    /**
-    * Rotation angle of dimension text away from
-     * default orientation.
-    */
-    double angle;
-};
-
-
-
-/**
- * Aligned Dimension Data.
- *
- * @author Andrew Mustun
- */
-struct DL_DimAlignedData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_DimAlignedData(double depx1, double depy1, double depz1,
-                      double depx2, double depy2, double depz2) {
-
-        epx1 = depx1;
-        epy1 = depy1;
-        epz1 = depz1;
-
-        epx2 = depx2;
-        epy2 = depy2;
-        epz2 = depz2;
-    }
-
-    /*! X Coordinate of Extension point 1. */
-    double epx1;
-    /*! Y Coordinate of Extension point 1. */
-    double epy1;
-    /*! Z Coordinate of Extension point 1. */
-    double epz1;
-
-    /*! X Coordinate of Extension point 2. */
-    double epx2;
-    /*! Y Coordinate of Extension point 2. */
-    double epy2;
-    /*! Z Coordinate of Extension point 2. */
-    double epz2;
-};
-
-
-
-/**
- * Linear Dimension Data.
- *
- * @author Andrew Mustun
- */
-struct DL_DimLinearData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_DimLinearData(double ddpx1, double ddpy1, double ddpz1,
-                     double ddpx2, double ddpy2, double ddpz2,
-                     double dAngle, double dOblique) {
-
-        dpx1 = ddpx1;
-        dpy1 = ddpy1;
-        dpz1 = ddpz1;
-
-        dpx2 = ddpx2;
-        dpy2 = ddpy2;
-        dpz2 = ddpz2;
-
-        angle = dAngle;
-        oblique = dOblique;
-    }
-
-    /*! X Coordinate of Extension point 1. */
-    double dpx1;
-    /*! Y Coordinate of Extension point 1. */
-    double dpy1;
-    /*! Z Coordinate of Extension point 1. */
-    double dpz1;
-
-    /*! X Coordinate of Extension point 2. */
-    double dpx2;
-    /*! Y Coordinate of Extension point 2. */
-    double dpy2;
-    /*! Z Coordinate of Extension point 2. */
-    double dpz2;
-
-    /*! Rotation angle (angle of dimension line) in degrees. */
-    double angle;
-    /*! Oblique angle in degrees. */
-    double oblique;
-};
-
-
-
-/**
- * Radial Dimension Data.
- *
- * @author Andrew Mustun
- */
-struct DL_DimRadialData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_DimRadialData(double ddpx, double ddpy, double ddpz, double dleader) {
-        dpx = ddpx;
-        dpy = ddpy;
-        dpz = ddpz;
-
-        leader = dleader;
-    }
-
-    /*! X Coordinate of definition point. */
-    double dpx;
-    /*! Y Coordinate of definition point. */
-    double dpy;
-    /*! Z Coordinate of definition point. */
-    double dpz;
-
-    /*! Leader length */
-    double leader;
-};
-
-
-
-/**
- * Diametric Dimension Data.
- *
- * @author Andrew Mustun
- */
-struct DL_DimDiametricData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_DimDiametricData(double ddpx, double ddpy, double ddpz, double dleader) {
-        dpx = ddpx;
-        dpy = ddpy;
-        dpz = ddpz;
-
-        leader = dleader;
-    }
-
-    /*! X Coordinate of definition point. */
-    double dpx;
-    /*! Y Coordinate of definition point. */
-    double dpy;
-    /*! Z Coordinate of definition point. */
-    double dpz;
-
-    /*! Leader length */
-    double leader;
-};
-
-
-
-/**
- * Angular Dimension Data.
- *
- * @author Andrew Mustun
- */
-struct DL_DimAngularData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_DimAngularData(double ddpx1, double ddpy1, double ddpz1,
-                      double ddpx2, double ddpy2, double ddpz2,
-                      double ddpx3, double ddpy3, double ddpz3,
-                      double ddpx4, double ddpy4, double ddpz4) {
-
-        dpx1 = ddpx1;
-        dpy1 = ddpy1;
-        dpz1 = ddpz1;
-
-        dpx2 = ddpx2;
-        dpy2 = ddpy2;
-        dpz2 = ddpz2;
-
-        dpx3 = ddpx3;
-        dpy3 = ddpy3;
-        dpz3 = ddpz3;
-
-        dpx4 = ddpx4;
-        dpy4 = ddpy4;
-        dpz4 = ddpz4;
-    }
-
-    /*! X Coordinate of definition point 1. */
-    double dpx1;
-    /*! Y Coordinate of definition point 1. */
-    double dpy1;
-    /*! Z Coordinate of definition point 1. */
-    double dpz1;
-
-    /*! X Coordinate of definition point 2. */
-    double dpx2;
-    /*! Y Coordinate of definition point 2. */
-    double dpy2;
-    /*! Z Coordinate of definition point 2. */
-    double dpz2;
-
-    /*! X Coordinate of definition point 3. */
-    double dpx3;
-    /*! Y Coordinate of definition point 3. */
-    double dpy3;
-    /*! Z Coordinate of definition point 3. */
-    double dpz3;
-
-    /*! X Coordinate of definition point 4. */
-    double dpx4;
-    /*! Y Coordinate of definition point 4. */
-    double dpy4;
-    /*! Z Coordinate of definition point 4. */
-    double dpz4;
-};
-
-
-/**
- * Angular Dimension Data (3 points version).
- *
- * @author Andrew Mustun
- */
-struct DL_DimAngular3PData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_DimAngular3PData(double ddpx1, double ddpy1, double ddpz1,
-                        double ddpx2, double ddpy2, double ddpz2,
-                        double ddpx3, double ddpy3, double ddpz3) {
-
-        dpx1 = ddpx1;
-        dpy1 = ddpy1;
-        dpz1 = ddpz1;
-
-        dpx2 = ddpx2;
-        dpy2 = ddpy2;
-        dpz2 = ddpz2;
-
-        dpx3 = ddpx3;
-        dpy3 = ddpy3;
-        dpz3 = ddpz3;
-    }
-
-    /*! X Coordinate of definition point 1. */
-    double dpx1;
-    /*! Y Coordinate of definition point 1. */
-    double dpy1;
-    /*! Z Coordinate of definition point 1. */
-    double dpz1;
-
-    /*! X Coordinate of definition point 2. */
-    double dpx2;
-    /*! Y Coordinate of definition point 2. */
-    double dpy2;
-    /*! Z Coordinate of definition point 2. */
-    double dpz2;
-
-    /*! X Coordinate of definition point 3. */
-    double dpx3;
-    /*! Y Coordinate of definition point 3. */
-    double dpy3;
-    /*! Z Coordinate of definition point 3. */
-    double dpz3;
-};
-
-
-
-/**
- * Ordinate Dimension Data.
- *
- * @author Andrew Mustun
- */
-struct DL_DimOrdinateData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_DimOrdinateData(double ddpx1, double ddpy1, double ddpz1,
-                      double ddpx2, double ddpy2, double ddpz2,
-                      bool dxtype) {
-
-        dpx1 = ddpx1;
-        dpy1 = ddpy1;
-        dpz1 = ddpz1;
-
-        dpx2 = ddpx2;
-        dpy2 = ddpy2;
-        dpz2 = ddpz2;
-
-        xtype = dxtype;
-    }
-
-    /*! X Coordinate of definition point 1. */
-    double dpx1;
-    /*! Y Coordinate of definition point 1. */
-    double dpy1;
-    /*! Z Coordinate of definition point 1. */
-    double dpz1;
-
-    /*! X Coordinate of definition point 2. */
-    double dpx2;
-    /*! Y Coordinate of definition point 2. */
-    double dpy2;
-    /*! Z Coordinate of definition point 2. */
-    double dpz2;
-
-    /*! True if the dimension indicates the X-value, false for Y-value */
-    bool xtype;
-};
-
-
-
-/**
- * Leader (arrow).
- *
- * @author Andrew Mustun
- */
-struct DL_LeaderData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_LeaderData(int lArrowHeadFlag,
-                  int lLeaderPathType,
-                  int lLeaderCreationFlag,
-                  int lHooklineDirectionFlag,
-                  int lHooklineFlag,
-                  double lTextAnnotationHeight,
-                  double lTextAnnotationWidth,
-                  int lNumber) {
-
-        arrowHeadFlag = lArrowHeadFlag;
-        leaderPathType = lLeaderPathType;
-        leaderCreationFlag = lLeaderCreationFlag;
-        hooklineDirectionFlag = lHooklineDirectionFlag;
-        hooklineFlag = lHooklineFlag;
-        textAnnotationHeight = lTextAnnotationHeight;
-        textAnnotationWidth = lTextAnnotationWidth;
-        number = lNumber;
-    }
-
-    /*! Arrow head flag (71). */
-    int arrowHeadFlag;
-    /*! Leader path type (72). */
-    int leaderPathType;
-    /*! Leader creation flag (73). */
-    int leaderCreationFlag;
-    /*! Hookline direction flag (74). */
-    int hooklineDirectionFlag;
-    /*! Hookline flag (75) */
-    int hooklineFlag;
-    /*! Text annotation height (40). */
-    double textAnnotationHeight;
-    /*! Text annotation width (41) */
-    double textAnnotationWidth;
-    /*! Number of vertices in leader (76). */
-    int number;
-};
-
-
-
-/**
- * Leader Vertex Data.
- *
- * @author Andrew Mustun
- */
-struct DL_LeaderVertexData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_LeaderVertexData(double px=0.0, double py=0.0, double pz=0.0) {
-        x = px;
-        y = py;
-        z = pz;
-    }
-
-    /*! X Coordinate of the vertex. */
-    double x;
-    /*! Y Coordinate of the vertex. */
-    double y;
-    /*! Z Coordinate of the vertex. */
-    double z;
-};
-
-
-
-/**
- * Hatch data.
- */
-struct DL_HatchData {
-    /**
-     * Default constructor.
-     */
-    DL_HatchData() {}
-
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_HatchData(int hNumLoops,
-                 bool hSolid,
-                 double hScale,
-                 double hAngle,
-                 const string& hPattern) {
-        numLoops = hNumLoops;
-        solid = hSolid;
-        scale = hScale;
-        angle = hAngle;
-        pattern = hPattern;
-    }
-
-    /*! Number of boundary paths (loops). */
-    int numLoops;
-    /*! Solid fill flag (true=solid, false=pattern). */
-    bool solid;
-    /*! Pattern scale or spacing */
-    double scale;
-    /*! Pattern angle */
-    double angle;
-    /*! Pattern name. */
-    string pattern;
-};
-
-
-
-/**
- * Hatch boundary path (loop) data.
- */
-struct DL_HatchLoopData {
-    /**
-     * Default constructor.
-     */
-    DL_HatchLoopData() {}
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_HatchLoopData(int hNumEdges) {
-        numEdges = hNumEdges;
-    }
-
-    /*! Number of edges in this loop. */
-    int numEdges;
-};
-
-
-
-/**
- * Hatch edge data.
- */
-struct DL_HatchEdgeData {
-    /**
-     * Default constructor.
-     */
-    DL_HatchEdgeData() {
-        defined = false;
-    }
-
-    /**
-     * Constructor for a line edge.
-     * Parameters: see member variables.
-     */
-    DL_HatchEdgeData(double lx1, double ly1,
-                     double lx2, double ly2) {
-        x1 = lx1;
-        y1 = ly1;
-        x2 = lx2;
-        y2 = ly2;
-        type = 1;
-        defined = true;
-    }
-
-    /**
-     * Constructor for an arc edge.
-     * Parameters: see member variables.
-     */
-    DL_HatchEdgeData(double acx, double acy,
-                     double aRadius,
-                     double aAngle1, double aAngle2,
-                     bool aCcw) {
-        cx = acx;
-        cy = acy;
-        radius = aRadius;
-        angle1 = aAngle1;
-        angle2 = aAngle2;
-        ccw = aCcw;
-        type = 2;
-        defined = true;
-    }
-
-    /**
-     * Edge type. 1=line, 2=arc.
-     */
-    int type;
-
-    /**
-     * Set to true if this edge is fully defined.
-     */
-    bool defined;
-
-    /*! Start point (X). */
-    double x1;
-    /*! Start point (Y). */
-    double y1;
-    /*! End point (X). */
-    double x2;
-    /*! End point (Y). */
-    double y2;
-    /*! Center point of arc (X). */
-    double cx;
-    /*! Center point of arc (Y). */
-    double cy;
-    /*! Arc radius. */
-    double radius;
-    /*! Start angle. */
-    double angle1;
-    /*! End angle. */
-    double angle2;
-    /*! Counterclockwise flag. */
-    bool ccw;
-};
-
-
-
-/**
- * Image Data.
- *
- * @author Andrew Mustun
- */
-struct DL_ImageData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_ImageData(const string& iref,
-                  double iipx, double iipy, double iipz,
-				  double iux, double iuy, double iuz,
-				  double ivx, double ivy, double ivz,
-				  int iwidth, int iheight,
-				  int ibrightness, int icontrast, int ifade) {
-        ref = iref;
-        ipx = iipx;
-        ipy = iipy;
-        ipz = iipz;
-		ux = iux;
-		uy = iuy;
-		uz = iuz;
-		vx = ivx;
-		vy = ivy;
-		vz = ivz;
-		width = iwidth;
-		height = iheight;
-		brightness = ibrightness;
-		contrast = icontrast;
-		fade = ifade;
-    }
-
-    /*! Reference to the image file 
-	    (unique, used to refer to the image def object). */
-    string ref;
-    /*! X Coordinate of insertion point. */
-    double ipx;
-    /*! Y Coordinate of insertion point. */
-    double ipy;
-    /*! Z Coordinate of insertion point. */
-    double ipz;
-	/*! X Coordinate of u vector along bottom of image. */
-	double ux;
-	/*! Y Coordinate of u vector along bottom of image. */
-	double uy;
-	/*! Z Coordinate of u vector along bottom of image. */
-	double uz;
-	/*! X Coordinate of v vector along left side of image. */
-	double vx;
-	/*! Y Coordinate of v vector along left side of image. */
-	double vy;
-	/*! Z Coordinate of v vector along left side of image. */
-	double vz;
-	/*! Width of image in pixel. */
-	int width;
-	/*! Height of image in pixel. */
-	int height;
-	/*! Brightness (0..100, default = 50). */
-	int brightness;
-	/*! Contrast (0..100, default = 50). */
-	int contrast;
-	/*! Fade (0..100, default = 0). */
-	int fade;
-};
-
-
-
-/**
- * Image Definition Data.
- *
- * @author Andrew Mustun
- */
-struct DL_ImageDefData {
-    /**
-     * Constructor.
-     * Parameters: see member variables.
-     */
-    DL_ImageDefData(const string& iref,
-				 const string& ifile) {
-        ref = iref;
-		file = ifile;
-    }
-
-    /*! Reference to the image file 
-	    (unique, used to refer to the image def object). */
-    string ref;
-
-	/*! Image file */
-	string file;
-};
-
-#endif
-
-// EOF
-
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_exception.h b/src/modules/io/io_shapes_dxf/dxflib/dl_exception.h
deleted file mode 100755
index df68b4f..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_exception.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**********************************************************
- * Version $Id: dl_exception.h 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_exception.h 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-** Copyright (C) 2001 Robert J. Campbell Jr.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef DL_EXCEPTION_H
-#define DL_EXCEPTION_H
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-/**
- * Used for exception handling.
- */
-class DL_Exception {}
-;
-
-/**
- * Used for exception handling.
- */
-class DL_NullStrExc : public DL_Exception {}
-;
-
-/**
- * Used for exception handling.
- */
-class DL_GroupCodeExc : public DL_Exception {
-    DL_GroupCodeExc(int gc=0) : groupCode(gc) {}
-    int groupCode;
-};
-#endif
-
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_extrusion.h b/src/modules/io/io_shapes_dxf/dxflib/dl_extrusion.h
deleted file mode 100755
index 6046c3c..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_extrusion.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/**********************************************************
- * Version $Id: dl_extrusion.h 1503 2012-10-26 09:49:21Z oconrad $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_extrusion.h 1503 2012-10-26 09:49:21Z oconrad $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef DL_EXTRUSION_H
-#define DL_EXTRUSION_H
-
-#include <math.h>
-
-
-/**
- * Storing and passing around attributes. Attributes
- * are the layer name, color, width and line type.
- *
- * @author Andrew Mustun
- */
-class DL_Extrusion {
-
-public:
-
-    /**
-     * Default constructor.
-     */
-    DL_Extrusion() {
-		direction = new double[3];
-        setDirection(0.0, 0.0, 1.0);
-        setElevation(0.0);
-    }
-
-
-    /**
-     * Destructor.
-     */
-	~DL_Extrusion() {
-		delete [] direction ;
-    }
-
-
-    /**
-     * Constructor for DXF extrusion.
-     *
-     * @param direction Vector of axis along which the entity shall be extruded
-	 *                  this is also the Z axis of the Entity coordinate system
-     * @param elevation Distance of the entities XY plane from the origin of the
-	 *                  world coordinate system
-     */
-    DL_Extrusion(double dx, double dy, double dz, double elevation) {
-		direction = new double[3];
-		setDirection(dx, dy, dz);
-        setElevation(elevation);
-    }
-
-
-
-    /**
-     * Sets the direction vector. 
-     */
-    void setDirection(double dx, double dy, double dz) {
-		direction[0]=dx;
-        direction[1]=dy;
-        direction[2]=dz;
-    }
-
-
-
-    /**
-     * @return direction vector.
-     */
-    double* getDirection() const {
-        return direction;
-    }
-
-
-
-    /**
-     * @return direction vector.
-     */
-    void getDirection(double dir[]) const {
-        dir[0]=direction[0];
-        dir[1]=direction[1];
-        dir[2]=direction[2];
-    }
-
-
-
-    /**
-     * Sets the elevation.
-     */
-    void setElevation(double elevation) {
-        this->elevation = elevation;
-    }
-
-
-
-    /**
-     * @return Elevation.
-     */
-    double getElevation() const {
-        return elevation;
-    }
-
-
-
-    /**
-     * Copies extrusion (deep copies) from another extrusion object.
-     */
-    DL_Extrusion operator = (const DL_Extrusion& extru) {
-        setDirection(extru.direction[0], extru.direction[1], extru.direction[2]);
-        setElevation(extru.elevation);
-
-        return *this;
-    }
-
-
-
-private:
-	double *direction;
-	double elevation;
-};
-
-#endif
-
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_writer.h b/src/modules/io/io_shapes_dxf/dxflib/dl_writer.h
deleted file mode 100755
index e94ca95..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_writer.h
+++ /dev/null
@@ -1,621 +0,0 @@
-/**********************************************************
- * Version $Id: dl_writer.h 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_writer.h 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-** Copyright (C) 2001 Robert J. Campbell Jr.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef DL_WRITER_H
-#define DL_WRITER_H
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#if defined(__OS2__)||defined(__EMX__)
-#define strcasecmp(s,t) stricmp(s,t)
-#endif
-
-#if defined(WIN32)
-#define strcasecmp(s,t) _stricmp(s,t)
-#endif
-
-#include <iostream>
-
-#include "dl_attributes.h"
-#include "dl_codes.h"
-
-
-
-/**
- * Defines interface for writing low level DXF constructs to
- * a file. Implementation is defined in derived classes that write
- * to binary or ASCII files.
- * 
- * Implements functions that write higher level constructs in terms of
- * the low level ones.
- *
- * @todo Add error checking for string/entry length.
- */
-class DL_Writer {
-public:
-    /**
-     * @para version DXF version. Defaults to VER_2002.
-     */
-    DL_Writer(DL_Codes::version version) : m_handle(0x30) {
-        this->version = version;
-        modelSpaceHandle = 0;
-        paperSpaceHandle = 0;
-        paperSpace0Handle = 0;
-    }
-
-    virtual ~DL_Writer() {}
-    ;
-
-    /** Generic section for section 'name'.
-     *
-     * <pre>
-     *   0
-     *  SECTION
-     *   2
-     *  name
-     * </pre>
-     */
-    void section(const char* name) const {
-        dxfString(0, "SECTION");
-        dxfString(2, name);
-    }
-
-    /**
-     * Section HEADER
-     *
-     * <pre>
-     *   0
-     *  SECTION
-     *   2
-     *  HEADER
-     * </pre>
-     */
-    void sectionHeader() const {
-        section("HEADER");
-    }
-
-    /**
-     * Section TABLES
-     *
-     * <pre>
-     *   0
-     *  SECTION
-     *   2
-     *  TABLES
-     * </pre>
-     */
-    void sectionTables() const {
-        section("TABLES");
-    }
-
-    /**
-     * Section BLOCKS
-     *
-     * <pre>
-     *   0
-     *  SECTION
-     *   2
-     *  BLOCKS
-     * </pre>
-     */
-    void sectionBlocks() const {
-        section("BLOCKS");
-    }
-
-    /**
-     * Section ENTITIES
-     *
-     * <pre>
-     *   0
-     *  SECTION
-     *   2
-     *  ENTITIES
-     * </pre>
-     */
-    void sectionEntities() const {
-        section("ENTITIES");
-    }
-
-    /**
-     * Section CLASSES
-     *
-     * <pre>
-     *   0
-     *  SECTION
-     *   2
-     *  CLASSES
-     * </pre>
-     */
-    void sectionClasses() const {
-        section("CLASSES");
-    }
-
-    /**
-     * Section OBJECTS
-     *
-     * <pre>
-     *   0
-     *  SECTION
-     *   2
-     *  OBJECTS
-     * </pre>
-     */
-    void sectionObjects() const {
-        section("OBJECTS");
-    }
-
-    /**
-     * End of a section.
-     *
-     * <pre>
-     *   0
-     *  ENDSEC
-     * </pre>
-     */
-    void sectionEnd() const {
-        dxfString(0, "ENDSEC");
-    }
-
-    /**
-     * Generic table for table 'name' with 'num' entries:
-     *
-     * <pre>
-     *   0
-     *  TABLE
-     *   2
-     *  name
-     *  70
-     *   num
-     * </pre>
-     */
-    void table(const char* name, int num, int handle) const {
-        dxfString(0, "TABLE");
-        dxfString(2, name);
-        if (version>=VER_2000) {
-            dxfHex(5, handle);
-            dxfString(100, "AcDbSymbolTable");
-        }
-        dxfInt(70, num);
-    }
-
-    /** Table for layers.
-     *
-     * @param num Number of layers in total.
-     *
-     * <pre>
-     *   0
-     *  TABLE
-     *   2
-     *  LAYER
-     *   70
-     *      num
-     * </pre>
-     */
-    void tableLayers(int num) const {
-        table("LAYER", num, 2);
-    }
-
-    /** Table for line types.
-     *
-     * @param num Number of line types in total.
-     *
-     * <pre>
-     *   0
-     *  TABLE
-     *   2
-     *  LTYPE
-     *   70
-     *      num
-     * </pre>
-     */
-    void tableLineTypes(int num) const {
-        //lineTypeHandle = 5;
-        table("LTYPE", num, 5);
-    }
-
-    /** Table for application id.
-     *
-     * @param num Number of registered applications in total.
-     *
-     * <pre>
-     *   0
-     *  TABLE
-     *   2
-     *  APPID
-     *   70
-     *      num
-     * </pre>
-     */
-    void tableAppid(int num) const {
-        table("APPID", num, 9);
-    }
-
-    /**
-     * End of a table.
-     *
-     * <pre>
-     *   0
-     *  ENDTAB
-     * </pre>
-     */
-    void tableEnd() const {
-        dxfString(0, "ENDTAB");
-    }
-
-    /**
-     * End of the DXF file.
-     *
-     * <pre>
-     *   0
-     *  EOF
-     * </pre>
-     */
-    void dxfEOF() const {
-        dxfString(0, "EOF");
-    }
-
-    /**
-     * Comment.
-     *
-     * <pre>
-     *  999
-     *  text
-     * </pre>
-     */
-    void comment(const char* text) const {
-        dxfString(999, text);
-    }
-
-    /**
-     * Entity.
-     *
-     * <pre>
-     *   0
-     *  entTypeName
-     * </pre>
-	 *
-	 * @return Unique handle or 0.
-     */
-    void entity(const char* entTypeName) const {
-        dxfString(0, entTypeName);
-        if (version>=VER_2000) {
-            handle();
-        }
-    }
-
-    /**
-     * Attributes of an entity.
-     *
-     * <pre>
-     *   8
-     *  layer
-     *  62
-     *  color
-     *  39
-     *  width
-     *   6
-     *  linetype
-     * </pre>
-     */
-    void entityAttributes(const DL_Attributes& attrib) const {
-	
-		// layer name:
-        dxfString(8, attrib.getLayer());
-		
-		// R12 doesn't accept BYLAYER values. The value has to be missing
-		//   in that case.
-        if (version>=VER_2000 || 
-			attrib.getColor()!=256) {
-        	dxfInt(62, attrib.getColor());
-		}
-        if (version>=VER_2000) {
-            dxfInt(370, attrib.getWidth());
-        }
-        if (version>=VER_2000 || 
-			strcasecmp(attrib.getLineType().c_str(), "BYLAYER")) {
-	        dxfString(6, attrib.getLineType());
-		}
-    }
-
-    /**
-     * Subclass.
-     */
-    void subClass(const char* sub) const {
-        dxfString(100, sub);
-    }
-
-    /**
-     * Layer (must be in the TABLES section LAYER).
-     *
-     * <pre>
-     *   0
-     *  LAYER
-     * </pre>
-     */
-    void tableLayerEntry(unsigned long int h=0)  const {
-        dxfString(0, "LAYER");
-        if (version>=VER_2000) {
-            if (h==0) {
-                handle();
-            } else {
-                dxfHex(5, h);
-            }
-            dxfString(100, "AcDbSymbolTableRecord");
-            dxfString(100, "AcDbLayerTableRecord");
-        }
-    }
-
-    /**
-     * Line type (must be in the TABLES section LTYPE).
-     *
-     * <pre>
-     *   0
-     *  LTYPE
-     * </pre>
-     */
-    void tableLineTypeEntry(unsigned long int h=0)  const {
-        dxfString(0, "LTYPE");
-        if (version>=VER_2000) {
-            if (h==0) {
-                handle();
-            } else {
-                dxfHex(5, h);
-            }
-            //dxfHex(330, 0x5);
-            dxfString(100, "AcDbSymbolTableRecord");
-            dxfString(100, "AcDbLinetypeTableRecord");
-        }
-    }
-
-    /**
-     * Appid (must be in the TABLES section APPID).
-     *
-     * <pre>
-     *   0
-     *  APPID
-     * </pre>
-     */
-    void tableAppidEntry(unsigned long int h=0)  const {
-        dxfString(0, "APPID");
-        if (version>=VER_2000) {
-            if (h==0) {
-                handle();
-            } else {
-                dxfHex(5, h);
-            }
-            //dxfHex(330, 0x9);
-            dxfString(100, "AcDbSymbolTableRecord");
-            dxfString(100, "AcDbRegAppTableRecord");
-        }
-    }
-
-    /**
-     * Block (must be in the section BLOCKS).
-     *
-     * <pre>
-     *   0
-     *  BLOCK
-     * </pre>
-     */
-    void sectionBlockEntry(unsigned long int h=0)  const {
-        dxfString(0, "BLOCK");
-        if (version>=VER_2000) {
-            if (h==0) {
-                handle();
-            } else {
-                dxfHex(5, h);
-            }
-            //dxfHex(330, blockHandle);
-            dxfString(100, "AcDbEntity");
-            if (h==0x1C) {
-                dxfInt(67, 1);
-            }
-            dxfString(8, "0");                 // TODO: Layer for block
-            dxfString(100, "AcDbBlockBegin");
-        }
-    }
-
-    /**
-     * End of Block (must be in the section BLOCKS).
-     *
-     * <pre>
-     *   0
-     *  ENDBLK
-     * </pre>
-     */
-    void sectionBlockEntryEnd(unsigned long int h=0)  const {
-        dxfString(0, "ENDBLK");
-        if (version>=VER_2000) {
-            if (h==0) {
-                handle();
-            } else {
-                dxfHex(5, h);
-            }
-            //dxfHex(330, blockHandle);
-            dxfString(100, "AcDbEntity");
-            if (h==0x1D) {
-                dxfInt(67, 1);
-            }
-            dxfString(8, "0");                 // TODO: Layer for block
-            dxfString(100, "AcDbBlockEnd");
-        }
-    }
-
-    void color(int col=256) const {
-        dxfInt(62, col);
-    }
-    void lineType(const char *lt) const {
-        dxfString(6, lt);
-    }
-    void lineTypeScale(double scale) const {
-        dxfReal(48, scale);
-    }
-    void lineWeight(int lw) const {
-        dxfInt(370, lw);
-    }
-
-    void coord(int gc, double x, double y, double z=0) const {
-        dxfReal(gc, x);
-        dxfReal(gc+10, y);
-        dxfReal(gc+20, z);
-    }
-
-    void coordTriplet(int gc, const double* value) const {
-        if (value) {
-            dxfReal(gc, *value++);
-            dxfReal(gc+10, *value++);
-            dxfReal(gc+20, *value++);
-        }
-    }
-
-    void resetHandle() const {
-        m_handle = 1;
-    }
-
-    /**
-     * Writes a unique handle and returns it.
-     */
-    unsigned long handle(int gc=5) const {
-        // handle has to be hex
-        dxfHex(gc, m_handle);
-        return m_handle++;
-    }
-
-    /**
-     * @return Next handle that will be written.
-     */
-    unsigned long getNextHandle() const {
-        return m_handle;
-    }
-	
-    /**
-     * Increases handle, so that the handle returned remains available.
-     */
-    unsigned long incHandle() const {
-        return m_handle++;
-    }
-
-    /**
-     * Sets the handle of the model space. Entities refer to 
-     * this handle.
-     */
-    void setModelSpaceHandle(unsigned long h) {
-        modelSpaceHandle = h;
-    }
-
-    unsigned long getModelSpaceHandle() {
-        return modelSpaceHandle;
-    }
-
-    /**
-     * Sets the handle of the paper space. Some special blocks refer to 
-     * this handle.
-     */
-    void setPaperSpaceHandle(unsigned long h) {
-        paperSpaceHandle = h;
-    }
-
-    unsigned long getPaperSpaceHandle() {
-        return paperSpaceHandle;
-    }
-
-    /**
-     * Sets the handle of the paper space 0. Some special blocks refer to 
-     * this handle.
-     */
-    void setPaperSpace0Handle(unsigned long h) {
-        paperSpace0Handle = h;
-    }
-
-    unsigned long getPaperSpace0Handle() {
-        return paperSpace0Handle;
-    }
-
-    /**
-     * Must be overwritten by the implementing class to write a
-     * real value to the file.
-     *
-     * @param gc Group code.
-     * @param value The real value.
-     */
-    virtual void dxfReal(int gc, double value) const = 0;
-
-    /**
-     * Must be overwritten by the implementing class to write an
-     * int value to the file.
-     *
-     * @param gc Group code.
-     * @param value The int value.
-     */
-    virtual void dxfInt(int gc, int value) const = 0;
-
-    /**
-     * Must be overwritten by the implementing class to write an
-     * int value (hex) to the file.
-     *
-     * @param gc Group code.
-     * @param value The int value.
-     */
-    virtual void dxfHex(int gc, int value) const = 0;
-
-    /**
-     * Must be overwritten by the implementing class to write a
-     * string to the file.
-     *
-     * @param gc Group code.
-     * @param value The string.
-     */
-    virtual void dxfString(int gc, const char* value) const = 0;
-
-    /**
-     * Must be overwritten by the implementing class to write a
-     * string to the file.
-     *
-     * @param gc Group code.
-     * @param value The string.
-     */
-    virtual void dxfString(int gc, const string& value) const = 0;
-
-protected:
-    mutable unsigned long m_handle;
-    mutable unsigned long modelSpaceHandle;
-    mutable unsigned long paperSpaceHandle;
-    mutable unsigned long paperSpace0Handle;
-
-    /**
-     * DXF version to be created.
-     */
-    DL_Codes::version version;
-private:
-};
-
-#endif
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_writer_ascii.cpp b/src/modules/io/io_shapes_dxf/dxflib/dl_writer_ascii.cpp
deleted file mode 100755
index a67af24..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_writer_ascii.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/**********************************************************
- * Version $Id: dl_writer_ascii.cpp 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_writer_ascii.cpp 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-** Copyright (C) 2001 Robert J. Campbell Jr.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include <stdio.h>
-#include <string.h>
-
-#include "dl_writer_ascii.h"
-#include "dl_exception.h"
-
-
-/**
- * Closes the output file.
- */
-void DL_WriterA::close() const {
-    m_ofile.close();
-}
-
-
-/**
- * @retval true Opening file has failed.
- * @retval false Otherwise.
- */
-bool DL_WriterA::openFailed() const {
-	return m_ofile.fail();
-}
-
-
-
-/**
- * Writes a real (double) variable to the DXF file.
- *
- * @param gc Group code.
- * @param value Double value
- */
-void DL_WriterA::dxfReal(int gc, double value) const {
-    char str[256];
-    sprintf(str, "%.16lf", value);
-	
-	// fix for german locale:
-	strReplace(str, ',', '.');
-
-    // Cut away those zeros at the end:
-    bool dot = false;
-    int end = -1;
-    for (unsigned int i=0; i<strlen(str); ++i) {
-        if (str[i]=='.') {
-            dot = true;
-            end = i+2;
-            continue;
-        } else if (dot && str[i]!='0') {
-            end = i+1;
-        }
-    }
-    if (end>0 && end<(int)strlen(str)) {
-        str[end] = '\0';
-    }
-
-    dxfString(gc, str);
-    m_ofile.flush();
-}
-
-
-
-/**
- * Writes an int variable to the DXF file.
- *
- * @param gc Group code.
- * @param value Int value
- */
-void DL_WriterA::dxfInt(int gc, int value) const {
-    m_ofile << (gc<10 ? "  " : (gc<100 ? " " : "")) << gc << "\n"
-    << value << "\n";
-}
-
-
-
-/**
- * Writes a hex int variable to the DXF file.
- *
- * @param gc Group code.
- * @param value Int value
- */
-void DL_WriterA::dxfHex(int gc, int value) const {
-    char str[12];
-    sprintf(str, "%0X", value);
-    dxfString(gc, str);
-}
-
-
-
-/**
- * Writes a string variable to the DXF file.
- *
- * @param gc Group code.
- * @param value String
- */
-void DL_WriterA::dxfString(int gc, const char* value) const {
-    if (value==NULL) {
-#ifndef __GCC2x__
-        //throw DL_NullStrExc();
-#endif
-    }
-    m_ofile << (gc<10 ? "  " : (gc<100 ? " " : "")) << gc << "\n"
-    << value << "\n";
-}
-
-
-
-void DL_WriterA::dxfString(int gc, const string& value) const {
-    m_ofile << (gc<10 ? "  " : (gc<100 ? " " : "")) << gc << "\n"
-    << value << "\n";
-}
-
-
-/**
- * Replaces every occurence of src with dest in the null terminated str.
- */
-void DL_WriterA::strReplace(char* str, char src, char dest) {
-	size_t i;
-	for	(i=0; i<strlen(str); i++) {
-		if (str[i]==src) {
-			str[i] = dest;
-		}
-	}
-}
-
diff --git a/src/modules/io/io_shapes_dxf/dxflib/dl_writer_ascii.h b/src/modules/io/io_shapes_dxf/dxflib/dl_writer_ascii.h
deleted file mode 100755
index b80160e..0000000
--- a/src/modules/io/io_shapes_dxf/dxflib/dl_writer_ascii.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**********************************************************
- * Version $Id: dl_writer_ascii.h 911 2011-02-14 16:38:15Z reklov_w $
- *********************************************************/
-/****************************************************************************
-** $Id: dl_writer_ascii.h 911 2011-02-14 16:38:15Z reklov_w $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-** Copyright (C) 2001 Robert J. Campbell Jr.
-**
-** This file is part of the dxflib project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid dxflib Professional Edition licenses may use 
-** this file in accordance with the dxflib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info at ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef DL_WRITER_ASCII_H
-#define DL_WRITER_ASCII_H
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "dl_writer.h"
-#include <fstream>
-#include <string>
-using std::string;
-
-/**
- * Implements functions defined in DL_Writer for writing low
- *   level DXF constructs to an ASCII format DXF file.
- * 
- * @para fname File name of the file to be created.
- * @para version DXF version. Defaults to VER_2002.
- *
- * @todo What if \c fname is NULL?  Or \c fname can't be opened for
- * another reason?
- */
-class DL_WriterA : public DL_Writer {
-public:
-    DL_WriterA(const char* fname, DL_Codes::version version=VER_2000)
-            : DL_Writer(version), m_ofile(fname) {}
-    virtual ~DL_WriterA() {}
-
-	bool openFailed() const;
-    void close() const;
-    void dxfReal(int gc, double value) const;
-    void dxfInt(int gc, int value) const;
-    void dxfHex(int gc, int value) const;
-    void dxfString(int gc, const char* value) const;
-    void dxfString(int gc, const string& value) const;
-
-	static void strReplace(char* str, char src, char dest);
-
-private:
-    /**
-     * DXF file to be created.
-     */
-    mutable std::ofstream m_ofile;
-
-};
-
-#endif
-
diff --git a/src/modules/pointcloud/pointcloud_tools/pc_drop_attribute.cpp b/src/modules/pointcloud/pointcloud_tools/pc_drop_attribute.cpp
index f910aba..ead1b0f 100755
--- a/src/modules/pointcloud/pointcloud_tools/pc_drop_attribute.cpp
+++ b/src/modules/pointcloud/pointcloud_tools/pc_drop_attribute.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: pc_drop_attribute.cpp 2626 2015-10-01 09:06:32Z reklov_w $
+ * Version $Id: pc_drop_attribute.cpp 2891 2016-04-13 12:33:23Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -75,10 +75,9 @@
 //---------------------------------------------------------
 CPC_Drop_Attribute::CPC_Drop_Attribute(void)
 {
+	Set_Name		(_TL("Drop Point Cloud Attributes"));
 
-	Set_Name(_TL("Drop Point Cloud Attributes"));
-
-	Set_Author(_TL("Volker Wichmann (c) 2010, LASERDATA GmbH"));
+	Set_Author		("Volker Wichmann (c) 2010, LASERDATA GmbH");
 
 	Set_Description	(_TW(
 		"The module can be used to drop attributes from a point cloud. "
@@ -86,7 +85,6 @@ CPC_Drop_Attribute::CPC_Drop_Attribute(void)
 		"from the input dataset, i.e. the input dataset will be overwritten.\n\n"
 	));
 
-
 	//-----------------------------------------------------
 	CSG_Parameter *pNode = Parameters.Add_PointCloud(
 		NULL	, "INPUT"		,_TL("Input"),
@@ -109,37 +107,14 @@ CPC_Drop_Attribute::CPC_Drop_Attribute(void)
 
 ///////////////////////////////////////////////////////////
 //														 //
-//														 //
-//														 //
 ///////////////////////////////////////////////////////////
 
 //---------------------------------------------------------
-bool CPC_Drop_Attribute::On_Before_Execution(void)
-{
-	if( Parameters("OUTPUT")->asPointCloud() == Parameters("INPUT")->asPointCloud() )
-		Parameters("OUTPUT")->Set_Value(DATAOBJECT_NOTSET);
-
-	return (true);
-}
-
-
-//---------------------------------------------------------
 bool CPC_Drop_Attribute::On_Execute(void)
 {
-	CSG_PointCloud		*pInput, *pOutput;
-	CSG_Parameters		sParms;
-	int					*Features, nFeatures;
-	std::set<int>		setCols;
-	std::set<int>::iterator it;
-
-
-	pInput	= Parameters("INPUT")->asPointCloud();
-	pOutput	= Parameters("OUTPUT")->asPointCloud();
-
-
 	//-------------------------------------------------
-	Features	= (int *)Parameters("FIELDS")->asPointer();
-	nFeatures	=        Parameters("FIELDS")->asInt    ();
+	int	*Features	= (int *)Parameters("FIELDS")->asPointer();
+	int	nFeatures	=        Parameters("FIELDS")->asInt    ();
 
 	if( !Features || nFeatures <= 0 )
 	{
@@ -149,48 +124,43 @@ bool CPC_Drop_Attribute::On_Execute(void)
 	}
 
 	//-----------------------------------------------------
-	CSG_String		sName;
-	CSG_MetaData	History;
+	CSG_PointCloud	*pInput		= Parameters("INPUT" )->asPointCloud();
+	CSG_PointCloud	*pOutput	= Parameters("OUTPUT")->asPointCloud(), Output;
 
 	if( !pOutput || pOutput == pInput )
 	{
-		sName = pInput->Get_Name();
-		pOutput = SG_Create_PointCloud(pInput);
-		History = pInput->Get_History();
-	}
-	else
-	{
-		sName = CSG_String::Format(SG_T("%s_droppedAttr"), pInput->Get_Name());
-		pOutput->Create(pInput);
+		pOutput	= &Output;
 	}
-	
+
+	pOutput->Create(pInput);
 
 	//-----------------------------------------------------
+	int	i;
+
+	std::set<int>			setCols;
+	std::set<int>::iterator it;
+
 	setCols.clear();
 
-	for( int i=0; i<nFeatures; i++ )
+	for(i=0; i<nFeatures; i++)
 	{
 		setCols.insert(Features[i]);
 	}
 
-
-	//-----------------------------------------------------
-	int j = 0;
-	for(it=setCols.begin(); it!=setCols.end(); it++)
+	for(i=0, it=setCols.begin(); it!=setCols.end(); i++, it++)
 	{
-		pOutput->Del_Field(*it - j);
-		j++;
+		pOutput->Del_Field(*it - i);
 	}
 
-	DataObject_Update(pOutput);
-
-	for(int i=0; i<pInput->Get_Point_Count() && SG_UI_Process_Set_Progress(i, pInput->Get_Count()); i++)
+	//-----------------------------------------------------
+	for(i=0; i<pInput->Get_Point_Count() && SG_UI_Process_Set_Progress(i, pInput->Get_Count()); i++)
 	{
 		pOutput->Add_Point(pInput->Get_X(i), pInput->Get_Y(i), pInput->Get_Z(i));
 
 		for(int j=0, k=0; j<pInput->Get_Attribute_Count(); j++, k++)
 		{
-			it = setCols.find(j + 3);
+			it	= setCols.find(j + 3);
+
 			if( it != setCols.end() )
 			{
 				k--;
@@ -201,52 +171,50 @@ bool CPC_Drop_Attribute::On_Execute(void)
 		}
 	}
 
-
 	//-----------------------------------------------------
-	if (!Parameters("OUTPUT")->asPointCloud() || Parameters("OUTPUT")->asPointCloud() == pInput )
+	if( pOutput == &Output )
 	{
-		pInput->Assign(pOutput);
-		pInput->Get_History() = History;
-		pInput->Set_Name(sName);
-		Parameters("OUTPUT")->Set_Value(pInput);
+		CSG_MetaData	History	= pInput->Get_History();
+		CSG_String		Name	= pInput->Get_Name   ();
 
-		delete(pOutput);
+		pInput->Assign(pOutput);
 
-		DataObject_Get_Parameters(pInput, sParms);
-		Set_Display_Attributes(pInput, sParms);
+		pInput->Get_History() = History;
+		pInput->Set_Name(Name);
 	}
 	else
 	{
-		pOutput->Set_Name(sName);
-		DataObject_Update(pOutput);
-
-		DataObject_Get_Parameters(pOutput, sParms);
-		Set_Display_Attributes(pOutput, sParms);
+		pOutput->Set_Name(CSG_String::Format("%s [%s]", pInput->Get_Name(), _TL("Dropped Attributes")));
 	}
 
-
 	//-----------------------------------------------------
 	return( true );
 }
 
 
+///////////////////////////////////////////////////////////
+//														 //
+///////////////////////////////////////////////////////////
+
 //---------------------------------------------------------
-void CPC_Drop_Attribute::Set_Display_Attributes(CSG_PointCloud *pPC, CSG_Parameters &sParms)
+bool CPC_Drop_Attribute::On_After_Execution(void)
 {
-	if (sParms("METRIC_ATTRIB")	&& sParms("COLORS_TYPE") && sParms("METRIC_COLORS")
-		&& sParms("METRIC_ZRANGE") && sParms("DISPLAY_VALUE_AGGREGATE"))
+	CSG_PointCloud	*pOutput	= Parameters("OUTPUT")->asPointCloud();
+
+	if( pOutput == NULL )
 	{
-		sParms("DISPLAY_VALUE_AGGREGATE")->Set_Value(3);		// highest z
-		sParms("COLORS_TYPE")->Set_Value(2);                    // graduated color
-		sParms("METRIC_COLORS")->asColors()->Set_Count(255);    // number of colors
-		sParms("METRIC_ATTRIB")->Set_Value(2);					// z attrib
-		sParms("METRIC_ZRANGE")->asRange()->Set_Range(pPC->Get_Minimum(2), pPC->Get_Maximum(2));
+		pOutput	= Parameters("INPUT")->asPointCloud();
 	}
 
-	DataObject_Set_Parameters(pPC, sParms);
-	DataObject_Update(pPC);
+	DataObject_Set_Parameter(pOutput, "DISPLAY_VALUE_AGGREGATE",  3);	// highest z
+	DataObject_Set_Parameter(pOutput, "METRIC_COLORS"          , 12);	// number of colors
+	DataObject_Set_Parameter(pOutput, "COLORS_TYPE"            ,  3);	// graduated color
+	DataObject_Set_Parameter(pOutput, "METRIC_ATTRIB"          ,  2);	// z attrib
+	DataObject_Set_Parameter(pOutput, "METRIC_ZRANGE", 100, 300);
 
-	return;
+	DataObject_Set_Colors(pOutput, 11, SG_COLORS_RAINBOW);
+
+	return( true );
 }
 
 
diff --git a/src/modules/pointcloud/pointcloud_tools/pc_drop_attribute.h b/src/modules/pointcloud/pointcloud_tools/pc_drop_attribute.h
index f0068bd..f2bd135 100755
--- a/src/modules/pointcloud/pointcloud_tools/pc_drop_attribute.h
+++ b/src/modules/pointcloud/pointcloud_tools/pc_drop_attribute.h
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: pc_drop_attribute.h 2851 2016-03-22 16:48:01Z oconrad $
+ * Version $Id: pc_drop_attribute.h 2891 2016-04-13 12:33:23Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -86,19 +86,14 @@ class CPC_Drop_Attribute : public CSG_Module
 public:
 	CPC_Drop_Attribute(void);
 
-	virtual CSG_String			Get_MenuPath			(void)	{	return( _TL("Tools") );	}
+	virtual CSG_String		Get_MenuPath			(void)	{	return( _TL("Tools") );	}
 
 
 protected:
 
-	virtual bool				On_Before_Execution		(void);
-	virtual bool				On_Execute				(void);
-
-
-private:
-
-	void						Set_Display_Attributes(CSG_PointCloud *pPC, CSG_Parameters &sParms);
+	virtual bool			On_Execute				(void);
 
+	virtual bool			On_After_Execution		(void);
 
 };
 
diff --git a/src/modules/projection/pj_proj4/crs_base.cpp b/src/modules/projection/pj_proj4/crs_base.cpp
index 17d7224..ec8e447 100755
--- a/src/modules/projection/pj_proj4/crs_base.cpp
+++ b/src/modules/projection/pj_proj4/crs_base.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: crs_base.cpp 2862 2016-03-24 14:59:41Z oconrad $
+ * Version $Id: crs_base.cpp 2881 2016-04-01 20:24:07Z johanvdw $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -237,7 +237,7 @@ int CCRS_Base::On_Parameter_Changed(CSG_Parameters *pParameters, CSG_Parameter *
 	{
 		if (!Projection.Create(pParameter->asInt()))
 		{
-			SG_UI_Dlg_Message(_TL("Unkown EPSG Code"), _TL("WARNING"));
+			SG_UI_Dlg_Message(_TL("Unknown EPSG Code"), _TL("WARNING"));
 		}
 	}
 
diff --git a/src/modules/terrain_analysis/ta_hydrology/Flow_Parallel.cpp b/src/modules/terrain_analysis/ta_hydrology/Flow_Parallel.cpp
index 88ff5f3..520e83f 100755
--- a/src/modules/terrain_analysis/ta_hydrology/Flow_Parallel.cpp
+++ b/src/modules/terrain_analysis/ta_hydrology/Flow_Parallel.cpp
@@ -192,7 +192,7 @@ CFlow_Parallel::CFlow_Parallel(void)
 
 	Parameters.Add_Grid(
 		NULL	, "WEIGHT_LOSS"	, _TL("Loss through Negative Weights"),
-		_TL("when using weights without support for negative flow: output of the absolute amount of negative flow that occured"),
+		_TL("when using weights without support for negative flow: output of the absolute amount of negative flow that occurred"),
 		PARAMETER_OUTPUT_OPTIONAL
 	);
 }
diff --git a/src/modules/terrain_analysis/ta_hydrology/Flow_RecursiveUp.cpp b/src/modules/terrain_analysis/ta_hydrology/Flow_RecursiveUp.cpp
index 7fea6bd..aef314b 100755
--- a/src/modules/terrain_analysis/ta_hydrology/Flow_RecursiveUp.cpp
+++ b/src/modules/terrain_analysis/ta_hydrology/Flow_RecursiveUp.cpp
@@ -150,7 +150,7 @@ CFlow_RecursiveUp::CFlow_RecursiveUp(void)
 
 	Parameters.Add_Grid(
 		NULL	, "WEIGHT_LOSS"	, _TL("Loss through Negative Weights"),
-		_TL("when using weights without support for negative flow: output of the absolute amount of negative flow that occured"),
+		_TL("when using weights without support for negative flow: output of the absolute amount of negative flow that occurred"),
 		PARAMETER_OUTPUT_OPTIONAL
 	);
 
diff --git a/src/modules/terrain_analysis/ta_hydrology/flow_massflux.cpp b/src/modules/terrain_analysis/ta_hydrology/flow_massflux.cpp
index 7d0a053..dd7c9ef 100755
--- a/src/modules/terrain_analysis/ta_hydrology/flow_massflux.cpp
+++ b/src/modules/terrain_analysis/ta_hydrology/flow_massflux.cpp
@@ -403,7 +403,7 @@ double CFlow_MassFlux::Get_Area(int x, int y)
 
 			d	= Get_Flow(ix, iy, i);
 
-			if( d > 0.0 )				// which portion drains ith neigbour into this cell???
+			if( d > 0.0 )				// which portion drains ith neighbour into this cell???
 			{
 				m_Area.Add_Value(x, y, d * Get_Area(ix, iy));	// then recursive call of this function...
 			}
diff --git a/src/saga_core/saga_api/grid_operation.cpp b/src/saga_core/saga_api/grid_operation.cpp
index 52217d0..6c8d514 100755
--- a/src/saga_core/saga_api/grid_operation.cpp
+++ b/src/saga_core/saga_api/grid_operation.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: grid_operation.cpp 2817 2016-02-23 15:16:48Z oconrad $
+ * Version $Id: grid_operation.cpp 2883 2016-04-08 15:17:32Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -802,7 +802,7 @@ void CSG_Grid::Flip(void)
 		#pragma omp parallel for
 		for(int x=0; x<Get_NX(); x++)
 		{
-			for(int yA=0, yB=Get_NX()-1; yA<yB; yA++, yB--)
+			for(int yA=0, yB=Get_NY()-1; yA<yB; yA++, yB--)
 			{
 				double	d	   = asDouble(x, yA);
 				Set_Value(x, yA, asDouble(x, yB));
diff --git a/src/saga_core/saga_api/mat_formula.cpp b/src/saga_core/saga_api/mat_formula.cpp
index 9e15b38..ee9f293 100755
--- a/src/saga_core/saga_api/mat_formula.cpp
+++ b/src/saga_core/saga_api/mat_formula.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: mat_formula.cpp 2779 2016-02-10 16:06:24Z oconrad $
+ * Version $Id: mat_formula.cpp 2887 2016-04-11 11:49:04Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -1355,9 +1355,9 @@ int CSG_Formula::max_size(const SG_Char *source)
 	{
 		if( isalpha(*scan) && (*scan != SG_T('E')) )
 		{
-			if( isalpha(*(scan + 1)) )
+			if( isalpha(*(scan + 1)) || isdigit(*(scan + 1)) )
 			{
-				// it is a function name, it will be counted later on
+				// must be a function name (combination of letters and digits, e.g. sin(..), atan2(..))
 			}
 			else if( *(scan + 1) == SG_T('(') )
 			{
diff --git a/src/saga_core/saga_api/module_chain.cpp b/src/saga_core/saga_api/module_chain.cpp
index 0e2c6ab..6fd984f 100755
--- a/src/saga_core/saga_api/module_chain.cpp
+++ b/src/saga_core/saga_api/module_chain.cpp
@@ -246,6 +246,8 @@ bool CSG_Module_Chain::Create(const CSG_String &File)
 		case PARAMETER_TYPE_Double           : Parameters.Add_Value          (pParent, ID, Name, Desc, PARAMETER_TYPE_Double, Value.asDouble(), Min, bMin, Max, bMax);	break;
 		case PARAMETER_TYPE_Degree           : Parameters.Add_Value          (pParent, ID, Name, Desc, PARAMETER_TYPE_Degree, Value.asDouble(), Min, bMin, Max, bMax);	break;
 
+		case PARAMETER_TYPE_Date             : Parameters.Add_Date           (pParent, ID, Name, Desc, 0.0)->Set_Value(Value);	break;
+
 		case PARAMETER_TYPE_Range            : Parameters.Add_Range          (pParent, ID, Name, Desc, Value.BeforeFirst(';').asDouble(), Value.AfterFirst (';').asDouble(), Min, bMin, Max, bMax);	break;
 		case PARAMETER_TYPE_Choice           : Parameters.Add_Choice         (pParent, ID, Name, Desc, Parameter.Get_Content("choices"))->Set_Value(Value);	break;
 
@@ -1153,6 +1155,7 @@ bool CSG_Module_Chain::_Save_History_Add_Tool(const CSG_MetaData &History, CSG_M
 			case PARAMETER_TYPE_Int         :
 			case PARAMETER_TYPE_Double      :
 			case PARAMETER_TYPE_Degree      :
+			case PARAMETER_TYPE_Date        :
 			case PARAMETER_TYPE_Range       :
 			case PARAMETER_TYPE_String      :
 			case PARAMETER_TYPE_Text        :
diff --git a/src/saga_core/saga_api/saga_api.h b/src/saga_core/saga_api/saga_api.h
index 99228e3..cdc1e44 100755
--- a/src/saga_core/saga_api/saga_api.h
+++ b/src/saga_core/saga_api/saga_api.h
@@ -128,8 +128,8 @@
 //---------------------------------------------------------
 #define SAGA_MAJOR_VERSION		2
 #define SAGA_MINOR_VERSION		2
-#define SAGA_RELEASE_NUMBER		6
-#define SAGA_VERSION			SG_T("2.2.6")
+#define SAGA_RELEASE_NUMBER		7
+#define SAGA_VERSION			SG_T("2.2.7")
 
 
 ///////////////////////////////////////////////////////////
diff --git a/src/saga_core/saga_cmd/module_library.cpp b/src/saga_core/saga_cmd/module_library.cpp
index 5662798..e02e1de 100755
--- a/src/saga_core/saga_cmd/module_library.cpp
+++ b/src/saga_core/saga_cmd/module_library.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: module_library.cpp 2873 2016-03-31 09:37:32Z oconrad $
+ * Version $Id: module_library.cpp 2886 2016-04-08 15:23:40Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -340,8 +340,8 @@ bool CCMD_Module::_Set_Parameters(CSG_Parameters *pParameters)
 				break;
 
 			case PARAMETER_TYPE_Range:
-				m_CMD.AddOption(_Get_ID(pParameter, "MIN"), wxEmptyString, Description, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
-				m_CMD.AddOption(_Get_ID(pParameter, "MAX"), wxEmptyString, Description, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
+				m_CMD.AddOption(_Get_ID(pParameter, "MIN"), wxEmptyString, Description, wxCMD_LINE_VAL_DOUBLE, wxCMD_LINE_PARAM_OPTIONAL);
+				m_CMD.AddOption(_Get_ID(pParameter, "MAX"), wxEmptyString, Description, wxCMD_LINE_VAL_DOUBLE, wxCMD_LINE_PARAM_OPTIONAL);
 				break;
 
 			case PARAMETER_TYPE_String:
@@ -359,9 +359,9 @@ bool CCMD_Module::_Set_Parameters(CSG_Parameters *pParameters)
 				{
 					m_CMD.AddOption(_Get_ID(pParameter, "NX"), wxEmptyString, Description, wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL);
 					m_CMD.AddOption(_Get_ID(pParameter, "NY"), wxEmptyString, Description, wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL);
-					m_CMD.AddOption(_Get_ID(pParameter,  "X"), wxEmptyString, Description, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
-					m_CMD.AddOption(_Get_ID(pParameter,  "Y"), wxEmptyString, Description, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
-					m_CMD.AddOption(_Get_ID(pParameter,  "D"), wxEmptyString, Description, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
+					m_CMD.AddOption(_Get_ID(pParameter,  "X"), wxEmptyString, Description, wxCMD_LINE_VAL_DOUBLE, wxCMD_LINE_PARAM_OPTIONAL);
+					m_CMD.AddOption(_Get_ID(pParameter,  "Y"), wxEmptyString, Description, wxCMD_LINE_VAL_DOUBLE, wxCMD_LINE_PARAM_OPTIONAL);
+					m_CMD.AddOption(_Get_ID(pParameter,  "D"), wxEmptyString, Description, wxCMD_LINE_VAL_DOUBLE, wxCMD_LINE_PARAM_OPTIONAL);
 				}
 				break;
 			}
@@ -476,7 +476,7 @@ bool CCMD_Module::_Get_Options(CSG_Parameters *pParameters, bool bInitialize)
 
 			case PARAMETER_TYPE_Double:
 			case PARAMETER_TYPE_Degree:
-				if( m_CMD.Found(_Get_ID(pParameter), &s) && s.ToDouble(&d) )
+				if( m_CMD.Found(_Get_ID(pParameter), &d) )
 				{
 					pParameter->Set_Value(d);
 				}
@@ -494,12 +494,12 @@ bool CCMD_Module::_Get_Options(CSG_Parameters *pParameters, bool bInitialize)
 				break;
 
 			case PARAMETER_TYPE_Range:
-				if( m_CMD.Found(_Get_ID(pParameter, "MIN"), &s) && s.ToDouble(&d) )
+				if( m_CMD.Found(_Get_ID(pParameter, "MIN"), &d) )
 				{
 					pParameter->asRange()->Set_LoVal(d);
 				}
 
-				if( m_CMD.Found(_Get_ID(pParameter, "MAX"), &s) && s.ToDouble(&d) )
+				if( m_CMD.Found(_Get_ID(pParameter, "MAX"), &d) )
 				{
 					pParameter->asRange()->Set_HiVal(d);
 				}
@@ -558,13 +558,13 @@ bool CCMD_Module::_Get_Options(CSG_Parameters *pParameters, bool bInitialize)
 				if( pParameter->Get_Children_Count() == 0 )
 				{
 					long	nx, ny;
-					double	d, x, y;
+					double	 x,  y;
 
 					if(	!m_CMD.Found(_Get_ID(pParameter, "NX"), &nx)
 					||	!m_CMD.Found(_Get_ID(pParameter, "NY"), &ny)
-					||	!m_CMD.Found(_Get_ID(pParameter,  "X"), &s) || !s.ToDouble(&x)
-					||	!m_CMD.Found(_Get_ID(pParameter,  "Y"), &s) || !s.ToDouble(&y)
-					||	!m_CMD.Found(_Get_ID(pParameter,  "D"), &s) || !s.ToDouble(&d) )
+					||	!m_CMD.Found(_Get_ID(pParameter,  "X"), &x )
+					||	!m_CMD.Found(_Get_ID(pParameter,  "Y"), &y )
+					||	!m_CMD.Found(_Get_ID(pParameter,  "D"), &d ) )
 					{
 						pParameter->asGrid_System()->Assign(-1, 0.0, 0.0, 0, 0);
 					}
diff --git a/src/saga_core/saga_gui/dlg_about.cpp b/src/saga_core/saga_gui/dlg_about.cpp
index 4132b11..d5e0619 100755
--- a/src/saga_core/saga_gui/dlg_about.cpp
+++ b/src/saga_core/saga_gui/dlg_about.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: dlg_about.cpp 2693 2015-11-17 16:17:12Z oconrad $
+ * Version $Id: dlg_about.cpp 2879 2016-03-31 16:07:02Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -205,8 +205,8 @@ wxString CDLG_About::_Get_Version(void)
 	s	+= "SAGA GUI\n";
 	s	+= "SAGA Graphical User Interface\n";
 	s	+= "\n";
-	s	+= "Copyrights (c) 2005-2015 by Olaf Conrad\n";
-	s	+= "Portions (c) 2008-2015 by Volker Wichmann\n";
+	s	+= "Copyrights (c) 2005-2016 by Olaf Conrad\n";
+	s	+= "Portions (c) 2008-2016 by Volker Wichmann\n";
 	s	+= "\n";
 	s	+= "GNU General Public License (GPL)\n";
 
@@ -215,8 +215,8 @@ wxString CDLG_About::_Get_Version(void)
 	s	+= "SAGA API\n";
 	s	+= "SAGA Application Programming Interface\n";
 	s	+= "\n";
-	s	+= "Copyrights (c) 2002-2015 by Olaf Conrad\n";
-	s	+= "Portions (c) 2008-2015 by Volker Wichmann\n";
+	s	+= "Copyrights (c) 2002-2016 by Olaf Conrad\n";
+	s	+= "Portions (c) 2008-2016 by Volker Wichmann\n";
 	s	+= "Portions (c) 2005-2006 by Victor Olaya\n";
 	s	+= "Portions (c) 2002 by Andre Ringeler\n";	// " (mat_formula.cpp)\n";
 	s	+= "\n";
diff --git a/src/saga_core/saga_gui/helper.cpp b/src/saga_core/saga_gui/helper.cpp
index 49a676f..782944f 100755
--- a/src/saga_core/saga_gui/helper.cpp
+++ b/src/saga_core/saga_gui/helper.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: helper.cpp 2772 2016-02-05 15:25:43Z oconrad $
+ * Version $Id: helper.cpp 2880 2016-03-31 16:10:03Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -713,6 +713,7 @@ bool		CONFIG_Read(wxConfigBase *pConfig, CSG_Parameter *pParameter)
 	case PARAMETER_TYPE_Degree  :
 		return( pConfig->Read(Entry, &d) && pParameter->Set_Value(d) );
 
+	case PARAMETER_TYPE_Date    :
 	case PARAMETER_TYPE_String  :
 	case PARAMETER_TYPE_Text    :
 	case PARAMETER_TYPE_FilePath:
@@ -771,6 +772,7 @@ bool		CONFIG_Write(wxConfigBase *pConfig, CSG_Parameter *pParameter)
 		case PARAMETER_TYPE_Degree  :
 			return( pConfig->Write(Entry, pParameter->asDouble()) );
 
+		case PARAMETER_TYPE_Date    :
 		case PARAMETER_TYPE_String  :
 		case PARAMETER_TYPE_Text    :
 		case PARAMETER_TYPE_FilePath:
diff --git a/src/saga_core/saga_gui/res/saga.bra.txt b/src/saga_core/saga_gui/res/saga.bra.txt
index 385f3de..4800068 100644
--- a/src/saga_core/saga_gui/res/saga.bra.txt
+++ b/src/saga_core/saga_gui/res/saga.bra.txt
@@ -441,7 +441,6 @@ TEXT	TRANSLATION
 "Apply"	"Aplicar"
 "Apply Move"	"Aplicarmovimento"
 "Apply changes?"	"Aplicar altera��es?"
-"Apply offset?"	"Aplicar deslocamento?"
 "Apply post-processing filter to remove small holes"	"Aplicar filtro de p�s-processamento para remover pequenos orif�cios"
 "Approx. Terrain Slope"	"Declive aproximado de terreno"
 "Approximate Coordinates of Projection Center"	"Coordenadas aproximadas do Centro de Proje��o"
@@ -635,6 +634,7 @@ TEXT	TRANSLATION
 "Borders"	"Bordas"
 "Bottom"	"Base"
 "Bottom to Top"	"De baixo para cima"
+"Bottom-Top"	""
 "Boundaries"	"Limites"
 "Boundaries: the simple filter will only operate on grid cells which fall in the same shape"	"Limites: o filtro simples funcionar� apenas em c�lulas da grades que caem no mesmo shape"
 "Boundary Effect"	"Efeito de contorno"
@@ -732,8 +732,6 @@ TEXT	TRANSLATION
 "Cell Size"	"Tamanho da C�lula"
 "Cell Sizes"	"Tamanhos das c�lulas"
 "Cell size"	"Tamanho da c�lula"
-"CellSize to S-N Extent"	"Tamanho da c�lula para a extens�o S-N"
-"CellSize to W-E Extent"	"Tamanho da c�lula para a extens�o W-E"
 "Cells"	"C�lulas"
 "Cellsize"	"Tamanho da c�lula"
 "Cellsize of the output grid [map units]"	"Tamanho da c�lula para a grade de sa�da [unidades do mapa]"
@@ -824,7 +822,6 @@ TEXT	TRANSLATION
 "Choose how to handle the NoData value of the output grid."	"Escolha como lidar com o valor SemDados da grade de sa�da."
 "Choose how to sort the elevation dataset before sampling"	"Escolha como classificar o conjunto de dados de eleva��o antes da amostragem"
 "Choose if you want to segmentate either on minima or on maxima."	"Escolha se voc� quer segmentar sobre os m�nimos ou sobre m�ximos."
-"Choose method how to adjust input values."	"Escolha a forma de como ajustar os valores de entrada."
 "Choose the Point Data Record Format you like to use"	"Escolha o formato do ponto de registro de dados que voc� gostaria de usar"
 "Choose the activation function used by the neronal network."	"Escolher a fun��o de ativa��o utilizada pela rede neronal."
 "Choose the classification constant to use"	"Escolha a constante de classifica��o a ser utilizada"
@@ -1471,6 +1468,7 @@ TEXT	TRANSLATION
 "Drop Database"	"Soltar do Banco de Dados"
 "Drop Point Cloud Attributes"	"Soltar Atributos de nuvem de ponto "
 "Drop Table"	"Soltar tabela"
+"Dropped Attributes"	""
 "Dummy Grid"	"Grade de manequim"
 "Duplicated Points"	"Pontos duplicados"
 "Duplicates"	"Duplicatas"
@@ -1642,8 +1640,8 @@ TEXT	TRANSLATION
 "Extended Neighourhood"	"Vizinhan�a estendida"
 "Extensions"	"Extens�es"
 "Extent"	"Extens�o"
+"Extent Definition"	""
 "Extent [Cut]"	"Extens�o [Cut]"
-"Extent to CellSize"	"Extender para o Tamanho de c�lula"
 "Extents"	"Extens�o"
 "Exterior Orientation Parameters"	"Par�metros de orienta��o exterior"
 "Extreme"	"Extremo"
@@ -2079,7 +2077,6 @@ TEXT	TRANSLATION
 "Grid with features to be buffered."	"Grade com fei��es a terem o buffer"
 "Grid with the input values to accumulate."	"Grade com valores de entrada para acumular."
 "Grid(s)"	"Grade(s)"
-"Grid(s) to fit extent to"	"Grade(s) para ajuste da extens�o"
 "Gridding"	"Grindagem"
 "Gridding of Points"	""
 "Grids"	"Grades"
@@ -2605,6 +2602,7 @@ TEXT	TRANSLATION
 "Left [/]"	"Esquerda [/]"
 "Left [F3]"	"Esquerda [F3]"
 "Left [Ins]"	"Esquerda [Ins]"
+"Left-Right"	""
 "Left/Right"	"Esquerda/direita"
 "Legend"	"Legenda"
 "Legend: Save"	"Legenda: Salvar"
@@ -3217,6 +3215,7 @@ TEXT	TRANSLATION
 "No shapes in selection"	"N�o h� shapes na sele��o"
 "No sinks have been detected."	"Sem dissipadores detectados."
 "No translation set by user"	"Nenhuma tradu��o definida pelo usu�rio"
+"No-Data Value"	""
 "NoData Output Grid"	"Grade SemDados de sa�da"
 "NoData Value"	"Valor SemDados"
 "NoData Value: %.6f"	"NoData Valor:% .6f"
@@ -3250,7 +3249,7 @@ TEXT	TRANSLATION
 "Nothing to do be done. Raster splitting is not supported."	"Nada a ser feito. Divis�o n�o � suportada."
 "Nothing to do! Merging needs more than one input data set."	"Nada para fazer! A fus�o precisa de mais do que um conjunto de dados de entrada."
 "Nothing to do. Raster is already within target range."	"Nada para fazer. Raster j� est� dentro da faixa alvo."
-"Nothing to do: there is no intersection with additonal grid."	"Nada a fazer: n�o h� intersec��o com a grade adicional."
+"Nothing to do: there is no intersection with additional grid."	""
 "November"	"Novembro"
 "No|Yes|"	"N�o|Sim|"
 "Number in Latitudinal Direction"	"N�mero de Dire��o Latitudinal"
@@ -3597,7 +3596,6 @@ TEXT	TRANSLATION
 "Play Loop [Ctrl + L]"	"Reproduzir loop [Ctrl + L]"
 "Play Once [Ctrl + P]"	"Reproduzir uma vez [Ctrl + P]"
 "Play and Save to Image"	"Reproduzir e salvar a Imagem"
-"Please choose a method of module operation."	"Por favor, escolha um m�todo de opera��o do m�dulo."
 "Please enter a numeric value:"	"Por favor, indique um valor num�rico:"
 "Please enter a text:"	"Por favor, indique um texto:"
 "Please provide a path for the output files."	"Por favor, forne�a um caminho para os arquivos de sa�da."
@@ -4016,6 +4014,7 @@ TEXT	TRANSLATION
 "Reports"	"Relat�rios"
 "Representativeness"	"Representatividade"
 "Representativeness (Grid)"	"Representatividade (grade)"
+"Resample"	""
 "Resampling"	"Reamostragem"
 "Resampling Filter"	"Filtro de reamostragem"
 "Resampling method used when projection is needed"	""
@@ -4351,11 +4350,10 @@ TEXT	TRANSLATION
 "Server Connection"	"Conex�o do Servidor"
 "Set Coordinate Reference System"	"Definir o Sistema de Coordenadas de Refer�ncia"
 "Set Custom NoData"	"Ajuste personalizado Sem-dados"
-"Set Range to Minmum/Maximum"	"Definir intervalo para minimo/M�ximo"
+"Set Range to Minimum/Maximum"	""
 "Set Range to Standard Deviation (1.5)"	"Definir faixa de desvio padr�o (1,5)"
 "Set Range to Standard Deviation (2.0)"	"Definir faixa de desvio padr�o (2,0)"
 "Set \'false\' to execute the calculation for each point in grid. Set \'true\' tu calculate the flow of one single cell."	"Definir \'false\' para executar o c�lculo para cada ponto na grade. Definir \'true\' para calcular o fluxo de uma �nica c�lula."
-"Set extent by"	"Definir extens�o por"
 "Set grid extent to grid cells (pixel as area), to grid nodes (pixel as point) or align to grid system."	"Definir ponto de grade para c�lulas da grade de pixels (como �rea), para n�s da grade de pixel (ponto) ou como alinhar ao sistema da grade."
 "Set selected values to no data."	"Definir valores selecionados para sem-dados."
 "Set true if you want multipart polygons to become separate polygons."	"Definir verdade, se voc� quiser pol�gonos de v�rias vias para tornar-se pol�gonos separados."
@@ -4378,8 +4376,6 @@ TEXT	TRANSLATION
 "Shape Type Manager"	"Gerenciador de tipo de shape"
 "Shape file could not be opened."	"Arquivo de shape n�o p�de ser aberto."
 "Shape type to generate."	"Tipo de shape a gerar."
-"Shape(s)"	"Shape(s)"
-"Shape(s) to fit extent to"	"Shape(s) para se ajustar � medida"
 "Shapefile describing the AOI."	"Shapefile descrevendo a AOI."
 "Shapes"	"Shapes"
 "Shapes Buffer"	"Buffer de shape"
@@ -4858,7 +4854,6 @@ TEXT	TRANSLATION
 "Target"	"Alvo"
 "Target Area"	"�rea-alvo"
 "Target Areas"	"Areas-alvo"
-"Target Cell Size"	"Tamanho das c�lulas alvo"
 "Target Cellsize"	"Tamanho das c�lulas alvo"
 "Target Coordinate System Error"	"Erro no sistema de coordenadas alvo"
 "Target Coordinate System Type Error"	"Erro no tipo de sistema de coordenadas alvo"
@@ -5313,10 +5308,10 @@ TEXT	TRANSLATION
 "Universal Kriging"	"Kringagem universal"
 "Universal Transvers Mercator (UTM)"	"Transverso Universal de Mercator (UTM)"
 "Unknown"	"Desconhecido"
+"Unknown EPSG Code"	""
 "Unknown Error"	"Erro desconhecido"
 "Unknown LAS header exception!"	"Exce��o de cabe�alho LAS desconhecida!"
 "Unknown LAS reader exception!"	"Exce��o leitor LAS desconhecida!"
-"Unkown EPSG Code"	"C�digo EPSG Unkown "
 "Unreferenced Grids"	"Grades n�o referenciadas"
 "Unsaturated zone time delay per unit storage deficit [h]"	"Zona insaturada de tempo de atraso por d�ficit de armazenagem de unidade [h]"
 "Unsorted tool chains"	"Cadeias de ferramentas n�o triadas"
@@ -5385,6 +5380,7 @@ TEXT	TRANSLATION
 "User Defined Filter"	"Filtro definido pelo usu�rio"
 "User Defined Kernel"	"Kernel definido pelo usu�rio"
 "User Defined No Data Value"	"Valor SemDados definido pelo usu�iro"
+"User Defined No-Data Value"	""
 "User Defined NoData Value"	"Valor SemDados definido pelo usu�iro"
 "User Defined Polynomial"	"Polinomial definido pelo usu�rio"
 "User Defined Size"	"Tamanho definido pelo usu�rio"
@@ -5622,12 +5618,12 @@ TEXT	TRANSLATION
 "X Component"	"Componente X"
 "X Coordinates"	"Coordenada X"
 "X Grid 1"	"Grade X 1"
+"X Offset"	""
 "X Position"	"Posi��o X"
 "X Range"	"Alcance X"
 "X Values"	"Valores X"
 "X World"	"Mundo X"
 "X is Column ..."	"X � uma coluna ..."
-"X offset"	"Deslocamento X"
 "X, Y"	"X, Y"
 "X, Y, Z"	"X, Y, Z"
 "X, Y, Z, M"	"X, Y, Z, M"
@@ -5653,12 +5649,12 @@ TEXT	TRANSLATION
 "Y Component"	"Componente Y"
 "Y Coordinates"	"Coordenada Y"
 "Y Grid 1"	"Grade Y 1"
+"Y Offset"	""
 "Y Position"	"Posi��o Y"
 "Y Range"	"Alcance Y"
 "Y Values"	"Valor Y"
 "Y World"	"Mundo Y"
 "Y is Column ..."	"Y � uma coluna ..."
-"Y offset"	"Deslocamento Y"
 "Y-Coordinate"	"Coordenada Y"
 "Y-Extent"	"Extens�o Y"
 "Y-Range"	"Alcance Y"
@@ -5725,9 +5721,6 @@ TEXT	TRANSLATION
 "[deprecated] TIN Viewer"	"[obsoleta] Visualizador TIN "
 "[not set]|"	"[n�o definida] |"
 "\n** Error : Invalid parameters **\n"	"\n** Erro: par�metros inv�lidos **\n"
-"\nError: Please verify your xMin, yMin, xMax, yMax settings!\n"	"\nErro: Por favor, verifique as configura��es do seu xMin, yMin, xMax, yMax!\n"
-"\nError: the method Extent by Grid(s) requires grid(s) as input!\n"	"\nErro: o m�todo de extens�o para grade(s) exige grade(s) como entrada!\n"
-"\nError: the method Extent by Shape(s) requires shape(s) as input!\n"	"\nErro: o m�todo de extens�o para shape(s) exige shape(s) como entrada!\n"
 "\nNumber of Clusters"	""
 "\nNumber of Variables"	""
 "\nRMS  of Residuals (stdfit):\t%f\n"	"\nRMS Residuais (stdfit):\t%f\n"
@@ -5846,6 +5839,7 @@ TEXT	TRANSLATION
 "bottom up"	"de baixo para cima"
 "bottom-left"	"inferior-esquerdo"
 "bottom-right"	"inferior direito"
+"bounding box for clipping"	""
 "bright - dark"	"claro - escuro"
 "built-in"	"constru�das em"
 "by area size"	"por tamanho da �rea"
@@ -5867,6 +5861,8 @@ TEXT	TRANSLATION
 "cell"	"c�lula"
 "cell area"	"�rea celular"
 "cell size of target grid"	""
+"cell size to bottom-top extent"	""
+"cell size to left-right extent"	""
 "cells"	"c�lulas"
 "cells in process"	"C�lulas no processo"
 "cellsize and lower left center coordinates"	"tamano da c�lula e coordenadas menores do centro-esquerda"
@@ -6117,6 +6113,7 @@ TEXT	TRANSLATION
 "export grid"	"exportar grade"
 "extent of lake, coded with local water depth"	"extens�o do lago, codificado com profundidade de �gua local"
 "extent of lake, coded with water depth"	"extens�o do lago, codificado com profundidade de �gua"
+"extent to cell size"	""
 "faces"	"faces"
 "faces and wire"	"faces e fio"
 "failed"	"falhou"
@@ -6382,7 +6379,9 @@ TEXT	TRANSLATION
 "lower and upper thresholds for semantic import model, straight vs. curved areas"	"limiares inferiores e superiores para o modelo de importa��o sem�ntica, �reas vs. curvado retas"
 "lower cell's value to neighbours minimum value minus epsilon"	"menor valor da c�lula para os vizinhos valor m�nimo menos epsilon"
 "lower left and upper right center coordinates"	"coordenadas centro-direita para a esquerda e superiores mais baixas"
+"lower left and upper right coordinates"	""
 "lower left and upper right corner coordinates"	"mais baixas coordenadas do canto direito esquerdo e superior"
+"lower left coordinate and number of rows and columns"	""
 "lowest"	"menor"
 "lowest z"	"menor z"
 "m"	"m"
@@ -6420,8 +6419,6 @@ TEXT	TRANSLATION
 "maximum triangle slope (Tarboton 1997)"	"inclina��o m�xima de tri�ngulo (Tarboton 1997)"
 "maximum value"	"valor m�ximo"
 "maximum value of all duplicates"	"valor m�ximo de todas as duplicatas"
-"maximum x value"	"valor m�ximo x"
-"maximum y value"	"valor m�ximo y"
 "mean"	"m�dia"
 "mean value"	"valor m�dio"
 "mean value of all duplicates"	"valor m�dio de todas as duplicatas"
@@ -6444,8 +6441,6 @@ TEXT	TRANSLATION
 "minimum slope angle preserved from one cell to the next, zero results in flat areas [Degree]"	"�ngulo de inclina��o m�nimo preservado de uma c�lula para as pr�ximas, zero resultados em �reas planas [Grau]"
 "minimum value"	"valor m�nimo"
 "minimum value of all duplicates"	"valor m�nimo de todos os duplicados"
-"minimum x value"	"valor m�nimo x"
-"minimum y value"	"valor m�nimo y"
 "minutes"	"minutos"
 "mirrored"	""
 "missing icon tags"	"�cone de marcas faltando"
@@ -6577,8 +6572,6 @@ TEXT	TRANSLATION
 "number of added polygons"	"n�mero de pol�gonos adicionadas"
 "number of categories"	"n�mero de categorias"
 "number of cells"	"n�mero de c�lulas"
-"number of cells in S-N direction"	"n�mero de c�lulas em direc��o S-N"
-"number of cells in W-E direction"	"n�mero de c�lulas em dire��o W-E"
 "number of clusters"	""
 "number of different categories (unique values) within search area"	"n�mero de diferente de categorias (valores originais) dentro da �rea de pesquisa"
 "number of dropped observations"	"o n�mero de observa��es arriou"
@@ -6608,6 +6601,8 @@ TEXT	TRANSLATION
 "one hull per shape part"	"um casco por parte do shape"
 "one layer for all points"	"uma camada para todos os pontos"
 "one multi-line per polygon"	"um multi-linha para pol�gono"
+"one or more grids"	""
+"one or more shapes layers"	""
 "one single (multi-)polygon object"	"um �nico (multi-)objeto pol�gono"
 "one single class specified by class identifier"	"uma �nica classe especificada pelo identificador de classe"
 "one-class SVM"	"uma classe SVM"
@@ -6990,7 +6985,7 @@ TEXT	TRANSLATION
 "warning: number of Eigen vectors and components differs."	"aviso: o n�mero de vetores Eigen e componentes difere."
 "warning: number of component grids and components differs."	"aviso: o n�mero de grades de componentes e componentes difere."
 "weighting factor for slope in index calculation"	"fator de pondera��o para o c�lculo de �ndices em declive"
-"when using weights without support for negative flow: output of the absolute amount of negative flow that occured"	"quando utilizar pesos sem suporte para fluxo negativo: sa�da da quantidade absoluta de fluxo negativo que ocorre"
+"when using weights without support for negative flow: output of the absolute amount of negative flow that occurred"	""
 "when using weights: do not transport negative flow, set it to zero instead; useful e.g. when accumulating measures of water balance."	"quando se utiliza pesos: n�o transportam fluxo negativo, configur�-lo para zero em vez; por exemplo �til ao acumular medidas de balan�o h�drico."
 "whether to train a SVC or SVR model for probability estimates"	"estimativas de probabilidade para para treinar um modelo SVC ou SVR"
 "whether to use the shrinking heuristics"	"se pretende utilizar a heur�stica encolhendo"
@@ -7009,14 +7004,8 @@ TEXT	TRANSLATION
 "x, y"	"x, y"
 "x, y, z"	"x, y, z"
 "x, y, z, m"	"x, y, z, m"
-"xMax"	"xMax"
-"xMin"	"xMin"
-"xMin, yMin, NX, NY"	"xMin, yMin, NX, NY"
-"xMin, yMin, xMax, yMax"	"xMin, yMin, xMax, yMax"
 "y - Values"	"Y - Valores"
 "y Position"	"y Posi��o"
-"yMax"	"yMax"
-"yMin"	"yMin"
 "yellow - white"	"amarelo - branco"
 "yellow > blue"	"amarelo > azul"
 "yellow > green"	"amarelo > verde"
diff --git a/src/saga_core/saga_gui/res/saga.ger.txt b/src/saga_core/saga_gui/res/saga.ger.txt
index a8fddcd..e942786 100644
--- a/src/saga_core/saga_gui/res/saga.ger.txt
+++ b/src/saga_core/saga_gui/res/saga.ger.txt
@@ -441,7 +441,6 @@ TEXT	TRANSLATION
 "Apply"	"Anwenden"
 "Apply Move"	"Wende Bewegung an"
 "Apply changes?"	"�nderungen anwenden?"
-"Apply offset?"	"Versatz zuf�gen?"
 "Apply post-processing filter to remove small holes"	""
 "Approx. Terrain Slope"	"ungef�hre Gel�ndeneigung"
 "Approximate Coordinates of Projection Center"	""
@@ -635,6 +634,7 @@ TEXT	TRANSLATION
 "Borders"	"Grenzen"
 "Bottom"	"Basis"
 "Bottom to Top"	"Unten bis Oben"
+"Bottom-Top"	""
 "Boundaries"	""
 "Boundaries: the simple filter will only operate on grid cells which fall in the same shape"	""
 "Boundary Effect"	""
@@ -732,8 +732,6 @@ TEXT	TRANSLATION
 "Cell Size"	"Zellen Gr��e"
 "Cell Sizes"	"Zellengr��e"
 "Cell size"	"Zellgr��e"
-"CellSize to S-N Extent"	"Zellgr��e in S-N Ausdehnung"
-"CellSize to W-E Extent"	"Zellgr��e in W-E Ausdehnung"
 "Cells"	"Zellen"
 "Cellsize"	"Zellgr��e"
 "Cellsize of the output grid [map units]"	""
@@ -824,7 +822,6 @@ TEXT	TRANSLATION
 "Choose how to handle the NoData value of the output grid."	""
 "Choose how to sort the elevation dataset before sampling"	""
 "Choose if you want to segmentate either on minima or on maxima."	"W�hle bei einer Aufteilung entweder minima oder maxima."
-"Choose method how to adjust input values."	"W�hle Methode wie die Eingabewerte anzupassen sind"
 "Choose the Point Data Record Format you like to use"	"W�hle das zu benutzende Punktdatenaufzeichnungsformat "
 "Choose the activation function used by the neronal network."	""
 "Choose the classification constant to use"	""
@@ -1471,6 +1468,7 @@ TEXT	TRANSLATION
 "Drop Database"	""
 "Drop Point Cloud Attributes"	""
 "Drop Table"	""
+"Dropped Attributes"	""
 "Dummy Grid"	"Attrappenraster"
 "Duplicated Points"	"Duplizierte Punkte"
 "Duplicates"	"Duplikate"
@@ -1642,8 +1640,8 @@ TEXT	TRANSLATION
 "Extended Neighourhood"	"erweiterte Nachbarschaft"
 "Extensions"	""
 "Extent"	"Umfang"
+"Extent Definition"	""
 "Extent [Cut]"	"Umfang [Zuschneiden]"
-"Extent to CellSize"	"Abh�ngig von Zellgr��e"
 "Extents"	"Umfange"
 "Exterior Orientation Parameters"	""
 "Extreme"	"Extrem"
@@ -2079,7 +2077,6 @@ TEXT	TRANSLATION
 "Grid with features to be buffered."	""
 "Grid with the input values to accumulate."	""
 "Grid(s)"	"Raster"
-"Grid(s) to fit extent to"	"Raster, das die Abmessung bestimmt"
 "Gridding"	""
 "Gridding of Points"	""
 "Grids"	"Raster"
@@ -2605,6 +2602,7 @@ TEXT	TRANSLATION
 "Left [/]"	""
 "Left [F3]"	"Links [F3]"
 "Left [Ins]"	""
+"Left-Right"	""
 "Left/Right"	"Links/Rechts"
 "Legend"	"Legende"
 "Legend: Save"	"Legende: Speichern"
@@ -3217,6 +3215,7 @@ TEXT	TRANSLATION
 "No shapes in selection"	"Keine Vektoren ausgew�hlt"
 "No sinks have been detected."	"Keine Senken gefunden."
 "No translation set by user"	"Keine �bersetzung durch den Nutzer ausgew�hlt"
+"No-Data Value"	""
 "NoData Output Grid"	""
 "NoData Value"	"NoDATA Wert"
 "NoData Value: %.6f"	""
@@ -3250,7 +3249,7 @@ TEXT	TRANSLATION
 "Nothing to do be done. Raster splitting is not supported."	""
 "Nothing to do! Merging needs more than one input data set."	""
 "Nothing to do. Raster is already within target range."	""
-"Nothing to do: there is no intersection with additonal grid."	"Nichts zu tun: es gibt keine Schnittmenge mit zus�tzlichem Raster."
+"Nothing to do: there is no intersection with additional grid."	""
 "November"	"November"
 "No|Yes|"	"Nein|Ja|"
 "Number in Latitudinal Direction"	""
@@ -3597,7 +3596,6 @@ TEXT	TRANSLATION
 "Play Loop [Ctrl + L]"	""
 "Play Once [Ctrl + P]"	""
 "Play and Save to Image"	""
-"Please choose a method of module operation."	"Bitte w�hle eine Methode der Moduloperation."
 "Please enter a numeric value:"	"Bitte einen numerischen Wert eingeben:"
 "Please enter a text:"	""
 "Please provide a path for the output files."	""
@@ -4016,6 +4014,7 @@ TEXT	TRANSLATION
 "Reports"	""
 "Representativeness"	"Repr�sentativit�t"
 "Representativeness (Grid)"	"Repr�sentativit�t (Raster)"
+"Resample"	""
 "Resampling"	"Neuberechnung"
 "Resampling Filter"	""
 "Resampling method used when projection is needed"	""
@@ -4351,11 +4350,10 @@ TEXT	TRANSLATION
 "Server Connection"	""
 "Set Coordinate Reference System"	"Setze Koordinaten Referenz System (CRS)"
 "Set Custom NoData"	""
-"Set Range to Minmum/Maximum"	""
+"Set Range to Minimum/Maximum"	""
 "Set Range to Standard Deviation (1.5)"	""
 "Set Range to Standard Deviation (2.0)"	""
 "Set \'false\' to execute the calculation for each point in grid. Set \'true\' tu calculate the flow of one single cell."	"Setze \'false\' um die Berechnung f�r jeden Punkt im Raster durchzuf�hren. Setze \'true\' um die Str�mung f�r eine einzelne Zelle zu berechnen."
-"Set extent by"	"Setze Ausdehnung durch"
 "Set grid extent to grid cells (pixel as area), to grid nodes (pixel as point) or align to grid system."	""
 "Set selected values to no data."	""
 "Set true if you want multipart polygons to become separate polygons."	"Gebe true ein wenn mehrteilige Polygone zu seperaten Polygonen werden sollen"
@@ -4378,8 +4376,6 @@ TEXT	TRANSLATION
 "Shape Type Manager"	"Vektortypverwaltung"
 "Shape file could not be opened."	"Vektordatei konnte nicht ge�ffnet werden."
 "Shape type to generate."	""
-"Shape(s)"	"Vektor(en)"
-"Shape(s) to fit extent to"	"Vektoren die anzugleichen sind an"
 "Shapefile describing the AOI."	""
 "Shapes"	"Vektoren"
 "Shapes Buffer"	"Vektorenpuffer"
@@ -4858,7 +4854,6 @@ TEXT	TRANSLATION
 "Target"	"Ziel"
 "Target Area"	"Zielbereich"
 "Target Areas"	"Zielbereiche"
-"Target Cell Size"	""
 "Target Cellsize"	"Ziel Zellgr��e"
 "Target Coordinate System Error"	"Ziel Koordinatensystemfehler"
 "Target Coordinate System Type Error"	"Ziel Koordinatensystemtypfehler"
@@ -5313,10 +5308,10 @@ TEXT	TRANSLATION
 "Universal Kriging"	"Universal Kriging"
 "Universal Transvers Mercator (UTM)"	"Universal Transversal Merkator (UTM)"
 "Unknown"	"Unbekannt"
+"Unknown EPSG Code"	""
 "Unknown Error"	"Unbekannter Fehler"
 "Unknown LAS header exception!"	""
 "Unknown LAS reader exception!"	""
-"Unkown EPSG Code"	""
 "Unreferenced Grids"	""
 "Unsaturated zone time delay per unit storage deficit [h]"	"Unges�ttigte Zone Zeitverz�gerung pro Einheit Speicherdefizit [h]"
 "Unsorted tool chains"	""
@@ -5385,6 +5380,7 @@ TEXT	TRANSLATION
 "User Defined Filter"	"Benutzerdefinierter Filter"
 "User Defined Kernel"	"Benutzerdefinierter Kernel"
 "User Defined No Data Value"	"Benutzerdefinierte NoData-Werte"
+"User Defined No-Data Value"	""
 "User Defined NoData Value"	"Benutzerdefinierte NoData-Werte"
 "User Defined Polynomial"	"Benutzerdefiniertes Polynomial"
 "User Defined Size"	"Benutzdefinierte Gr��e"
@@ -5622,12 +5618,12 @@ TEXT	TRANSLATION
 "X Component"	"X Komponente"
 "X Coordinates"	"X Koordinate"
 "X Grid 1"	""
+"X Offset"	""
 "X Position"	"X Position"
 "X Range"	"X Bereich"
 "X Values"	"X Werte"
 "X World"	""
 "X is Column ..."	"X ist Spalte ..."
-"X offset"	"X Versatz"
 "X, Y"	""
 "X, Y, Z"	""
 "X, Y, Z, M"	""
@@ -5653,12 +5649,12 @@ TEXT	TRANSLATION
 "Y Component"	"Y Komponente"
 "Y Coordinates"	"Y Koordinate"
 "Y Grid 1"	""
+"Y Offset"	""
 "Y Position"	""
 "Y Range"	"Y Bereich"
 "Y Values"	"Y Werte"
 "Y World"	""
 "Y is Column ..."	"Y ist Spalte..."
-"Y offset"	"Y Versatz"
 "Y-Coordinate"	"Y-Koordinate"
 "Y-Extent"	"Y-Abmessung"
 "Y-Range"	"Y-Bereich"
@@ -5725,9 +5721,6 @@ TEXT	TRANSLATION
 "[deprecated] TIN Viewer"	""
 "[not set]|"	"[nichts ausgew�hlt]|"
 "\n** Error : Invalid parameters **\n"	"\n**Fehler : Ung�ltige Parameter **\n"
-"\nError: Please verify your xMin, yMin, xMax, yMax settings!\n"	"\nFehler: Bitte �berpr�fe deine xMin, yMin, xMax, yMax Einstellungen!\n"
-"\nError: the method Extent by Grid(s) requires grid(s) as input!\n"	"\nFehler: Die Methode Ausdehnung durch Raster erfordert ein Raster als Eingabe!\n"
-"\nError: the method Extent by Shape(s) requires shape(s) as input!\n"	"\nFehler: Die Methode Ausdehnung durch Vektoren erfordert eine Vektordatendatei als Eingabe!\n"
 "\nNumber of Clusters"	"\nAnzahl der Gruppen"
 "\nNumber of Variables"	"\nAnzahl der Variablen"
 "\nRMS  of Residuals (stdfit):\t%f\n"	"\nQuadratwurzel der Reste (stdfit):\t%f\n"
@@ -5846,6 +5839,7 @@ TEXT	TRANSLATION
 "bottom up"	""
 "bottom-left"	""
 "bottom-right"	""
+"bounding box for clipping"	""
 "bright - dark"	"hell - dunkel"
 "built-in"	"eingebaut"
 "by area size"	""
@@ -5867,6 +5861,8 @@ TEXT	TRANSLATION
 "cell"	"Zelle"
 "cell area"	"Zellfl�che"
 "cell size of target grid"	""
+"cell size to bottom-top extent"	""
+"cell size to left-right extent"	""
 "cells"	"Zellen"
 "cells in process"	""
 "cellsize and lower left center coordinates"	""
@@ -6117,6 +6113,7 @@ TEXT	TRANSLATION
 "export grid"	""
 "extent of lake, coded with local water depth"	"Ausdehnung des Sees, kodiert mit lokaler Wassertiefe"
 "extent of lake, coded with water depth"	"Ausdehnung des Sees, kodiert mit der Wassertiefe"
+"extent to cell size"	""
 "faces"	"Ansichten"
 "faces and wire"	"Ansichten und Dr�hte"
 "failed"	"fehlgeschlagen"
@@ -6382,7 +6379,9 @@ TEXT	TRANSLATION
 "lower and upper thresholds for semantic import model, straight vs. curved areas"	""
 "lower cell's value to neighbours minimum value minus epsilon"	""
 "lower left and upper right center coordinates"	""
+"lower left and upper right coordinates"	""
 "lower left and upper right corner coordinates"	""
+"lower left coordinate and number of rows and columns"	""
 "lowest"	""
 "lowest z"	"niedrigster z"
 "m"	""
@@ -6420,8 +6419,6 @@ TEXT	TRANSLATION
 "maximum triangle slope (Tarboton 1997)"	""
 "maximum value"	"Maximalwert"
 "maximum value of all duplicates"	""
-"maximum x value"	"maximaler x-Wert"
-"maximum y value"	"maximaler y-Wert"
 "mean"	"Mittel"
 "mean value"	"Mittelwert"
 "mean value of all duplicates"	""
@@ -6444,8 +6441,6 @@ TEXT	TRANSLATION
 "minimum slope angle preserved from one cell to the next, zero results in flat areas [Degree]"	"minimaler Neigungswinkel der von einer Zelle zur n�chsten erhalten bleibt, null ergibt eine ebene Fl�che [Grad]."
 "minimum value"	"Minimalwert"
 "minimum value of all duplicates"	""
-"minimum x value"	"minimaler x-Wert"
-"minimum y value"	"minimaler y-Wert"
 "minutes"	"Minuten"
 "mirrored"	""
 "missing icon tags"	""
@@ -6577,8 +6572,6 @@ TEXT	TRANSLATION
 "number of added polygons"	"Anzahl zugef�gter Polygone"
 "number of categories"	""
 "number of cells"	""
-"number of cells in S-N direction"	"Anzahl der Zellen in S-N-Richtung"
-"number of cells in W-E direction"	"Anzahl der Zellen in W-E-Richtung"
 "number of clusters"	""
 "number of different categories (unique values) within search area"	""
 "number of dropped observations"	""
@@ -6608,6 +6601,8 @@ TEXT	TRANSLATION
 "one hull per shape part"	"eine H�lle pro Vektorteil"
 "one layer for all points"	"eine Ebene f�r alle Punkte"
 "one multi-line per polygon"	"eine Multilinie pro Polygon"
+"one or more grids"	""
+"one or more shapes layers"	""
 "one single (multi-)polygon object"	"ein einzelnes (multi-)polygon Objekt"
 "one single class specified by class identifier"	"eine einzelne Klasse spezifiziert durch Klassenidentifizierer"
 "one-class SVM"	""
@@ -6990,7 +6985,7 @@ TEXT	TRANSLATION
 "warning: number of Eigen vectors and components differs."	""
 "warning: number of component grids and components differs."	""
 "weighting factor for slope in index calculation"	""
-"when using weights without support for negative flow: output of the absolute amount of negative flow that occured"	""
+"when using weights without support for negative flow: output of the absolute amount of negative flow that occurred"	""
 "when using weights: do not transport negative flow, set it to zero instead; useful e.g. when accumulating measures of water balance."	""
 "whether to train a SVC or SVR model for probability estimates"	""
 "whether to use the shrinking heuristics"	""
@@ -7009,14 +7004,8 @@ TEXT	TRANSLATION
 "x, y"	""
 "x, y, z"	""
 "x, y, z, m"	""
-"xMax"	"xMax"
-"xMin"	"xMin"
-"xMin, yMin, NX, NY"	""
-"xMin, yMin, xMax, yMax"	""
 "y - Values"	"y - Werte"
 "y Position"	"y Position"
-"yMax"	""
-"yMin"	""
 "yellow - white"	"gelb - wei�"
 "yellow > blue"	"gelb > blau"
 "yellow > green"	"gelb > gr�n"
diff --git a/src/saga_core/saga_gui/res/saga.lng.txt b/src/saga_core/saga_gui/res/saga.lng.txt
index 35e63b6..cc83a5a 100644
--- a/src/saga_core/saga_gui/res/saga.lng.txt
+++ b/src/saga_core/saga_gui/res/saga.lng.txt
@@ -441,7 +441,6 @@ TEXT	TRANSLATION
 "Apply"	""
 "Apply Move"	""
 "Apply changes?"	""
-"Apply offset?"	""
 "Apply post-processing filter to remove small holes"	""
 "Approx. Terrain Slope"	""
 "Approximate Coordinates of Projection Center"	""
@@ -635,6 +634,7 @@ TEXT	TRANSLATION
 "Borders"	""
 "Bottom"	""
 "Bottom to Top"	""
+"Bottom-Top"	""
 "Boundaries"	""
 "Boundaries: the simple filter will only operate on grid cells which fall in the same shape"	""
 "Boundary Effect"	""
@@ -732,8 +732,6 @@ TEXT	TRANSLATION
 "Cell Size"	""
 "Cell Sizes"	""
 "Cell size"	""
-"CellSize to S-N Extent"	""
-"CellSize to W-E Extent"	""
 "Cells"	""
 "Cellsize"	""
 "Cellsize of the output grid [map units]"	""
@@ -824,7 +822,6 @@ TEXT	TRANSLATION
 "Choose how to handle the NoData value of the output grid."	""
 "Choose how to sort the elevation dataset before sampling"	""
 "Choose if you want to segmentate either on minima or on maxima."	""
-"Choose method how to adjust input values."	""
 "Choose the Point Data Record Format you like to use"	""
 "Choose the activation function used by the neronal network."	""
 "Choose the classification constant to use"	""
@@ -1471,6 +1468,7 @@ TEXT	TRANSLATION
 "Drop Database"	""
 "Drop Point Cloud Attributes"	""
 "Drop Table"	""
+"Dropped Attributes"	""
 "Dummy Grid"	""
 "Duplicated Points"	""
 "Duplicates"	""
@@ -1642,8 +1640,8 @@ TEXT	TRANSLATION
 "Extended Neighourhood"	""
 "Extensions"	""
 "Extent"	""
+"Extent Definition"	""
 "Extent [Cut]"	""
-"Extent to CellSize"	""
 "Extents"	""
 "Exterior Orientation Parameters"	""
 "Extreme"	""
@@ -2079,7 +2077,6 @@ TEXT	TRANSLATION
 "Grid with features to be buffered."	""
 "Grid with the input values to accumulate."	""
 "Grid(s)"	""
-"Grid(s) to fit extent to"	""
 "Gridding"	""
 "Gridding of Points"	""
 "Grids"	""
@@ -2605,6 +2602,7 @@ TEXT	TRANSLATION
 "Left [/]"	""
 "Left [F3]"	""
 "Left [Ins]"	""
+"Left-Right"	""
 "Left/Right"	""
 "Legend"	""
 "Legend: Save"	""
@@ -3217,6 +3215,7 @@ TEXT	TRANSLATION
 "No shapes in selection"	""
 "No sinks have been detected."	""
 "No translation set by user"	""
+"No-Data Value"	""
 "NoData Output Grid"	""
 "NoData Value"	""
 "NoData Value: %.6f"	""
@@ -3250,7 +3249,7 @@ TEXT	TRANSLATION
 "Nothing to do be done. Raster splitting is not supported."	""
 "Nothing to do! Merging needs more than one input data set."	""
 "Nothing to do. Raster is already within target range."	""
-"Nothing to do: there is no intersection with additonal grid."	""
+"Nothing to do: there is no intersection with additional grid."	""
 "November"	""
 "No|Yes|"	""
 "Number in Latitudinal Direction"	""
@@ -3597,7 +3596,6 @@ TEXT	TRANSLATION
 "Play Loop [Ctrl + L]"	""
 "Play Once [Ctrl + P]"	""
 "Play and Save to Image"	""
-"Please choose a method of module operation."	""
 "Please enter a numeric value:"	""
 "Please enter a text:"	""
 "Please provide a path for the output files."	""
@@ -4016,6 +4014,7 @@ TEXT	TRANSLATION
 "Reports"	""
 "Representativeness"	""
 "Representativeness (Grid)"	""
+"Resample"	""
 "Resampling"	""
 "Resampling Filter"	""
 "Resampling method used when projection is needed"	""
@@ -4351,11 +4350,10 @@ TEXT	TRANSLATION
 "Server Connection"	""
 "Set Coordinate Reference System"	""
 "Set Custom NoData"	""
-"Set Range to Minmum/Maximum"	""
+"Set Range to Minimum/Maximum"	""
 "Set Range to Standard Deviation (1.5)"	""
 "Set Range to Standard Deviation (2.0)"	""
 "Set \'false\' to execute the calculation for each point in grid. Set \'true\' tu calculate the flow of one single cell."	""
-"Set extent by"	""
 "Set grid extent to grid cells (pixel as area), to grid nodes (pixel as point) or align to grid system."	""
 "Set selected values to no data."	""
 "Set true if you want multipart polygons to become separate polygons."	""
@@ -4378,8 +4376,6 @@ TEXT	TRANSLATION
 "Shape Type Manager"	""
 "Shape file could not be opened."	""
 "Shape type to generate."	""
-"Shape(s)"	""
-"Shape(s) to fit extent to"	""
 "Shapefile describing the AOI."	""
 "Shapes"	""
 "Shapes Buffer"	""
@@ -4858,7 +4854,6 @@ TEXT	TRANSLATION
 "Target"	""
 "Target Area"	""
 "Target Areas"	""
-"Target Cell Size"	""
 "Target Cellsize"	""
 "Target Coordinate System Error"	""
 "Target Coordinate System Type Error"	""
@@ -5313,10 +5308,10 @@ TEXT	TRANSLATION
 "Universal Kriging"	""
 "Universal Transvers Mercator (UTM)"	""
 "Unknown"	""
+"Unknown EPSG Code"	""
 "Unknown Error"	""
 "Unknown LAS header exception!"	""
 "Unknown LAS reader exception!"	""
-"Unkown EPSG Code"	""
 "Unreferenced Grids"	""
 "Unsaturated zone time delay per unit storage deficit [h]"	""
 "Unsorted tool chains"	""
@@ -5385,6 +5380,7 @@ TEXT	TRANSLATION
 "User Defined Filter"	""
 "User Defined Kernel"	""
 "User Defined No Data Value"	""
+"User Defined No-Data Value"	""
 "User Defined NoData Value"	""
 "User Defined Polynomial"	""
 "User Defined Size"	""
@@ -5622,12 +5618,12 @@ TEXT	TRANSLATION
 "X Component"	""
 "X Coordinates"	""
 "X Grid 1"	""
+"X Offset"	""
 "X Position"	""
 "X Range"	""
 "X Values"	""
 "X World"	""
 "X is Column ..."	""
-"X offset"	""
 "X, Y"	""
 "X, Y, Z"	""
 "X, Y, Z, M"	""
@@ -5653,12 +5649,12 @@ TEXT	TRANSLATION
 "Y Component"	""
 "Y Coordinates"	""
 "Y Grid 1"	""
+"Y Offset"	""
 "Y Position"	""
 "Y Range"	""
 "Y Values"	""
 "Y World"	""
 "Y is Column ..."	""
-"Y offset"	""
 "Y-Coordinate"	""
 "Y-Extent"	""
 "Y-Range"	""
@@ -5725,9 +5721,6 @@ TEXT	TRANSLATION
 "[deprecated] TIN Viewer"	""
 "[not set]|"	""
 "\n** Error : Invalid parameters **\n"	""
-"\nError: Please verify your xMin, yMin, xMax, yMax settings!\n"	""
-"\nError: the method Extent by Grid(s) requires grid(s) as input!\n"	""
-"\nError: the method Extent by Shape(s) requires shape(s) as input!\n"	""
 "\nNumber of Clusters"	""
 "\nNumber of Variables"	""
 "\nRMS  of Residuals (stdfit):\t%f\n"	""
@@ -5846,6 +5839,7 @@ TEXT	TRANSLATION
 "bottom up"	""
 "bottom-left"	""
 "bottom-right"	""
+"bounding box for clipping"	""
 "bright - dark"	""
 "built-in"	""
 "by area size"	""
@@ -5867,6 +5861,8 @@ TEXT	TRANSLATION
 "cell"	""
 "cell area"	""
 "cell size of target grid"	""
+"cell size to bottom-top extent"	""
+"cell size to left-right extent"	""
 "cells"	""
 "cells in process"	""
 "cellsize and lower left center coordinates"	""
@@ -6117,6 +6113,7 @@ TEXT	TRANSLATION
 "export grid"	""
 "extent of lake, coded with local water depth"	""
 "extent of lake, coded with water depth"	""
+"extent to cell size"	""
 "faces"	""
 "faces and wire"	""
 "failed"	""
@@ -6382,7 +6379,9 @@ TEXT	TRANSLATION
 "lower and upper thresholds for semantic import model, straight vs. curved areas"	""
 "lower cell's value to neighbours minimum value minus epsilon"	""
 "lower left and upper right center coordinates"	""
+"lower left and upper right coordinates"	""
 "lower left and upper right corner coordinates"	""
+"lower left coordinate and number of rows and columns"	""
 "lowest"	""
 "lowest z"	""
 "m"	""
@@ -6420,8 +6419,6 @@ TEXT	TRANSLATION
 "maximum triangle slope (Tarboton 1997)"	""
 "maximum value"	""
 "maximum value of all duplicates"	""
-"maximum x value"	""
-"maximum y value"	""
 "mean"	""
 "mean value"	""
 "mean value of all duplicates"	""
@@ -6444,8 +6441,6 @@ TEXT	TRANSLATION
 "minimum slope angle preserved from one cell to the next, zero results in flat areas [Degree]"	""
 "minimum value"	""
 "minimum value of all duplicates"	""
-"minimum x value"	""
-"minimum y value"	""
 "minutes"	""
 "mirrored"	""
 "missing icon tags"	""
@@ -6577,8 +6572,6 @@ TEXT	TRANSLATION
 "number of added polygons"	""
 "number of categories"	""
 "number of cells"	""
-"number of cells in S-N direction"	""
-"number of cells in W-E direction"	""
 "number of clusters"	""
 "number of different categories (unique values) within search area"	""
 "number of dropped observations"	""
@@ -6608,6 +6601,8 @@ TEXT	TRANSLATION
 "one hull per shape part"	""
 "one layer for all points"	""
 "one multi-line per polygon"	""
+"one or more grids"	""
+"one or more shapes layers"	""
 "one single (multi-)polygon object"	""
 "one single class specified by class identifier"	""
 "one-class SVM"	""
@@ -6990,7 +6985,7 @@ TEXT	TRANSLATION
 "warning: number of Eigen vectors and components differs."	""
 "warning: number of component grids and components differs."	""
 "weighting factor for slope in index calculation"	""
-"when using weights without support for negative flow: output of the absolute amount of negative flow that occured"	""
+"when using weights without support for negative flow: output of the absolute amount of negative flow that occurred"	""
 "when using weights: do not transport negative flow, set it to zero instead; useful e.g. when accumulating measures of water balance."	""
 "whether to train a SVC or SVR model for probability estimates"	""
 "whether to use the shrinking heuristics"	""
@@ -7009,14 +7004,8 @@ TEXT	TRANSLATION
 "x, y"	""
 "x, y, z"	""
 "x, y, z, m"	""
-"xMax"	""
-"xMin"	""
-"xMin, yMin, NX, NY"	""
-"xMin, yMin, xMax, yMax"	""
 "y - Values"	""
 "y Position"	""
-"yMax"	""
-"yMin"	""
 "yellow - white"	""
 "yellow > blue"	""
 "yellow > green"	""
diff --git a/src/saga_core/saga_gui/res_commands.cpp b/src/saga_core/saga_gui/res_commands.cpp
index 73e5735..b01cfe1 100755
--- a/src/saga_core/saga_gui/res_commands.cpp
+++ b/src/saga_core/saga_gui/res_commands.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: res_commands.cpp 2793 2016-02-16 16:51:24Z oconrad $
+ * Version $Id: res_commands.cpp 2882 2016-04-04 15:48:12Z reklov_w $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -210,7 +210,7 @@ wxString CMD_Get_Name(int Cmd_ID)
 	case ID_CMD_SHAPES_EDIT_MERGE:		return( _TL("Merge Selection") );
 	case ID_CMD_SHAPES_EDIT_MOVE:		return( _TL("Move") );
 
-	case ID_CMD_POINTCLOUD_RANGE_MINMAX:		return( _TL("Set Range to Minmum/Maximum") );
+	case ID_CMD_POINTCLOUD_RANGE_MINMAX:		return( _TL("Set Range to Minimum/Maximum") );
 	case ID_CMD_POINTCLOUD_RANGE_STDDEV150:		return( _TL("Set Range to Standard Deviation (1.5)") );
 	case ID_CMD_POINTCLOUD_RANGE_STDDEV200:		return( _TL("Set Range to Standard Deviation (2.0)") );
 
diff --git a/src/saga_core/saga_gui/saga_frame.cpp b/src/saga_core/saga_gui/saga_frame.cpp
index b30dd75..081937b 100755
--- a/src/saga_core/saga_gui/saga_frame.cpp
+++ b/src/saga_core/saga_gui/saga_frame.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: saga_frame.cpp 2865 2016-03-29 14:31:27Z oconrad $
+ * Version $Id: saga_frame.cpp 2891 2016-04-13 12:33:23Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -793,7 +793,7 @@ bool CSAGA_Frame::ProgressBar_Set_Position(int Position)
 //---------------------------------------------------------
 bool CSAGA_Frame::ProgressBar_Set_Position(double Position, double Range)
 {
-	return( ProgressBar_Set_Position(Range < 0.0 ? 0 : (int)(0.5 + 100.0 * Position / Range)) );
+	return( ProgressBar_Set_Position(Range > 0.0 ? (int)(0.5 + 100.0 * Position / Range) : 0) );
 }
 
 //---------------------------------------------------------
diff --git a/src/saga_core/saga_gui/wksp_module.cpp b/src/saga_core/saga_gui/wksp_module.cpp
index 9af396d..566bb16 100755
--- a/src/saga_core/saga_gui/wksp_module.cpp
+++ b/src/saga_core/saga_gui/wksp_module.cpp
@@ -1,5 +1,5 @@
 /**********************************************************
- * Version $Id: wksp_module.cpp 2762 2016-01-22 16:49:22Z oconrad $
+ * Version $Id: wksp_module.cpp 2891 2016-04-13 12:33:23Z oconrad $
  *********************************************************/
 
 ///////////////////////////////////////////////////////////
@@ -361,6 +361,8 @@ bool CWKSP_Module::Execute(bool bDialog)
 
 			bResult		= m_pModule->Execute();
 
+			m_pModule->On_After_Execution();
+
 			g_pACTIVE->Get_Parameters()->Update_Parameters(m_pModule->Get_Parameters(), false);
 
 			if( m_pModule->is_Interactive() )
@@ -731,7 +733,7 @@ void CWKSP_Module::_Get_XML(CSG_MetaData &Tool, CSG_Parameters *pParameters)
 	{
 		CSG_Parameter	*p	= pParameters->Get_Parameter(iParameter);
 
-		if( !p->is_Enabled() )
+		if( !p->is_Enabled() || p->is_Information() )
 		{
 			continue;
 		}
@@ -751,6 +753,7 @@ void CWKSP_Module::_Get_XML(CSG_MetaData &Tool, CSG_Parameters *pParameters)
 		case PARAMETER_TYPE_Int         :
 		case PARAMETER_TYPE_Double      :
 		case PARAMETER_TYPE_Degree      :
+		case PARAMETER_TYPE_Date        :
 		case PARAMETER_TYPE_Range       :
 		case PARAMETER_TYPE_String      :
 		case PARAMETER_TYPE_Text        :
@@ -809,7 +812,7 @@ void CWKSP_Module::_Get_CMD(CSG_String &Command, CSG_Parameters *pParameters)
 	{
 		CSG_Parameter	*p	= pParameters->Get_Parameter(iParameter);
 
-		if( !p->is_Enabled() )
+		if( !p->is_Enabled() || p->is_Information() )
 		{
 			continue;
 		}
@@ -845,6 +848,7 @@ void CWKSP_Module::_Get_CMD(CSG_String &Command, CSG_Parameters *pParameters)
 			Command	+= CSG_String::Format(SG_T(" -%s=%f"), GET_ID2(p, SG_T("MAX")), p->asRange()->Get_HiVal());
 			break;
 
+		case PARAMETER_TYPE_Date:
 		case PARAMETER_TYPE_String:
 		case PARAMETER_TYPE_Text:
 		case PARAMETER_TYPE_FilePath:
@@ -912,7 +916,7 @@ void CWKSP_Module::_Get_Python(CSG_String &Command, CSG_Parameters *pParameters)
 	{
 		CSG_Parameter	*p	= pParameters->Get_Parameter(iParameter);
 
-		if( !p->is_Enabled() )
+		if( !p->is_Enabled() || p->is_Information() )
 		{
 			continue;
 		}
@@ -946,6 +950,7 @@ void CWKSP_Module::_Get_Python(CSG_String &Command, CSG_Parameters *pParameters)
 			Command	+= CSG_String::Format(SG_T("    Parms.Get(unicode('%s')).asRange().Set_HiVal(%f)\n"), p->Get_Identifier(), p->asRange()->Get_HiVal());
 			break;
 
+		case PARAMETER_TYPE_Date:
 		case PARAMETER_TYPE_String:
 		case PARAMETER_TYPE_Text:
 		case PARAMETER_TYPE_FilePath:
diff --git a/src/scripting/helper/make_saga_release.bat b/src/scripting/helper/make_saga_release.bat
index 09fec26..c3fdaad 100755
--- a/src/scripting/helper/make_saga_release.bat
+++ b/src/scripting/helper/make_saga_release.bat
@@ -3,7 +3,7 @@
 REM ___________________________________
 SET SAGA_VER_MAJOR=2
 SET SAGA_VER_MINOR=2
-SET SAGA_VER_RELEASE=6
+SET SAGA_VER_RELEASE=7
 
 SET SAGA_VERSION=saga_%SAGA_VER_MAJOR%.%SAGA_VER_MINOR%.%SAGA_VER_RELEASE%
 SET SVN__VERSION=%SAGA_VER_MAJOR%-%SAGA_VER_MINOR%-%SAGA_VER_RELEASE%
diff --git a/src/scripting/toolchains/imagery_lczc.xml b/src/scripting/toolchains/imagery_lczc.xml
index 865db75..6a990f2 100755
--- a/src/scripting/toolchains/imagery_lczc.xml
+++ b/src/scripting/toolchains/imagery_lczc.xml
@@ -104,7 +104,7 @@
 				<input	id="LUT">CLASS_DEF</input>
 				<option id="FILE" varname="true">FILE_LCZC</option>
 				<option id="COLOURING">3</option>
-				<option id="INTERPOL">false</option>
+				<option id="RESAMPLING">false</option>
 				<option id="OUTPUT">2</option>
 			</tool>
 		</condition>
@@ -125,7 +125,7 @@
 					<input	id="LUT">CLASS_DEF</input>
 					<option id="FILE" varname="true">FILE_LCZC_FILTERED</option>
 					<option id="COLOURING">3</option>
-					<option id="INTERPOL">false</option>
+					<option id="RESAMPLING">false</option>
 					<option id="OUTPUT">2</option>
 				</tool>
 			</condition>
diff --git a/src/scripting/toolchains/twi.xml b/src/scripting/toolchains/twi.xml
index 1b623c2..92eee08 100755
--- a/src/scripting/toolchains/twi.xml
+++ b/src/scripting/toolchains/twi.xml
@@ -29,12 +29,12 @@
     </tool>
     <tool library="ta_hydrology" module="0" name="Catchment Area (Top-Down)">
       <input id="ELEVATION">DEM_PREPROC</input>
-      <output id="CAREA">CAREA</output>
+      <output id="FLOW">FLOW</output>
       <option id="METHOD" varname="true">FLOW_METHOD</option>
     </tool>
     <tool library="ta_hydrology" module="19" name="Flow Width and Specific Catchment Area">
       <input id="DEM">DEM_PREPROC</input>
-      <input id="TCA">CAREA</input>
+      <input id="TCA">FLOW</input>
       <output id="SCA">SCA</output>
       <option id="METHOD">2</option>
     </tool>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/saga.git



More information about the Pkg-grass-devel mailing list